\hypertarget{group__gfs__sice__main}{}\doxysubsection{GFS sfc\+\_\+sice Module}
\label{group__gfs__sice__main}\index{GFS sfc\_sice Module@{GFS sfc\_sice Module}}


This is three-\/layer thermodynomics sea-\/ice model based on Winton (2000) \cite{winton_2000}.  


\doxysubsubsection*{Functions/\+Subroutines}
\begin{DoxyCompactItemize}
\item 
subroutine \mbox{\hyperlink{group__gfs__sice__main_ga149e1298ecc35315fae91f67b158b4ad_ga149e1298ecc35315fae91f67b158b4ad}{sfc\+\_\+sice\+::sfc\+\_\+sice\+\_\+run}} (im, kice, sbc, hvap, tgice, cp, eps, epsm1, rvrdm1, grav, t0c, rd, ps, t1, q1, delt, sfcemis, dlwflx, sfcnsw, sfcdsw, srflag, cm, ch, prsl1, prslki, prsik1, prslk1, wind, flag\+\_\+iter, use\+\_\+lake\+\_\+model, lprnt, ipr, thsfc\+\_\+loc, hice, fice, tice, weasd, tsfc\+\_\+wat, tprcp, tiice, ep, snwdph, qss\+\_\+i, qss\+\_\+w, snowmt, gflux, cmm, chh, evapi, evapw, hflxi, hflxw, islmsk, errmsg, errflg
\end{DoxyCompactItemize}
\begin{DoxyCompactItemize}
\item 
subroutine \mbox{\hyperlink{group__gfs__sice__main_ga7ef26147a1c8d851bfaf0a7574ba9fbb_ga7ef26147a1c8d851bfaf0a7574ba9fbb}{ice3lay}}
\begin{DoxyCompactList}\small\item\em This subroutine is the entity of three-\/layer sea ice vertical thermodynamics based on Winton(2000) \cite{winton_2000} . \end{DoxyCompactList}\end{DoxyCompactItemize}


\doxysubsubsection{Detailed Description}
\hypertarget{group__gfs__sice__main_general_sice_run}{}\doxysubsubsection{General Algorithm}\label{group__gfs__sice__main_general_sice_run}
The model has four prognostic variables\+: the snow layer thickness $h_s$, the ice layer thickness $h_i$, the upper and lower ice layer temperatures located at the midpoints of the layers $h_i/4$ and $3h_i/4$ below the ice surface, respectively $T_1$ and $T_2$. The temperature of the bottom of the ice is fixed at $T_f$, the freezing temperature of seawater. The temperature of the top of the ice or snow, $T_s$, is determined from the surface energy balance. The model consists of a zero-\/heat-\/capacity snow layer overlying two equally thick sea ice layers (Figure 1). The upper ice layer has a variable heat capacity to represent brine pockets.  The ice model main program \mbox{\hyperlink{group__gfs__sice__main_ga7ef26147a1c8d851bfaf0a7574ba9fbb_ga7ef26147a1c8d851bfaf0a7574ba9fbb}{ice3lay()}} performs two functions\+:
\begin{DoxyItemize}
\item {\bfseries{Calculation}} {\bfseries{of}} {\bfseries{ice}} {\bfseries{temperature}} ~\newline
 The surface temperature is determined from the diagnostic balance between the upward conduction of heat through snow and/or ice and upward flux of heat from the surface.
\item {\bfseries{Calculation}} {\bfseries{of}} {\bfseries{ice}} {\bfseries{and}} {\bfseries{snow}} {\bfseries{changes}} ~\newline
 In addition to calculating ice temperature changes, the ice model must also readjust the sizes of the snow and ice layers 1) to accommodate mass fluxes at the upper and lower surfaces, 2) to convert snow below the water line to ice, and 3) to equalize the thickness of the two ice layers. 
\end{DoxyItemize}\hypertarget{group__gfs__sice__main_detailed_sice_run}{}\doxysubsubsection{Detailed Algorithm}\label{group__gfs__sice__main_detailed_sice_run}
\hypertarget{group__gfs__sice__main_arg_table_sfc_sice_run}{}\doxysubsubsection{Argument Table}\label{group__gfs__sice__main_arg_table_sfc_sice_run}
 

