SCALE-RM
mod_atmos_phy_rd_driver.F90
Go to the documentation of this file.
1 !-------------------------------------------------------------------------------
10 !-------------------------------------------------------------------------------
11 #include "scalelib.h"
13  !-----------------------------------------------------------------------------
14  !
15  !++ used modules
16  !
17  use scale_precision
18  use scale_io
19  use scale_prof
21  use scale_tracer
23  !-----------------------------------------------------------------------------
24  implicit none
25  private
26  !-----------------------------------------------------------------------------
27  !
28  !++ Public procedure
29  !
32 
33  !-----------------------------------------------------------------------------
34  !
35  !++ Public parameters & variables
36  !
37  !-----------------------------------------------------------------------------
38  !
39  !++ Private procedure
40  !
41  !-----------------------------------------------------------------------------
42  !
43  !++ Private parameters & variables
44  !
45  logical, private :: RD_use_PBL_cloud = .false.
46 
47  !-----------------------------------------------------------------------------
48 contains
49  !-----------------------------------------------------------------------------
51  subroutine atmos_phy_rd_driver_setup
52  use scale_prc, only: &
53  prc_abort
54  use scale_atmos_phy_rd_mstrnx, only: &
56  use scale_atmos_phy_rd_offline, only: &
58  use scale_atmos_grid_cartesc, only: &
59  cz => atmos_grid_cartesc_cz, &
61  use mod_atmos_admin, only: &
64  use mod_atmos_phy_rd_vars, only: &
65  sfcflx_lw_up => atmos_phy_rd_sflx_lw_up, &
66  sfcflx_lw_dn => atmos_phy_rd_sflx_lw_dn, &
67  sfcflx_sw_up => atmos_phy_rd_sflx_sw_up, &
68  sfcflx_sw_dn => atmos_phy_rd_sflx_sw_dn, &
69  tomflx_lw_up => atmos_phy_rd_tomflx_lw_up, &
70  tomflx_lw_dn => atmos_phy_rd_tomflx_lw_dn, &
71  tomflx_sw_up => atmos_phy_rd_tomflx_sw_up, &
72  tomflx_sw_dn => atmos_phy_rd_tomflx_sw_dn, &
73  sflx_rad_dn => atmos_phy_rd_sflx_down, &
74  solins => atmos_phy_rd_solins, &
75  cossza => atmos_phy_rd_cossza
76  implicit none
77 
78  namelist / param_atmos_phy_rd / &
79  rd_use_pbl_cloud
80 
81  integer :: ierr
82  !---------------------------------------------------------------------------
83 
84  log_newline
85  log_info("ATMOS_PHY_RD_driver_setup",*) 'Setup'
86 
87  if ( atmos_sw_phy_rd ) then
88 
89  !--- read namelist
90  rewind(io_fid_conf)
91  read(io_fid_conf,nml=param_atmos_phy_rd,iostat=ierr)
92  if( ierr < 0 ) then !--- missing
93  log_info("ATMOS_PHY_RD_driver_setup",*) 'Not found namelist. Default used.'
94  elseif( ierr > 0 ) then !--- fatal error
95  log_error("ATMOS_PHY_RD_driver_setup",*) 'Not appropriate names in namelist PARAM_ATMOS_PHY_RD. Check!'
96  call prc_abort
97  endif
98  log_nml(param_atmos_phy_rd)
99 
100  select case ( atmos_phy_rd_type )
101  case ( "MSTRNX" )
102  call atmos_phy_rd_mstrnx_setup( ka, ks, ke, cz(:), fz(:) )
103  case ( "OFFLINE" )
105  case default
106  log_error("ATMOS_PHY_RD_driver_setup",*) 'invalid Radiation type(', trim(atmos_phy_rd_type), '). CHECK!'
107  call prc_abort
108  end select
109 
110  else
111 
112  log_info("ATMOS_PHY_RD_driver_setup",*) 'this component is never called.'
113  log_info("ATMOS_PHY_RD_driver_setup",*) 'radiation fluxes are set to zero.'
114  sfcflx_lw_up(:,:) = 0.0_rp
115  sfcflx_lw_dn(:,:) = 0.0_rp
116  sfcflx_sw_up(:,:) = 0.0_rp
117  sfcflx_sw_dn(:,:) = 0.0_rp
118  tomflx_lw_up(:,:) = 0.0_rp
119  tomflx_lw_dn(:,:) = 0.0_rp
120  tomflx_sw_up(:,:) = 0.0_rp
121  tomflx_sw_dn(:,:) = 0.0_rp
122  sflx_rad_dn(:,:,:,:) = 0.0_rp
123  solins(:,:) = 0.0_rp
124  cossza(:,:) = 0.0_rp
125 
126  endif
127 
128  return
129  end subroutine atmos_phy_rd_driver_setup
130 
131  !-----------------------------------------------------------------------------
133  subroutine atmos_phy_rd_driver_calc_tendency( update_flag )
134  use scale_const, only: &
135  eps => const_eps
136  use scale_atmos_grid_cartesc_real, only: &
137  real_cz => atmos_grid_cartesc_real_cz, &
138  real_fz => atmos_grid_cartesc_real_fz, &
139  real_lon => atmos_grid_cartesc_real_lon, &
140  real_lat => atmos_grid_cartesc_real_lat, &
143  use scale_landuse, only: &
144  fact_ocean => landuse_fact_ocean, &
145  fact_land => landuse_fact_land, &
146  fact_urban => landuse_fact_urban
147  use scale_time, only: &
148  time_nowdate, &
149  time_nowdaysec, &
151  use scale_statistics, only: &
153  statistics_total
154  use scale_file_history, only: &
155  file_history_in
156  use scale_atmos_hydrometeor, only: &
157  n_hyd, &
158  i_hc, &
159  i_hi
160  use scale_atmos_aerosol, only: &
161  n_ae
162  use mod_atmos_admin, only: &
164  use scale_atmos_solarins, only: &
165  solarins_insolation => atmos_solarins_insolation
166  use scale_atmos_phy_rd_mstrnx, only: &
168  use scale_atmos_phy_rd_offline, only: &
170  use scale_atmos_phy_rd_common, only: &
172  i_sw, &
173  i_lw, &
174  i_dn, &
175  i_up
176  use mod_atmos_vars, only: &
177  temp, &
178  pres, &
179  qv, &
180  cvtot, &
181  dens => dens_av, &
182  qtrc => qtrc_av, &
183  rhoh => rhoh_p
184  use mod_atmos_phy_sf_vars, only: &
185  sfc_temp => atmos_phy_sf_sfc_temp, &
186  sfc_albedo => atmos_phy_sf_sfc_albedo
187  use mod_atmos_phy_rd_vars, only: &
188  rhoh_rd => atmos_phy_rd_rhoh, &
189  sfcflx_lw_up => atmos_phy_rd_sflx_lw_up, &
190  sfcflx_lw_dn => atmos_phy_rd_sflx_lw_dn, &
191  sfcflx_sw_up => atmos_phy_rd_sflx_sw_up, &
192  sfcflx_sw_dn => atmos_phy_rd_sflx_sw_dn, &
193  tomflx_lw_up => atmos_phy_rd_tomflx_lw_up, &
194  tomflx_lw_dn => atmos_phy_rd_tomflx_lw_dn, &
195  tomflx_sw_up => atmos_phy_rd_tomflx_sw_up, &
196  tomflx_sw_dn => atmos_phy_rd_tomflx_sw_dn, &
197  sflx_rad_dn => atmos_phy_rd_sflx_down, &
198  solins => atmos_phy_rd_solins, &
199  cossza => atmos_phy_rd_cossza
200  use mod_atmos_phy_bl_vars, only: &
201  atmos_phy_bl_zi, &
202  atmos_phy_bl_ql, &
204  use mod_atmos_vars, only: &
205  atmos_vars_get_diagnostic
206  use mod_atmos_phy_mp_vars, only: &
208  use mod_atmos_phy_ae_vars, only: &
210  implicit none
211 
212  logical, intent(in) :: update_flag
213 
214  real(rp) :: temp_t (ka,ia,ja,3)
215  real(rp) :: flux_rad (ka,ia,ja,2,2,2)
216  real(rp) :: flux_rad_top( ia,ja,2,2,2)
217 
218  real(rp) :: dtau_s (ka,ia,ja) ! 0.67 micron cloud optical depth
219  real(rp) :: dem_s (ka,ia,ja) ! 10.5 micron cloud emissivity
220 
221  real(rp) :: flux_up (ka,ia,ja,2)
222  real(rp) :: flux_dn (ka,ia,ja,2)
223  real(rp) :: flux_net (ka,ia,ja,2)
224  real(rp) :: flux_net_sfc( ia,ja,2)
225  real(rp) :: flux_net_toa( ia,ja,2)
226  real(rp) :: flux_net_tom( ia,ja,2)
227 
228  real(rp) :: toaflx_lw_up(ia,ja)
229  real(rp) :: toaflx_lw_dn(ia,ja)
230  real(rp) :: toaflx_sw_up(ia,ja)
231  real(rp) :: toaflx_sw_dn(ia,ja)
232 
233  real(rp) :: sfcflx_lw_up_c(ia,ja)
234  real(rp) :: sfcflx_lw_dn_c(ia,ja)
235  real(rp) :: sfcflx_sw_up_c(ia,ja)
236  real(rp) :: sfcflx_sw_dn_c(ia,ja)
237  real(rp) :: toaflx_lw_up_c(ia,ja)
238  real(rp) :: toaflx_lw_dn_c(ia,ja)
239  real(rp) :: toaflx_sw_up_c(ia,ja)
240  real(rp) :: toaflx_sw_dn_c(ia,ja)
241  real(rp) :: tomflx_lw_up_c(ia,ja)
242  real(rp) :: tomflx_lw_dn_c(ia,ja)
243  real(rp) :: tomflx_sw_up_c(ia,ja)
244  real(rp) :: tomflx_sw_dn_c(ia,ja)
245 
246  real(rp) :: cldfrac(ka,ia,ja)
247  real(rp) :: mp_re (ka,ia,ja,n_hyd)
248  real(rp) :: mp_qe (ka,ia,ja,n_hyd)
249  real(rp) :: ae_re (ka,ia,ja,n_ae)
250  real(rp) :: ae_qe (ka,ia,ja,n_ae)
251 
252  real(rp) :: rh(ka,ia,ja)
253 
254  integer :: k, i, j
255  !---------------------------------------------------------------------------
256 
257  if ( update_flag ) then
258 
259  call solarins_insolation( ia, is, ie, ja, js, je, &
260  real_lon(:,:), real_lat(:,:), & ! [IN]
261  time_nowdate(:), time_offset_year, & ! [IN]
262  solins(:,:), cossza(:,:) ) ! [OUT]
263 
265  dens(:,:,:), temp(:,:,:), qtrc(:,:,:,:), & ! [IN]
266  cldfrac=cldfrac, re=mp_re, qe=mp_qe ) ! [IN]
267 
268  if ( rd_use_pbl_cloud ) then
269  !$omp parallel do
270  do j = js, je
271  do i = is, ie
272  do k = ks, ke
273  if ( real_cz(k,i,j) < atmos_phy_bl_zi(i,j) + real_fz(ks-1,i,j) ) then
274  cldfrac(k,i,j) = atmos_phy_bl_cldfrac(k,i,j)
275  if ( atmos_phy_bl_cldfrac(k,i,j) > eps ) then
276  mp_qe(k,i,j,i_hc) = atmos_phy_bl_ql(k,i,j) / atmos_phy_bl_cldfrac(k,i,j)
277  else
278  mp_qe(k,i,j,i_hc) = 0.0_rp
279  end if
280  mp_qe(k,i,j,i_hi) = 0.0_rp
281  mp_re(k,i,j,i_hc) = 8.0e-4
282  end if
283  end do
284  end do
285  end do
286 
287  end if
288 
289  call atmos_vars_get_diagnostic( "RH", rh )
291  qtrc(:,:,:,:), rh(:,:,:), & ! [IN]
292  re=ae_re, qe=ae_qe ) ! [IN]
293 
294 
295  select case ( atmos_phy_rd_type )
296  case ( "MSTRNX" )
297 
299  ka, ks, ke, ia, is, ie, ja, js, je, &
300  dens(:,:,:), temp(:,:,:), pres(:,:,:), qv(:,:,:), & ! [IN]
301  real_cz(:,:,:), real_fz(:,:,:), & ! [IN]
302  fact_ocean(:,:), fact_land(:,:), fact_urban(:,:), & ! [IN]
303  sfc_temp(:,:), sfc_albedo(:,:,:,:), & ! [IN]
304  solins(:,:), cossza(:,:), & ! [IN]
305  cldfrac(:,:,:), mp_re(:,:,:,:), mp_qe(:,:,:,:), & ! [IN]
306  ae_re(:,:,:,:), ae_qe(:,:,:,:), & ! [IN]
307  flux_rad(:,:,:,:,:,:), & ! [OUT]
308  flux_rad_top(:,:,:,:,:), sflx_rad_dn(:,:,:,:), & ! [OUT]
309  dtau_s = dtau_s(:,:,:), dem_s = dem_s(:,:,:) ) ! [OUT]
310 
311  case ( "OFFLINE" )
312 
314  ka, ks, ke, ia, is, ie, ja, js, je, &
315  time_nowdaysec, & ! [IN]
316  flux_rad(:,:,:,:,:,2), & ! [OUT]
317  sflx_rad_dn(:,:,:,:) ) ! [OUT]
318  flux_rad(:,:,:,:,:,1) = 0.0_rp ! clear sky
319  flux_rad_top(:,:,:,:,:) = 0.0_rp
320  dtau_s(:,:,:) = 0.0_rp
321  dem_s(:,:,:) = 0.0_rp
322 
323  end select
324 
325 
326  ! surface
327 !OCL XFILL
328  do j = js, je
329  do i = is, ie
330  ! for clear-sky
331  sfcflx_lw_up_c(i,j) = flux_rad(ks-1,i,j,i_lw,i_up,1)
332  sfcflx_lw_dn_c(i,j) = flux_rad(ks-1,i,j,i_lw,i_dn,1)
333  sfcflx_sw_up_c(i,j) = flux_rad(ks-1,i,j,i_sw,i_up,1)
334  sfcflx_sw_dn_c(i,j) = flux_rad(ks-1,i,j,i_sw,i_dn,1)
335  ! for all-sky
336  sfcflx_lw_up(i,j) = flux_rad(ks-1,i,j,i_lw,i_up,2)
337  sfcflx_lw_dn(i,j) = flux_rad(ks-1,i,j,i_lw,i_dn,2)
338  sfcflx_sw_up(i,j) = flux_rad(ks-1,i,j,i_sw,i_up,2)
339  sfcflx_sw_dn(i,j) = flux_rad(ks-1,i,j,i_sw,i_dn,2)
340 
341  flux_net_sfc(i,j,i_lw) = sfcflx_lw_up(i,j) - sfcflx_lw_dn(i,j)
342  flux_net_sfc(i,j,i_sw) = sfcflx_sw_up(i,j) - sfcflx_sw_dn(i,j)
343  enddo
344  enddo
345 
346  ! top of the atmosphere
347 !OCL XFILL
348  do j = js, je
349  do i = is, ie
350  ! for clear-sky
351  toaflx_lw_up_c(i,j) = flux_rad_top(i,j,i_lw,i_up,1)
352  toaflx_lw_dn_c(i,j) = flux_rad_top(i,j,i_lw,i_dn,1)
353  toaflx_sw_up_c(i,j) = flux_rad_top(i,j,i_sw,i_up,1)
354  toaflx_sw_dn_c(i,j) = flux_rad_top(i,j,i_sw,i_dn,1)
355  ! for all-sky
356  toaflx_lw_up(i,j) = flux_rad_top(i,j,i_lw,i_up,2)
357  toaflx_lw_dn(i,j) = flux_rad_top(i,j,i_lw,i_dn,2)
358  toaflx_sw_up(i,j) = flux_rad_top(i,j,i_sw,i_up,2)
359  toaflx_sw_dn(i,j) = flux_rad_top(i,j,i_sw,i_dn,2)
360 
361  flux_net_toa(i,j,i_lw) = toaflx_lw_up(i,j) - toaflx_lw_dn(i,j)
362  flux_net_toa(i,j,i_sw) = toaflx_sw_up(i,j) - toaflx_sw_dn(i,j)
363  enddo
364  enddo
365 
366  ! top of the model
367 !OCL XFILL
368  do j = js, je
369  do i = is, ie
370  ! for clear-sky
371  tomflx_lw_up_c(i,j) = flux_rad(ke,i,j,i_lw,i_up,1)
372  tomflx_lw_dn_c(i,j) = flux_rad(ke,i,j,i_lw,i_dn,1)
373  tomflx_sw_up_c(i,j) = flux_rad(ke,i,j,i_sw,i_up,1)
374  tomflx_sw_dn_c(i,j) = flux_rad(ke,i,j,i_sw,i_dn,1)
375  ! for all-sky
376  tomflx_lw_up(i,j) = flux_rad(ke,i,j,i_lw,i_up,2)
377  tomflx_lw_dn(i,j) = flux_rad(ke,i,j,i_lw,i_dn,2)
378  tomflx_sw_up(i,j) = flux_rad(ke,i,j,i_sw,i_up,2)
379  tomflx_sw_dn(i,j) = flux_rad(ke,i,j,i_sw,i_dn,2)
380 
381  flux_net_tom(i,j,i_lw) = tomflx_lw_up(i,j) - tomflx_lw_dn(i,j)
382  flux_net_tom(i,j,i_sw) = tomflx_sw_up(i,j) - tomflx_sw_dn(i,j)
383  enddo
384  enddo
385 
386 !OCL XFILL
387  do j = js, je
388  do i = is, ie
389  do k = ks, ke
390  flux_up(k,i,j,i_lw) = 0.5_rp * ( flux_rad(k-1,i,j,i_lw,i_up,2) + flux_rad(k,i,j,i_lw,i_up,2) )
391  flux_dn(k,i,j,i_lw) = 0.5_rp * ( flux_rad(k-1,i,j,i_lw,i_dn,2) + flux_rad(k,i,j,i_lw,i_dn,2) )
392  flux_up(k,i,j,i_sw) = 0.5_rp * ( flux_rad(k-1,i,j,i_sw,i_up,2) + flux_rad(k,i,j,i_sw,i_up,2) )
393  flux_dn(k,i,j,i_sw) = 0.5_rp * ( flux_rad(k-1,i,j,i_sw,i_dn,2) + flux_rad(k,i,j,i_sw,i_dn,2) )
394 
395  flux_net(k,i,j,i_lw) = flux_up(k,i,j,i_lw) - flux_dn(k,i,j,i_lw)
396  flux_net(k,i,j,i_sw) = flux_up(k,i,j,i_sw) - flux_dn(k,i,j,i_sw)
397  enddo
398  enddo
399  enddo
400 
401  ! apply radiative flux convergence -> heating rate
403  ka, ks, ke, ia, is, ie, ja, js, je, &
404  flux_rad(:,:,:,:,:,2), & ! [IN]
405  dens(:,:,:), temp(:,:,:), & ! [IN]
406  cvtot(:,:,:), & ! [IN]
407  real_fz(:,:,:), & ! [IN]
408  rhoh_rd(:,:,:), & ! [OUT]
409  temp_t = temp_t(:,:,:,:) ) ! [OUT]
410 
411 
412 
413  call file_history_in( solins(:,:), 'SOLINS', 'solar insolation', 'W/m2', fill_halo=.true. )
414  call file_history_in( cossza(:,:), 'COSZ', 'cos(solar zenith angle)', '1', fill_halo=.true. )
415 
416  call file_history_in( sfcflx_lw_up_c(:,:), 'SFLX_LW_up_c', 'SFC upward longwave radiation flux (clr)', 'W/m2', fill_halo=.true. )
417  call file_history_in( sfcflx_lw_dn_c(:,:), 'SFLX_LW_dn_c', 'SFC downward longwave radiation flux (clr)', 'W/m2', fill_halo=.true. )
418  call file_history_in( sfcflx_sw_up_c(:,:), 'SFLX_SW_up_c', 'SFC upward shortwave radiation flux (clr)', 'W/m2', fill_halo=.true. )
419  call file_history_in( sfcflx_sw_dn_c(:,:), 'SFLX_SW_dn_c', 'SFC downward shortwave radiation flux (clr)', 'W/m2', fill_halo=.true. )
420 
421  call file_history_in( sfcflx_lw_up(:,:), 'SFLX_LW_up', 'SFC upward longwave radiation flux', 'W/m2', fill_halo=.true. )
422  call file_history_in( sfcflx_lw_dn(:,:), 'SFLX_LW_dn', 'SFC downward longwave radiation flux', 'W/m2', fill_halo=.true. )
423  call file_history_in( sfcflx_sw_up(:,:), 'SFLX_SW_up', 'SFC upward shortwave radiation flux', 'W/m2', fill_halo=.true. )
424  call file_history_in( sfcflx_sw_dn(:,:), 'SFLX_SW_dn', 'SFC downward shortwave radiation flux', 'W/m2', fill_halo=.true. )
425 
426  call file_history_in( flux_net_sfc(:,:,i_lw), 'SFLX_LW_net', 'SFC net longwave radiation flux', 'W/m2', fill_halo=.true. )
427  call file_history_in( flux_net_sfc(:,:,i_sw), 'SFLX_SW_net', 'SFC net shortwave radiation flux', 'W/m2', fill_halo=.true. )
428 
429  call file_history_in( toaflx_lw_up_c(:,:), 'TOAFLX_LW_up_c', 'TOA upward longwave radiation flux (clr)', 'W/m2', fill_halo=.true. )
430  call file_history_in( toaflx_lw_dn_c(:,:), 'TOAFLX_LW_dn_c', 'TOA downward longwave radiation flux (clr)', 'W/m2', fill_halo=.true. )
431  call file_history_in( toaflx_sw_up_c(:,:), 'TOAFLX_SW_up_c', 'TOA upward shortwave radiation flux (clr)', 'W/m2', fill_halo=.true. )
432  call file_history_in( toaflx_sw_dn_c(:,:), 'TOAFLX_SW_dn_c', 'TOA downward shortwave radiation flux (clr)', 'W/m2', fill_halo=.true. )
433 
434  call file_history_in( toaflx_lw_up(:,:), 'TOAFLX_LW_up', 'TOA upward longwave radiation flux', 'W/m2', fill_halo=.true. )
435  call file_history_in( toaflx_lw_dn(:,:), 'TOAFLX_LW_dn', 'TOA downward longwave radiation flux', 'W/m2', fill_halo=.true. )
436  call file_history_in( toaflx_sw_up(:,:), 'TOAFLX_SW_up', 'TOA upward shortwave radiation flux', 'W/m2', fill_halo=.true. )
437  call file_history_in( toaflx_sw_dn(:,:), 'TOAFLX_SW_dn', 'TOA downward shortwave radiation flux', 'W/m2', fill_halo=.true. )
438 
439  call file_history_in( flux_net_toa(:,:,i_lw), 'TOAFLX_LW_net', 'TOA net longwave radiation flux', 'W/m2', fill_halo=.true. )
440  call file_history_in( flux_net_toa(:,:,i_sw), 'TOAFLX_SW_net', 'TOA net shortwave radiation flux', 'W/m2', fill_halo=.true. )
441 
442  call file_history_in( tomflx_lw_up_c(:,:), 'TOMFLX_LW_up_c', 'TOM upward longwave radiation flux (clr)', 'W/m2', fill_halo=.true. )
443  call file_history_in( tomflx_lw_dn_c(:,:), 'TOMFLX_LW_dn_c', 'TOM downward longwave radiation flux (clr)', 'W/m2', fill_halo=.true. )
444  call file_history_in( tomflx_sw_up_c(:,:), 'TOMFLX_SW_up_c', 'TOM upward shortwave radiation flux (clr)', 'W/m2', fill_halo=.true. )
445  call file_history_in( tomflx_sw_dn_c(:,:), 'TOMFLX_SW_dn_c', 'TOM downward shortwave radiation flux (clr)', 'W/m2', fill_halo=.true. )
446 
447  call file_history_in( tomflx_lw_up(:,:), 'TOMFLX_LW_up', 'TOM upward longwave radiation flux', 'W/m2', fill_halo=.true. )
448  call file_history_in( tomflx_lw_dn(:,:), 'TOMFLX_LW_dn', 'TOM downward longwave radiation flux', 'W/m2', fill_halo=.true. )
449  call file_history_in( tomflx_sw_up(:,:), 'TOMFLX_SW_up', 'TOM upward shortwave radiation flux', 'W/m2', fill_halo=.true. )
450  call file_history_in( tomflx_sw_dn(:,:), 'TOMFLX_SW_dn', 'TOM downward shortwave radiation flux', 'W/m2', fill_halo=.true. )
451 
452  call file_history_in( flux_net_tom(:,:,i_lw), 'TOMFLX_LW_net', 'TOM net longwave radiation flux', 'W/m2', fill_halo=.true. )
453  call file_history_in( flux_net_tom(:,:,i_sw), 'TOMFLX_SW_net', 'TOM net shortwave radiation flux', 'W/m2', fill_halo=.true. )
454 
455  call file_history_in( flux_net_sfc(:,:,i_lw), 'SLR', 'SFC net longwave radiation flux', 'W/m2', fill_halo=.true. )
456  call file_history_in( flux_net_sfc(:,:,i_sw), 'SSR', 'SFC net shortwave radiation flux', 'W/m2', fill_halo=.true. )
457  call file_history_in( toaflx_lw_up(:,:), 'OLR', 'outgoing longwave radiation flux', 'W/m2', fill_halo=.true. )
458  call file_history_in( toaflx_sw_up(:,:), 'OSR', 'outgoing shortwave radiation flux', 'W/m2', fill_halo=.true. )
459 
460  call file_history_in( flux_up(:,:,:,i_lw), 'RADFLUX_LWUP', 'upward longwave radiation flux', 'W/m2', fill_halo=.true. )
461  call file_history_in( flux_dn(:,:,:,i_lw), 'RADFLUX_LWDN', 'downward longwave radiation flux', 'W/m2', fill_halo=.true. )
462  call file_history_in( flux_net(:,:,:,i_lw), 'RADFLUX_LW', 'net longwave radiation flux', 'W/m2', fill_halo=.true. )
463  call file_history_in( flux_up(:,:,:,i_sw), 'RADFLUX_SWUP', 'upward shortwave radiation flux', 'W/m2', fill_halo=.true. )
464  call file_history_in( flux_dn(:,:,:,i_sw), 'RADFLUX_SWDN', 'downward shortwave radiation flux', 'W/m2', fill_halo=.true. )
465  call file_history_in( flux_net(:,:,:,i_sw), 'RADFLUX_SW', 'net shortwave radiation flux', 'W/m2', fill_halo=.true. )
466 
467  call file_history_in( sflx_rad_dn(:,:,i_r_direct ,i_r_ir ), 'SFLX_IR_dn_dir', 'SFC downward radiation flux (direct; IR)', 'W/m2', fill_halo=.true. )
468  call file_history_in( sflx_rad_dn(:,:,i_r_diffuse,i_r_ir ), 'SFLX_IR_dn_dif', 'SFC downward radiation flux (diffuse; IR)', 'W/m2', fill_halo=.true. )
469  call file_history_in( sflx_rad_dn(:,:,i_r_direct ,i_r_nir), 'SFLX_NIR_dn_dir', 'SFC downward radiation flux (direct; NIR)', 'W/m2', fill_halo=.true. )
470  call file_history_in( sflx_rad_dn(:,:,i_r_diffuse,i_r_nir), 'SFLX_NIR_dn_dif', 'SFC downward radiation flux (diffuse; NIR)', 'W/m2', fill_halo=.true. )
471  call file_history_in( sflx_rad_dn(:,:,i_r_direct ,i_r_vis), 'SFLX_VIS_dn_dir', 'SFC downward radiation flux (direct; VIS)', 'W/m2', fill_halo=.true. )
472  call file_history_in( sflx_rad_dn(:,:,i_r_diffuse,i_r_vis), 'SFLX_VIS_dn_dif', 'SFC downward radiation flux (diffuse; VIS)', 'W/m2', fill_halo=.true. )
473 
474  call file_history_in( temp_t(:,:,:,i_lw), 'TEMP_t_rd_LW', 'tendency of temp in rd(LW)', 'K/day', fill_halo=.true. )
475  call file_history_in( temp_t(:,:,:,i_sw), 'TEMP_t_rd_SW', 'tendency of temp in rd(SW)', 'K/day', fill_halo=.true. )
476  call file_history_in( temp_t(:,:,:,3 ), 'TEMP_t_rd', 'tendency of temp in rd', 'K/day', fill_halo=.true. )
477  call file_history_in( rhoh_rd(:,:,:), 'RHOH_RD', 'diabatic heating rate in rd', 'J/m3/s', fill_halo=.true. )
478 
479  ! output of raw data, for offline output
480  call file_history_in( flux_rad(:,:,:,i_lw,i_up,2), 'RFLX_LW_up', 'upward longwave radiation flux (cell face)', 'W/m2', fill_halo=.true. )
481  call file_history_in( flux_rad(:,:,:,i_lw,i_dn,2), 'RFLX_LW_dn', 'downward longwave radiation flux (cell face)', 'W/m2', fill_halo=.true. )
482  call file_history_in( flux_rad(:,:,:,i_sw,i_up,2), 'RFLX_SW_up', 'upward shortwave radiation flux (cell face)', 'W/m2', fill_halo=.true. )
483  call file_history_in( flux_rad(:,:,:,i_sw,i_dn,2), 'RFLX_SW_dn', 'downward shortwave radiation flux (cell face)', 'W/m2', fill_halo=.true. )
484 
485  call file_history_in( dtau_s(:,:,:), 'dtau_s', '0.67 micron cloud optical depth', '1', fill_halo=.true. )
486  call file_history_in( dem_s(:,:,:), 'dem_s', '10.5 micron cloud emissivity', '1', fill_halo=.true. )
487 
488  endif
489 
490  do j = js, je
491  do i = is, ie
492  do k = ks, ke
493  rhoh(k,i,j) = rhoh(k,i,j) + rhoh_rd(k,i,j)
494  enddo
495  enddo
496  enddo
497 
498  if ( statistics_checktotal ) then
499  call statistics_total( ka, ks, ke, ia, is, ie, ja, js, je, &
500  rhoh_rd(:,:,:), 'RHOH_RD', &
503  endif
504 
505  return
506  end subroutine atmos_phy_rd_driver_calc_tendency
507 
508 end module mod_atmos_phy_rd_driver
mod_atmos_phy_rd_vars::atmos_phy_rd_sflx_down
real(rp), dimension(:,:,:,:), allocatable, public atmos_phy_rd_sflx_down
Definition: mod_atmos_phy_rd_vars.F90:71
scale_statistics
module Statistics
Definition: scale_statistics.F90:11
mod_atmos_phy_mp_vars
module Atmosphere / Physics Cloud Microphysics
Definition: mod_atmos_phy_mp_vars.F90:12
scale_landuse::landuse_fact_ocean
real(rp), dimension(:,:), allocatable, public landuse_fact_ocean
ocean factor
Definition: scale_landuse.F90:44
scale_atmos_grid_cartesc_index::ke
integer, public ke
end point of inner domain: z, local
Definition: scale_atmos_grid_cartesC_index.F90:52
scale_time::time_nowdaysec
real(dp), public time_nowdaysec
second of current time [sec]
Definition: scale_time.F90:70
scale_prc::prc_abort
subroutine, public prc_abort
Abort Process.
Definition: scale_prc.F90:342
mod_atmos_phy_rd_vars::atmos_phy_rd_rhoh
real(rp), dimension(:,:,:), allocatable, public atmos_phy_rd_rhoh
Definition: mod_atmos_phy_rd_vars.F90:57
scale_cpl_sfc_index::i_r_direct
integer, parameter, public i_r_direct
Definition: scale_cpl_sfc_index.F90:37
mod_atmos_phy_mp_vars::atmos_phy_mp_vars_get_diagnostic
subroutine, public atmos_phy_mp_vars_get_diagnostic(DENS, TEMP, QTRC, CLDFRAC, Re, Qe, Ne)
Definition: mod_atmos_phy_mp_vars.F90:573
scale_atmos_phy_rd_offline::atmos_phy_rd_offline_flux
subroutine, public atmos_phy_rd_offline_flux(KA, KS, KE, IA, IS, IE, JA, JS, JE, time_now, flux_rad, SFLX_rad_dn)
Radiation main.
Definition: scale_atmos_phy_rd_offline.F90:192
scale_atmos_grid_cartesc_real::atmos_grid_cartesc_real_cz
real(rp), dimension(:,:,:), allocatable, public atmos_grid_cartesc_real_cz
geopotential height [m] (zxy)
Definition: scale_atmos_grid_cartesC_real.F90:38
mod_atmos_vars::qtrc_av
real(rp), dimension(:,:,:,:), pointer, public qtrc_av
Definition: mod_atmos_vars.F90:94
scale_cpl_sfc_index::i_r_diffuse
integer, parameter, public i_r_diffuse
Definition: scale_cpl_sfc_index.F90:38
scale_atmos_phy_rd_offline::atmos_phy_rd_offline_setup
subroutine, public atmos_phy_rd_offline_setup
Setup.
Definition: scale_atmos_phy_rd_offline.F90:58
mod_atmos_admin::atmos_phy_rd_type
character(len=h_short), public atmos_phy_rd_type
Definition: mod_atmos_admin.F90:39
scale_atmos_phy_rd_common::atmos_phy_rd_calc_heating
subroutine, public atmos_phy_rd_calc_heating(KA, KS, KE, IA, IS, IE, JA, JS, JE, flux_rad, DENS, TEMP, CVtot, FZ, RHOH, TEMP_t)
Calc heating rate.
Definition: scale_atmos_phy_rd_common.F90:60
scale_precision
module PRECISION
Definition: scale_precision.F90:14
scale_atmos_grid_cartesc_index::ka
integer, public ka
Definition: scale_atmos_grid_cartesC_index.F90:47
mod_atmos_admin
module ATMOS admin
Definition: mod_atmos_admin.F90:11
mod_atmos_phy_ae_vars::atmos_phy_ae_vars_get_diagnostic
subroutine, public atmos_phy_ae_vars_get_diagnostic(QTRC, RH, Re, Qe)
Definition: mod_atmos_phy_ae_vars.F90:466
scale_atmos_aerosol::n_ae
integer, parameter, public n_ae
Definition: scale_atmos_aerosol.F90:33
mod_atmos_phy_rd_vars::atmos_phy_rd_tomflx_lw_dn
real(rp), dimension(:,:), allocatable, public atmos_phy_rd_tomflx_lw_dn
Definition: mod_atmos_phy_rd_vars.F90:67
scale_atmos_phy_rd_common::i_dn
integer, parameter, public i_dn
Definition: scale_atmos_phy_rd_common.F90:35
scale_atmos_phy_rd_common::i_lw
integer, parameter, public i_lw
Definition: scale_atmos_phy_rd_common.F90:37
scale_atmos_phy_rd_offline
module atmosphere / physics / radiation / offline
Definition: scale_atmos_phy_rd_offline.F90:13
scale_cpl_sfc_index::i_r_ir
integer, parameter, public i_r_ir
Definition: scale_cpl_sfc_index.F90:29
mod_atmos_phy_rd_vars::atmos_phy_rd_cossza
real(rp), dimension(:,:), allocatable, public atmos_phy_rd_cossza
Definition: mod_atmos_phy_rd_vars.F90:74
scale_const::const_eps
real(rp), public const_eps
small number
Definition: scale_const.F90:33
scale_atmos_phy_rd_common::i_up
integer, parameter, public i_up
Definition: scale_atmos_phy_rd_common.F90:34
scale_atmos_hydrometeor
module atmosphere / hydrometeor
Definition: scale_atmos_hydrometeor.F90:12
mod_atmos_phy_rd_vars
module Atmosphere / Physics Radiation
Definition: mod_atmos_phy_rd_vars.F90:12
mod_atmos_phy_sf_vars
module ATMOSPHERIC Surface Variables
Definition: mod_atmos_phy_sf_vars.F90:12
mod_atmos_phy_rd_vars::atmos_phy_rd_tomflx_sw_up
real(rp), dimension(:,:), allocatable, public atmos_phy_rd_tomflx_sw_up
Definition: mod_atmos_phy_rd_vars.F90:68
scale_atmos_solarins
module atmosphere / SOLARINS
Definition: scale_atmos_solarins.F90:14
scale_atmos_grid_cartesc_real
module Atmosphere GRID CartesC Real(real space)
Definition: scale_atmos_grid_cartesC_real.F90:11
mod_atmos_phy_sf_vars::atmos_phy_sf_sfc_temp
real(rp), dimension(:,:), allocatable, public atmos_phy_sf_sfc_temp
Definition: mod_atmos_phy_sf_vars.F90:64
mod_atmos_vars::qtrc
real(rp), dimension(:,:,:,:), allocatable, target, public qtrc
Definition: mod_atmos_vars.F90:80
scale_file_history
module file_history
Definition: scale_file_history.F90:15
scale_atmos_grid_cartesc_real::atmos_grid_cartesc_real_lon
real(rp), dimension(:,:), allocatable, public atmos_grid_cartesc_real_lon
longitude [rad,0-2pi]
Definition: scale_atmos_grid_cartesC_real.F90:48
scale_prc
module PROCESS
Definition: scale_prc.F90:11
scale_precision::rp
integer, parameter, public rp
Definition: scale_precision.F90:41
scale_atmos_hydrometeor::i_hi
integer, parameter, public i_hi
ice water cloud
Definition: scale_atmos_hydrometeor.F90:83
scale_atmos_grid_cartesc_index::ie
integer, public ie
end point of inner domain: x, local
Definition: scale_atmos_grid_cartesC_index.F90:54
scale_io
module STDIO
Definition: scale_io.F90:10
mod_atmos_phy_rd_vars::atmos_phy_rd_sflx_lw_dn
real(rp), dimension(:,:), allocatable, public atmos_phy_rd_sflx_lw_dn
Definition: mod_atmos_phy_rd_vars.F90:61
mod_atmos_phy_bl_vars
module atmosphere / physics / PBL
Definition: mod_atmos_phy_bl_vars.F90:12
mod_atmos_phy_rd_vars::atmos_phy_rd_sflx_sw_dn
real(rp), dimension(:,:), allocatable, public atmos_phy_rd_sflx_sw_dn
Definition: mod_atmos_phy_rd_vars.F90:63
mod_atmos_vars::dens
real(rp), dimension(:,:,:), allocatable, target, public dens
Definition: mod_atmos_vars.F90:75
scale_cpl_sfc_index::i_r_nir
integer, parameter, public i_r_nir
Definition: scale_cpl_sfc_index.F90:30
scale_tracer::k
real(rp), public k
Definition: scale_tracer.F90:44
scale_atmos_grid_cartesc_index
module atmosphere / grid / cartesC index
Definition: scale_atmos_grid_cartesC_index.F90:12
scale_const
module CONSTANT
Definition: scale_const.F90:11
scale_atmos_grid_cartesc_index::ia
integer, public ia
Definition: scale_atmos_grid_cartesC_index.F90:48
scale_atmos_grid_cartesc_real::atmos_grid_cartesc_real_vol
real(rp), dimension(:,:,:), allocatable, public atmos_grid_cartesc_real_vol
control volume (zxy) [m3]
Definition: scale_atmos_grid_cartesC_real.F90:83
mod_atmos_phy_rd_vars::atmos_phy_rd_sflx_sw_up
real(rp), dimension(:,:), allocatable, public atmos_phy_rd_sflx_sw_up
Definition: mod_atmos_phy_rd_vars.F90:62
mod_atmos_phy_rd_vars::atmos_phy_rd_sflx_lw_up
real(rp), dimension(:,:), allocatable, public atmos_phy_rd_sflx_lw_up
Definition: mod_atmos_phy_rd_vars.F90:60
mod_atmos_phy_sf_vars::atmos_phy_sf_sfc_albedo
real(rp), dimension(:,:,:,:), allocatable, public atmos_phy_sf_sfc_albedo
Definition: mod_atmos_phy_sf_vars.F90:65
scale_atmos_phy_rd_mstrnx::atmos_phy_rd_mstrnx_setup
subroutine, public atmos_phy_rd_mstrnx_setup(KA, KS, KE, CZ, FZ)
Setup.
Definition: scale_atmos_phy_rd_mstrnx.F90:221
mod_atmos_phy_bl_vars::atmos_phy_bl_zi
real(rp), dimension(:,:), allocatable, public atmos_phy_bl_zi
Definition: mod_atmos_phy_bl_vars.F90:64
scale_prof
module profiler
Definition: scale_prof.F90:11
mod_atmos_phy_rd_vars::atmos_phy_rd_tomflx_sw_dn
real(rp), dimension(:,:), allocatable, public atmos_phy_rd_tomflx_sw_dn
Definition: mod_atmos_phy_rd_vars.F90:69
scale_atmos_grid_cartesc_index::is
integer, public is
start point of inner domain: x, local
Definition: scale_atmos_grid_cartesC_index.F90:53
mod_atmos_vars::temp
real(rp), dimension(:,:,:), allocatable, target, public temp
Definition: mod_atmos_vars.F90:133
scale_atmos_grid_cartesc_index::ja
integer, public ja
Definition: scale_atmos_grid_cartesC_index.F90:49
scale_time
module TIME
Definition: scale_time.F90:11
mod_atmos_vars::qv
real(rp), dimension(:,:,:), allocatable, pointer, target, public qv
Definition: mod_atmos_vars.F90:96
scale_atmos_hydrometeor::i_hc
integer, parameter, public i_hc
liquid water cloud
Definition: scale_atmos_hydrometeor.F90:81
scale_tracer
module TRACER
Definition: scale_tracer.F90:12
scale_atmos_aerosol
module atmosphere / aerosol
Definition: scale_atmos_aerosol.F90:12
mod_atmos_phy_rd_driver
module ATMOSPHERE / Physics Radiation
Definition: mod_atmos_phy_rd_driver.F90:12
mod_atmos_vars::pres
real(rp), dimension(:,:,:), allocatable, target, public pres
Definition: mod_atmos_vars.F90:134
mod_atmos_admin::atmos_sw_phy_rd
logical, public atmos_sw_phy_rd
Definition: mod_atmos_admin.F90:55
mod_atmos_vars::dens_av
real(rp), dimension(:,:,:), pointer, public dens_av
Definition: mod_atmos_vars.F90:89
scale_atmos_phy_rd_common::i_sw
integer, parameter, public i_sw
Definition: scale_atmos_phy_rd_common.F90:38
scale_landuse::landuse_fact_land
real(rp), dimension(:,:), allocatable, public landuse_fact_land
land factor
Definition: scale_landuse.F90:45
mod_atmos_phy_rd_vars::atmos_phy_rd_tomflx_lw_up
real(rp), dimension(:,:), allocatable, public atmos_phy_rd_tomflx_lw_up
Definition: mod_atmos_phy_rd_vars.F90:66
scale_atmos_grid_cartesc_index::ks
integer, public ks
start point of inner domain: z, local
Definition: scale_atmos_grid_cartesC_index.F90:51
mod_atmos_vars::rhoh_p
real(rp), dimension(:,:,:), allocatable, public rhoh_p
Definition: mod_atmos_vars.F90:119
scale_atmos_grid_cartesc::atmos_grid_cartesc_fz
real(rp), dimension(:), allocatable, public atmos_grid_cartesc_fz
face coordinate [m]: z, local
Definition: scale_atmos_grid_cartesC.F90:41
scale_statistics::statistics_checktotal
logical, public statistics_checktotal
calc&report variable totals to logfile?
Definition: scale_statistics.F90:64
mod_atmos_vars
module ATMOSPHERIC Variables
Definition: mod_atmos_vars.F90:12
scale_cpl_sfc_index
module coupler / surface-atmospehre
Definition: scale_cpl_sfc_index.F90:11
scale_time::time_nowdate
integer, dimension(6), public time_nowdate
current time [YYYY MM DD HH MM SS]
Definition: scale_time.F90:66
scale_atmos_grid_cartesc_index::js
integer, public js
start point of inner domain: y, local
Definition: scale_atmos_grid_cartesC_index.F90:55
scale_cpl_sfc_index::i_r_vis
integer, parameter, public i_r_vis
Definition: scale_cpl_sfc_index.F90:31
mod_atmos_phy_ae_vars
module ATMOSPHERE / Physics Aerosol Microphysics
Definition: mod_atmos_phy_ae_vars.F90:12
scale_atmos_phy_rd_common
module atmosphere / physics / radiation / common
Definition: scale_atmos_phy_rd_common.F90:12
scale_landuse::landuse_fact_urban
real(rp), dimension(:,:), allocatable, public landuse_fact_urban
urban factor
Definition: scale_landuse.F90:46
scale_atmos_grid_cartesc_real::atmos_grid_cartesc_real_lat
real(rp), dimension(:,:), allocatable, public atmos_grid_cartesc_real_lat
latitude [rad,-pi,pi]
Definition: scale_atmos_grid_cartesC_real.F90:52
mod_atmos_phy_rd_driver::atmos_phy_rd_driver_setup
subroutine, public atmos_phy_rd_driver_setup
Setup.
Definition: mod_atmos_phy_rd_driver.F90:52
scale_atmos_grid_cartesc_real::atmos_grid_cartesc_real_fz
real(rp), dimension(:,:,:), allocatable, public atmos_grid_cartesc_real_fz
geopotential height [m] (wxy)
Definition: scale_atmos_grid_cartesC_real.F90:42
mod_atmos_phy_rd_vars::atmos_phy_rd_solins
real(rp), dimension(:,:), allocatable, public atmos_phy_rd_solins
Definition: mod_atmos_phy_rd_vars.F90:73
scale_atmos_grid_cartesc_real::atmos_grid_cartesc_real_totvol
real(rp), public atmos_grid_cartesc_real_totvol
total volume (zxy, local) [m3]
Definition: scale_atmos_grid_cartesC_real.F90:87
mod_atmos_phy_bl_vars::atmos_phy_bl_cldfrac
real(rp), dimension(:,:,:), allocatable, public atmos_phy_bl_cldfrac
Definition: mod_atmos_phy_bl_vars.F90:67
scale_atmos_grid_cartesc
module atmosphere / grid / cartesC
Definition: scale_atmos_grid_cartesC.F90:12
scale_landuse
module LANDUSE
Definition: scale_landuse.F90:19
scale_atmos_grid_cartesc::atmos_grid_cartesc_cz
real(rp), dimension(:), allocatable, public atmos_grid_cartesc_cz
center coordinate [m]: z, local
Definition: scale_atmos_grid_cartesC.F90:40
scale_atmos_phy_rd_mstrnx::atmos_phy_rd_mstrnx_flux
subroutine, public atmos_phy_rd_mstrnx_flux(KA, KS, KE, IA, IS, IE, JA, JS, JE, DENS, TEMP, PRES, QV, CZ, FZ, fact_ocean, fact_land, fact_urban, temp_sfc, albedo_sfc, solins, cosSZA, CLDFRAC, MP_Re, MP_Qe, AE_Re, AE_Qe, flux_rad, flux_rad_top, flux_rad_sfc_dn, dtau_s, dem_s)
Radiation main.
Definition: scale_atmos_phy_rd_mstrnx.F90:449
mod_atmos_phy_bl_vars::atmos_phy_bl_ql
real(rp), dimension(:,:,:), allocatable, public atmos_phy_bl_ql
Definition: mod_atmos_phy_bl_vars.F90:66
scale_io::io_fid_conf
integer, public io_fid_conf
Config file ID.
Definition: scale_io.F90:56
scale_atmos_grid_cartesc_index::je
integer, public je
end point of inner domain: y, local
Definition: scale_atmos_grid_cartesC_index.F90:56
scale_atmos_hydrometeor::n_hyd
integer, parameter, public n_hyd
Definition: scale_atmos_hydrometeor.F90:79
mod_atmos_phy_rd_driver::atmos_phy_rd_driver_calc_tendency
subroutine, public atmos_phy_rd_driver_calc_tendency(update_flag)
Driver.
Definition: mod_atmos_phy_rd_driver.F90:134
mod_atmos_vars::cvtot
real(rp), dimension(:,:,:), allocatable, target, public cvtot
Definition: mod_atmos_vars.F90:141
scale_time::time_offset_year
integer, public time_offset_year
time offset [year]
Definition: scale_time.F90:74
scale_atmos_phy_rd_mstrnx
module atmosphere / physics / radiation / mstrnX
Definition: scale_atmos_phy_rd_mstrnx.F90:15