\hypertarget{namespacemom__ice__shelf__state}{}\section{mom\+\_\+ice\+\_\+shelf\+\_\+state Module Reference}
\label{namespacemom__ice__shelf__state}\index{mom\+\_\+ice\+\_\+shelf\+\_\+state@{mom\+\_\+ice\+\_\+shelf\+\_\+state}}


\subsection{Detailed Description}
Implements the thermodynamic aspects of ocean / ice-\/shelf interactions, along with a crude placeholder for a later implementation of full ice shelf dynamics, all using the M\+OM framework and coding style. \subsection*{Data Types}
\begin{DoxyCompactItemize}
\item 
type \hyperlink{structmom__ice__shelf__state_1_1ice__shelf__state}{ice\+\_\+shelf\+\_\+state}
\begin{DoxyCompactList}\small\item\em Structure that describes the ice shelf state. \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Functions/\+Subroutines}
\begin{DoxyCompactItemize}
\item 
subroutine, public \hyperlink{namespacemom__ice__shelf__state_a8d567511be122c8312c1efae11ce2fe2}{ice\+\_\+shelf\+\_\+state\+\_\+init} (I\+SS, G)
\begin{DoxyCompactList}\small\item\em Deallocates all memory associated with this module. \end{DoxyCompactList}\item 
subroutine, public \hyperlink{namespacemom__ice__shelf__state_a8b1a83b8efb864a70ef9028b28dc1fcb}{ice\+\_\+shelf\+\_\+state\+\_\+end} (I\+SS)
\begin{DoxyCompactList}\small\item\em Deallocates all memory associated with this module. \end{DoxyCompactList}\end{DoxyCompactItemize}


\subsection{Function/\+Subroutine Documentation}
\mbox{\Hypertarget{namespacemom__ice__shelf__state_a8b1a83b8efb864a70ef9028b28dc1fcb}\label{namespacemom__ice__shelf__state_a8b1a83b8efb864a70ef9028b28dc1fcb}} 
\index{mom\+\_\+ice\+\_\+shelf\+\_\+state@{mom\+\_\+ice\+\_\+shelf\+\_\+state}!ice\+\_\+shelf\+\_\+state\+\_\+end@{ice\+\_\+shelf\+\_\+state\+\_\+end}}
\index{ice\+\_\+shelf\+\_\+state\+\_\+end@{ice\+\_\+shelf\+\_\+state\+\_\+end}!mom\+\_\+ice\+\_\+shelf\+\_\+state@{mom\+\_\+ice\+\_\+shelf\+\_\+state}}
\subsubsection{\texorpdfstring{ice\+\_\+shelf\+\_\+state\+\_\+end()}{ice\_shelf\_state\_end()}}
{\footnotesize\ttfamily subroutine, public mom\+\_\+ice\+\_\+shelf\+\_\+state\+::ice\+\_\+shelf\+\_\+state\+\_\+end (\begin{DoxyParamCaption}\item[{type(\hyperlink{structmom__ice__shelf__state_1_1ice__shelf__state}{ice\+\_\+shelf\+\_\+state}), pointer}]{I\+SS }\end{DoxyParamCaption})}



Deallocates all memory associated with this module. 


\begin{DoxyParams}{Parameters}
{\em iss} & A pointer to the ice shelf state structure \\
\hline
\end{DoxyParams}


Definition at line 86 of file M\+O\+M\+\_\+ice\+\_\+shelf\+\_\+state.\+F90.


\begin{DoxyCode}
86   \textcolor{keywordtype}{type}(ice\_shelf\_state), \textcolor{keywordtype}{pointer} :: iss\textcolor{comment}{ !< A pointer to the ice shelf state structure}
87 
88   \textcolor{keywordflow}{if} (.not.\textcolor{keyword}{associated}(iss)) \textcolor{keywordflow}{return}
89 
90   \textcolor{keyword}{deallocate}(iss%mass\_shelf, iss%area\_shelf\_h, iss%h\_shelf, iss%hmask)
91 
92   \textcolor{keyword}{deallocate}(iss%tflux\_ocn, iss%water\_flux, iss%salt\_flux, iss%tflux\_shelf)
93   \textcolor{keyword}{deallocate}(iss%tfreeze)
94 
95   \textcolor{keyword}{deallocate}(iss)
96 
\end{DoxyCode}
\mbox{\Hypertarget{namespacemom__ice__shelf__state_a8d567511be122c8312c1efae11ce2fe2}\label{namespacemom__ice__shelf__state_a8d567511be122c8312c1efae11ce2fe2}} 
\index{mom\+\_\+ice\+\_\+shelf\+\_\+state@{mom\+\_\+ice\+\_\+shelf\+\_\+state}!ice\+\_\+shelf\+\_\+state\+\_\+init@{ice\+\_\+shelf\+\_\+state\+\_\+init}}
\index{ice\+\_\+shelf\+\_\+state\+\_\+init@{ice\+\_\+shelf\+\_\+state\+\_\+init}!mom\+\_\+ice\+\_\+shelf\+\_\+state@{mom\+\_\+ice\+\_\+shelf\+\_\+state}}
\subsubsection{\texorpdfstring{ice\+\_\+shelf\+\_\+state\+\_\+init()}{ice\_shelf\_state\_init()}}
{\footnotesize\ttfamily subroutine, public mom\+\_\+ice\+\_\+shelf\+\_\+state\+::ice\+\_\+shelf\+\_\+state\+\_\+init (\begin{DoxyParamCaption}\item[{type(\hyperlink{structmom__ice__shelf__state_1_1ice__shelf__state}{ice\+\_\+shelf\+\_\+state}), pointer}]{I\+SS,  }\item[{type(ocean\+\_\+grid\+\_\+type), intent(in)}]{G }\end{DoxyParamCaption})}



Deallocates all memory associated with this module. 


\begin{DoxyParams}[1]{Parameters}
 & {\em iss} & A pointer to the ice shelf state structure\\
\hline
\mbox{\tt in}  & {\em g} & The grid structure used by the ice shelf. \\
\hline
\end{DoxyParams}


Definition at line 57 of file M\+O\+M\+\_\+ice\+\_\+shelf\+\_\+state.\+F90.


\begin{DoxyCode}
57   \textcolor{keywordtype}{type}(ice\_shelf\_state), \textcolor{keywordtype}{pointer}    :: iss\textcolor{comment}{ !< A pointer to the ice shelf state structure}
58   \textcolor{keywordtype}{type}(ocean\_grid\_type), \textcolor{keywordtype}{intent(in)} :: g\textcolor{comment}{   !< The grid structure used by the ice shelf.}
59 
60   \textcolor{keywordtype}{integer} :: isd, ied, jsd, jed
61   isd = g%isd ; jsd = g%jsd ; ied = g%ied ; jed = g%jed
62 
63   \textcolor{keywordflow}{if} (\textcolor{keyword}{associated}(iss)) \textcolor{keywordflow}{then}
64     \textcolor{keyword}{call }mom\_error(fatal, \textcolor{stringliteral}{"MOM\_ice\_shelf\_state.F90, ice\_shelf\_state\_init: "}// &
65                           \textcolor{stringliteral}{"called with an associated ice\_shelf\_state pointer."})
66     \textcolor{keywordflow}{return}
67 \textcolor{keywordflow}{  endif}
68   \textcolor{keyword}{allocate}(iss)
69 
70   \textcolor{keyword}{allocate}(iss%mass\_shelf(isd:ied,jsd:jed) )   ; iss%mass\_shelf(:,:) = 0.0
71   \textcolor{keyword}{allocate}(iss%area\_shelf\_h(isd:ied,jsd:jed) ) ; iss%area\_shelf\_h(:,:) = 0.0
72   \textcolor{keyword}{allocate}(iss%h\_shelf(isd:ied,jsd:jed) )      ; iss%h\_shelf(:,:) = 0.0
73   \textcolor{keyword}{allocate}(iss%hmask(isd:ied,jsd:jed) )        ; iss%hmask(:,:) = -2.0
74 
75   \textcolor{keyword}{allocate}(iss%tflux\_ocn(isd:ied,jsd:jed) )    ; iss%tflux\_ocn(:,:) = 0.0
76   \textcolor{keyword}{allocate}(iss%water\_flux(isd:ied,jsd:jed) )   ; iss%water\_flux(:,:) = 0.0
77   \textcolor{keyword}{allocate}(iss%salt\_flux(isd:ied,jsd:jed) )    ; iss%salt\_flux(:,:) = 0.0
78   \textcolor{keyword}{allocate}(iss%tflux\_shelf(isd:ied,jsd:jed) )  ; iss%tflux\_shelf(:,:) = 0.0
79   \textcolor{keyword}{allocate}(iss%tfreeze(isd:ied,jsd:jed) )      ; iss%tfreeze(:,:) = 0.0
80 
\end{DoxyCode}
