\hypertarget{group__dcyc2t3__mod}{}\doxysubsection{RRTMG dcyc2t3 Module}
\label{group__dcyc2t3__mod}\index{RRTMG dcyc2t3 Module@{RRTMG dcyc2t3 Module}}


This module contains the CCPP-\/compliant \mbox{\hyperlink{namespacedcyc2t3}{dcyc2t3}} codes that fits radiative fluxes and heating rates from a coarse radiation calculation time interval into model\textquotesingle{}s more frequent time steps.  


\doxysubsubsection*{Functions/\+Subroutines}
\begin{DoxyCompactItemize}
\item 
subroutine, public \mbox{\hyperlink{group__dcyc2t3__mod_gaa716831331b796066a1750a8924b454f_gaa716831331b796066a1750a8924b454f}{dcyc2t3\+::dcyc2t3\+\_\+run}} (solhr, slag, sdec, cdec, sinlat, coslat, con\+\_\+g, con\+\_\+cp, con\+\_\+pi, con\+\_\+sbc, xlon, coszen, tsfc\+\_\+lnd, tsfc\+\_\+ice, tsfc\+\_\+wat, tf, tsflw, tsfc, sfcemis\+\_\+lnd, sfcemis\+\_\+ice, sfcemis\+\_\+wat, sfcdsw, sfcnsw, sfcdlw, swh, swhc, hlw, hlwc, sfcnirbmu, sfcnirdfu, sfcvisbmu, sfcvisdfu, sfcnirbmd, sfcnirdfd, sfcvisbmd, sfcvisdfd, im, levs, deltim, fhswr, dry, icy, wet, damp\+\_\+\+LW\+\_\+fluxadj, lfnc\+\_\+k, lfnc\+\_\+p0, use\+\_\+\+LW\+\_\+jacobian, sfculw, use\+\_\+med\+\_\+flux, sfculw\+\_\+med, fluxlw\+UP\+\_\+jac, t\+\_\+lay, p\+\_\+lay, p\+\_\+lev, flux2\+D\+\_\+lw\+UP, flux2\+D\+\_\+lw\+DOWN, pert\+\_\+radtend, do\+\_\+sppt, ca\+\_\+global, tsfc\+\_\+radtime, dtdt, dtdtnp, htrlw, adjsfcdsw, adjsfcnsw, adjsfcdlw, adjsfculw, adjsfculw\+\_\+lnd, adjsfculw\+\_\+ice, adjsfculw\+\_\+wat, xmu, xcosz, adjnirbmu, adjnirdfu, adjvisbmu, adjvisdfu, adjnirbmd, adjnirdfd, adjvisbmd, adjvisdfd, errmsg, errflg)
\end{DoxyCompactItemize}


\doxysubsubsection{Detailed Description}
Solar heating rates and fluxes are scaled by the ratio of cosine of zenith angle at the current time to the mean value used in radiation calculation. Surface downward LW flux is scaled by the ratio of current surface air temperature to the corresponding temperature saved during LW radiation calculation. Upward LW flux at the surface is computed by current ground surface temperature. Surface emissivity effect will be taken in other part of the model.

program history\+:
\begin{DoxyItemize}
\item 198? nmc mrf -\/ created, similar as treatment in gfdl radiation treatment
\item 1994 y. hou -\/ modified solar zenith angle calculation
\item nov 2004 x. wu -\/ add sfc sw downward flux to the variable list for sea-\/ice model
\item mar 2008 y. hou -\/ add cosine of zenith angle as output for sunshine duration time calc.
\item sep 2008 y. hou -\/ separate net sw and downward lw in slrad, changed the sign of sfc net sw to consistent with other parts of the mdl (positive value defines from atmos to the ground). rename output fluxes as adjusted fluxes. other minor changes such as renaming some of passing argument names to be consistent with calling program.
\item apr 2009 y. hou -\/ integrated with the new parallel model along with other modifications
\item mar 2011 y. hou -\/ minor modification including rearrange loop orders and loop structures to improve efficiency
\item mar 2014 x. wu -\/ add sfc nir/vis bm/df to the variable list for the coupled model input
\item jul 2014 s moorthi -\/ merge gfs and nems versions
\item jun 2014 y. hou -\/ revised to include both up and down sw spectral component fluxes
\item Oct 2014 y. hous s. moorthi -\/ add emissivity contribution to upward longwave flux
\item Mar 2019 s. moorthi -\/ modify xmu calculation in a time centered way and add more accuracy when physics time step is close to radiation time step 
\end{DoxyItemize}\hypertarget{group__dcyc2t3__mod_arg_table_dcyc2t3_run}{}\doxysubsubsection{Argument Table}\label{group__dcyc2t3__mod_arg_table_dcyc2t3_run}
\hypertarget{group__dcyc2t3__mod_dcyc2t3_general}{}\doxysubsubsection{RRTMG dcyc2t3 General Algorithm}\label{group__dcyc2t3__mod_dcyc2t3_general}


\doxysubsubsection{Function/\+Subroutine Documentation}
\mbox{\Hypertarget{group__dcyc2t3__mod_gaa716831331b796066a1750a8924b454f_gaa716831331b796066a1750a8924b454f}\label{group__dcyc2t3__mod_gaa716831331b796066a1750a8924b454f_gaa716831331b796066a1750a8924b454f}} 
\index{RRTMG dcyc2t3 Module@{RRTMG dcyc2t3 Module}!dcyc2t3\_run@{dcyc2t3\_run}}
\index{dcyc2t3\_run@{dcyc2t3\_run}!RRTMG dcyc2t3 Module@{RRTMG dcyc2t3 Module}}
\doxyparagraph{\texorpdfstring{dcyc2t3\_run()}{dcyc2t3\_run()}}
{\footnotesize\ttfamily subroutine, public dcyc2t3\+::dcyc2t3\+\_\+run (\begin{DoxyParamCaption}\item[{real(kind=kind\+\_\+phys), intent(in)}]{solhr,  }\item[{real(kind=kind\+\_\+phys), intent(in)}]{slag,  }\item[{real(kind=kind\+\_\+phys), intent(in)}]{sdec,  }\item[{real(kind=kind\+\_\+phys), intent(in)}]{cdec,  }\item[{real(kind=kind\+\_\+phys), dimension(\+:), intent(in)}]{sinlat,  }\item[{real(kind=kind\+\_\+phys), dimension(\+:), intent(in)}]{coslat,  }\item[{real(kind\+\_\+phys), intent(in)}]{con\+\_\+g,  }\item[{real(kind\+\_\+phys), intent(in)}]{con\+\_\+cp,  }\item[{real(kind\+\_\+phys), intent(in)}]{con\+\_\+pi,  }\item[{real(kind\+\_\+phys), intent(in)}]{con\+\_\+sbc,  }\item[{real(kind=kind\+\_\+phys), dimension(\+:), intent(in)}]{xlon,  }\item[{real(kind=kind\+\_\+phys), dimension(\+:), intent(in)}]{coszen,  }\item[{real(kind=kind\+\_\+phys), dimension(\+:), intent(in)}]{tsfc\+\_\+lnd,  }\item[{real(kind=kind\+\_\+phys), dimension(\+:), intent(in)}]{tsfc\+\_\+ice,  }\item[{real(kind=kind\+\_\+phys), dimension(\+:), intent(in)}]{tsfc\+\_\+wat,  }\item[{real(kind=kind\+\_\+phys), dimension(\+:), intent(in)}]{tf,  }\item[{real(kind=kind\+\_\+phys), dimension(\+:), intent(in)}]{tsflw,  }\item[{real(kind=kind\+\_\+phys), dimension(\+:), intent(in)}]{tsfc,  }\item[{real(kind=kind\+\_\+phys), dimension(\+:), intent(in)}]{sfcemis\+\_\+lnd,  }\item[{real(kind=kind\+\_\+phys), dimension(\+:), intent(in)}]{sfcemis\+\_\+ice,  }\item[{real(kind=kind\+\_\+phys), dimension(\+:), intent(in)}]{sfcemis\+\_\+wat,  }\item[{real(kind=kind\+\_\+phys), dimension(\+:), intent(in)}]{sfcdsw,  }\item[{real(kind=kind\+\_\+phys), dimension(\+:), intent(in)}]{sfcnsw,  }\item[{real(kind=kind\+\_\+phys), dimension(\+:), intent(in)}]{sfcdlw,  }\item[{real(kind=kind\+\_\+phys), dimension(\+:,\+:), intent(in)}]{swh,  }\item[{real(kind=kind\+\_\+phys), dimension(\+:,\+:), intent(in)}]{swhc,  }\item[{real(kind=kind\+\_\+phys), dimension(\+:,\+:), intent(in)}]{hlw,  }\item[{real(kind=kind\+\_\+phys), dimension(\+:,\+:), intent(in)}]{hlwc,  }\item[{real(kind=kind\+\_\+phys), dimension(\+:), intent(in)}]{sfcnirbmu,  }\item[{real(kind=kind\+\_\+phys), dimension(\+:), intent(in)}]{sfcnirdfu,  }\item[{real(kind=kind\+\_\+phys), dimension(\+:), intent(in)}]{sfcvisbmu,  }\item[{real(kind=kind\+\_\+phys), dimension(\+:), intent(in)}]{sfcvisdfu,  }\item[{real(kind=kind\+\_\+phys), dimension(\+:), intent(in)}]{sfcnirbmd,  }\item[{real(kind=kind\+\_\+phys), dimension(\+:), intent(in)}]{sfcnirdfd,  }\item[{real(kind=kind\+\_\+phys), dimension(\+:), intent(in)}]{sfcvisbmd,  }\item[{real(kind=kind\+\_\+phys), dimension(\+:), intent(in)}]{sfcvisdfd,  }\item[{integer, intent(in)}]{im,  }\item[{integer, intent(in)}]{levs,  }\item[{real(kind=kind\+\_\+phys), intent(in)}]{deltim,  }\item[{real(kind=kind\+\_\+phys), intent(in)}]{fhswr,  }\item[{logical, dimension(\+:), intent(in)}]{dry,  }\item[{logical, dimension(\+:), intent(in)}]{icy,  }\item[{logical, dimension(\+:), intent(in)}]{wet,  }\item[{logical, intent(in)}]{damp\+\_\+\+LW\+\_\+fluxadj,  }\item[{real(kind=kind\+\_\+phys), intent(in)}]{lfnc\+\_\+k,  }\item[{real(kind=kind\+\_\+phys), intent(in)}]{lfnc\+\_\+p0,  }\item[{logical, intent(in)}]{use\+\_\+\+LW\+\_\+jacobian,  }\item[{real(kind=kind\+\_\+phys), dimension(\+:), intent(in)}]{sfculw,  }\item[{logical, intent(in)}]{use\+\_\+med\+\_\+flux,  }\item[{real(kind=kind\+\_\+phys), dimension(\+:), intent(in)}]{sfculw\+\_\+med,  }\item[{real(kind=kind\+\_\+phys), dimension(\+:,\+:), intent(in)}]{fluxlw\+UP\+\_\+jac,  }\item[{real(kind=kind\+\_\+phys), dimension(\+:,\+:), intent(in)}]{t\+\_\+lay,  }\item[{real(kind=kind\+\_\+phys), dimension(\+:,\+:), intent(in)}]{p\+\_\+lay,  }\item[{real(kind=kind\+\_\+phys), dimension(\+:,\+:), intent(in)}]{p\+\_\+lev,  }\item[{real(kind=kind\+\_\+phys), dimension(\+:,\+:), intent(in)}]{flux2\+D\+\_\+lw\+UP,  }\item[{real(kind=kind\+\_\+phys), dimension(\+:,\+:), intent(in)}]{flux2\+D\+\_\+lw\+DOWN,  }\item[{logical, intent(in)}]{pert\+\_\+radtend,  }\item[{logical, intent(in)}]{do\+\_\+sppt,  }\item[{logical, intent(in)}]{ca\+\_\+global,  }\item[{real(kind=kind\+\_\+phys), dimension(\+:), intent(in)}]{tsfc\+\_\+radtime,  }\item[{real(kind=kind\+\_\+phys), dimension(\+:,\+:), intent(inout)}]{dtdt,  }\item[{real(kind=kind\+\_\+phys), dimension(\+:,\+:), intent(inout)}]{dtdtnp,  }\item[{real(kind=kind\+\_\+phys), dimension(\+:,\+:), intent(inout)}]{htrlw,  }\item[{real(kind=kind\+\_\+phys), dimension(\+:), intent(out)}]{adjsfcdsw,  }\item[{real(kind=kind\+\_\+phys), dimension(\+:), intent(out)}]{adjsfcnsw,  }\item[{real(kind=kind\+\_\+phys), dimension(\+:), intent(out)}]{adjsfcdlw,  }\item[{real(kind=kind\+\_\+phys), dimension(\+:), intent(out)}]{adjsfculw,  }\item[{real(kind=kind\+\_\+phys), dimension(\+:), intent(out)}]{adjsfculw\+\_\+lnd,  }\item[{real(kind=kind\+\_\+phys), dimension(\+:), intent(out)}]{adjsfculw\+\_\+ice,  }\item[{real(kind=kind\+\_\+phys), dimension(\+:), intent(out)}]{adjsfculw\+\_\+wat,  }\item[{real(kind=kind\+\_\+phys), dimension(\+:), intent(out)}]{xmu,  }\item[{real(kind=kind\+\_\+phys), dimension(\+:), intent(out)}]{xcosz,  }\item[{real(kind=kind\+\_\+phys), dimension(\+:), intent(out)}]{adjnirbmu,  }\item[{real(kind=kind\+\_\+phys), dimension(\+:), intent(out)}]{adjnirdfu,  }\item[{real(kind=kind\+\_\+phys), dimension(\+:), intent(out)}]{adjvisbmu,  }\item[{real(kind=kind\+\_\+phys), dimension(\+:), intent(out)}]{adjvisdfu,  }\item[{real(kind=kind\+\_\+phys), dimension(\+:), intent(out)}]{adjnirbmd,  }\item[{real(kind=kind\+\_\+phys), dimension(\+:), intent(out)}]{adjnirdfd,  }\item[{real(kind=kind\+\_\+phys), dimension(\+:), intent(out)}]{adjvisbmd,  }\item[{real(kind=kind\+\_\+phys), dimension(\+:), intent(out)}]{adjvisdfd,  }\item[{character(len=$\ast$), intent(out)}]{errmsg,  }\item[{integer, intent(out)}]{errflg }\end{DoxyParamCaption})}


\begin{DoxyItemize}
\item LW time-\/step adjustment\+:
\item replace upward longwave flux provided by the mediator (zero over lakes)
\item normalize by average value over radiation period for daytime.
\item adjust {\itshape sfc} net and downward SW fluxes for zenith angle changes.
\end{DoxyItemize}