\hypertarget{group__cu__gf__sh__group}{}\doxysubsection{Grell-\/\+Freitas Shallow Convection Module}
\label{group__cu__gf__sh__group}\index{Grell-\/Freitas Shallow Convection Module@{Grell-\/Freitas Shallow Convection Module}}


This module contains Grell-\/\+Freitas shallow convection scheme.

GF shallow convection as described in Grell and Freitas (2014) \cite{grell_and_freitas_2014}. input variables are\+:  


Collaboration diagram for Grell-\/\+Freitas Shallow Convection Module\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=342pt]{group__cu__gf__sh__group}
\end{center}
\end{figure}
\doxysubsubsection*{Functions/\+Subroutines}
\begin{DoxyCompactItemize}
\item 
subroutine \mbox{\hyperlink{group__cu__gf__sh__group_gac3f853aacccfdee63bf9a5e64611683f_gac3f853aacccfdee63bf9a5e64611683f}{cu\+\_\+gf\+\_\+sh\+::cu\+\_\+gf\+\_\+sh\+\_\+run}} (us, vs, zo, t, q, z1, tn, qo, po, psur, dhdt, kpbl, rho, hfx, qfx, xland, ichoice, tcrit, dtime, zuo, xmb\+\_\+out, kbcon, ktop, k22, ierr, ierrc, outt, outq, outqc, outu, outv, cnvwt, pre, cupclw, itf, ktf, its, ite, kts, kte, ipr, tropics)
\end{DoxyCompactItemize}


\doxysubsubsection{Detailed Description}

\begin{DoxyParams}{Parameters}
{\em us} & x wind updated by physics \\
\hline
{\em vs} & y wind updated by physics \\
\hline
{\em zo} & height at model levels \\
\hline
{\em t,tn} & temperature without and with forcing at model levels \\
\hline
{\em q,qo} & mixing ratio without and with forcing at model levels \\
\hline
{\em po} & pressure at model levels (mb) \\
\hline
{\em psur} & surface pressure (mb) \\
\hline
{\em z1} & surface height \\
\hline
{\em dhdt} & forcing for boundary layer equilibrium \\
\hline
{\em hfx,qfx} & in w/m2 (positive, if upward from sfc) \\
\hline
{\em kpbl} & level of boundaty layer height \\
\hline
{\em rho} & moist air density \\
\hline
{\em xland} & land mask (1. for land) \\
\hline
{\em ichoice} & which closure to choose ~\newline
 1\+: old g ~\newline
 2\+: zws ~\newline
 3\+: dhdt ~\newline
 0\+: average \\
\hline
{\em tcrit} & parameter for water/ice conversion (258) \\
\hline
{\em dtime} & physics time step \\
\hline
{\em zuo} & normalized mass flux profile \\
\hline
{\em xmb\+\_\+out} & base mass flux \\
\hline
{\em kbcon} & convective cloud base \\
\hline
{\em ktop} & cloud top \\
\hline
{\em k22} & level of updraft originating air \\
\hline
{\em ierr} & error flag \\
\hline
{\em ierrc} & error description \\
\hline
{\em outt} & temperature tendency (k/s) \\
\hline
{\em outq} & mixing ratio tendency (kg/kg/s) \\
\hline
{\em outqc} & cloud water/ice tendency (kg/kg/s) \\
\hline
{\em outu} & x wind tendency \\
\hline
{\em outv} & y wind tendency \\
\hline
{\em pre} & precip rate (mm/s) \\
\hline
{\em cupclw} & incloud mixing ratio of cloudwater/ice (for radiation) this needs heavy tuning factors, since cloud fraction is not included (kg/kg) \\
\hline
{\em cnvwt} & required for gfs physics \\
\hline
{\em itf,ktf,its,ite,kts,kte} & are dimensions \\
\hline
{\em ipr} & horizontal index of printed column \\
\hline
{\em tropics} & =0 \\
\hline
\end{DoxyParams}
\hypertarget{group__cu__gf__sh__group_gen_cu_gf_sh_run}{}\doxysubsubsection{Grell-\/\+Freitas Shallow Convection General Algorithm}\label{group__cu__gf__sh__group_gen_cu_gf_sh_run}


\doxysubsubsection{Function/\+Subroutine Documentation}
\mbox{\Hypertarget{group__cu__gf__sh__group_gac3f853aacccfdee63bf9a5e64611683f_gac3f853aacccfdee63bf9a5e64611683f}\label{group__cu__gf__sh__group_gac3f853aacccfdee63bf9a5e64611683f_gac3f853aacccfdee63bf9a5e64611683f}} 
\index{Grell-\/Freitas Shallow Convection Module@{Grell-\/Freitas Shallow Convection Module}!cu\_gf\_sh\_run@{cu\_gf\_sh\_run}}
\index{cu\_gf\_sh\_run@{cu\_gf\_sh\_run}!Grell-\/Freitas Shallow Convection Module@{Grell-\/Freitas Shallow Convection Module}}
\doxyparagraph{\texorpdfstring{cu\_gf\_sh\_run()}{cu\_gf\_sh\_run()}}
{\footnotesize\ttfamily subroutine cu\+\_\+gf\+\_\+sh\+::cu\+\_\+gf\+\_\+sh\+\_\+run (\begin{DoxyParamCaption}\item[{real(kind=kind\+\_\+phys), dimension (its\+:ite,kts\+:kte), intent(in)}]{us,  }\item[{real(kind=kind\+\_\+phys), dimension (its\+:ite,kts\+:kte), intent(in)}]{vs,  }\item[{real(kind=kind\+\_\+phys), dimension (its\+:ite,kts\+:kte)}]{zo,  }\item[{real(kind=kind\+\_\+phys), dimension (its\+:ite,kts\+:kte), intent(in)}]{t,  }\item[{real(kind=kind\+\_\+phys), dimension (its\+:ite,kts\+:kte), intent(inout)}]{q,  }\item[{real(kind=kind\+\_\+phys), dimension (its\+:ite), intent(in)}]{z1,  }\item[{real(kind=kind\+\_\+phys), dimension (its\+:ite,kts\+:kte), intent(in)}]{tn,  }\item[{real(kind=kind\+\_\+phys), dimension (its\+:ite,kts\+:kte), intent(inout)}]{qo,  }\item[{real(kind=kind\+\_\+phys), dimension (its\+:ite,kts\+:kte), intent(in)}]{po,  }\item[{real(kind=kind\+\_\+phys), dimension (its\+:ite), intent(in)}]{psur,  }\item[{real(kind=kind\+\_\+phys), dimension (its\+:ite,kts\+:kte), intent(in)}]{dhdt,  }\item[{integer, dimension (its\+:ite), intent(in)}]{kpbl,  }\item[{real(kind=kind\+\_\+phys), dimension (its\+:ite,kts\+:kte), intent(in)}]{rho,  }\item[{real(kind=kind\+\_\+phys), dimension (its\+:ite), intent(in)}]{hfx,  }\item[{real(kind=kind\+\_\+phys), dimension (its\+:ite), intent(in)}]{qfx,  }\item[{real(kind=kind\+\_\+phys), dimension (its\+:ite), intent(in)}]{xland,  }\item[{integer, intent(in)}]{ichoice,  }\item[{real(kind=kind\+\_\+phys), intent(in)}]{tcrit,  }\item[{real(kind=kind\+\_\+phys), intent(in)}]{dtime,  }\item[{real(kind=kind\+\_\+phys), dimension (its\+:ite,kts\+:kte), intent(inout)}]{zuo,  }\item[{real(kind=kind\+\_\+phys), dimension (its\+:ite), intent(out)}]{xmb\+\_\+out,  }\item[{integer, dimension (its\+:ite), intent(out)}]{kbcon,  }\item[{integer, dimension (its\+:ite), intent(out)}]{ktop,  }\item[{integer, dimension (its\+:ite), intent(out)}]{k22,  }\item[{integer, dimension (its\+:ite), intent(inout)}]{ierr,  }\item[{character$\ast$50, dimension(its\+:ite)}]{ierrc,  }\item[{real(kind=kind\+\_\+phys), dimension (its\+:ite,kts\+:kte), intent(inout)}]{outt,  }\item[{real(kind=kind\+\_\+phys), dimension (its\+:ite,kts\+:kte), intent(inout)}]{outq,  }\item[{real(kind=kind\+\_\+phys), dimension (its\+:ite,kts\+:kte), intent(inout)}]{outqc,  }\item[{real(kind=kind\+\_\+phys), dimension (its\+:ite,kts\+:kte), intent(inout)}]{outu,  }\item[{real(kind=kind\+\_\+phys), dimension (its\+:ite,kts\+:kte), intent(inout)}]{outv,  }\item[{real(kind=kind\+\_\+phys), dimension (its\+:ite,kts\+:kte), intent(inout)}]{cnvwt,  }\item[{real(kind=kind\+\_\+phys), dimension (its\+:ite)}]{pre,  }\item[{real(kind=kind\+\_\+phys), dimension (its\+:ite,kts\+:kte), intent(inout)}]{cupclw,  }\item[{integer, intent(in)}]{itf,  }\item[{integer, intent(in)}]{ktf,  }\item[{integer, intent(in)}]{its,  }\item[{integer, intent(in)}]{ite,  }\item[{integer, intent(in)}]{kts,  }\item[{integer, intent(in)}]{kte,  }\item[{integer, intent(in)}]{ipr,  }\item[{integer, dimension (its\+:ite), intent(in)}]{tropics }\end{DoxyParamCaption})}


\begin{DoxyItemize}
\item Initial detrainmentrates
\item Calculate zws for shallow convection closure (grant 2001)
\item Determin max height(m) above ground where updraft air can originate
\item Call \mbox{\hyperlink{group__cu__gf__deep__group_gabf84026a03bf21d4ba4eaa77efa11d93_gabf84026a03bf21d4ba4eaa77efa11d93}{cup\+\_\+env()}} to calculate moist static energy, heights, qes
\item Call \mbox{\hyperlink{group__cu__gf__deep__group_ga56111f64554b06083c77b1bec308b6ea_ga56111f64554b06083c77b1bec308b6ea}{cup\+\_\+env\+\_\+clev()}} to calculate environmental values on cloud levels
\item Determine level with highest moist static energy content ({\ttfamily k22})
\item Call \mbox{\hyperlink{group__cu__gf__deep__group_ga1c93354ade8bedf132cb748238d59ff1_ga1c93354ade8bedf132cb748238d59ff1}{get\+\_\+cloud\+\_\+bc()}} and \mbox{\hyperlink{group__cu__gf__deep__group_ga0a1b26105b052b8c66d7eb99a64c032e_ga0a1b26105b052b8c66d7eb99a64c032e}{cup\+\_\+kbcon()}} to determine the level of convective cloud base ({\ttfamily kbcon})
\item Call \mbox{\hyperlink{group__cu__gf__deep__group_gadce84bec635baa56686cb533dbc1e456_gadce84bec635baa56686cb533dbc1e456}{cup\+\_\+minimi()}} and \mbox{\hyperlink{group__cu__gf__deep__group_ga05c3c7ba138f383b801c11f6022521fc_ga05c3c7ba138f383b801c11f6022521fc}{get\+\_\+inversion\+\_\+layers()}} to get inversion layers for cloud tops
\item Call \mbox{\hyperlink{group__cu__gf__deep__group_ga7ab8f34f0c857d59f7c9b44e7126e83b_ga7ab8f34f0c857d59f7c9b44e7126e83b}{rates\+\_\+up\+\_\+pdf()}} to get normalized mass flux profile
\item Call \mbox{\hyperlink{group__cu__gf__deep__group_ga3e83c3a033d897332227dcf1820cce9c_ga3e83c3a033d897332227dcf1820cce9c}{get\+\_\+lateral\+\_\+massflux()}} to calculate mass entrainment and detrainment
\end{DoxyItemize}

References \mbox{\hyperlink{group__cu__gf__deep__group_gabf84026a03bf21d4ba4eaa77efa11d93_gabf84026a03bf21d4ba4eaa77efa11d93}{cu\+\_\+gf\+\_\+deep\+::cup\+\_\+env()}}, \mbox{\hyperlink{group__cu__gf__deep__group_ga56111f64554b06083c77b1bec308b6ea_ga56111f64554b06083c77b1bec308b6ea}{cu\+\_\+gf\+\_\+deep\+::cup\+\_\+env\+\_\+clev()}}, \mbox{\hyperlink{group__cu__gf__deep__group_ga0a1b26105b052b8c66d7eb99a64c032e_ga0a1b26105b052b8c66d7eb99a64c032e}{cu\+\_\+gf\+\_\+deep\+::cup\+\_\+kbcon()}}, \mbox{\hyperlink{group__cu__gf__deep__group_gadce84bec635baa56686cb533dbc1e456_gadce84bec635baa56686cb533dbc1e456}{cu\+\_\+gf\+\_\+deep\+::cup\+\_\+minimi()}}, \mbox{\hyperlink{group__cu__gf__deep__group_ga5b68f3b33a94b5a23df8c21759ffb320_ga5b68f3b33a94b5a23df8c21759ffb320}{cu\+\_\+gf\+\_\+deep\+::cup\+\_\+up\+\_\+aa0()}}, \mbox{\hyperlink{group__cu__gf__deep__group_ga1c93354ade8bedf132cb748238d59ff1_ga1c93354ade8bedf132cb748238d59ff1}{cu\+\_\+gf\+\_\+deep\+::get\+\_\+cloud\+\_\+bc()}}, \mbox{\hyperlink{group__cu__gf__deep__group_ga05c3c7ba138f383b801c11f6022521fc_ga05c3c7ba138f383b801c11f6022521fc}{cu\+\_\+gf\+\_\+deep\+::get\+\_\+inversion\+\_\+layers()}}, \mbox{\hyperlink{group__cu__gf__deep__group_ga3e83c3a033d897332227dcf1820cce9c_ga3e83c3a033d897332227dcf1820cce9c}{cu\+\_\+gf\+\_\+deep\+::get\+\_\+lateral\+\_\+massflux()}}, and \mbox{\hyperlink{group__cu__gf__deep__group_ga7ab8f34f0c857d59f7c9b44e7126e83b_ga7ab8f34f0c857d59f7c9b44e7126e83b}{cu\+\_\+gf\+\_\+deep\+::rates\+\_\+up\+\_\+pdf()}}.



Referenced by \mbox{\hyperlink{group__cu__gf__group_ga5946f8b09cdcaf4fe6cee01377f4de7a_ga5946f8b09cdcaf4fe6cee01377f4de7a}{cu\+\_\+gf\+\_\+driver\+::cu\+\_\+gf\+\_\+driver\+\_\+run()}}.

Here is the call graph for this function\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{group__cu__gf__sh__group_gac3f853aacccfdee63bf9a5e64611683f_gac3f853aacccfdee63bf9a5e64611683f_cgraph}
\end{center}
\end{figure}
Here is the caller graph for this function\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=336pt]{group__cu__gf__sh__group_gac3f853aacccfdee63bf9a5e64611683f_gac3f853aacccfdee63bf9a5e64611683f_icgraph}
\end{center}
\end{figure}