\doxysubsubsection{Function/\+Subroutine Documentation}
\mbox{\Hypertarget{group__gfs__sice__main_ga149e1298ecc35315fae91f67b158b4ad_ga149e1298ecc35315fae91f67b158b4ad}\label{group__gfs__sice__main_ga149e1298ecc35315fae91f67b158b4ad_ga149e1298ecc35315fae91f67b158b4ad}} 
\index{GFS sfc\_sice Module@{GFS sfc\_sice Module}!sfc\_sice\_run@{sfc\_sice\_run}}
\index{sfc\_sice\_run@{sfc\_sice\_run}!GFS sfc\_sice Module@{GFS sfc\_sice Module}}
\doxyparagraph{\texorpdfstring{sfc\_sice\_run()}{sfc\_sice\_run()}}
{\footnotesize\ttfamily subroutine sfc\+\_\+sice\+::sfc\+\_\+sice\+\_\+run (\begin{DoxyParamCaption}\item[{integer, intent(in)}]{im,  }\item[{integer, intent(in)}]{kice,  }\item[{real (kind=kind\+\_\+phys), intent(in)}]{sbc,  }\item[{real (kind=kind\+\_\+phys), intent(in)}]{hvap,  }\item[{real (kind=kind\+\_\+phys), intent(in)}]{tgice,  }\item[{real (kind=kind\+\_\+phys), intent(in)}]{cp,  }\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)}]{grav,  }\item[{real (kind=kind\+\_\+phys), intent(in)}]{t0c,  }\item[{real (kind=kind\+\_\+phys), intent(in)}]{rd,  }\item[{real (kind=kind\+\_\+phys), dimension(\+:), intent(in)}]{ps,  }\item[{real (kind=kind\+\_\+phys), dimension(\+:), intent(in)}]{t1,  }\item[{real (kind=kind\+\_\+phys), dimension(\+:), intent(in)}]{q1,  }\item[{real (kind=kind\+\_\+phys), intent(in)}]{delt,  }\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)}]{sfcdsw,  }\item[{real (kind=kind\+\_\+phys), dimension(\+:), intent(in)}]{srflag,  }\item[{real (kind=kind\+\_\+phys), dimension(\+:), intent(in)}]{cm,  }\item[{real (kind=kind\+\_\+phys), dimension(\+:), intent(in)}]{ch,  }\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[{real (kind=kind\+\_\+phys), dimension(\+:), intent(in)}]{wind,  }\item[{logical, dimension(im), intent(in)}]{flag\+\_\+iter,  }\item[{integer, dimension(im), intent(in)}]{use\+\_\+lake\+\_\+model,  }\item[{logical, intent(in)}]{lprnt,  }\item[{integer, intent(in)}]{ipr,  }\item[{logical, intent(in)}]{thsfc\+\_\+loc,  }\item[{real (kind=kind\+\_\+phys), dimension(\+:), intent(inout)}]{hice,  }\item[{real (kind=kind\+\_\+phys), dimension(\+:), intent(inout)}]{fice,  }\item[{real (kind=kind\+\_\+phys), dimension(\+:), intent(inout)}]{tice,  }\item[{real (kind=kind\+\_\+phys), dimension(\+:), intent(inout)}]{weasd,  }\item[{real (kind=kind\+\_\+phys), dimension(\+:), intent(inout)}]{tsfc\+\_\+wat,  }\item[{real (kind=kind\+\_\+phys), dimension(\+:), intent(inout)}]{tprcp,  }\item[{real (kind=kind\+\_\+phys), dimension(\+:,\+:), intent(inout)}]{tiice,  }\item[{real (kind=kind\+\_\+phys), dimension(\+:), intent(inout)}]{ep,  }\item[{real (kind=kind\+\_\+phys), dimension(\+:), intent(inout)}]{snwdph,  }\item[{real (kind=kind\+\_\+phys), dimension(\+:), intent(inout)}]{qss\+\_\+i,  }\item[{real (kind=kind\+\_\+phys), dimension(\+:), intent(inout)}]{qss\+\_\+w,  }\item[{real (kind=kind\+\_\+phys), dimension(\+:), intent(inout)}]{snowmt,  }\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)}]{evapi,  }\item[{real (kind=kind\+\_\+phys), dimension(\+:), intent(inout)}]{evapw,  }\item[{real (kind=kind\+\_\+phys), dimension(\+:), intent(inout)}]{hflxi,  }\item[{real (kind=kind\+\_\+phys), dimension(\+:), intent(inout)}]{hflxw,  }\item[{integer, dimension(\+:), intent(in)}]{islmsk,  }\item[{character(len=$\ast$), intent(out)}]{errmsg,  }\item[{integer, intent(out)}]{errflg }\end{DoxyParamCaption})}

program history log\+:
\begin{DoxyItemize}
\item 2005 -- xingren wu created from original progtm and added two-\/layer ice model
\item 200x -- sarah lu added flag\+\_\+iter
\item oct 2006 -- h. wei added cmm and chh to output
\item 2007 -- x. wu modified for mom4 coupling (i.\+e. cpldice) (not used anymore)
\item 2007 -- s. moorthi micellaneous changes
\item may 2009 -- y.-\/t. hou modified to include surface emissivity effect on lw radiation. replaced the confusing slrad with sfc net sw sfcnsw (dn-\/up). reformatted the code and add program documentation block.
\item sep 2009 -- s. moorthi removed rcl, changed pressure units and further optimized
\item jan 2015 -- x. wu change \char`\"{}cimin = 0.\+15\char`\"{} for both uncoupled and coupled case
\item Set flag for sea-\/ice.
\item Convert snow depth in water equivalent from mm to m unit.
\item Calculate sensible and latent heat flux over open water \& sea ice.
\item Calculate net solar incoming at top {\itshape sneti}.
\item Calculate net non-\/solar and upir heat flux @ ice surface {\itshape hfi}.
\item Calculate heat flux derivative at surface {\itshape hfd}.
\item Assigin heat flux from ocean {\itshape focn} and snowfall rate as constants, which should be from ocean model and other physics.
\item Initialize snow depth {\itshape snowd}.
\item Call the three-\/layer thermodynamics sea ice model \mbox{\hyperlink{group__gfs__sice__main_ga7ef26147a1c8d851bfaf0a7574ba9fbb_ga7ef26147a1c8d851bfaf0a7574ba9fbb}{ice3lay()}}.
\end{DoxyItemize}

References \mbox{\hyperlink{group__gfs__sice__main_ga7ef26147a1c8d851bfaf0a7574ba9fbb_ga7ef26147a1c8d851bfaf0a7574ba9fbb}{ice3lay()}}.

Here is the call graph for this function\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=278pt]{group__gfs__sice__main_ga149e1298ecc35315fae91f67b158b4ad_ga149e1298ecc35315fae91f67b158b4ad_cgraph}
\end{center}
\end{figure}
\mbox{\Hypertarget{group__gfs__sice__main_ga7ef26147a1c8d851bfaf0a7574ba9fbb_ga7ef26147a1c8d851bfaf0a7574ba9fbb}\label{group__gfs__sice__main_ga7ef26147a1c8d851bfaf0a7574ba9fbb_ga7ef26147a1c8d851bfaf0a7574ba9fbb}} 
\index{GFS sfc\_sice Module@{GFS sfc\_sice Module}!ice3lay@{ice3lay}}
\index{ice3lay@{ice3lay}!GFS sfc\_sice Module@{GFS sfc\_sice Module}}
\doxyparagraph{\texorpdfstring{ice3lay()}{ice3lay()}}
{\footnotesize\ttfamily subroutine sfc\+\_\+sice\+\_\+run\+::ice3lay}

\hypertarget{group__gfs__sice__main_ga7ef26147a1c8d851bfaf0a7574ba9fbb_gen_ice3lay}{}\doxysubsubsection{Three-\/layer Thermodynamics Sea Ice Model General Algorithm}\label{group__gfs__sice__main_ga7ef26147a1c8d851bfaf0a7574ba9fbb_gen_ice3lay}

\begin{DoxyItemize}
\item Ice temperature calculation.
\item Calculate the effective conductive coupling of the snow-\/ice layer between the surface and the upper layer ice temperature $h_i/4$ beneath the snow-\/ice interface (see {\itshape eq}.(5) in Winton (2000) \cite{winton_2000}).
\item Calculate the conductive coupling between the two ice temperature points (see {\itshape eq}.(10) in Winton (2000) \cite{winton_2000}).
\item Calculate the new upper ice temperature following {\itshape eq}.(21) in Winton (2000) \cite{winton_2000}.
\item If the surface temperature is greater than the freezing temperature of snow (when there is snow over) or sea ice (when there is none), the surface temperature is fixed at the melting temperature of snow or sea ice, respectively, and the upper ice temperature is recomputed from {\itshape eq}.(21) using the coefficients given by {\itshape eqs}. (19),(20), and (18). An energy flux {\itshape eq}.(22) is applied toward surface melting thereby balancing the surface energy budget.
\item Calculate the new lower ice temperature following {\itshape eq}.(15) in Winton (2000) \cite{winton_2000}.
\item Calculate the energy for bottom melting (or freezing, if negative) following {\itshape eq}.(23), which serves to balance the difference between the oceanic heat flux to the ice bottom and the conductive flux of heat upward from the bottom.
\item Calculation of ice and snow mass changes.
\item Calculate the top layer thickness.
\item When the energy for bottem melting $M_b$ is negative (i.\+e., freezing is happening),calculate the bottom layer thickness $h_2$ and the new lower layer temperature (see {\itshape eqs}.(24)-\/(26)).
\item If ice remains, even up 2 layers, else, pass negative energy back in snow. Calculate the new upper layer temperature (see {\itshape eq}.(38)).
\end{DoxyItemize}

Referenced by \mbox{\hyperlink{group__gfs__sice__main_ga149e1298ecc35315fae91f67b158b4ad_ga149e1298ecc35315fae91f67b158b4ad}{sfc\+\_\+sice\+::sfc\+\_\+sice\+\_\+run()}}.

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