interp_temperature_w Function

public function interp_temperature_w(i, j, k)

Uses

  • proc~~interp_temperature_w~~UsesGraph proc~interp_temperature_w interp_temperature_w module~modfields modfields proc~interp_temperature_w->module~modfields decomp_2d decomp_2d module~modfields->decomp_2d

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: i
integer, intent(in) :: j
integer, intent(in) :: k

Return Value real


Source Code

   real function interp_temperature_w(i, j, k)
     ! interpolates the temperature at w-grid location i,j,k
     use modfields, only :  thl0
     integer, intent(in) :: i, j, k

     !interp_temperature_w = 0.5 * (thl0(i,j,k) + thl0(i,j,k-1))
     interp_temperature_w = 0.5 * (thl0(i,j,k  )*mask_c(i,j,k  )*(2.-mask_c(i,j,k-1)) &
                                +  thl0(i,j,k-1)*mask_c(i,j,k-1)*(2.-mask_c(i,j,k  )))

     return
   end function interp_temperature_w