CCPP SciDoc  v6.0.0
Common Community Physics Package Developed at DTC

◆ rrtmg_sw_run()

subroutine, public rrtmg_sw::rrtmg_sw_run ( real (kind=kind_phys), dimension(:,:), intent(in)  plyr,
real (kind=kind_phys), dimension(:,:), intent(in)  plvl,
real (kind=kind_phys), dimension(:,:), intent(in)  tlyr,
real (kind=kind_phys), dimension(:,:), intent(in)  tlvl,
real (kind=kind_phys), dimension(:,:), intent(in)  qlyr,
real (kind=kind_phys), dimension(:,:), intent(in)  olyr,
real(kind=kind_phys), dimension(:,:), intent(in)  gasvmr_co2,
real(kind=kind_phys), dimension(:,:), intent(in)  gasvmr_n2o,
real(kind=kind_phys), dimension(:,:), intent(in)  gasvmr_ch4,
real(kind=kind_phys), dimension(:,:), intent(in)  gasvmr_o2,
real(kind=kind_phys), dimension(:,:), intent(in)  gasvmr_co,
real(kind=kind_phys), dimension(:,:), intent(in)  gasvmr_cfc11,
real(kind=kind_phys), dimension(:,:), intent(in)  gasvmr_cfc12,
real(kind=kind_phys), dimension(:,:), intent(in)  gasvmr_cfc22,
real(kind=kind_phys), dimension(:,:), intent(in)  gasvmr_ccl4,
integer, dimension(:), intent(in)  icseed,
real(kind=kind_phys), dimension(:,:,:), intent(in)  aeraod,
real(kind=kind_phys), dimension(:,:,:), intent(in)  aerssa,
real(kind=kind_phys), dimension(:,:,:), intent(in)  aerasy,
real (kind=kind_phys), dimension(:), intent(in)  sfcalb_nir_dir,
real (kind=kind_phys), dimension(:), intent(in)  sfcalb_nir_dif,
real (kind=kind_phys), dimension(:), intent(in)  sfcalb_uvis_dir,
real (kind=kind_phys), dimension(:), intent(in)  sfcalb_uvis_dif,
real (kind=kind_phys), dimension(:,:), intent(in)  dzlyr,
real (kind=kind_phys), dimension(:,:), intent(in)  delpin,
real (kind=kind_phys), dimension(npts), intent(in)  de_lgth,
real (kind=kind_phys), dimension(npts,nlay), intent(in)  alpha,
real (kind=kind_phys), dimension(npts), intent(in)  cosz,
real (kind=kind_phys), intent(in)  solcon,
integer, intent(in)  NDAY,
integer, dimension(:), intent(in)  idxday,
integer, intent(in)  npts,
integer, intent(in)  nlay,
integer, intent(in)  nlp1,
logical, intent(in)  lprnt,
real (kind=kind_phys), dimension(:,:), intent(in)  cld_cf,
logical, intent(in)  lsswr,
real (kind=kind_phys), dimension(:,:), intent(inout)  hswc,
type (topfsw_type), dimension(:), intent(inout)  topflx,
type (sfcfsw_type), dimension(:), intent(inout)  sfcflx,
real (kind=kind_phys), dimension(:,:), intent(inout)  cldtau,
real (kind=kind_phys), dimension(:,:), intent(inout), optional  HSW0,
real (kind=kind_phys), dimension(:,:,:), intent(inout), optional  HSWB,
type (profsw_type), dimension(:,:), intent(inout), optional  FLXPRF,
type (cmpfsw_type), dimension(:), intent(inout), optional  FDNCMP,
real (kind=kind_phys), dimension(:,:), intent(in), optional  cld_lwp,
real (kind=kind_phys), dimension(:,:), intent(in), optional  cld_ref_liq,
real (kind=kind_phys), dimension(:,:), intent(in), optional  cld_iwp,
real (kind=kind_phys), dimension(:,:), intent(in), optional  cld_ref_ice,
real (kind=kind_phys), dimension(:,:), intent(in), optional  cld_rwp,
real (kind=kind_phys), dimension(:,:), intent(in), optional  cld_ref_rain,
real (kind=kind_phys), dimension(:,:), intent(in), optional  cld_swp,
real (kind=kind_phys), dimension(:,:), intent(in), optional  cld_ref_snow,
real (kind=kind_phys), dimension(:,:), intent(in), optional  cld_od,
real (kind=kind_phys), dimension(:,:), intent(in), optional  cld_ssa,
real (kind=kind_phys), dimension(:,:), intent(in), optional  cld_asy,
character(len=*), intent(out)  errmsg,
integer, intent(out)  errflg 
)
  • Compute solar constant adjustment factor (s0fac) according to solcon.
  • Initial output arrays (and optional) as zero.
  • Change random number seed value for each radiation invocation (isubcsw =1 or 2).
  • Prepare surface albedo: bm,df - dir,dif; 1,2 - nir,uvv.
  • Prepare atmospheric profile for use in rrtm.
  • Set absorber and gas column amount, convert from volume mixing ratio to molec/cm2 based on coldry (scaled to 1.0e-20)
    • colamt(nlay,maxgas):column amounts of absorbing gases 1 to maxgas are for h2o,co2,o3,n2o,ch4,o2,co, respectively ( \( mol/cm^2 \))
  • Read aerosol optical properties from 'aerosols'.
  • Read cloud optical properties from 'clouds'.
  • Compute fractions of clear sky view:
    • random overlapping
    • max/ran overlapping
    • maximum overlapping
  • For cloudy sky column, call cldprop() to compute the cloud optical properties for each cloudy layer.
  • Call setcoef() to compute various coefficients needed in radiative transfer calculations.
  • Call taumol() to calculate optical depths for gaseous absorption and rayleigh scattering
  • Call the 2-stream radiation transfer model:
  • Save outputs.

References cldprop(), setcoef(), spcvrtc(), spcvrtm(), and taumol().

Here is the call graph for this function: