SCALE-RM
Functions/Subroutines
scale_atmos_phy_rd_mstrnx Module Reference

module ATMOSPHERE / Physics Radiation More...

Functions/Subroutines

subroutine, public atmos_phy_rd_mstrnx_setup (RD_TYPE)
 Setup. More...
 
subroutine, public atmos_phy_rd_mstrnx (DENS, RHOT, QTRC, CZ, FZ, fact_ocean, fact_land, fact_urban, temp_sfc, albedo_land, solins, cosSZA, flux_rad, flux_rad_top, flux_rad_sfc_dn)
 Radiation main. More...
 

Detailed Description

module ATMOSPHERE / Physics Radiation

Description
Atmospheric radiation transfer process mstrnX Ref: Nakajima and Tanaka(1986) Nakajima et al.(2000) Sekiguchi and Nakajima(2008)
Author
Team SCALE
History
  • 2013-02-06 (H.Yashiro) [new]
NAMELIST
  • PARAM_ATMOS_PHY_RD_MSTRN
    nametypedefault valuecomment
    ATMOS_PHY_RD_MSTRN_TOA real(RP)
    ATMOS_PHY_RD_MSTRN_KADD integer
    ATMOS_PHY_RD_MSTRN_GASPARA_IN_FILENAME character(len=H_LONG)
    ATMOS_PHY_RD_MSTRN_AEROPARA_IN_FILENAME character(len=H_LONG)
    ATMOS_PHY_RD_MSTRN_HYGROPARA_IN_FILENAME character(len=H_LONG)
    ATMOS_PHY_RD_MSTRN_NBAND integer
    ATMOS_PHY_RD_MSTRN_NPTYPE integer
    ATMOS_PHY_RD_MSTRN_NRADIUS integer
    ATMOS_PHY_RD_MSTRN_ONLY_QCI logical .false.
    ATMOS_PHY_RD_MSTRN_ONLY_TROPOCLOUD logical .false.

History Output
No history output

Function/Subroutine Documentation

◆ atmos_phy_rd_mstrnx_setup()

subroutine, public scale_atmos_phy_rd_mstrnx::atmos_phy_rd_mstrnx_setup ( character(len=*), intent(in)  RD_TYPE)

Setup.

Definition at line 230 of file scale_atmos_phy_rd_mstrnx.F90.

References scale_atmos_phy_rd_profile::atmos_phy_rd_profile_read(), scale_atmos_phy_rd_profile::atmos_phy_rd_profile_setup(), scale_atmos_phy_rd_profile::atmos_phy_rd_profile_setup_zgrid(), scale_stdio::io_fid_conf, scale_stdio::io_fid_log, scale_stdio::io_fid_nml, scale_stdio::io_l, scale_stdio::io_nml, scale_grid_index::kmax, scale_atmos_aerosol::n_ae, scale_atmos_hydrometeor::n_hyd, scale_process::prc_mpistop(), scale_grid_real::real_basepoint_lat, and scale_time::time_nowdate.

Referenced by scale_atmos_phy_rd::atmos_phy_rd_setup().

230  use scale_process, only: &
232  use scale_time, only: &
234  use scale_grid_real, only: &
236  use scale_atmos_phy_rd_profile, only: &
237  rd_profile_setup => atmos_phy_rd_profile_setup, &
238  rd_profile_setup_zgrid => atmos_phy_rd_profile_setup_zgrid, &
239  rd_profile_read => atmos_phy_rd_profile_read
240  use scale_atmos_hydrometeor, only: &
241  n_hyd
242  use scale_atmos_aerosol, only: &
243  n_ae
244  implicit none
245 
246  character(len=*), intent(in) :: RD_TYPE
247 
248  real(RP) :: ATMOS_PHY_RD_MSTRN_TOA
249  integer :: ATMOS_PHY_RD_MSTRN_KADD
250  character(len=H_LONG) :: ATMOS_PHY_RD_MSTRN_GASPARA_IN_FILENAME
251  character(len=H_LONG) :: ATMOS_PHY_RD_MSTRN_AEROPARA_IN_FILENAME
252  character(len=H_LONG) :: ATMOS_PHY_RD_MSTRN_HYGROPARA_IN_FILENAME
253  integer :: ATMOS_PHY_RD_MSTRN_nband
254  integer :: ATMOS_PHY_RD_MSTRN_nptype
255  integer :: ATMOS_PHY_RD_MSTRN_nradius
256 
257  namelist / param_atmos_phy_rd_mstrn / &
258  atmos_phy_rd_mstrn_toa, &
259  atmos_phy_rd_mstrn_kadd, &
260  atmos_phy_rd_mstrn_gaspara_in_filename, &
261  atmos_phy_rd_mstrn_aeropara_in_filename, &
262  atmos_phy_rd_mstrn_hygropara_in_filename, &
263  atmos_phy_rd_mstrn_nband, &
264  atmos_phy_rd_mstrn_nptype, &
265  atmos_phy_rd_mstrn_nradius, &
266  atmos_phy_rd_mstrn_only_qci, &
267  atmos_phy_rd_mstrn_only_tropocloud
268 
269  integer :: ngas, ncfc
270  integer :: ierr
271  !---------------------------------------------------------------------------
272 
273  if( io_l ) write(io_fid_log,*)
274  if( io_l ) write(io_fid_log,*) '++++++ Module[RADIATION] / Categ[ATMOS PHYSICS] / Origin[SCALElib]'
275  if( io_l ) write(io_fid_log,*) '*** Sekiguchi and Nakajima (2008) mstrnX radiation process'
276 
277  if ( rd_type /= 'MSTRNX' ) then
278  write(*,*) 'xxx RD_TYPE is not MSTRNX. Check!'
279  call prc_mpistop
280  endif
281 
282  !--- read namelist
283  atmos_phy_rd_mstrn_toa = rd_toa
284  atmos_phy_rd_mstrn_kadd = rd_kadd
285  atmos_phy_rd_mstrn_gaspara_in_filename = mstrn_gaspara_inputfile
286  atmos_phy_rd_mstrn_aeropara_in_filename = mstrn_aeropara_inputfile
287  atmos_phy_rd_mstrn_hygropara_in_filename = mstrn_hygropara_inputfile
288  atmos_phy_rd_mstrn_nband = mstrn_nband
289  atmos_phy_rd_mstrn_nptype = mstrn_nptype
290  atmos_phy_rd_mstrn_nradius = mstrn_nradius
291 
292  rewind(io_fid_conf)
293  read(io_fid_conf,nml=param_atmos_phy_rd_mstrn,iostat=ierr)
294  if( ierr < 0 ) then !--- missing
295  if( io_l ) write(io_fid_log,*) '*** Not found namelist. Default used.'
296  elseif( ierr > 0 ) then !--- fatal error
297  write(*,*) 'xxx Not appropriate names in namelist PARAM_ATMOS_PHY_RD_MSTRN. Check!'
298  call prc_mpistop
299  endif
300  if( io_nml ) write(io_fid_nml,nml=param_atmos_phy_rd_mstrn)
301 
302  rd_toa = atmos_phy_rd_mstrn_toa
303  rd_kadd = atmos_phy_rd_mstrn_kadd
304  mstrn_gaspara_inputfile = atmos_phy_rd_mstrn_gaspara_in_filename
305  mstrn_aeropara_inputfile = atmos_phy_rd_mstrn_aeropara_in_filename
306  mstrn_hygropara_inputfile = atmos_phy_rd_mstrn_hygropara_in_filename
307  mstrn_nband = atmos_phy_rd_mstrn_nband
308  mstrn_nptype = atmos_phy_rd_mstrn_nptype
309  mstrn_nradius = atmos_phy_rd_mstrn_nradius
310 
311  !--- setup MSTRN parameter
312  call rd_mstrn_setup( ngas, & ! [OUT]
313  ncfc ) ! [OUT]
314 
315  !--- setup climatological profile
316  call rd_profile_setup
317 
318  rd_kmax = kmax + rd_kadd
319 
320  !--- allocate arrays
321  ! input
322  allocate( rd_zh(rd_kmax+1) )
323  allocate( rd_z(rd_kmax ) )
324 
325  allocate( rd_rhodz(rd_kmax ) )
326  allocate( rd_pres(rd_kmax ) )
327  allocate( rd_presh(rd_kmax+1) )
328  allocate( rd_temp(rd_kmax ) )
329  allocate( rd_temph(rd_kmax+1) )
330 
331  allocate( rd_gas(rd_kmax,ngas ) )
332  allocate( rd_cfc(rd_kmax,ncfc ) )
333  allocate( rd_aerosol_conc(rd_kmax,rd_naero) )
334  allocate( rd_aerosol_radi(rd_kmax,rd_naero) )
335  allocate( rd_cldfrac(rd_kmax ) )
336 
337  !--- setup vartical grid for radiation (larger TOA than Model domain)
338  call rd_profile_setup_zgrid( rd_toa, rd_kmax, rd_kadd, & ! [IN]
339  rd_zh(:), rd_z(:) ) ! [INOUT]
340 
341  !--- read climatological profile
342  call rd_profile_read( rd_kmax, & ! [IN]
343  ngas, & ! [IN]
344  ncfc, & ! [IN]
345  rd_naero, & ! [IN]
346  real_basepoint_lat, & ! [IN]
347  time_nowdate(:), & ! [IN]
348  rd_zh(:), & ! [IN]
349  rd_z(:), & ! [IN]
350  rd_rhodz(:), & ! [OUT]
351  rd_pres(:), & ! [OUT]
352  rd_presh(:), & ! [OUT]
353  rd_temp(:), & ! [OUT]
354  rd_temph(:), & ! [OUT]
355  rd_gas(:,:), & ! [OUT]
356  rd_cfc(:,:), & ! [OUT]
357  rd_aerosol_conc(:,:), & ! [OUT]
358  rd_aerosol_radi(:,:), & ! [OUT]
359  rd_cldfrac(:) ) ! [OUT]
360 
361  return
subroutine, public prc_mpistop
Abort MPI.
real(rp), public real_basepoint_lat
position of base point in real world [rad,-pi,pi]
module ATMOSPHERE / Physics Radiation / Vertical profile
subroutine, public atmos_phy_rd_profile_setup
Setup.
module GRID (real space)
integer, public kmax
of computational cells: z, local
module TIME
Definition: scale_time.F90:15
subroutine, public atmos_phy_rd_profile_setup_zgrid(toa, kmax, kadd, zh, z)
Setup vertical grid for radiation.
module PROCESS
subroutine, public atmos_phy_rd_profile_read(kmax, ngas, ncfc, naero, real_lat, now_date, zh, z, rhodz, pres, presh, temp, temph, gas, cfc, aerosol_conc, aerosol_radi, cldfrac)
Read profile for radiation.
integer, dimension(6), public time_nowdate
current time [YYYY MM DD HH MM SS]
Definition: scale_time.F90:65
Here is the call graph for this function:
Here is the caller graph for this function:

◆ atmos_phy_rd_mstrnx()

subroutine, public scale_atmos_phy_rd_mstrnx::atmos_phy_rd_mstrnx ( real(rp), dimension (ka,ia,ja), intent(in)  DENS,
real(rp), dimension (ka,ia,ja), intent(in)  RHOT,
real(rp), dimension (ka,ia,ja,qa), intent(in)  QTRC,
real(rp), dimension ( ka,ia,ja), intent(in)  CZ,
real(rp), dimension (0:ka,ia,ja), intent(in)  FZ,
real(rp), dimension (ia,ja), intent(in)  fact_ocean,
real(rp), dimension (ia,ja), intent(in)  fact_land,
real(rp), dimension (ia,ja), intent(in)  fact_urban,
real(rp), dimension (ia,ja), intent(in)  temp_sfc,
real(rp), dimension (ia,ja,2), intent(in)  albedo_land,
real(rp), dimension (ia,ja), intent(in)  solins,
real(rp), dimension (ia,ja), intent(in)  cosSZA,
real(rp), dimension (ka,ia,ja,2,2,2), intent(out)  flux_rad,
real(rp), dimension (ia,ja,2,2,2), intent(out)  flux_rad_top,
real(rp), dimension(ia,ja,2,2), intent(out)  flux_rad_sfc_dn 
)

Radiation main.

Definition at line 377 of file scale_atmos_phy_rd_mstrnx.F90.

References scale_atmos_phy_ae::atmos_phy_ae_dens, scale_atmos_phy_ae::atmos_phy_ae_effectiveradius, scale_atmos_phy_mp::atmos_phy_mp_cloudfraction, scale_atmos_phy_mp::atmos_phy_mp_dens, scale_atmos_phy_mp::atmos_phy_mp_effectiveradius, scale_atmos_phy_mp::atmos_phy_mp_mixingratio, scale_atmos_phy_rd_profile::atmos_phy_rd_profile_read(), scale_atmos_phy_rd_profile::atmos_phy_rd_profile_use_climatology, scale_const::const_eps, scale_const::const_eps1, scale_const::const_grav, scale_const::const_mdry, scale_const::const_mvap, scale_const::const_pi, scale_const::const_ppm, scale_const::const_pstd, scale_const::const_rdry, scale_const::const_tem00, scale_atmos_phy_rd_common::i_dn, scale_atmos_hydrometeor::i_hc, scale_atmos_hydrometeor::i_hi, scale_atmos_phy_rd_common::i_lw, scale_atmos_hydrometeor::i_qv, scale_atmos_phy_rd_common::i_sw, scale_atmos_phy_rd_common::i_up, scale_grid_index::ie, scale_stdio::io_fid_log, scale_stdio::io_get_available_fid(), scale_stdio::io_l, scale_grid_index::is, scale_grid_index::je, scale_grid_index::js, scale_grid_index::ke, scale_grid_index::ks, scale_atmos_aerosol::n_ae, scale_atmos_hydrometeor::n_hyd, scale_process::prc_mpistop(), scale_prof::prof_rapend(), scale_prof::prof_rapstart(), scale_atmos_phy_ae::qa_ae, scale_atmos_phy_ae::qs_ae, scale_grid_real::real_basepoint_lat, scale_time::time_nowdate, scale_tracer::tracer_cv, scale_tracer::tracer_mass, and scale_tracer::tracer_r.

Referenced by scale_atmos_phy_rd::atmos_phy_rd_setup().

377 ! Jval )
378  use scale_grid_index
379  use scale_tracer
380  use scale_const, only: &
381  eps => const_eps, &
382  mdry => const_mdry, &
383  mvap => const_mvap, &
384  ppm => const_ppm
385  use scale_time, only: &
387  use scale_grid_real, only: &
389  use scale_atmos_thermodyn, only: &
390  thermodyn_temp_pres => atmos_thermodyn_temp_pres
391  use scale_atmos_saturation, only: &
392  saturation_dens2qsat_liq => atmos_saturation_dens2qsat_liq
393  use scale_atmos_phy_mp, only: &
394  mp_effectiveradius => atmos_phy_mp_effectiveradius, &
395  mp_cloudfraction => atmos_phy_mp_cloudfraction, &
396  mp_mixingratio => atmos_phy_mp_mixingratio, &
397  mp_dens => atmos_phy_mp_dens
398  use scale_atmos_phy_ae, only: &
399  ae_effectiveradius => atmos_phy_ae_effectiveradius, &
400  ae_dens => atmos_phy_ae_dens, &
401  qa_ae, &
402  qs_ae
403  use scale_atmos_hydrometeor, only: &
404  n_hyd, &
405  i_qv, &
406  i_hc, &
407  i_hi
408  use scale_atmos_aerosol, only: &
409  n_ae
410  use scale_atmos_phy_rd_profile, only: &
411  rd_profile_read => atmos_phy_rd_profile_read, &
412  rd_profile_use_climatology => atmos_phy_rd_profile_use_climatology
413  implicit none
414 
415  real(RP), intent(in) :: DENS (KA,IA,JA)
416  real(RP), intent(in) :: RHOT (KA,IA,JA)
417  real(RP), intent(in) :: QTRC (KA,IA,JA,QA)
418  real(RP), intent(in) :: CZ ( KA,IA,JA) ! UNUSED
419  real(RP), intent(in) :: FZ (0:KA,IA,JA)
420  real(RP), intent(in) :: fact_ocean (IA,JA)
421  real(RP), intent(in) :: fact_land (IA,JA)
422  real(RP), intent(in) :: fact_urban (IA,JA)
423  real(RP), intent(in) :: temp_sfc (IA,JA)
424  real(RP), intent(in) :: albedo_land (IA,JA,2)
425  real(RP), intent(in) :: solins (IA,JA)
426  real(RP), intent(in) :: cosSZA (IA,JA)
427  real(RP), intent(out) :: flux_rad (KA,IA,JA,2,2,2)
428  real(RP), intent(out) :: flux_rad_top (IA,JA,2,2,2)
429  real(RP), intent(out) :: flux_rad_sfc_dn(IA,JA,2,2)
430 ! real(RP), intent(out) :: Jval (KA,IA,JA,CH_QA_photo)
431 
432  real(RP) :: temp (KA,IA,JA)
433  real(RP) :: pres (KA,IA,JA)
434  real(RP) :: qsat (KA,IA,JA)
435  real(RP) :: rh (KA,IA,JA)
436  real(RP) :: cldfrac(KA,IA,JA)
437  real(RP) :: MP_Re (KA,IA,JA,N_HYD)
438  real(RP) :: MP_Qe (KA,IA,JA,N_HYD)
439  real(RP) :: AE_Re (KA,IA,JA,N_AE)
440 
441  integer :: tropopause(IA,JA)
442  real(RP) :: gamma
443 
444  real(RP), parameter :: min_cldfrac = 1.e-8_rp
445 
446  real(RP) :: rhodz_merge (RD_KMAX,IA,JA)
447  real(RP) :: pres_merge (RD_KMAX,IA,JA)
448  real(RP) :: temp_merge (RD_KMAX,IA,JA)
449  real(RP) :: temph_merge (RD_KMAX+1,IA,JA)
450 
451  real(RP) :: gas_merge (RD_KMAX,IA,JA,MSTRN_ngas)
452  real(RP) :: cfc_merge (RD_KMAX,IA,JA,MSTRN_ncfc)
453  real(RP) :: aerosol_conc_merge(RD_KMAX,IA,JA,RD_naero )
454  real(RP) :: aerosol_radi_merge(RD_KMAX,IA,JA,RD_naero )
455  real(RP) :: cldfrac_merge (RD_KMAX,IA,JA)
456 
457  ! output
458  real(RP) :: flux_rad_merge(RD_KMAX+1,IA,JA,2,2,MSTRN_ncloud)
459 
460  real(RP) :: zerosw
461 
462  integer :: ihydro, iaero
463  integer :: RD_k, k, i, j, v, ic
464  !---------------------------------------------------------------------------
465 
466  if( io_l ) write(io_fid_log,*) '*** Atmos physics step: Radiation(mstrnX)'
467 
468  call prof_rapstart('RD_Profile', 3)
469 
470  call thermodyn_temp_pres( temp(:,:,:), & ! [OUT]
471  pres(:,:,:), & ! [OUT]
472  dens(:,:,:), & ! [IN]
473  rhot(:,:,:), & ! [IN]
474  qtrc(:,:,:,:), & ! [IN]
475  tracer_cv(:), & ! [IN]
476  tracer_r(:), & ! [IN]
477  tracer_mass(:) ) ! [IN]
478 
479  call saturation_dens2qsat_liq( qsat(:,:,:), & ! [OUT]
480  temp(:,:,:), & ! [IN]
481  dens(:,:,:) ) ! [IN]
482 
483 !OCL XFILL
484  if ( i_qv > 0 ) then
485  do j = js, je
486  do i = is, ie
487  do k = ks, ke
488  rh(k,i,j) = qtrc(k,i,j,i_qv) / qsat(k,i,j)
489  enddo
490  enddo
491  enddo
492  else
493  do j = js, je
494  do i = is, ie
495  do k = ks, ke
496  rh(k,i,j) = 0.0_rp
497  enddo
498  enddo
499  enddo
500  endif
501 
502  call mp_cloudfraction( cldfrac(:,:,:), & ! [OUT]
503  qtrc(:,:,:,:), & ! [IN]
504  eps ) ! [IN]
505 
506  call mp_effectiveradius( mp_re(:,:,:,:), & ! [OUT]
507  qtrc(:,:,:,:), & ! [IN]
508  dens(:,:,:) , & ! [IN]
509  temp(:,:,:) ) ! [IN]
510 
511  call ae_effectiveradius( ae_re(:,:,:,:), & ! [OUT]
512  qtrc(:,:,:,:), & ! [IN]
513  rh(:,:,:) ) ! [IN]
514 
515  call mp_mixingratio( mp_qe(:,:,:,:), & ! [OUT]
516  qtrc(:,:,:,:) ) ! [IN]
517 
518 ! call AE_Mixingratio( AE_Qe(:,:,:,:), & ! [OUT]
519 ! QTRC (:,:,:,:) ) ! [IN]
520 
521  if ( atmos_phy_rd_mstrn_only_qci ) then
522  do ihydro = 1, n_hyd
523  if ( ihydro /= i_hc .and. ihydro /= i_hi ) then
524  mp_qe(:,:,:,ihydro) = 0.0_rp
525  end if
526  end do
527  end if
528 
529  if ( atmos_phy_rd_mstrn_only_tropocloud ) then
530  do j = js, je
531  do i = is, ie
532  tropopause(i,j) = ke+1
533  do k = ke, ks, -1
534  if ( pres(k,i,j) >= 300.e+2_rp ) then
535  exit
536  elseif( pres(k,i,j) < 50.e+2_rp ) then
537  tropopause(i,j) = k
538  else
539  gamma = ( temp(k+1,i,j) - temp(k,i,j) ) / ( cz(k+1,i,j) - cz(k,i,j) )
540  if( gamma > 1.e-4 ) tropopause(i,j) = k
541  endif
542  enddo
543  enddo
544  enddo
545 
546  do ihydro = 1, n_hyd
547  do j = js, je
548  do i = is, ie
549  do k = tropopause(i,j), ke
550  mp_qe(k,i,j,ihydro) = 0.0_rp
551  enddo
552  enddo
553  enddo
554  enddo
555  endif
556 
557  ! marge basic profile and value in model domain
558 
559  if ( rd_profile_use_climatology ) then
560  call rd_profile_read( rd_kmax, & ! [IN]
561  mstrn_ngas, & ! [IN]
562  mstrn_ncfc, & ! [IN]
563  rd_naero, & ! [IN]
564  real_basepoint_lat, & ! [IN]
565  time_nowdate(:), & ! [IN]
566  rd_zh(:), & ! [IN]
567  rd_z(:), & ! [IN]
568  rd_rhodz(:), & ! [OUT]
569  rd_pres(:), & ! [OUT]
570  rd_presh(:), & ! [OUT]
571  rd_temp(:), & ! [OUT]
572  rd_temph(:), & ! [OUT]
573  rd_gas(:,:), & ! [OUT]
574  rd_cfc(:,:), & ! [OUT]
575  rd_aerosol_conc(:,:), & ! [OUT]
576  rd_aerosol_radi(:,:), & ! [OUT]
577  rd_cldfrac(:) ) ! [OUT]
578  endif
579 
580 !OCL XFILL
581  !$omp parallel do default(none) &
582  !$omp shared(JS,JE,IS,IE,RD_KADD,temph_merge,RD_temph,KE,RD_KMAX,KS,temp,CZ,FZ) &
583  !$omp private(i,j,k,RD_k) OMP_SCHEDULE_ collapse(2)
584  do j = js, je
585  do i = is, ie
586  do rd_k = 1, rd_kadd
587  temph_merge(rd_k,i,j) = rd_temph(rd_k)
588  enddo
589 
590  temp(ke+1,i,j) = temp(ke,i,j)
591  do rd_k = rd_kadd+1, rd_kmax
592  k = ks + rd_kmax - rd_k ! reverse axis
593 
594  temph_merge(rd_k,i,j) = ( temp(k ,i,j) * (cz(k+1,i,j)-fz(k,i,j)) / (cz(k+1,i,j)-cz(k,i,j)) &
595  + temp(k+1,i,j) * (fz(k ,i,j)-cz(k,i,j)) / (cz(k+1,i,j)-cz(k,i,j)) )
596  enddo
597  temph_merge(rd_kmax+1,i,j) = temp(ks,i,j)
598  enddo
599  enddo
600 
601 !OCL XFILL
602  !$omp parallel do default(none) private(i,j,RD_k,k) OMP_SCHEDULE_ collapse(2) &
603  !$omp shared(JS,JE,IS,IE,RD_KADD,rhodz_merge,RD_rhodz,pres_merge,RD_pres,temp_merge) &
604  !$omp shared(RD_temp,RD_KMAX,KS,dens,FZ,pres,temp)
605  do j = js, je
606  do i = is, ie
607  do rd_k = 1, rd_kadd
608  rhodz_merge(rd_k,i,j) = rd_rhodz(rd_k)
609  pres_merge(rd_k,i,j) = rd_pres(rd_k)
610  temp_merge(rd_k,i,j) = rd_temp(rd_k)
611  enddo
612 
613  do rd_k = rd_kadd+1, rd_kmax
614  k = ks + rd_kmax - rd_k ! reverse axis
615 
616  rhodz_merge(rd_k,i,j) = dens(k,i,j) * ( fz(k,i,j)-fz(k-1,i,j) ) ! [kg/m2]
617  pres_merge(rd_k,i,j) = pres(k,i,j) * 1.e-2_rp ! [hPa]
618  temp_merge(rd_k,i,j) = temp(k,i,j)
619  enddo
620  enddo
621  enddo
622 
623 !OCL XFILL
624 !OCL SERIAL
625  do v = 1, mstrn_ngas
626 !OCL PARALLEL
627  do j = js, je
628  do i = is, ie
629  do rd_k = 1, rd_kmax
630  gas_merge(rd_k,i,j,v) = rd_gas(rd_k,v)
631  enddo
632  enddo
633  enddo
634  enddo
635 
636  if ( i_qv > 0 ) then
637  do j = js, je
638  do i = is, ie
639  do rd_k = rd_kadd+1, rd_kmax
640  k = ks + rd_kmax - rd_k ! reverse axis
641  zerosw = sign(0.5_rp, qtrc(k,i,j,i_qv)-eps) + 0.5_rp
642  gas_merge(rd_k,i,j,1) = qtrc(k,i,j,i_qv) / mvap * mdry / ppm * zerosw ! [PPM]
643  enddo
644  enddo
645  enddo
646  endif
647 
648 !OCL XFILL
649 !OCL SERIAL
650  do v = 1, mstrn_ncfc
651 !OCL PARALLEL
652  do j = js, je
653  do i = is, ie
654  do rd_k = 1, rd_kmax
655  cfc_merge(rd_k,i,j,v) = rd_cfc(rd_k,v)
656  enddo
657  enddo
658  enddo
659  enddo
660 
661  do j = js, je
662  do i = is, ie
663  do rd_k = 1, rd_kadd
664  cldfrac_merge(rd_k,i,j) = rd_cldfrac(rd_k)
665  enddo
666 
667  do rd_k = rd_kadd+1, rd_kmax
668  k = ks + rd_kmax - rd_k ! reverse axis
669 
670  cldfrac_merge(rd_k,i,j) = 0.5_rp + sign( 0.5_rp, cldfrac(k,i,j)-min_cldfrac )
671  enddo
672  enddo
673  enddo
674 
675 !OCL XFILL
676 !OCL SERIAL
677  do v = 1, rd_naero
678 !OCL PARALLEL
679  do j = js, je
680  do i = is, ie
681  do rd_k = 1, rd_kadd
682  aerosol_conc_merge(rd_k,i,j,v) = rd_aerosol_conc(rd_k,v)
683  aerosol_radi_merge(rd_k,i,j,v) = rd_aerosol_radi(rd_k,v)
684  enddo
685  enddo
686  enddo
687  enddo
688 
689 !OCL SERIAL
690  do ihydro = 1, n_hyd
691 !OCL PARALLEL
692  do j = js, je
693  do i = is, ie
694  do rd_k = rd_kadd+1, rd_kmax
695  k = ks + rd_kmax - rd_k ! reverse axis
696 
697  aerosol_conc_merge(rd_k,i,j,ihydro) = max( mp_qe(k,i,j,ihydro), 0.0_rp ) &
698  / mp_dens(ihydro) * rho_std / ppm ! [PPM to standard air]
699  aerosol_radi_merge(rd_k,i,j,ihydro) = mp_re(k,i,j,ihydro)
700  enddo
701  enddo
702  enddo
703  enddo
704 
705 !OCL SERIAL
706  do iaero = 1, n_ae
707 
708 !!$ do j = JS, JE
709 !!$ do i = IS, IE
710 !!$ do RD_k = RD_KADD+1, RD_KMAX
711 !!$ k = KS + RD_KMAX - RD_k ! reverse axis
712 !!$
713 !!$ aerosol_conc_merge(RD_k,i,j,N_HYD+iaero) = max( AE_Qe(k,i,j,iaero), 0.0_RP ) &
714 !!$ / AE_DENS(iaero) * RHO_std / PPM ! [PPM to standard air]
715 !!$ aerosol_radi_merge(RD_k,i,j,N_HYD+iaero) = AE_Re(k,i,j,iaero)
716 !!$ enddo
717 !!$ enddo
718 !!$ enddo
719 
720 !OCL PARALLEL
721  do j = js, je
722  do i = is, ie
723  do rd_k = rd_kadd+1, rd_kmax
724  aerosol_conc_merge(rd_k,i,j,n_hyd+iaero) = rd_aerosol_conc(rd_k,n_hyd+iaero)
725  aerosol_radi_merge(rd_k,i,j,n_hyd+iaero) = rd_aerosol_radi(rd_k,n_hyd+iaero)
726  enddo
727  enddo
728  enddo
729 
730  enddo
731 
732  call prof_rapend ('RD_Profile', 3)
733  call prof_rapstart('RD_MSTRN_DTRN3', 3)
734 
735  ! calc radiative transfer
736  call rd_mstrn_dtrn3( rd_kmax, & ! [IN]
737  mstrn_ngas, & ! [IN]
738  mstrn_ncfc, & ! [IN]
739  rd_naero, & ! [IN]
740  rd_hydro_str, & ! [IN]
741  rd_hydro_end, & ! [IN]
742  rd_aero_str, & ! [IN]
743  rd_aero_end, & ! [IN]
744  solins(:,:), & ! [IN]
745  cossza(:,:), & ! [IN]
746  rhodz_merge(:,:,:), & ! [IN]
747  pres_merge(:,:,:), & ! [IN]
748  temp_merge(:,:,:), & ! [IN]
749  temph_merge(:,:,:), & ! [IN]
750  temp_sfc(:,:), & ! [IN]
751  gas_merge(:,:,:,:), & ! [IN]
752  cfc_merge(:,:,:,:), & ! [IN]
753  aerosol_conc_merge(:,:,:,:), & ! [IN]
754  aerosol_radi_merge(:,:,:,:), & ! [IN]
755  i_mpae2rd(:), & ! [IN]
756  cldfrac_merge(:,:,:), & ! [IN]
757  albedo_land(:,:,:), & ! [IN]
758  fact_ocean(:,:), & ! [IN]
759  fact_land(:,:), & ! [IN]
760  fact_urban(:,:), & ! [IN]
761  flux_rad_merge(:,:,:,:,:,:), & ! [OUT]
762  flux_rad_sfc_dn(:,:,:,:) ) ! [OUT]
763 
764  call prof_rapend ('RD_MSTRN_DTRN3', 3)
765 
766  ! return to grid coordinate of model domain
767 !OCL SERIAL
768  do ic = 1, 2
769 !OCL PARALLEL
770  do j = js, je
771  do i = is, ie
772  do rd_k = rd_kadd+1, rd_kmax+1
773  k = ks + rd_kmax - rd_k ! reverse axis
774 
775  flux_rad(k,i,j,i_lw,i_up,ic) = flux_rad_merge(rd_k,i,j,i_lw,i_up,ic)
776  flux_rad(k,i,j,i_lw,i_dn,ic) = flux_rad_merge(rd_k,i,j,i_lw,i_dn,ic)
777  flux_rad(k,i,j,i_sw,i_up,ic) = flux_rad_merge(rd_k,i,j,i_sw,i_up,ic)
778  flux_rad(k,i,j,i_sw,i_dn,ic) = flux_rad_merge(rd_k,i,j,i_sw,i_dn,ic)
779  enddo
780  enddo
781  enddo
782  enddo
783 
784 !OCL XFILL
785 !OCL SERIAL
786  do ic = 1, 2
787 !OCL PARALLEL
788  do j = js, je
789  do i = is, ie
790  flux_rad_top(i,j,i_lw,i_up,ic) = flux_rad_merge(1,i,j,i_lw,i_up,ic)
791  flux_rad_top(i,j,i_lw,i_dn,ic) = flux_rad_merge(1,i,j,i_lw,i_dn,ic)
792  flux_rad_top(i,j,i_sw,i_up,ic) = flux_rad_merge(1,i,j,i_sw,i_up,ic)
793  flux_rad_top(i,j,i_sw,i_dn,ic) = flux_rad_merge(1,i,j,i_sw,i_dn,ic)
794  enddo
795  enddo
796  enddo
797 
798  return
integer, public is
start point of inner domain: x, local
integer, public je
end point of inner domain: y, local
real(rp), parameter, public const_ppm
parts par million
Definition: scale_const.F90:93
module ATMOSPHERE / Saturation adjustment
module ATMOSPHERE / Physics Aerosol Microphysics
real(rp), public real_basepoint_lat
position of base point in real world [rad,-pi,pi]
real(rp), dimension(qa_max), public tracer_r
module ATMOSPHERE / Physics Cloud Microphysics
module ATMOSPHERE / Physics Radiation / Vertical profile
real(rp), dimension(qa_max), public tracer_cv
module grid index
real(rp), public const_mvap
mass weight (water vapor) [g/mol]
Definition: scale_const.F90:64
module TRACER
module GRID (real space)
integer, public js
start point of inner domain: y, local
module TIME
Definition: scale_time.F90:15
module CONSTANT
Definition: scale_const.F90:14
integer, public ie
end point of inner domain: x, local
real(rp), public const_eps
small number
Definition: scale_const.F90:36
module ATMOSPHERE / Thermodynamics
subroutine, public atmos_phy_rd_profile_read(kmax, ngas, ncfc, naero, real_lat, now_date, zh, z, rhodz, pres, presh, temp, temph, gas, cfc, aerosol_conc, aerosol_radi, cldfrac)
Read profile for radiation.
integer, dimension(6), public time_nowdate
current time [YYYY MM DD HH MM SS]
Definition: scale_time.F90:65
real(rp), public const_mdry
mass weight (dry air) [g/mol]
Definition: scale_const.F90:56
logical, public atmos_phy_rd_profile_use_climatology
use climatology?
real(rp), dimension(qa_max), public tracer_mass
Here is the call graph for this function:
Here is the caller graph for this function: