Radiation Scheme in CCPP
LW Coefficients calculation

SUBROUTINE setcoef in module_radlw_main computes various coefficients needed in radiative transfer calculation.
Usage:
call setcoef
! — inputs:
& ( pavel,tavel,tz,stemp,h2ovmr,colamt,coldry,colbrd, &
& nlay, nlp1, &
! — outputs:
& laytrop,pklay,pklev,jp,jt,jt1, &
& rfrate,fac00,fac01,fac10,fac11, &
& selffac,selffrac,indself,forfac,forfrac,indfor, &
& minorfrac,scaleminor,scaleminorn2,indminor &
& )

Parameters
[in]pavel- real, (nlay), layer pressure (mb)
[in]tavel- real, (nlay), layer temperature (K)
[in]tz- real, (0:nlay), level(interface) temperatures (K)
[in]stemp- real, 1, surface ground temperature (K)
[in]h2ovmr- real, (nlay), layer w.v. volumn mixing ratio (kg/kg)
[in]colamt- real, (nlay*maxgas), column amounts of absorbing gases. 2nd indices range: 1-maxgas, for watervapor,carbon dioxide, ozone, nitrous oxide, methane,oxigen, carbon monoxide,etc. (molecules/cm**2)
[in]coldry- real, (nlay), dry air column amount
[in]colbrd- real, (nlay), column amount of broadening gases
[in]nlay- integer, 1, total number of vertical layers
[in]nlp1- integer, 1, total number of vertical levels
[out]laytrop- integer, 1, tropopause layer index (unitless)
[out]pklay- real, (nbands*0:nlay), integrated planck func at lay temp
[out]pklev- real, (nbands*0:nlay), integrated planck func at lev temp
[out]jp- real, (nlay), indices of lower reference pressure
[out]jt,jt1- real, (nlay), indices of lower reference temperatures
[out]rfrate- real, (nlay*nrates*2), ref ratios of binary species param
(:,m,:)m=1-h2o/co2,2-h2o/o3,3-h2o/n2o,4-h2o/ch4,5-n2o/co2,6-o3/co2
(:,:,n)n=1,2: the rates of ref press at the 2 sides of the layer
[out]facij- real, (nlay), factors multiply the reference ks, i,j=0/1 for lower/higher of the 2 appropriate temperatures and altitudes.
[out]selffac- real, (nlay), scale factor for w. v. self-continuum equals (w. v. density)/(atmospheric density at 296k and 1013 mb)
[out]selffrac- real, (nlay), factor for temperature interpolation of reference w. v. self-continuum data !
[out]indself- integer, (nlay), index of lower ref temp for selffac
[out]forfac- real, (nlay), scale factor for w. v. foreign-continuum
[out]forfrac- real, (nlay), factor for temperature interpolation of reference w.v. foreign-continuum data
[out]indfor- integer, (nlay), index of lower ref temp for forfac
[out]minorfrac- real, (nlay), factor for minor gases
[out]scaleminor,scaleminorn2- real, (nlay), scale factors for minor gases
[out]indminor- integer, (nlay), index of lower ref temp for minor gases