46 logical,
private :: RD_use_PBL_cloud = .false.
79 namelist / param_atmos_phy_rd / &
86 log_info(
"ATMOS_PHY_RD_driver_setup",*)
'Setup'
92 read(
io_fid_conf,nml=param_atmos_phy_rd,iostat=ierr)
94 log_info(
"ATMOS_PHY_RD_driver_setup",*)
'Not found namelist. Default used.'
95 elseif( ierr > 0 )
then
96 log_error(
"ATMOS_PHY_RD_driver_setup",*)
'Not appropriate names in namelist PARAM_ATMOS_PHY_RD. Check!'
99 log_nml(param_atmos_phy_rd)
107 log_error(
"ATMOS_PHY_RD_driver_setup",*)
'invalid Radiation type(', trim(
atmos_phy_rd_type),
'). CHECK!'
113 log_info(
"ATMOS_PHY_RD_driver_setup",*)
'this component is never called.'
114 log_info(
"ATMOS_PHY_RD_driver_setup",*)
'radiation fluxes are set to zero.'
116 sfcflx_lw_up(:,:) = 0.0_rp
117 sfcflx_lw_dn(:,:) = 0.0_rp
118 sfcflx_sw_up(:,:) = 0.0_rp
119 sfcflx_sw_dn(:,:) = 0.0_rp
120 tomflx_lw_up(:,:) = 0.0_rp
121 tomflx_lw_dn(:,:) = 0.0_rp
122 tomflx_sw_up(:,:) = 0.0_rp
123 tomflx_sw_dn(:,:) = 0.0_rp
124 sflx_rad_dn(:,:,:,:) = 0.0_rp
148 log_info(
"ATMOS_PHY_RD_driver_finalize",*)
'Finalize'
197 solarins_insolation => atmos_solarins_insolation
237 atmos_vars_get_diagnostic
244 logical,
intent(in) :: update_flag
247 real(
rp) :: flux_rad (
ka,
ia,
ja,2,2,2)
248 real(
rp) :: flux_rad_top(
ia,
ja,2,2,2)
256 real(
rp) :: flux_net_sfc(
ia,
ja,2)
257 real(
rp) :: flux_net_toa(
ia,
ja,2)
258 real(
rp) :: flux_net_tom(
ia,
ja,2)
260 real(
rp) :: toaflx_lw_up(
ia,
ja)
261 real(
rp) :: toaflx_lw_dn(
ia,
ja)
262 real(
rp) :: toaflx_sw_up(
ia,
ja)
263 real(
rp) :: toaflx_sw_dn(
ia,
ja)
265 real(
rp) :: sfcflx_lw_up_c(
ia,
ja)
266 real(
rp) :: sfcflx_lw_dn_c(
ia,
ja)
267 real(
rp) :: sfcflx_sw_up_c(
ia,
ja)
268 real(
rp) :: sfcflx_sw_dn_c(
ia,
ja)
269 real(
rp) :: toaflx_lw_up_c(
ia,
ja)
270 real(
rp) :: toaflx_lw_dn_c(
ia,
ja)
271 real(
rp) :: toaflx_sw_up_c(
ia,
ja)
272 real(
rp) :: toaflx_sw_dn_c(
ia,
ja)
273 real(
rp) :: tomflx_lw_up_c(
ia,
ja)
274 real(
rp) :: tomflx_lw_dn_c(
ia,
ja)
275 real(
rp) :: tomflx_sw_up_c(
ia,
ja)
276 real(
rp) :: tomflx_sw_dn_c(
ia,
ja)
289 if ( update_flag )
then
294 real_lon(:,:), real_lat(:,:), &
296 solins(:,:), cossza(:,:) )
299 dens(:,:,:), temp(:,:,:), qtrc(:,:,:,:), &
300 cldfrac=cldfrac, re=mp_re, qe=mp_qe )
302 if ( rd_use_pbl_cloud )
then
313 mp_qe(
k,i,j,
i_hc) = 0.0_rp
315 mp_qe(
k,i,j,
i_hi) = 0.0_rp
316 mp_re(
k,i,j,
i_hc) = 8.0e-4
325 call atmos_vars_get_diagnostic(
"RH", rh )
327 qtrc(:,:,:,:), rh(:,:,:), &
336 dens(:,:,:), temp(:,:,:), pres(:,:,:), qv(:,:,:), &
337 real_cz(:,:,:), real_fz(:,:,:), &
338 fact_ocean(:,:), fact_land(:,:), fact_urban(:,:), &
339 sfc_temp(:,:), sfc_albedo(:,:,:,:), &
340 solins(:,:), cossza(:,:), &
341 cldfrac(:,:,:), mp_re(:,:,:,:), mp_qe(:,:,:,:), &
342 ae_re(:,:,:,:), ae_qe(:,:,:,:), &
343 flux_rad(:,:,:,:,:,:), &
344 flux_rad_top(:,:,:,:,:), sflx_rad_dn(:,:,:,:), &
345 dtau_s = dtau_s(:,:,:), dem_s = dem_s(:,:,:) )
352 flux_rad(:,:,:,:,:,2), &
353 sflx_rad_dn(:,:,:,:) )
355 flux_rad(:,:,:,:,:,1) = 0.0_rp
356 flux_rad_top(:,:,:,:,:) = 0.0_rp
357 dtau_s(:,:,:) = 0.0_rp
358 dem_s(:,:,:) = 0.0_rp
371 sfcflx_lw_up_c(i,j) = flux_rad(
ks-1,i,j,
i_lw,
i_up,1)
372 sfcflx_lw_dn_c(i,j) = flux_rad(
ks-1,i,j,
i_lw,
i_dn,1)
373 sfcflx_sw_up_c(i,j) = flux_rad(
ks-1,i,j,
i_sw,
i_up,1)
374 sfcflx_sw_dn_c(i,j) = flux_rad(
ks-1,i,j,
i_sw,
i_dn,1)
376 sfcflx_lw_up(i,j) = flux_rad(
ks-1,i,j,
i_lw,
i_up,2)
377 sfcflx_lw_dn(i,j) = flux_rad(
ks-1,i,j,
i_lw,
i_dn,2)
378 sfcflx_sw_up(i,j) = flux_rad(
ks-1,i,j,
i_sw,
i_up,2)
379 sfcflx_sw_dn(i,j) = flux_rad(
ks-1,i,j,
i_sw,
i_dn,2)
381 flux_net_sfc(i,j,
i_lw) = sfcflx_lw_up(i,j) - sfcflx_lw_dn(i,j)
382 flux_net_sfc(i,j,
i_sw) = sfcflx_sw_up(i,j) - sfcflx_sw_dn(i,j)
394 toaflx_lw_up_c(i,j) = flux_rad_top(i,j,
i_lw,
i_up,1)
395 toaflx_lw_dn_c(i,j) = flux_rad_top(i,j,
i_lw,
i_dn,1)
396 toaflx_sw_up_c(i,j) = flux_rad_top(i,j,
i_sw,
i_up,1)
397 toaflx_sw_dn_c(i,j) = flux_rad_top(i,j,
i_sw,
i_dn,1)
399 toaflx_lw_up(i,j) = flux_rad_top(i,j,
i_lw,
i_up,2)
400 toaflx_lw_dn(i,j) = flux_rad_top(i,j,
i_lw,
i_dn,2)
401 toaflx_sw_up(i,j) = flux_rad_top(i,j,
i_sw,
i_up,2)
402 toaflx_sw_dn(i,j) = flux_rad_top(i,j,
i_sw,
i_dn,2)
404 flux_net_toa(i,j,
i_lw) = toaflx_lw_up(i,j) - toaflx_lw_dn(i,j)
405 flux_net_toa(i,j,
i_sw) = toaflx_sw_up(i,j) - toaflx_sw_dn(i,j)
417 tomflx_lw_up_c(i,j) = flux_rad(
ke,i,j,
i_lw,
i_up,1)
418 tomflx_lw_dn_c(i,j) = flux_rad(
ke,i,j,
i_lw,
i_dn,1)
419 tomflx_sw_up_c(i,j) = flux_rad(
ke,i,j,
i_sw,
i_up,1)
420 tomflx_sw_dn_c(i,j) = flux_rad(
ke,i,j,
i_sw,
i_dn,1)
422 tomflx_lw_up(i,j) = flux_rad(
ke,i,j,
i_lw,
i_up,2)
423 tomflx_lw_dn(i,j) = flux_rad(
ke,i,j,
i_lw,
i_dn,2)
424 tomflx_sw_up(i,j) = flux_rad(
ke,i,j,
i_sw,
i_up,2)
425 tomflx_sw_dn(i,j) = flux_rad(
ke,i,j,
i_sw,
i_dn,2)
427 flux_net_tom(i,j,
i_lw) = tomflx_lw_up(i,j) - tomflx_lw_dn(i,j)
428 flux_net_tom(i,j,
i_sw) = tomflx_sw_up(i,j) - tomflx_sw_dn(i,j)
439 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) )
440 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) )
441 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) )
442 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) )
454 flux_rad(:,:,:,:,:,2), &
455 dens(:,:,:), temp(:,:,:), &
459 temp_t = temp_t(:,:,:,:) )
463 call file_history_in( solins(:,:),
'SOLINS',
'solar insolation',
'W/m2', fill_halo=.true. )
464 call file_history_in( cossza(:,:),
'COSZ',
'cos(solar zenith angle)',
'1', fill_halo=.true. )
466 call file_history_in( sfcflx_lw_up_c(:,:),
'SFLX_LW_up_c',
'SFC upward longwave radiation flux (clr)',
'W/m2', fill_halo=.true. )
467 call file_history_in( sfcflx_lw_dn_c(:,:),
'SFLX_LW_dn_c',
'SFC downward longwave radiation flux (clr)',
'W/m2', fill_halo=.true. )
468 call file_history_in( sfcflx_sw_up_c(:,:),
'SFLX_SW_up_c',
'SFC upward shortwave radiation flux (clr)',
'W/m2', fill_halo=.true. )
469 call file_history_in( sfcflx_sw_dn_c(:,:),
'SFLX_SW_dn_c',
'SFC downward shortwave radiation flux (clr)',
'W/m2', fill_halo=.true. )
471 call file_history_in( sfcflx_lw_up(:,:),
'SFLX_LW_up',
'SFC upward longwave radiation flux',
'W/m2', fill_halo=.true. )
472 call file_history_in( sfcflx_lw_dn(:,:),
'SFLX_LW_dn',
'SFC downward longwave radiation flux',
'W/m2', fill_halo=.true. )
473 call file_history_in( sfcflx_sw_up(:,:),
'SFLX_SW_up',
'SFC upward shortwave radiation flux',
'W/m2', fill_halo=.true. )
474 call file_history_in( sfcflx_sw_dn(:,:),
'SFLX_SW_dn',
'SFC downward shortwave radiation flux',
'W/m2', fill_halo=.true. )
476 call file_history_in( flux_net_sfc(:,:,
i_lw),
'SFLX_LW_net',
'SFC net longwave radiation flux',
'W/m2', fill_halo=.true. )
477 call file_history_in( flux_net_sfc(:,:,
i_sw),
'SFLX_SW_net',
'SFC net shortwave radiation flux',
'W/m2', fill_halo=.true. )
479 call file_history_in( toaflx_lw_up_c(:,:),
'TOAFLX_LW_up_c',
'TOA upward longwave radiation flux (clr)',
'W/m2', fill_halo=.true. )
480 call file_history_in( toaflx_lw_dn_c(:,:),
'TOAFLX_LW_dn_c',
'TOA downward longwave radiation flux (clr)',
'W/m2', fill_halo=.true. )
481 call file_history_in( toaflx_sw_up_c(:,:),
'TOAFLX_SW_up_c',
'TOA upward shortwave radiation flux (clr)',
'W/m2', fill_halo=.true. )
482 call file_history_in( toaflx_sw_dn_c(:,:),
'TOAFLX_SW_dn_c',
'TOA downward shortwave radiation flux (clr)',
'W/m2', fill_halo=.true. )
484 call file_history_in( toaflx_lw_up(:,:),
'TOAFLX_LW_up',
'TOA upward longwave radiation flux',
'W/m2', fill_halo=.true. )
485 call file_history_in( toaflx_lw_dn(:,:),
'TOAFLX_LW_dn',
'TOA downward longwave radiation flux',
'W/m2', fill_halo=.true. )
486 call file_history_in( toaflx_sw_up(:,:),
'TOAFLX_SW_up',
'TOA upward shortwave radiation flux',
'W/m2', fill_halo=.true. )
487 call file_history_in( toaflx_sw_dn(:,:),
'TOAFLX_SW_dn',
'TOA downward shortwave radiation flux',
'W/m2', fill_halo=.true. )
489 call file_history_in( flux_net_toa(:,:,
i_lw),
'TOAFLX_LW_net',
'TOA net longwave radiation flux',
'W/m2', fill_halo=.true. )
490 call file_history_in( flux_net_toa(:,:,
i_sw),
'TOAFLX_SW_net',
'TOA net shortwave radiation flux',
'W/m2', fill_halo=.true. )
492 call file_history_in( tomflx_lw_up_c(:,:),
'TOMFLX_LW_up_c',
'TOM upward longwave radiation flux (clr)',
'W/m2', fill_halo=.true. )
493 call file_history_in( tomflx_lw_dn_c(:,:),
'TOMFLX_LW_dn_c',
'TOM downward longwave radiation flux (clr)',
'W/m2', fill_halo=.true. )
494 call file_history_in( tomflx_sw_up_c(:,:),
'TOMFLX_SW_up_c',
'TOM upward shortwave radiation flux (clr)',
'W/m2', fill_halo=.true. )
495 call file_history_in( tomflx_sw_dn_c(:,:),
'TOMFLX_SW_dn_c',
'TOM downward shortwave radiation flux (clr)',
'W/m2', fill_halo=.true. )
497 call file_history_in( tomflx_lw_up(:,:),
'TOMFLX_LW_up',
'TOM upward longwave radiation flux',
'W/m2', fill_halo=.true. )
498 call file_history_in( tomflx_lw_dn(:,:),
'TOMFLX_LW_dn',
'TOM downward longwave radiation flux',
'W/m2', fill_halo=.true. )
499 call file_history_in( tomflx_sw_up(:,:),
'TOMFLX_SW_up',
'TOM upward shortwave radiation flux',
'W/m2', fill_halo=.true. )
500 call file_history_in( tomflx_sw_dn(:,:),
'TOMFLX_SW_dn',
'TOM downward shortwave radiation flux',
'W/m2', fill_halo=.true. )
502 call file_history_in( flux_net_tom(:,:,
i_lw),
'TOMFLX_LW_net',
'TOM net longwave radiation flux',
'W/m2', fill_halo=.true. )
503 call file_history_in( flux_net_tom(:,:,
i_sw),
'TOMFLX_SW_net',
'TOM net shortwave radiation flux',
'W/m2', fill_halo=.true. )
505 call file_history_in( flux_net_sfc(:,:,
i_lw),
'SLR',
'SFC net longwave radiation flux',
'W/m2', fill_halo=.true. )
506 call file_history_in( flux_net_sfc(:,:,
i_sw),
'SSR',
'SFC net shortwave radiation flux',
'W/m2', fill_halo=.true. )
507 call file_history_in( toaflx_lw_up(:,:),
'OLR',
'outgoing longwave radiation flux',
'W/m2', fill_halo=.true. )
508 call file_history_in( toaflx_sw_up(:,:),
'OSR',
'outgoing shortwave radiation flux',
'W/m2', fill_halo=.true. )
510 call file_history_in( flux_up(:,:,:,
i_lw),
'RADFLUX_LWUP',
'upward longwave radiation flux',
'W/m2', fill_halo=.true. )
511 call file_history_in( flux_dn(:,:,:,
i_lw),
'RADFLUX_LWDN',
'downward longwave radiation flux',
'W/m2', fill_halo=.true. )
512 call file_history_in( flux_net(:,:,:,
i_lw),
'RADFLUX_LW',
'net longwave radiation flux',
'W/m2', fill_halo=.true. )
513 call file_history_in( flux_up(:,:,:,
i_sw),
'RADFLUX_SWUP',
'upward shortwave radiation flux',
'W/m2', fill_halo=.true. )
514 call file_history_in( flux_dn(:,:,:,
i_sw),
'RADFLUX_SWDN',
'downward shortwave radiation flux',
'W/m2', fill_halo=.true. )
515 call file_history_in( flux_net(:,:,:,
i_sw),
'RADFLUX_SW',
'net shortwave radiation flux',
'W/m2', fill_halo=.true. )
517 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. )
518 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. )
519 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. )
520 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. )
521 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. )
522 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. )
524 call file_history_in( temp_t(:,:,:,
i_lw),
'TEMP_t_rd_LW',
'tendency of temp in rd(LW)',
'K/day', fill_halo=.true. )
525 call file_history_in( temp_t(:,:,:,
i_sw),
'TEMP_t_rd_SW',
'tendency of temp in rd(SW)',
'K/day', fill_halo=.true. )
526 call file_history_in( temp_t(:,:,:,3 ),
'TEMP_t_rd',
'tendency of temp in rd',
'K/day', fill_halo=.true. )
527 call file_history_in( rhoh_rd(:,:,:),
'RHOH_RD',
'diabatic heating rate in rd',
'J/m3/s', fill_halo=.true. )
530 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. )
531 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. )
532 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. )
533 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. )
535 call file_history_in( dtau_s(:,:,:),
'dtau_s',
'0.67 micron cloud optical depth',
'1', fill_halo=.true. )
536 call file_history_in( dem_s(:,:,:),
'dem_s',
'10.5 micron cloud emissivity',
'1', fill_halo=.true. )
546 rhoh(
k,i,j) = rhoh(
k,i,j) + rhoh_rd(
k,i,j)
554 rhoh_rd(:,:,:),
'RHOH_RD', &