CCPP Scientific Documentation
v5.0.0
subroutine, public rrtmg_sw::rrtmg_sw_run ( real (kind=kind_phys), dimension(npts,nlay), intent(in)  plyr,
real (kind=kind_phys), dimension(npts,nlp1), intent(in)  plvl,
real (kind=kind_phys), dimension(npts,nlay), intent(in)  tlyr,
real (kind=kind_phys), dimension(npts,nlp1), intent(in)  tlvl,
real (kind=kind_phys), dimension(npts,nlay), intent(in)  qlyr,
real (kind=kind_phys), dimension(npts,nlay), intent(in)  olyr,
real(kind=kind_phys), dimension(npts,nlay), intent(in)  gasvmr_co2,
real(kind=kind_phys), dimension(npts,nlay), intent(in)  gasvmr_n2o,
real(kind=kind_phys), dimension(npts,nlay), intent(in)  gasvmr_ch4,
real(kind=kind_phys), dimension(npts,nlay), intent(in)  gasvmr_o2,
real(kind=kind_phys), dimension(npts,nlay), intent(in)  gasvmr_co,
real(kind=kind_phys), dimension(npts,nlay), intent(in)  gasvmr_cfc11,
real(kind=kind_phys), dimension(npts,nlay), intent(in)  gasvmr_cfc12,
real(kind=kind_phys), dimension(npts,nlay), intent(in)  gasvmr_cfc22,
real(kind=kind_phys), dimension(npts,nlay), intent(in)  gasvmr_ccl4,
integer, dimension(:), intent(in)  icseed,
real(kind=kind_phys), dimension(npts,nlay,nbdsw), intent(in)  aeraod,
real(kind=kind_phys), dimension(npts,nlay,nbdsw), intent(in)  aerssa,
real(kind=kind_phys), dimension(npts,nlay,nbdsw), intent(in)  aerasy,
real (kind=kind_phys), dimension(npts), intent(in)  sfcalb_nir_dir,
real (kind=kind_phys), dimension(npts), intent(in)  sfcalb_nir_dif,
real (kind=kind_phys), dimension(npts), intent(in)  sfcalb_uvis_dir,
real (kind=kind_phys), dimension(npts), intent(in)  sfcalb_uvis_dif,
real (kind=kind_phys), dimension(npts,nlay), intent(in)  dzlyr,
real (kind=kind_phys), dimension(npts,nlay), intent(in)  delpin,
real (kind=kind_phys), dimension(npts), intent(in)  de_lgth,
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(npts,nlay), intent(in)  cld_cf,
logical, intent(in)  lsswr,
real (kind=kind_phys), dimension(npts,nlay), intent(inout)  hswc,
type (topfsw_type), dimension(npts), intent(inout)  topflx,
type (sfcfsw_type), dimension(npts), intent(inout)  sfcflx,
real (kind=kind_phys), dimension(npts,nlay), intent(inout)  cldtau,
real (kind=kind_phys), dimension(npts,nlay), intent(inout), optional  HSW0,
real (kind=kind_phys), dimension(npts,nlay,nbdsw), intent(inout), optional  HSWB,
type (profsw_type), dimension(npts,nlp1), intent(inout), optional  FLXPRF,
type (cmpfsw_type), dimension(npts), intent(inout), optional  FDNCMP,
real (kind=kind_phys), dimension(npts,nlay), intent(in), optional  cld_lwp,
real (kind=kind_phys), dimension(npts,nlay), intent(in), optional  cld_ref_liq,
real (kind=kind_phys), dimension(npts,nlay), intent(in), optional  cld_iwp,
real (kind=kind_phys), dimension(npts,nlay), intent(in), optional  cld_ref_ice,
real (kind=kind_phys), dimension(npts,nlay), intent(in), optional  cld_rwp,
real (kind=kind_phys), dimension(npts,nlay), intent(in), optional  cld_ref_rain,
real (kind=kind_phys), dimension(npts,nlay), intent(in), optional  cld_swp,
real (kind=kind_phys), dimension(npts,nlay), intent(in), optional  cld_ref_snow,
real (kind=kind_phys), dimension(npts,nlay), intent(in), optional  cld_od,
real (kind=kind_phys), dimension(npts,nlay), intent(in), optional  cld_ssa,
real (kind=kind_phys), dimension(npts,nlay), intent(in), optional  cld_asy,
character(len=*), intent(out)  errmsg,
integer, intent(out)  errflg 
)
  1. Compute solar constant adjustment factor (s0fac) according to solcon.
  2. Initial output arrays (and optional) as zero.
  3. Change random number seed value for each radiation invocation (isubcsw =1 or 2).
  4. Prepare surface albedo: bm,df - dir,dif; 1,2 - nir,uvv.
  5. Prepare atmospheric profile for use in rrtm.
  6. 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 \))
  7. Read aerosol optical properties from 'aerosols'.
  8. Read cloud optical properties from 'clouds'.
  9. Compute fractions of clear sky view:
    • random overlapping
    • max/ran overlapping
    • maximum overlapping
  10. For cloudy sky column, call cldprop() to compute the cloud optical properties for each cloudy layer.
  11. Call setcoef() to compute various coefficients needed in radiative transfer calculations.
  12. Call taumol() to calculate optical depths for gaseous absorption and rayleigh scattering
  13. Call the 2-stream radiation transfer model:
  14. Save outputs.

References amdo3, amdw, cldprop(), physcons::con_amd, physcons::con_amw, physcons::con_avgd, physcons::con_g, f_one, f_zero, ftiny, heatfac, physparam::iovrsw, ipsdsw0, physparam::isubcsw, physparam::iswcliq, physparam::iswrgas, physparam::ivflip, lfdncmp, lflxprf, lhsw0, lhswb, module_radsw_parameters::nbdsw, oneminus, s0, setcoef(), spcvrtc(), spcvrtm(), and taumol().

Here is the call graph for this function: