\hypertarget{namespacesfc__nst}{}\doxysubsection{sfc\+\_\+nst Module Reference}
\label{namespacesfc__nst}\index{sfc\_nst@{sfc\_nst}}


This module contains the CCPP-\/compliant GFS near-\/surface sea temperature scheme.  


\doxysubsubsection*{Functions/\+Subroutines}
\begin{DoxyCompactItemize}
\item 
subroutine \mbox{\hyperlink{group__gfs__nst__main__mod_gaf1d4588f94fa0249277318bf34bd687b_gaf1d4588f94fa0249277318bf34bd687b}{sfc\+\_\+nst\+\_\+run}} (im, hvap, cp, hfus, jcal, eps, epsm1, rvrdm1, rd, rhw0, pi, tgice, sbc, ps, u1, v1, t1, q1, tref, cm, ch, lseaspray, fm, fm10, prsl1, prslki, prsik1, prslk1, wet, use\+\_\+lake\+\_\+model, xlon, sinlat, stress, sfcemis, dlwflx, sfcnsw, rain, timestep, kdt, solhr, xcosz, wind, flag\+\_\+iter, flag\+\_\+guess, nstf\+\_\+name1, nstf\+\_\+name4, nstf\+\_\+name5, lprnt, ipr, thsfc\+\_\+loc, tskin, tsurf, xt, xs, xu, xv, xz, zm, xtts, xzts, dt\+\_\+cool, z\+\_\+c, c\+\_\+0, c\+\_\+d, w\+\_\+0, w\+\_\+d, d\+\_\+conv, ifd, qrain, qsurf, gflux, cmm, chh, evap, hflx, ep, errmsg, errflg)
\end{DoxyCompactItemize}


\doxysubsubsection{Function/\+Subroutine Documentation}
\mbox{\Hypertarget{group__gfs__nst__main__mod_gaf1d4588f94fa0249277318bf34bd687b_gaf1d4588f94fa0249277318bf34bd687b}\label{group__gfs__nst__main__mod_gaf1d4588f94fa0249277318bf34bd687b_gaf1d4588f94fa0249277318bf34bd687b}} 
\index{sfc\_nst@{sfc\_nst}!sfc\_nst\_run@{sfc\_nst\_run}}
\index{sfc\_nst\_run@{sfc\_nst\_run}!sfc\_nst@{sfc\_nst}}
\doxyparagraph{\texorpdfstring{sfc\_nst\_run()}{sfc\_nst\_run()}}
{\footnotesize\ttfamily subroutine sfc\+\_\+nst\+::sfc\+\_\+nst\+\_\+run (\begin{DoxyParamCaption}\item[{integer, intent(in)}]{im,  }\item[{real (kind=kind\+\_\+phys), intent(in)}]{hvap,  }\item[{real (kind=kind\+\_\+phys), intent(in)}]{cp,  }\item[{real (kind=kind\+\_\+phys), intent(in)}]{hfus,  }\item[{real (kind=kind\+\_\+phys), intent(in)}]{jcal,  }\item[{real (kind=kind\+\_\+phys), intent(in)}]{eps,  }\item[{real (kind=kind\+\_\+phys), intent(in)}]{epsm1,  }\item[{real (kind=kind\+\_\+phys), intent(in)}]{rvrdm1,  }\item[{real (kind=kind\+\_\+phys), intent(in)}]{rd,  }\item[{real (kind=kind\+\_\+phys), intent(in)}]{rhw0,  }\item[{real (kind=kind\+\_\+phys), intent(in)}]{pi,  }\item[{real (kind=kind\+\_\+phys), intent(in)}]{tgice,  }\item[{real (kind=kind\+\_\+phys), intent(in)}]{sbc,  }\item[{real (kind=kind\+\_\+phys), dimension(\+:), intent(in)}]{ps,  }\item[{real (kind=kind\+\_\+phys), dimension(\+:), intent(in)}]{u1,  }\item[{real (kind=kind\+\_\+phys), dimension(\+:), intent(in)}]{v1,  }\item[{real (kind=kind\+\_\+phys), dimension(\+:), intent(in)}]{t1,  }\item[{real (kind=kind\+\_\+phys), dimension(\+:), intent(in)}]{q1,  }\item[{real (kind=kind\+\_\+phys), dimension(\+:), intent(in)}]{tref,  }\item[{real (kind=kind\+\_\+phys), dimension(\+:), intent(in)}]{cm,  }\item[{real (kind=kind\+\_\+phys), dimension(\+:), intent(in)}]{ch,  }\item[{logical, intent(in)}]{lseaspray,  }\item[{real (kind=kind\+\_\+phys), dimension(\+:), intent(in)}]{fm,  }\item[{real (kind=kind\+\_\+phys), dimension(\+:), intent(in)}]{fm10,  }\item[{real (kind=kind\+\_\+phys), dimension(\+:), intent(in)}]{prsl1,  }\item[{real (kind=kind\+\_\+phys), dimension(\+:), intent(in)}]{prslki,  }\item[{real (kind=kind\+\_\+phys), dimension(\+:), intent(in)}]{prsik1,  }\item[{real (kind=kind\+\_\+phys), dimension(\+:), intent(in)}]{prslk1,  }\item[{logical, dimension(\+:), intent(in)}]{wet,  }\item[{integer, dimension(\+:), intent(in)}]{use\+\_\+lake\+\_\+model,  }\item[{real (kind=kind\+\_\+phys), dimension(\+:), intent(in)}]{xlon,  }\item[{real (kind=kind\+\_\+phys), dimension(\+:), intent(in)}]{sinlat,  }\item[{real (kind=kind\+\_\+phys), dimension(\+:), intent(in)}]{stress,  }\item[{real (kind=kind\+\_\+phys), dimension(\+:), intent(in)}]{sfcemis,  }\item[{real (kind=kind\+\_\+phys), dimension(\+:), intent(in)}]{dlwflx,  }\item[{real (kind=kind\+\_\+phys), dimension(\+:), intent(in)}]{sfcnsw,  }\item[{real (kind=kind\+\_\+phys), dimension(\+:), intent(in)}]{rain,  }\item[{real (kind=kind\+\_\+phys), intent(in)}]{timestep,  }\item[{integer, intent(in)}]{kdt,  }\item[{real (kind=kind\+\_\+phys), intent(in)}]{solhr,  }\item[{real (kind=kind\+\_\+phys), dimension(\+:), intent(in)}]{xcosz,  }\item[{real (kind=kind\+\_\+phys), dimension(\+:), intent(in)}]{wind,  }\item[{logical, dimension(\+:), intent(in)}]{flag\+\_\+iter,  }\item[{logical, dimension(\+:), intent(in)}]{flag\+\_\+guess,  }\item[{integer, intent(in)}]{nstf\+\_\+name1,  }\item[{integer, intent(in)}]{nstf\+\_\+name4,  }\item[{integer, intent(in)}]{nstf\+\_\+name5,  }\item[{logical, intent(in)}]{lprnt,  }\item[{integer, intent(in)}]{ipr,  }\item[{logical, intent(in)}]{thsfc\+\_\+loc,  }\item[{real (kind=kind\+\_\+phys), dimension(\+:), intent(inout)}]{tskin,  }\item[{real (kind=kind\+\_\+phys), dimension(\+:), intent(inout)}]{tsurf,  }\item[{real (kind=kind\+\_\+phys), dimension(\+:), intent(inout)}]{xt,  }\item[{real (kind=kind\+\_\+phys), dimension(\+:), intent(inout)}]{xs,  }\item[{real (kind=kind\+\_\+phys), dimension(\+:), intent(inout)}]{xu,  }\item[{real (kind=kind\+\_\+phys), dimension(\+:), intent(inout)}]{xv,  }\item[{real (kind=kind\+\_\+phys), dimension(\+:), intent(inout)}]{xz,  }\item[{real (kind=kind\+\_\+phys), dimension(\+:), intent(inout)}]{zm,  }\item[{real (kind=kind\+\_\+phys), dimension(\+:), intent(inout)}]{xtts,  }\item[{real (kind=kind\+\_\+phys), dimension(\+:), intent(inout)}]{xzts,  }\item[{real (kind=kind\+\_\+phys), dimension(\+:), intent(inout)}]{dt\+\_\+cool,  }\item[{real (kind=kind\+\_\+phys), dimension(\+:), intent(inout)}]{z\+\_\+c,  }\item[{real (kind=kind\+\_\+phys), dimension(\+:), intent(inout)}]{c\+\_\+0,  }\item[{real (kind=kind\+\_\+phys), dimension(\+:), intent(inout)}]{c\+\_\+d,  }\item[{real (kind=kind\+\_\+phys), dimension(\+:), intent(inout)}]{w\+\_\+0,  }\item[{real (kind=kind\+\_\+phys), dimension(\+:), intent(inout)}]{w\+\_\+d,  }\item[{real (kind=kind\+\_\+phys), dimension(\+:), intent(inout)}]{d\+\_\+conv,  }\item[{real (kind=kind\+\_\+phys), dimension(\+:), intent(inout)}]{ifd,  }\item[{real (kind=kind\+\_\+phys), dimension(\+:), intent(inout)}]{qrain,  }\item[{real (kind=kind\+\_\+phys), dimension(\+:), intent(inout)}]{qsurf,  }\item[{real (kind=kind\+\_\+phys), dimension(\+:), intent(inout)}]{gflux,  }\item[{real (kind=kind\+\_\+phys), dimension(\+:), intent(inout)}]{cmm,  }\item[{real (kind=kind\+\_\+phys), dimension(\+:), intent(inout)}]{chh,  }\item[{real (kind=kind\+\_\+phys), dimension(\+:), intent(inout)}]{evap,  }\item[{real (kind=kind\+\_\+phys), dimension(\+:), intent(inout)}]{hflx,  }\item[{real (kind=kind\+\_\+phys), dimension(\+:), intent(inout)}]{ep,  }\item[{character(len=$\ast$), intent(out)}]{errmsg,  }\item[{integer, intent(out)}]{errflg }\end{DoxyParamCaption})}


\begin{DoxyItemize}
\item Calculate latent and sensible heat flux over open water with tskin.
\item Call \mbox{\hyperlink{group__gfs__nst__main__mod_ga145ec239c4ce636e671701d0f8780664_ga145ec239c4ce636e671701d0f8780664}{module\+\_\+nst\+\_\+water\+\_\+prop\+::density()}} to compute sea water density.
\begin{DoxyItemize}
\item Call \mbox{\hyperlink{group__gfs__nst__main__mod_ga8832504bf7674b233b0842af159b6bfb_ga8832504bf7674b233b0842af159b6bfb}{module\+\_\+nst\+\_\+water\+\_\+prop\+::rhocoef()}} to compute thermal expansion coefficient ({\itshape alpha}) and saline contraction coefficient ({\itshape beta}).
\end{DoxyItemize}
\item Calculate sensible heat flux ({\itshape qrain}) due to rainfall.
\item Calculate input non solar heat flux as upward = positive to models here
\item Call \mbox{\hyperlink{group__gfs__nst__main__mod_ga575fe07affb9f7ac503aafa593f99c16_ga575fe07affb9f7ac503aafa593f99c16}{cool\+\_\+skin()}}, which is the sub-\/layer cooling parameterization (Fairfall et al. (1996) \cite{fairall_et_al_1996}).
\item Call \mbox{\hyperlink{group__gfs__nst__main__mod_ga8a443d04ac3e0fda9d65715d0a15106b_ga8a443d04ac3e0fda9d65715d0a15106b}{convdepth()}} to calculate depth for convective adjustments.
\item Call the diurnal thermocline layer model \mbox{\hyperlink{group__gfs__nst__main__mod_gafd47af48d99737aba7c03ab6d1c17540_gafd47af48d99737aba7c03ab6d1c17540}{dtm\+\_\+1p()}}.
\item If {\itshape dtl} heat content {\itshape xt} \texorpdfstring{$>$}{>} 0.\+0, call \mbox{\hyperlink{group__gfs__nst__main__mod_gab2d5db491828a6ccdd93d0a75c18f90a_gab2d5db491828a6ccdd93d0a75c18f90a}{dtm\+\_\+1p\+\_\+mda()}} to apply minimum depth adjustment (mda).
\item If {\itshape dtl} thickness \texorpdfstring{$>$}{>}= \mbox{\hyperlink{namespacemodule__nst__parameters_adda42c3931b0784ea6de609446b63cd0_adda42c3931b0784ea6de609446b63cd0}{module\+\_\+nst\+\_\+parameters\+::z\+\_\+w\+\_\+max}}, call \mbox{\hyperlink{group__gfs__nst__main__mod_gac580da303d7ed06da1f8c095dcf848ba_gac580da303d7ed06da1f8c095dcf848ba}{dtl\+\_\+reset()}} to reset xt/xs/x/xv to zero, and xz to \mbox{\hyperlink{namespacemodule__nst__parameters_adda42c3931b0784ea6de609446b63cd0_adda42c3931b0784ea6de609446b63cd0}{module\+\_\+nst\+\_\+parameters\+::z\+\_\+w\+\_\+max}}.
\item If thickness of free convection layer \texorpdfstring{$>$}{>} 0.\+0, call \mbox{\hyperlink{group__gfs__nst__main__mod_gaf3e1724af903b4b2b330022953959678_gaf3e1724af903b4b2b330022953959678}{dtm\+\_\+1p\+\_\+fca()}} to apply free convection adjustment.
\begin{DoxyItemize}
\item If {\itshape dtl} thickness \texorpdfstring{$>$}{>}= \mbox{\hyperlink{namespacemodule__nst__parameters_adda42c3931b0784ea6de609446b63cd0_adda42c3931b0784ea6de609446b63cd0}{module\+\_\+nst\+\_\+parameters\+::z\+\_\+w\+\_\+max()}}, call \mbox{\hyperlink{group__gfs__nst__main__mod_gac580da303d7ed06da1f8c095dcf848ba_gac580da303d7ed06da1f8c095dcf848ba}{dtl\+\_\+reset()}} to reset xt/xs/x/xv to zero, and xz to \mbox{\hyperlink{namespacemodule__nst__parameters_adda42c3931b0784ea6de609446b63cd0_adda42c3931b0784ea6de609446b63cd0}{module\+\_\+nst\+\_\+parameters\+::z\+\_\+w\+\_\+max()}}.
\end{DoxyItemize}
\item Call \mbox{\hyperlink{group__gfs__nst__main__mod_ga45cae76cb75a5002a0dc89ec5a340d18_ga45cae76cb75a5002a0dc89ec5a340d18}{sw\+\_\+ps\+\_\+9b()}} to compute the fraction of the solar radiation absorbed by the depth {\itshape delz} (Paulson and Simpson (1981) \cite{paulson_and_simpson_1981}). And calculate the total heat absorbed in warm layer.
\item Call \mbox{\hyperlink{group__gfs__nst__main__mod_gabba35e4e5b182736d1769dfd527e20d1_gabba35e4e5b182736d1769dfd527e20d1}{cal\+\_\+ttop()}} to calculate the diurnal warming amount at the top layer with thickness of {\itshape dz}.
\item Call \mbox{\hyperlink{group__gfs__nst__main__mod_ga85daa66ec3f9754880f9d3a0e4b7930d_ga85daa66ec3f9754880f9d3a0e4b7930d}{dtm\+\_\+1p\+\_\+tla()}} to apply top layer adjustment.
\item Call dt\+\_\+1p\+\_\+mwa() to apply maximum warming adjustment.
\item Call \mbox{\hyperlink{group__gfs__nst__main__mod_ga7fb7e8cac3ea5dd061b8ec533532d2e6_ga7fb7e8cac3ea5dd061b8ec533532d2e6}{dtm\+\_\+1p\+\_\+mta()}} to apply maximum temperature adjustment.
\item Call \mbox{\hyperlink{group__gfs__nst__main__mod_ga25d34d9108cef737a45cce10e4269279_ga25d34d9108cef737a45cce10e4269279}{get\+\_\+dtzm\+\_\+point()}} to computes {\itshape dtz} and {\itshape tsurf}.
\item Call \mbox{\hyperlink{group__gfs__nst__main__mod_gad57616c57a22ebce71578b7412cb3d96_gad57616c57a22ebce71578b7412cb3d96}{cal\+\_\+w()}} to calculate {\itshape w\+\_\+0} and {\itshape w\+\_\+d}.
\item Calculate latent and sensible heat flux over open water with updated tskin for the grids of open water and the iteration is on.
\item Include sea spray effects
\end{DoxyItemize}

References \mbox{\hyperlink{group__gfs__nst__main__mod_gabba35e4e5b182736d1769dfd527e20d1_gabba35e4e5b182736d1769dfd527e20d1}{nst\+\_\+module\+::cal\+\_\+ttop()}}, \mbox{\hyperlink{group__gfs__nst__main__mod_gad57616c57a22ebce71578b7412cb3d96_gad57616c57a22ebce71578b7412cb3d96}{nst\+\_\+module\+::cal\+\_\+w()}}, \mbox{\hyperlink{group__gfs__nst__main__mod_ga9f620ef24937a68d2deabf48c0af0878_ga9f620ef24937a68d2deabf48c0af0878}{module\+\_\+nst\+\_\+water\+\_\+prop\+::compjd()}}, \mbox{\hyperlink{group__gfs__nst__main__mod_ga8a443d04ac3e0fda9d65715d0a15106b_ga8a443d04ac3e0fda9d65715d0a15106b}{nst\+\_\+module\+::convdepth()}}, \mbox{\hyperlink{group__gfs__nst__main__mod_ga575fe07affb9f7ac503aafa593f99c16_ga575fe07affb9f7ac503aafa593f99c16}{nst\+\_\+module\+::cool\+\_\+skin()}}, \mbox{\hyperlink{group__gfs__nst__main__mod_ga145ec239c4ce636e671701d0f8780664_ga145ec239c4ce636e671701d0f8780664}{module\+\_\+nst\+\_\+water\+\_\+prop\+::density()}}, \mbox{\hyperlink{group__gfs__nst__main__mod_gac580da303d7ed06da1f8c095dcf848ba_gac580da303d7ed06da1f8c095dcf848ba}{nst\+\_\+module\+::dtl\+\_\+reset()}}, \mbox{\hyperlink{group__gfs__nst__main__mod_gafd47af48d99737aba7c03ab6d1c17540_gafd47af48d99737aba7c03ab6d1c17540}{nst\+\_\+module\+::dtm\+\_\+1p()}}, \mbox{\hyperlink{group__gfs__nst__main__mod_gaf3e1724af903b4b2b330022953959678_gaf3e1724af903b4b2b330022953959678}{nst\+\_\+module\+::dtm\+\_\+1p\+\_\+fca()}}, \mbox{\hyperlink{group__gfs__nst__main__mod_gab2d5db491828a6ccdd93d0a75c18f90a_gab2d5db491828a6ccdd93d0a75c18f90a}{nst\+\_\+module\+::dtm\+\_\+1p\+\_\+mda()}}, \mbox{\hyperlink{group__gfs__nst__main__mod_ga7fb7e8cac3ea5dd061b8ec533532d2e6_ga7fb7e8cac3ea5dd061b8ec533532d2e6}{nst\+\_\+module\+::dtm\+\_\+1p\+\_\+mta()}}, \mbox{\hyperlink{group__gfs__nst__main__mod_ga2e08a6c88cc2edc6501027f42b18c335_ga2e08a6c88cc2edc6501027f42b18c335}{nst\+\_\+module\+::dtm\+\_\+1p\+\_\+mwa()}}, \mbox{\hyperlink{group__gfs__nst__main__mod_ga85daa66ec3f9754880f9d3a0e4b7930d_ga85daa66ec3f9754880f9d3a0e4b7930d}{nst\+\_\+module\+::dtm\+\_\+1p\+\_\+tla()}}, \mbox{\hyperlink{group__gfs__nst__main__mod_ga25d34d9108cef737a45cce10e4269279_ga25d34d9108cef737a45cce10e4269279}{module\+\_\+nst\+\_\+water\+\_\+prop\+::get\+\_\+dtzm\+\_\+point()}}, \mbox{\hyperlink{group__gfs__nst__main__mod_gae4ece51aa1179683f77efbf509275c64_gae4ece51aa1179683f77efbf509275c64}{module\+\_\+nst\+\_\+water\+\_\+prop\+::grv()}}, \mbox{\hyperlink{group__gfs__nst__main__mod_ga8832504bf7674b233b0842af159b6bfb_ga8832504bf7674b233b0842af159b6bfb}{module\+\_\+nst\+\_\+water\+\_\+prop\+::rhocoef()}}, and \mbox{\hyperlink{group__gfs__nst__main__mod_gae1de354735fac5ea60e260ca0f4ae76d_gae1de354735fac5ea60e260ca0f4ae76d}{module\+\_\+nst\+\_\+water\+\_\+prop\+::solar\+\_\+time\+\_\+from\+\_\+julian()}}.

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