CCPP Scientific Documentation
v4.1.0
subroutine rrtmg_sw::setcoef ( real (kind=kind_phys), dimension(:), intent(in)  pavel,
real (kind=kind_phys), dimension(:), intent(in)  tavel,
real (kind=kind_phys), dimension(:), intent(in)  h2ovmr,
integer, intent(in)  nlay,
integer, intent(in)  nlp1,
integer, intent(out)  laytrop,
integer, dimension(nlay), intent(out)  jp,
integer, dimension(nlay), intent(out)  jt,
integer, dimension(nlay), intent(out)  jt1,
real (kind=kind_phys), dimension(nlay), intent(out)  fac00,
real (kind=kind_phys), dimension(nlay), intent(out)  fac01,
real (kind=kind_phys), dimension(nlay), intent(out)  fac10,
real (kind=kind_phys), dimension(nlay), intent(out)  fac11,
real (kind=kind_phys), dimension(nlay), intent(out)  selffac,
real (kind=kind_phys), dimension(nlay), intent(out)  selffrac,
integer, dimension(nlay), intent(out)  indself,
real (kind=kind_phys), dimension(nlay), intent(out)  forfac,
real (kind=kind_phys), dimension(nlay), intent(out)  forfrac,
integer, dimension(nlay), intent(out)  indfor 
)
private
Parameters
pavellayer pressure (mb)
tavellayer temperature (k)
h2ovmrlayer w.v. volumn mixing ratio (kg/kg)
nlaytotal number of vertical layers
nlp1total number of vertical levels
laytroptropopause layer index (unitless)
jpindices of lower reference pressure
jt,jt1indices of lower reference temperatures at levels of jp and jp+1
fac00,fac01,fac10,fac11factors mltiply the reference ks,i,j=0/1 for lower/higher of the 2 appropriate temperature and altitudes.
selffacscale factor for w. v. self-continuum equals (w.v. density)/(atmospheric density at 296k and 1013 mb)
selffracfactor for temperature interpolation of reference w.v. self-continuum data
indselfindex of lower ref temp for selffac
forfacscale factor for w. v. foreign-continuum
forfracfactor for temperature interpolation of reference w.v. foreign-continuum data
indforindex of lower ref temp for forfac

setcoef General Algorithm

  1. Find the two reference pressures on either side of the layer pressure. store them in jp and jp1. store in fp the fraction of the difference (in ln(pressure)) between these two values that the layer pressure lies.
  2. Determine, for each reference pressure (jp and jp1), which reference temperature (these are different for each reference pressure) is nearest the layer temperature but does not exceed it. store these indices in jt and jt1, resp. store in ft (resp. ft1) the fraction of the way between jt (jt1) and the next highest reference temperature that the layer temperature falls.
  3. We have now isolated the layer ln pressure and temperature, between two reference pressures and two reference temperatures (for each reference pressure). we multiply the pressure fraction fp with the appropriate temperature fractions to get the factors that will be needed for the interpolation that yields the optical depths (performed in routines taugbn for band n).
  4. If the pressure is less than ~100mb, perform a different set of species interpolations.
  5. Set up factors needed to separately include the water vapor foreign-continuum in the calculation of absorption coefficient.
  6. Set up factors needed to separately include the water vapor self-continuum in the calculation of absorption coefficient.

References f_one, f_zero, module_radsw_ref::preflog, stpfac, and module_radsw_ref::tref.

Referenced by rrtmg_sw_run().