SCALE-RM
Functions/Subroutines
mod_atmos_phy_sf_driver Module Reference

module ATMOSPHERE / Physics Surface fluxes More...

Functions/Subroutines

subroutine, public atmos_phy_sf_driver_setup
 Setup. More...
 
subroutine, public atmos_phy_sf_driver_calc_tendency (update_flag)
 calculation tendency More...
 
subroutine history_output
 

Detailed Description

module ATMOSPHERE / Physics Surface fluxes

Description
Flux from/to bottom boundary of atmosphere (surface)
Author
Team SCALE
NAMELIST
  • No namelist group
History Output
namedescriptionunitvariable
SFLX_{TRACER_NAME} surface {TRACER_NAME} flux (merged);
{TRACER_NAME} depends on the physics schemes, e.g., QV, QC, QR.
kg/m2/s SFLX_QTRC
GHFLX ground heat flux (merged) W/m2 SFLX_GH
LHFLX latent heat flux (merged) W/m2 SFLX_LH
MSLP mean sea-level pressure Pa MSLP
MUFLX u-momentum flux (merged) kg/m/s2 SFLX_MU
MVFLX v-momentum flux (merged) kg/m/s2 SFLX_MV
MWFLX w-momentum flux (merged) kg/m/s2 SFLX_MW
Q2 2m specific humidity kg/kg Q2
SFC_ALB_IR_dif surface albedo (IR; diffuse; merged) 1 SFC_albedo
SFC_ALB_IR_dir surface albedo (IR; direct; merged) 1 SFC_albedo
SFC_ALB_NIR_dif surface albedo (NIR; diffuse; merged) 1 SFC_albedo
SFC_ALB_NIR_dir surface albedo (NIR; direct; merged) 1 SFC_albedo
SFC_ALB_VIS_dif surface albedo (VIS; diffuse; merged) 1 SFC_albedo
SFC_ALB_VIS_dir surface albedo (VIS; direct; merged) 1 SFC_albedo
SFC_DENS surface atmospheric density kg/m3 SFC_DENS
SFC_PRES surface atmospheric pressure Pa SFC_PRES
SFC_TEMP surface skin temperature (merged) K SFC_TEMP
SFC_Z0E roughness length (vapor) m SFC_Z0E
SFC_Z0H roughness length (heat) m SFC_Z0H
SFC_Z0M roughness length (momentum) m SFC_Z0M
SHFLX sensible heat flux (merged) W/m2 SFLX_SH
T2 2m air temperature K T2
U10 10m x-wind m/s U10
U10m 10m eastward wind m/s U10m
Uabs10 10m absolute wind m/s Uabs10
V10 10m y-wind m/s V10
V10m 10m northward wind m/s V10m

Function/Subroutine Documentation

◆ atmos_phy_sf_driver_setup()

subroutine, public mod_atmos_phy_sf_driver::atmos_phy_sf_driver_setup ( )

Setup.

Definition at line 50 of file mod_atmos_phy_sf_driver.F90.

References scale_atmos_phy_sf_bulk::atmos_phy_sf_bulk_setup(), scale_atmos_phy_sf_const::atmos_phy_sf_const_setup(), mod_atmos_phy_sf_vars::atmos_phy_sf_sfc_z0e, mod_atmos_phy_sf_vars::atmos_phy_sf_sfc_z0h, mod_atmos_phy_sf_vars::atmos_phy_sf_sfc_z0m, mod_atmos_phy_sf_vars::atmos_phy_sf_sflx_lh, mod_atmos_phy_sf_vars::atmos_phy_sf_sflx_mu, mod_atmos_phy_sf_vars::atmos_phy_sf_sflx_mv, mod_atmos_phy_sf_vars::atmos_phy_sf_sflx_mw, mod_atmos_phy_sf_vars::atmos_phy_sf_sflx_qtrc, mod_atmos_phy_sf_vars::atmos_phy_sf_sflx_sh, mod_atmos_admin::atmos_phy_sf_type, mod_atmos_admin::atmos_sw_phy_sf, mod_cpl_admin::cpl_sw, and scale_prc::prc_abort().

Referenced by mod_atmos_driver::atmos_driver_setup().

50  use scale_prc, only: &
51  prc_abort
52  use scale_atmos_phy_sf_bulk, only: &
54  use scale_atmos_phy_sf_const, only: &
56  use mod_atmos_admin, only: &
59  use mod_atmos_phy_sf_vars, only: &
60  sfc_z0m => atmos_phy_sf_sfc_z0m, &
61  sfc_z0h => atmos_phy_sf_sfc_z0h, &
62  sfc_z0e => atmos_phy_sf_sfc_z0e, &
63  sflx_mw => atmos_phy_sf_sflx_mw, &
64  sflx_mu => atmos_phy_sf_sflx_mu, &
65  sflx_mv => atmos_phy_sf_sflx_mv, &
66  sflx_sh => atmos_phy_sf_sflx_sh, &
67  sflx_lh => atmos_phy_sf_sflx_lh, &
68  sflx_qtrc => atmos_phy_sf_sflx_qtrc
69  use mod_cpl_admin, only: &
70  cpl_sw
71  implicit none
72  !---------------------------------------------------------------------------
73 
74  log_newline
75  log_info("ATMOS_PHY_SF_driver_setup",*) 'Setup'
76 
77  if ( atmos_sw_phy_sf ) then
78 
79  if ( cpl_sw ) then
80  log_info("ATMOS_PHY_SF_driver_setup",*) 'Coupler is enabled.'
81  else
82  ! setup library component
83  select case( atmos_phy_sf_type )
84  case ( 'BULK' )
86  case ( 'CONST' )
88  case default
89  log_error("ATMOS_PHY_SF_driver_setup",*) 'invalid Surface flux type(', trim(atmos_phy_sf_type), '). CHECK!'
90  call prc_abort
91  end select
92  endif
93 
94  else
95 
96  log_info("ATMOS_PHY_SF_driver_setup",*) 'this component is never called.'
97  log_info("ATMOS_PHY_SF_driver_setup",*) 'surface fluxes are set to zero.'
98  sflx_mw(:,:) = 0.0_rp
99  sflx_mu(:,:) = 0.0_rp
100  sflx_mv(:,:) = 0.0_rp
101  sflx_sh(:,:) = 0.0_rp
102  sflx_lh(:,:) = 0.0_rp
103  log_info("ATMOS_PHY_SF_driver_setup",*) 'SFC_TEMP, SFC_albedo is set in ATMOS_PHY_SF_vars.'
104 
105  endif
106 
107  sflx_qtrc(:,:,:) = 0.0_rp
108 
109  return
module ATMOS admin
real(rp), dimension(:,:), allocatable, public atmos_phy_sf_sfc_z0e
real(rp), dimension(:,:), allocatable, public atmos_phy_sf_sflx_mw
real(rp), dimension(:,:), allocatable, public atmos_phy_sf_sflx_mv
character(len=h_short), public atmos_phy_sf_type
module ATMOSPHERIC Surface Variables
real(rp), dimension(:,:), allocatable, public atmos_phy_sf_sfc_z0h
module PROCESS
Definition: scale_prc.F90:11
real(rp), dimension(:,:), allocatable, public atmos_phy_sf_sflx_lh
module atmosphere / physics / surface / bulk
real(rp), dimension(:,:,:), allocatable, target, public atmos_phy_sf_sflx_qtrc
subroutine, public atmos_phy_sf_bulk_setup
Setup.
logical, public atmos_sw_phy_sf
logical, public cpl_sw
subroutine, public prc_abort
Abort Process.
Definition: scale_prc.F90:338
subroutine, public atmos_phy_sf_const_setup
Setup.
real(rp), dimension(:,:), allocatable, public atmos_phy_sf_sflx_sh
module atmosphere / physics / surface / const
real(rp), dimension(:,:), allocatable, public atmos_phy_sf_sfc_z0m
module Coupler admin
real(rp), dimension(:,:), allocatable, public atmos_phy_sf_sflx_mu
Here is the call graph for this function:
Here is the caller graph for this function:

◆ atmos_phy_sf_driver_calc_tendency()

subroutine, public mod_atmos_phy_sf_driver::atmos_phy_sf_driver_calc_tendency ( logical, intent(in)  update_flag)

calculation tendency

Definition at line 115 of file mod_atmos_phy_sf_driver.F90.

References scale_atmos_bottom::atmos_bottom_estimate(), scale_atmos_grid_cartesc_real::atmos_grid_cartesc_real_area, scale_atmos_grid_cartesc_real::atmos_grid_cartesc_real_cz, scale_atmos_grid_cartesc_real::atmos_grid_cartesc_real_fz, scale_atmos_grid_cartesc_real::atmos_grid_cartesc_real_totarea, scale_atmos_grid_cartesc_real::atmos_grid_cartesc_real_z1, scale_atmos_hydrometeor::atmos_hydrometeor_dry, mod_atmos_phy_bl_vars::atmos_phy_bl_zi, mod_atmos_phy_rd_vars::atmos_phy_rd_sflx_lw_dn, mod_atmos_phy_rd_vars::atmos_phy_rd_sflx_sw_dn, scale_atmos_phy_sf_bulk::atmos_phy_sf_bulk_flux(), scale_atmos_phy_sf_const::atmos_phy_sf_const_flux(), mod_atmos_phy_sf_vars::atmos_phy_sf_dens_t, mod_atmos_phy_sf_vars::atmos_phy_sf_l_mo, mod_atmos_phy_sf_vars::atmos_phy_sf_momz_t, mod_atmos_phy_sf_vars::atmos_phy_sf_q2, mod_atmos_phy_sf_vars::atmos_phy_sf_rhoh, mod_atmos_phy_sf_vars::atmos_phy_sf_rhoq_t, mod_atmos_phy_sf_vars::atmos_phy_sf_rhot_t, mod_atmos_phy_sf_vars::atmos_phy_sf_rhou_t, mod_atmos_phy_sf_vars::atmos_phy_sf_rhov_t, mod_atmos_phy_sf_vars::atmos_phy_sf_sfc_dens, mod_atmos_phy_sf_vars::atmos_phy_sf_sfc_pres, mod_atmos_phy_sf_vars::atmos_phy_sf_sfc_temp, mod_atmos_phy_sf_vars::atmos_phy_sf_sfc_z0e, mod_atmos_phy_sf_vars::atmos_phy_sf_sfc_z0h, mod_atmos_phy_sf_vars::atmos_phy_sf_sfc_z0m, mod_atmos_phy_sf_vars::atmos_phy_sf_sflx_gh, mod_atmos_phy_sf_vars::atmos_phy_sf_sflx_lh, mod_atmos_phy_sf_vars::atmos_phy_sf_sflx_mu, mod_atmos_phy_sf_vars::atmos_phy_sf_sflx_mv, mod_atmos_phy_sf_vars::atmos_phy_sf_sflx_mw, mod_atmos_phy_sf_vars::atmos_phy_sf_sflx_qtrc, mod_atmos_phy_sf_vars::atmos_phy_sf_sflx_sh, mod_atmos_phy_sf_vars::atmos_phy_sf_t2, mod_atmos_admin::atmos_phy_sf_type, mod_atmos_phy_sf_vars::atmos_phy_sf_u10, mod_atmos_phy_sf_vars::atmos_phy_sf_v10, scale_const::const_cpdry, scale_const::const_eps, scale_const::const_grav, scale_const::const_karman, mod_cpl_admin::cpl_sw, mod_atmos_vars::dens, mod_atmos_vars::dens_av, mod_atmos_vars::dens_tp, history_output(), scale_atmos_hydrometeor::i_qv, scale_atmos_grid_cartesc_index::ia, scale_atmos_grid_cartesc_index::ie, scale_atmos_grid_cartesc_index::ieb, scale_atmos_grid_cartesc_index::is, scale_atmos_grid_cartesc_index::isb, scale_atmos_grid_cartesc_index::ja, scale_atmos_grid_cartesc_index::je, scale_atmos_grid_cartesc_index::jeb, scale_atmos_grid_cartesc_index::js, scale_atmos_grid_cartesc_index::jsb, scale_atmos_grid_cartesc_index::ka, scale_atmos_grid_cartesc_index::ke, scale_atmos_grid_cartesc_index::ks, mod_atmos_vars::momz_tp, mod_atmos_vars::pott, mod_atmos_vars::pres, scale_tracer::qa, mod_atmos_vars::qv, mod_atmos_vars::rhoh_p, mod_atmos_vars::rhoq_tp, mod_atmos_vars::rhot, mod_atmos_vars::rhot_av, mod_atmos_vars::rhot_tp, mod_atmos_vars::rhou_tp, mod_atmos_vars::rhov_tp, scale_statistics::statistics_checktotal, mod_atmos_vars::temp, scale_time::time_dtsec_atmos_phy_sf, scale_topography::topo_zsfc, scale_tracer::tracer_mass, scale_tracer::tracer_name, mod_atmos_vars::u, mod_atmos_vars::v, and mod_atmos_vars::w.

Referenced by mod_atmos_driver::atmos_driver_calc_tendency(), and mod_atmos_driver::atmos_driver_calc_tendency_from_sflux().

115  use scale_const, only: &
116  eps => const_eps, &
117  grav => const_grav, &
118  karman => const_karman, &
119  cpdry => const_cpdry
120  use scale_atmos_grid_cartesc_real, only: &
126  use scale_topography, only: &
127  topo_zsfc
128  use scale_time, only: &
129  dt_sf => time_dtsec_atmos_phy_sf
130  use scale_statistics, only: &
132  statistics_total
133  use scale_atmos_bottom, only: &
134  bottom_estimate => atmos_bottom_estimate
135  use scale_atmos_hydrometeor, only: &
137  i_qv
138  use scale_atmos_phy_sf_bulk, only: &
140  use scale_atmos_phy_sf_const, only: &
142  use mod_atmos_admin, only: &
144  use mod_atmos_vars, only: &
145  dens => dens_av, &
146  rhot => rhot_av, &
147  pott, &
148  temp, &
149  pres, &
150  w, &
151  u, &
152  v, &
153  qv, &
154  dens_t => dens_tp, &
155  momz_t => momz_tp, &
156  rhou_t => rhou_tp, &
157  rhov_t => rhov_tp, &
158  rhoh => rhoh_p, &
159  rhot_t => rhot_tp, &
160  rhoq_t => rhoq_tp
161  use mod_atmos_phy_rd_vars, only: &
162  sflx_lw_dn => atmos_phy_rd_sflx_lw_dn, &
163  sflx_sw_dn => atmos_phy_rd_sflx_sw_dn
164  use mod_atmos_phy_bl_vars, only: &
165  pbl_zi => atmos_phy_bl_zi
166  use mod_atmos_phy_sf_vars, only: &
167  dens_t_sf => atmos_phy_sf_dens_t, &
168  momz_t_sf => atmos_phy_sf_momz_t, &
169  rhou_t_sf => atmos_phy_sf_rhou_t, &
170  rhov_t_sf => atmos_phy_sf_rhov_t, &
171  rhoh_sf => atmos_phy_sf_rhoh, &
172  rhot_t_sf => atmos_phy_sf_rhot_t, &
173  rhoq_t_sf => atmos_phy_sf_rhoq_t, &
174  sfc_dens => atmos_phy_sf_sfc_dens, &
175  sfc_pres => atmos_phy_sf_sfc_pres, &
176  sfc_temp => atmos_phy_sf_sfc_temp, &
177  sfc_z0m => atmos_phy_sf_sfc_z0m, &
178  sfc_z0h => atmos_phy_sf_sfc_z0h, &
179  sfc_z0e => atmos_phy_sf_sfc_z0e, &
180  sflx_mw => atmos_phy_sf_sflx_mw, &
181  sflx_mu => atmos_phy_sf_sflx_mu, &
182  sflx_mv => atmos_phy_sf_sflx_mv, &
183  sflx_sh => atmos_phy_sf_sflx_sh, &
184  sflx_lh => atmos_phy_sf_sflx_lh, &
185  sflx_gh => atmos_phy_sf_sflx_gh, &
186  sflx_qtrc => atmos_phy_sf_sflx_qtrc, &
187  u10 => atmos_phy_sf_u10, &
188  v10 => atmos_phy_sf_v10, &
189  t2 => atmos_phy_sf_t2, &
190  q2 => atmos_phy_sf_q2, &
191  l_mo => atmos_phy_sf_l_mo
192  use mod_cpl_admin, only: &
193  cpl_sw
194  implicit none
195 
196  logical, intent(in) :: update_flag
197 
198  real(RP) :: atm_w (ia,ja)
199  real(RP) :: atm_u (ia,ja)
200  real(RP) :: atm_v (ia,ja)
201  real(RP) :: atm_dens(ia,ja)
202  real(RP) :: atm_temp(ia,ja)
203  real(RP) :: atm_pres(ia,ja)
204  real(RP) :: atm_qv (ia,ja)
205  real(RP) :: sflx_qv (ia,ja)
206  real(RP) :: us, sflx_pt
207  real(RP) :: work
208 
209  integer :: i, j, iq
210  !---------------------------------------------------------------------------
211 
212  if ( update_flag ) then
213 
214  ! update surface density, surface pressure
215  call bottom_estimate( ka, ks, ke, & ! [IN]
216  ia, isb, ieb, & ! [IN]
217  ja, jsb, jeb, & ! [IN]
218  dens(:,:,:), pres(:,:,:), & ! [IN]
219  cz(:,:,:), topo_zsfc(:,:), z1(:,:), & ! [IN]
220  sfc_dens(:,:), sfc_pres(:,:) ) ! [OUT]
221 
222  if ( .NOT. cpl_sw ) then
223 
224  !$omp parallel do
225  do j = jsb, jeb
226  do i = isb, ieb
227  atm_w(i,j) = w(ks,i,j)
228  atm_u(i,j) = u(ks,i,j)
229  atm_v(i,j) = v(ks,i,j)
230  atm_dens(i,j) = dens(ks,i,j)
231  atm_temp(i,j) = temp(ks,i,j)
232  atm_pres(i,j) = pres(ks,i,j)
233  atm_qv(i,j) = qv(ks,i,j)
234  enddo
235  enddo
236 
237  select case ( atmos_phy_sf_type )
238  case ( 'BULK' )
239 
240  call atmos_phy_sf_bulk_flux( ia, isb, ieb, ja, jsb, jeb, & ! [IN]
241  atm_w(:,:), atm_u(:,:), atm_v(:,:), & ! [IN]
242  atm_temp(:,:), atm_pres(:,:), atm_qv(:,:), & ! [IN]
243  sfc_dens(:,:), sfc_temp(:,:), sfc_pres(:,:), & ! [IN]
244  sfc_z0m(:,:), sfc_z0h(:,:), sfc_z0e(:,:), & ! [IN]
245  pbl_zi(:,:), z1(:,:), & ! [IN]
246  sflx_mw(:,:), sflx_mu(:,:), sflx_mv(:,:), & ! [OUT]
247  sflx_sh(:,:), sflx_lh(:,:), sflx_qv(:,:), & ! [OUT]
248  u10(:,:), v10(:,:), t2(:,:), q2(:,:) ) ! [OUT]
249 
250  case ( 'CONST' )
251 
252  call atmos_phy_sf_const_flux( ia, is, ie, ja, js, je, & ! [IN]
253  atm_w(:,:), atm_u(:,:), atm_v(:,:), atm_temp(:,:), & ! [IN]
254  z1(:,:), sfc_dens(:,:), & ! [IN]
255  sflx_mw(:,:), sflx_mu(:,:), sflx_mv(:,:), & ! [OUT]
256  sflx_sh(:,:), sflx_lh(:,:), sflx_qv(:,:), & ! [OUT]
257  u10(:,:), v10(:,:) ) ! [OUT]
258  t2(:,:) = atm_temp(:,:)
259  q2(:,:) = atm_qv(:,:)
260 
261  end select
262 
263  if ( .NOT. atmos_hydrometeor_dry ) then
264  sflx_qtrc(:,:,i_qv) = sflx_qv(:,:)
265  endif
266 
267  endif
268 
269  ! temtative
270  !$omp parallel do private(us,sflx_pt)
271  do j = js, je
272  do i = is, ie
273  us = max( 1.e-6_rp, sqrt( sqrt( sflx_mu(i,j)**2 + sflx_mv(i,j)**2 ) / dens(ks,i,j) ) ) ! frictional velocity
274 
275  sflx_pt = sflx_sh(i,j) / ( cpdry * dens(ks,i,j) ) * pott(ks,i,j) / temp(ks,i,j)
276  sflx_pt = sign( max(abs(sflx_pt), eps), sflx_pt )
277 
278  l_mo(i,j) = - us**3 * pott(ks,i,j) / ( karman * grav * sflx_pt )
279  enddo
280  enddo
281 
282  call history_output
283 
284 !OCL XFILL
285  !$omp parallel do
286  do j = js, je
287  do i = is, ie
288  momz_t_sf(i,j) = sflx_mw(i,j) / ( cz(ks+1,i,j) - cz(ks,i,j) )
289  rhou_t_sf(i,j) = sflx_mu(i,j) / ( fz(ks,i,j) - fz(ks-1,i,j) )
290  rhov_t_sf(i,j) = sflx_mv(i,j) / ( fz(ks,i,j) - fz(ks-1,i,j) )
291  rhoh_sf(i,j) = sflx_sh(i,j) / ( fz(ks,i,j) - fz(ks-1,i,j) )
292  dens_t_sf(i,j) = 0.0_rp
293  rhot_t_sf(i,j) = 0.0_rp
294  enddo
295  enddo
296 
297  if ( .NOT. atmos_hydrometeor_dry ) then
298  !$omp parallel do &
299  !$omp private(work)
300  do j = js, je
301  do i = is, ie
302  do iq = 1, qa
303  work = sflx_qtrc(i,j,iq) / ( fz(ks,i,j) - fz(ks-1,i,j) )
304 
305  rhoq_t_sf(i,j,iq) = work
306  dens_t_sf(i,j) = dens_t_sf(i,j) + work * tracer_mass(iq)
307  rhot_t_sf(i,j) = rhot_t_sf(i,j) + work * tracer_mass(iq) * rhot(ks,i,j) / dens(ks,i,j)
308  enddo
309  enddo
310  enddo
311  endif
312 
313  endif
314 
315  !$omp parallel do
316  do j = js, je
317  do i = is, ie
318  momz_t(ks,i,j) = momz_t(ks,i,j) + momz_t_sf(i,j)
319  rhou_t(ks,i,j) = rhou_t(ks,i,j) + rhou_t_sf(i,j)
320  rhov_t(ks,i,j) = rhov_t(ks,i,j) + rhov_t_sf(i,j)
321  rhoh(ks,i,j) = rhoh(ks,i,j) + rhoh_sf(i,j)
322  enddo
323  enddo
324 
325  if ( .NOT. atmos_hydrometeor_dry ) then
326  !$omp parallel do
327  do j = js, je
328  do i = is, ie
329  do iq = 1, qa
330  rhoq_t(ks,i,j,iq) = rhoq_t(ks,i,j,iq) + rhoq_t_sf(i,j,iq)
331  enddo
332  dens_t(ks,i,j) = dens_t(ks,i,j) + dens_t_sf(i,j)
333  rhot_t(ks,i,j) = rhot_t(ks,i,j) + rhot_t_sf(i,j)
334  enddo
335  enddo
336  endif
337 
338  if ( statistics_checktotal ) then
339 
340  if ( .NOT. atmos_hydrometeor_dry ) then
341  do iq = 1, qa
342  call statistics_total( ia, is, ie, ja, js, je, &
343  sflx_qtrc(:,:,iq), 'SFLX_'//trim(tracer_name(iq)), &
346  enddo
347  endif
348 
349  call statistics_total( ia, is, ie, ja, js, je, &
350  dens_t_sf(:,:), 'DENS_t_SF', &
353  call statistics_total( ia, is, ie, ja, js, je, &
354  momz_t_sf(:,:), 'MOMZ_t_SF', &
357  call statistics_total( ia, is, ie, ja, js, je, &
358  rhou_t_sf(:,:), 'RHOU_t_SF', &
361  call statistics_total( ia, is, ie, ja, js, je, &
362  rhov_t_sf(:,:), 'RHOV_t_SF', &
365  call statistics_total( ia, is, ie, ja, js, je, &
366  rhoh_sf(:,:), 'RHOH_SF', &
369 
370  if ( .NOT. atmos_hydrometeor_dry ) then
371  call statistics_total( ia, is, ie, ja, js, je, &
372  rhot_t_sf(:,:), 'RHOT_t_SF', &
375  do iq = 1, qa
376  call statistics_total( ia, is, ie, ja, js, je, &
377  rhoq_t_sf(:,:,iq), trim(tracer_name(iq))//'_t_SF', &
380  enddo
381  endif
382  endif
383 
384  return
module ATMOS admin
real(rp), dimension(:,:,:), allocatable, public dens_tp
real(rp), dimension(:,:), allocatable, public atmos_phy_sf_rhou_t
subroutine, public atmos_bottom_estimate(KA, KS, KE, IA, IS, IE, JA, JS, JE, DENS, PRES, CZ, Zsfc, Z1, SFC_DENS, SFC_PRES)
Calc bottom boundary of atmosphere (just above surface)
real(rp), public const_cpdry
specific heat (dry air,constant pressure) [J/kg/K]
Definition: scale_const.F90:56
real(rp), dimension(:,:), allocatable, public atmos_phy_sf_rhot_t
real(rp), dimension(:,:), allocatable, public atmos_phy_sf_sfc_z0e
real(rp), dimension(:,:), allocatable, public atmos_phy_sf_rhoh
real(rp), dimension(:,:), allocatable, public atmos_phy_sf_sflx_mw
real(rp), dimension(:,:,:), allocatable, target, public rhot
real(rp), dimension(:,:), allocatable, public atmos_phy_sf_momz_t
real(rp), dimension(:,:), allocatable, public atmos_phy_sf_v10
module atmosphere / bottom boundary extrapolation
module ATMOSPHERIC Variables
real(rp), dimension(:,:,:), allocatable, public rhot_tp
real(rp), dimension(:,:), allocatable, public atmos_phy_sf_sfc_temp
real(rp), dimension(:,:,:), allocatable, public atmos_grid_cartesc_real_fz
geopotential height [m] (wxy)
real(rp), dimension(:,:,:), allocatable, target, public dens
real(rp), dimension(:,:), allocatable, public atmos_phy_sf_sflx_mv
real(rp), parameter, public const_karman
von Karman constant
Definition: scale_const.F90:50
real(rp), dimension(:,:,:), allocatable, public rhov_tp
logical, public statistics_checktotal
calc&report variable totals to logfile?
real(rp), dimension(:,:,:), allocatable, public rhoh_p
subroutine, public atmos_phy_sf_const_flux(IA, IS, IE, JA, JS, JE, ATM_W, ATM_U, ATM_V, ATM_TEMP, ATM_Z1, SFC_DENS, SFLX_MW, SFLX_MU, SFLX_MV, SFLX_SH, SFLX_LH, SFLX_QV, U10, V10)
Constant flux.
subroutine, public atmos_phy_sf_bulk_flux(IA, IS, IE, JA, JS, JE, ATM_W, ATM_U, ATM_V, ATM_TEMP, ATM_PRES, ATM_QV, SFC_DENS, SFC_TEMP, SFC_PRES, SFC_Z0M, SFC_Z0H, SFC_Z0E, PBL, ATM_Z1, SFLX_MW, SFLX_MU, SFLX_MV, SFLX_SH, SFLX_LH, SFLX_QV, U10, V10, T2, Q2)
Calculate surface flux.
real(rp), dimension(:,:), allocatable, public atmos_phy_rd_sflx_lw_dn
real(rp), dimension(:,:), allocatable, public atmos_grid_cartesc_real_z1
Height of the lowermost grid from surface (cell center) [m].
real(rp), dimension(:,:), allocatable, public atmos_phy_sf_l_mo
module Atmosphere / Physics Radiation
real(rp), dimension(:,:,:), allocatable, public atmos_phy_sf_rhoq_t
character(len=h_short), public atmos_phy_sf_type
module ATMOSPHERIC Surface Variables
real(rp), dimension(:,:), allocatable, public atmos_phy_bl_zi
real(rp), dimension(:,:), allocatable, public atmos_phy_sf_u10
module atmosphere / hydrometeor
real(rp), dimension(:,:), allocatable, public atmos_phy_sf_sfc_z0h
real(rp), dimension(:,:), allocatable, public atmos_phy_rd_sflx_sw_dn
real(rp), dimension(:,:,:,:), allocatable, public rhoq_tp
real(rp), dimension(:,:,:), allocatable, target, public temp
real(rp), dimension(:,:,:), allocatable, target, public w
real(rp), dimension(:,:), allocatable, public atmos_phy_sf_sflx_lh
real(rp), public const_grav
standard acceleration of gravity [m/s2]
Definition: scale_const.F90:46
module atmosphere / physics / PBL
module atmosphere / physics / surface / bulk
real(rp), dimension(:,:), allocatable, public atmos_phy_sf_sfc_pres
module TIME
Definition: scale_time.F90:16
real(rp), dimension(:,:,:), allocatable, target, public atmos_phy_sf_sflx_qtrc
real(dp), public time_dtsec_atmos_phy_sf
time interval of physics(surface flux) [sec]
Definition: scale_time.F90:45
real(rp), dimension(:,:,:), allocatable, target, public pott
real(rp), dimension(:,:,:), pointer, public dens_av
logical, public cpl_sw
real(rp), dimension(:,:,:), allocatable, pointer, target, public qv
module CONSTANT
Definition: scale_const.F90:11
real(rp), dimension(:,:,:), allocatable, target, public v
real(rp), dimension(:,:,:), allocatable, target, public u
real(rp), dimension(:,:,:), allocatable, public momz_tp
real(rp), dimension(:,:), allocatable, public atmos_phy_sf_sflx_sh
real(rp), dimension(:,:,:), allocatable, public atmos_grid_cartesc_real_cz
geopotential height [m] (zxy)
real(rp), public const_eps
small number
Definition: scale_const.F90:33
real(rp), dimension(:,:), allocatable, public atmos_phy_sf_q2
module Atmosphere GRID CartesC Real(real space)
real(rp), dimension(:,:), allocatable, public atmos_grid_cartesc_real_area
horizontal area ( xy, normal z) [m2]
module atmosphere / physics / surface / const
real(rp), dimension(:,:), allocatable, public topo_zsfc
absolute ground height [m]
real(rp), dimension(:,:,:), allocatable, public rhou_tp
module TOPOGRAPHY
real(rp), dimension(:,:), allocatable, public atmos_phy_sf_rhov_t
real(rp), dimension(:,:), allocatable, public atmos_phy_sf_sfc_z0m
real(rp), dimension(:,:), allocatable, public atmos_phy_sf_t2
module Statistics
real(rp), dimension(:,:), allocatable, public atmos_phy_sf_dens_t
real(rp), dimension(:,:,:), pointer, public rhot_av
real(rp), dimension(:,:), allocatable, public atmos_phy_sf_sfc_dens
module Coupler admin
real(rp), dimension(:,:), allocatable, public atmos_phy_sf_sflx_gh
real(rp), dimension(:,:), allocatable, public atmos_phy_sf_sflx_mu
real(rp), dimension(:,:,:), allocatable, target, public pres
real(rp), public atmos_grid_cartesc_real_totarea
total area (xy, local) [m2]
Here is the call graph for this function:
Here is the caller graph for this function:

◆ history_output()

subroutine mod_atmos_phy_sf_driver::history_output ( )

Definition at line 389 of file mod_atmos_phy_sf_driver.F90.

References scale_atmos_grid_cartesc_metric::atmos_grid_cartesc_metric_rotc, scale_atmos_grid_cartesc_real::atmos_grid_cartesc_real_cz, scale_atmos_hydrometeor::atmos_hydrometeor_dry, mod_atmos_phy_sf_vars::atmos_phy_sf_q2, mod_atmos_phy_sf_vars::atmos_phy_sf_sfc_albedo, mod_atmos_phy_sf_vars::atmos_phy_sf_sfc_dens, mod_atmos_phy_sf_vars::atmos_phy_sf_sfc_pres, mod_atmos_phy_sf_vars::atmos_phy_sf_sfc_temp, mod_atmos_phy_sf_vars::atmos_phy_sf_sfc_z0e, mod_atmos_phy_sf_vars::atmos_phy_sf_sfc_z0h, mod_atmos_phy_sf_vars::atmos_phy_sf_sfc_z0m, mod_atmos_phy_sf_vars::atmos_phy_sf_sflx_gh, mod_atmos_phy_sf_vars::atmos_phy_sf_sflx_lh, mod_atmos_phy_sf_vars::atmos_phy_sf_sflx_mu, mod_atmos_phy_sf_vars::atmos_phy_sf_sflx_mv, mod_atmos_phy_sf_vars::atmos_phy_sf_sflx_mw, mod_atmos_phy_sf_vars::atmos_phy_sf_sflx_qtrc, mod_atmos_phy_sf_vars::atmos_phy_sf_sflx_sh, mod_atmos_phy_sf_vars::atmos_phy_sf_t2, mod_atmos_phy_sf_vars::atmos_phy_sf_u10, mod_atmos_phy_sf_vars::atmos_phy_sf_v10, scale_const::const_undef, scale_atmos_hydrometeor::i_qv, scale_cpl_sfc_index::i_r_diffuse, scale_cpl_sfc_index::i_r_direct, scale_cpl_sfc_index::i_r_ir, scale_cpl_sfc_index::i_r_nir, scale_cpl_sfc_index::i_r_vis, scale_atmos_grid_cartesc_index::ia, scale_atmos_grid_cartesc_index::ie, scale_atmos_grid_cartesc_index::is, scale_atmos_grid_cartesc_index::ja, scale_atmos_grid_cartesc_index::je, scale_atmos_grid_cartesc_index::js, scale_atmos_grid_cartesc_index::ka, scale_atmos_grid_cartesc_index::ke, scale_atmos_grid_cartesc_index::ks, mod_atmos_vars::pres, scale_tracer::qa, mod_atmos_vars::qv, mod_atmos_vars::temp, and scale_tracer::tracer_name.

Referenced by atmos_phy_sf_driver_calc_tendency().

389  use scale_const, only: &
390  undef => const_undef
391  use scale_file_history, only: &
392  file_history_in
393  use scale_atmos_hydrostatic, only: &
394  barometric_law_mslp => atmos_hydrostatic_barometric_law_mslp
395  use scale_atmos_grid_cartesc_real, only: &
396  real_cz => atmos_grid_cartesc_real_cz
399  use scale_atmos_hydrometeor, only: &
401  i_qv
402  use mod_atmos_vars, only: &
403  temp, &
404  pres, &
405  qv
406  use mod_atmos_phy_sf_vars, only: &
407  sfc_dens => atmos_phy_sf_sfc_dens, &
408  sfc_pres => atmos_phy_sf_sfc_pres, &
409  sfc_temp => atmos_phy_sf_sfc_temp, &
410  sfc_albedo => atmos_phy_sf_sfc_albedo, &
411  sfc_z0m => atmos_phy_sf_sfc_z0m, &
412  sfc_z0h => atmos_phy_sf_sfc_z0h, &
413  sfc_z0e => atmos_phy_sf_sfc_z0e, &
414  sflx_mw => atmos_phy_sf_sflx_mw, &
415  sflx_mu => atmos_phy_sf_sflx_mu, &
416  sflx_mv => atmos_phy_sf_sflx_mv, &
417  sflx_sh => atmos_phy_sf_sflx_sh, &
418  sflx_lh => atmos_phy_sf_sflx_lh, &
419  sflx_gh => atmos_phy_sf_sflx_gh, &
420  sflx_qtrc => atmos_phy_sf_sflx_qtrc, &
421  u10 => atmos_phy_sf_u10, &
422  v10 => atmos_phy_sf_v10, &
423  t2 => atmos_phy_sf_t2, &
424  q2 => atmos_phy_sf_q2
425  implicit none
426 
427  real(RP) :: mslp (ia,ja) ! mean sea-level pressure [Pa]
428  real(RP) :: uabs10(ia,ja) ! 10m absolute wind [m/s]
429  real(RP) :: u10m (ia,ja) ! eastward 10m wind
430  real(RP) :: v10m (ia,ja) ! northward 10m wind
431 
432  integer :: i, j, iq
433  !---------------------------------------------------------------------------
434 
435 !OCL XFILL
436  !$omp parallel do
437  do j = js, je
438  do i = is, ie
439  uabs10(i,j) = sqrt( u10(i,j)**2 + v10(i,j)**2 )
440  u10m(i,j) = u10(i,j) * rotc(i,j,1) - v10(i,j) * rotc(i,j,2)
441  v10m(i,j) = u10(i,j) * rotc(i,j,2) + v10(i,j) * rotc(i,j,1)
442  enddo
443  enddo
444 
445 
446  call barometric_law_mslp( ka, ks, ke, ia, is, ie, ja, js, je, & ! [IN]
447  pres(:,:,:), temp(:,:,:), qv(:,:,:), & ! [IN]
448  real_cz(:,:,:), & ! [IN]
449  mslp(:,:) ) ! [OUT]
450 
451  call file_history_in( sfc_dens(:,:), 'SFC_DENS', 'surface atmospheric density', 'kg/m3' )
452  call file_history_in( sfc_pres(:,:), 'SFC_PRES', 'surface atmospheric pressure', 'Pa' )
453  call file_history_in( sfc_temp(:,:), 'SFC_TEMP', 'surface skin temperature (merged)', 'K' )
454  call file_history_in( sfc_albedo(:,:,i_r_direct ,i_r_ir ), 'SFC_ALB_IR_dir' , 'surface albedo (IR; direct; merged)', '1' , fill_halo=.true. )
455  call file_history_in( sfc_albedo(:,:,i_r_diffuse,i_r_ir ), 'SFC_ALB_IR_dif' , 'surface albedo (IR; diffuse; merged)', '1' , fill_halo=.true. )
456  call file_history_in( sfc_albedo(:,:,i_r_direct ,i_r_nir), 'SFC_ALB_NIR_dir', 'surface albedo (NIR; direct; merged)', '1' , fill_halo=.true. )
457  call file_history_in( sfc_albedo(:,:,i_r_diffuse,i_r_nir), 'SFC_ALB_NIR_dif', 'surface albedo (NIR; diffuse; merged)', '1' , fill_halo=.true. )
458  call file_history_in( sfc_albedo(:,:,i_r_direct ,i_r_vis), 'SFC_ALB_VIS_dir', 'surface albedo (VIS; direct; merged)', '1' , fill_halo=.true. )
459  call file_history_in( sfc_albedo(:,:,i_r_diffuse,i_r_vis), 'SFC_ALB_VIS_dif', 'surface albedo (VIS; diffuse; merged)', '1' , fill_halo=.true. )
460  call file_history_in( sfc_z0m(:,:), 'SFC_Z0M', 'roughness length (momentum)', 'm' , fill_halo=.true. )
461  call file_history_in( sfc_z0h(:,:), 'SFC_Z0H', 'roughness length (heat)', 'm' , fill_halo=.true. )
462  call file_history_in( sfc_z0e(:,:), 'SFC_Z0E', 'roughness length (vapor)', 'm' , fill_halo=.true. )
463  call file_history_in( sflx_mw(:,:), 'MWFLX', 'w-momentum flux (merged)', 'kg/m/s2' )
464  call file_history_in( sflx_mu(:,:), 'MUFLX', 'u-momentum flux (merged)', 'kg/m/s2' )
465  call file_history_in( sflx_mv(:,:), 'MVFLX', 'v-momentum flux (merged)', 'kg/m/s2' )
466  call file_history_in( sflx_sh(:,:), 'SHFLX', 'sensible heat flux (merged)', 'W/m2' , fill_halo=.true. )
467  call file_history_in( sflx_lh(:,:), 'LHFLX', 'latent heat flux (merged)', 'W/m2' , fill_halo=.true. )
468  call file_history_in( sflx_gh(:,:), 'GHFLX', 'ground heat flux (merged)', 'W/m2' , fill_halo=.true. )
469  if ( .NOT. atmos_hydrometeor_dry ) then
470  do iq = 1, qa
471  call file_history_in( sflx_qtrc(:,:,iq), 'SFLX_'//trim(tracer_name(iq)), &
472  'surface '//trim(tracer_name(iq))//' flux (merged)', &
473  'kg/m2/s' , fill_halo=.true. )
474  enddo
475  endif
476  call file_history_in( uabs10(:,:), 'Uabs10', '10m absolute wind', 'm/s' , fill_halo=.true. )
477  call file_history_in( u10(:,:), 'U10', '10m x-wind', 'm/s' , fill_halo=.true. )
478  call file_history_in( v10(:,:), 'V10', '10m y-wind', 'm/s' , fill_halo=.true. )
479  call file_history_in( u10m(:,:), 'U10m', '10m eastward wind', 'm/s' , fill_halo=.true. )
480  call file_history_in( v10m(:,:), 'V10m', '10m northward wind', 'm/s' , fill_halo=.true. )
481  call file_history_in( t2(:,:), 'T2 ', '2m air temperature', 'K' , fill_halo=.true. )
482  call file_history_in( q2(:,:), 'Q2 ', '2m specific humidity', 'kg/kg', fill_halo=.true. )
483  call file_history_in( mslp(:,:), 'MSLP', 'mean sea-level pressure', 'Pa' , fill_halo=.true., standard_name='air_pressure_at_mean_sea_level' )
484 
485  return
real(rp), dimension(:,:), allocatable, public atmos_phy_sf_sfc_z0e
real(rp), dimension(:,:), allocatable, public atmos_phy_sf_sflx_mw
real(rp), dimension(:,:), allocatable, public atmos_phy_sf_v10
module Atmosphere Grid CartesianC metirc
module ATMOSPHERIC Variables
real(rp), dimension(:,:), allocatable, public atmos_phy_sf_sfc_temp
real(rp), dimension(:,:), allocatable, public atmos_phy_sf_sflx_mv
real(rp), public const_undef
Definition: scale_const.F90:41
module ATMOSPHERIC Surface Variables
real(rp), dimension(:,:,:,:), allocatable, public atmos_phy_sf_sfc_albedo
real(rp), dimension(:,:), allocatable, public atmos_phy_sf_u10
module atmosphere / hydrometeor
real(rp), dimension(:,:), allocatable, public atmos_phy_sf_sfc_z0h
real(rp), dimension(:,:,:), allocatable, target, public temp
real(rp), dimension(:,:), allocatable, public atmos_phy_sf_sflx_lh
module atmosphere / hydrostatic barance
real(rp), dimension(:,:), allocatable, public atmos_phy_sf_sfc_pres
real(rp), dimension(:,:,:), allocatable, target, public atmos_phy_sf_sflx_qtrc
real(rp), dimension(:,:,:), allocatable, public atmos_grid_cartesc_metric_rotc
rotation coefficient
real(rp), dimension(:,:,:), allocatable, pointer, target, public qv
module CONSTANT
Definition: scale_const.F90:11
real(rp), dimension(:,:), allocatable, public atmos_phy_sf_sflx_sh
real(rp), dimension(:,:,:), allocatable, public atmos_grid_cartesc_real_cz
geopotential height [m] (zxy)
real(rp), dimension(:,:), allocatable, public atmos_phy_sf_q2
module Atmosphere GRID CartesC Real(real space)
real(rp), dimension(:,:), allocatable, public atmos_phy_sf_sfc_z0m
real(rp), dimension(:,:), allocatable, public atmos_phy_sf_t2
real(rp), dimension(:,:), allocatable, public atmos_phy_sf_sfc_dens
real(rp), dimension(:,:), allocatable, public atmos_phy_sf_sflx_gh
real(rp), dimension(:,:), allocatable, public atmos_phy_sf_sflx_mu
real(rp), dimension(:,:,:), allocatable, target, public pres
module file_history
Here is the caller graph for this function: