\hypertarget{namespacemom__marine__ice}{}\section{mom\+\_\+marine\+\_\+ice Module Reference}
\label{namespacemom__marine__ice}\index{mom\_marine\_ice@{mom\_marine\_ice}}


\subsection{Detailed Description}
Routines incorporating the effects of marine ice (sea-\/ice and icebergs) into the ocean model dynamics and thermodynamics. \subsection*{Data Types}
\begin{DoxyCompactItemize}
\item 
type \mbox{\hyperlink{structmom__marine__ice_1_1marine__ice__cs}{marine\+\_\+ice\+\_\+cs}}
\begin{DoxyCompactList}\small\item\em Control structure for M\+O\+M\+\_\+marine\+\_\+ice. \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Functions/\+Subroutines}
\begin{DoxyCompactItemize}
\item 
subroutine, public \mbox{\hyperlink{namespacemom__marine__ice_af84733e6afc851704bbfd1051aea0487}{iceberg\+\_\+forces}} (G, forces, use\+\_\+ice\+\_\+shelf, sfc\+\_\+state, time\+\_\+step, CS)
\begin{DoxyCompactList}\small\item\em add\+\_\+berg\+\_\+flux\+\_\+to\+\_\+shelf adds rigidity and ice-\/area coverage due to icebergs to the forces type fields, and adds ice-\/areal coverage and modifies various thermodynamic fluxes due to the presence of icebergs. \end{DoxyCompactList}\item 
subroutine, public \mbox{\hyperlink{namespacemom__marine__ice_a7deb4a003d193fd5ba6614d2a683cba6}{iceberg\+\_\+fluxes}} (G, US, fluxes, use\+\_\+ice\+\_\+shelf, sfc\+\_\+state, time\+\_\+step, CS)
\begin{DoxyCompactList}\small\item\em iceberg\+\_\+fluxes adds ice-\/area-\/coverage and modifies various thermodynamic fluxes due to the presence of icebergs. \end{DoxyCompactList}\item 
subroutine, public \mbox{\hyperlink{namespacemom__marine__ice_a72f210b9737887a318aa7dd2779e8850}{marine\+\_\+ice\+\_\+init}} (Time, G, param\+\_\+file, diag, CS)
\begin{DoxyCompactList}\small\item\em Initialize control structure for M\+O\+M\+\_\+marine\+\_\+ice. \end{DoxyCompactList}\end{DoxyCompactItemize}


\subsection{Function/\+Subroutine Documentation}
\mbox{\Hypertarget{namespacemom__marine__ice_a7deb4a003d193fd5ba6614d2a683cba6}\label{namespacemom__marine__ice_a7deb4a003d193fd5ba6614d2a683cba6}} 
\index{mom\_marine\_ice@{mom\_marine\_ice}!iceberg\_fluxes@{iceberg\_fluxes}}
\index{iceberg\_fluxes@{iceberg\_fluxes}!mom\_marine\_ice@{mom\_marine\_ice}}
\subsubsection{\texorpdfstring{iceberg\_fluxes()}{iceberg\_fluxes()}}
{\footnotesize\ttfamily subroutine, public mom\+\_\+marine\+\_\+ice\+::iceberg\+\_\+fluxes (\begin{DoxyParamCaption}\item[{type(ocean\+\_\+grid\+\_\+type), intent(inout)}]{G,  }\item[{type(unit\+\_\+scale\+\_\+type), intent(in)}]{US,  }\item[{type(forcing), intent(inout)}]{fluxes,  }\item[{logical, intent(in)}]{use\+\_\+ice\+\_\+shelf,  }\item[{type(surface), intent(inout)}]{sfc\+\_\+state,  }\item[{real, intent(in)}]{time\+\_\+step,  }\item[{type(\mbox{\hyperlink{structmom__marine__ice_1_1marine__ice__cs}{marine\+\_\+ice\+\_\+cs}}), pointer}]{CS }\end{DoxyParamCaption})}



iceberg\+\_\+fluxes adds ice-\/area-\/coverage and modifies various thermodynamic fluxes due to the presence of icebergs. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in,out}}  & {\em g} & The ocean\textquotesingle{}s grid structure \\
\hline
\mbox{\texttt{ in}}  & {\em us} & A dimensional unit scaling type \\
\hline
\mbox{\texttt{ in,out}}  & {\em fluxes} & A structure with pointers to themodynamic, tracer and mass exchange forcing fields \\
\hline
\mbox{\texttt{ in,out}}  & {\em sfc\+\_\+state} & A structure containing fields that describe the surface state of the ocean. \\
\hline
\mbox{\texttt{ in}}  & {\em use\+\_\+ice\+\_\+shelf} & If true, this configuration uses ice shelves. \\
\hline
\mbox{\texttt{ in}}  & {\em time\+\_\+step} & The coupling time step \mbox{[}s\mbox{]}. \\
\hline
 & {\em cs} & Pointer to the control structure for M\+O\+M\+\_\+marine\+\_\+ice \\
\hline
\end{DoxyParams}


Definition at line 102 of file M\+O\+M\+\_\+marine\+\_\+ice.\+F90.


\begin{DoxyCode}{0}
\DoxyCodeLine{102   \textcolor{keywordtype}{type}(ocean\_grid\_type), \textcolor{keywordtype}{intent(inout)} :: G\textcolor{comment}{       !< The ocean's grid structure}}
\DoxyCodeLine{103   \textcolor{keywordtype}{type}(unit\_scale\_type), \textcolor{keywordtype}{intent(in)}    :: US\textcolor{comment}{      !< A dimensional unit scaling type}}
\DoxyCodeLine{104   \textcolor{keywordtype}{type}(forcing),         \textcolor{keywordtype}{intent(inout)} :: fluxes\textcolor{comment}{  !< A structure with pointers to themodynamic,}}
\DoxyCodeLine{105 \textcolor{comment}{                                                  !! tracer and mass exchange forcing fields}}
\DoxyCodeLine{106   \textcolor{keywordtype}{type}(surface),         \textcolor{keywordtype}{intent(inout)} :: sfc\_state\textcolor{comment}{ !< A structure containing fields that}}
\DoxyCodeLine{107 \textcolor{comment}{                                                    !! describe the surface state of the ocean.}}
\DoxyCodeLine{108   \textcolor{keywordtype}{logical},               \textcolor{keywordtype}{intent(in)}    :: use\_ice\_shelf\textcolor{comment}{  !< If true, this configuration uses ice shelves.}}
\DoxyCodeLine{109 \textcolor{keywordtype}{  real},                  \textcolor{keywordtype}{intent(in)}    :: time\_step\textcolor{comment}{   !< The coupling time step [s].}}
\DoxyCodeLine{110   \textcolor{keywordtype}{type}(marine\_ice\_CS),   \textcolor{keywordtype}{pointer}       :: CS\textcolor{comment}{      !< Pointer to the control structure for MOM\_marine\_ice}}
\DoxyCodeLine{111 }
\DoxyCodeLine{112 \textcolor{keywordtype}{  real} :: fraz      \textcolor{comment}{! refreezing rate [R Z T-1 ~> kg m-2 s-1]}}
\DoxyCodeLine{113 \textcolor{keywordtype}{  real} :: I\_dt\_LHF  \textcolor{comment}{! The inverse of the timestep times the latent heat of fusion times [Q-1 T-1 ~> kg J-1 s-1].}}
\DoxyCodeLine{114   \textcolor{keywordtype}{integer} :: i, j, is, ie, js, je, isd, ied, jsd, jed}
\DoxyCodeLine{115   is = g\%isc ; ie = g\%iec ; js = g\%jsc ; je = g\%jec}
\DoxyCodeLine{116   isd = g\%isd ; jsd = g\%jsd ; ied = g\%ied ; jed = g\%jed}
\DoxyCodeLine{117   \textcolor{comment}{! This routine adds iceberg data to the ice shelf data (if ice shelf is used)}}
\DoxyCodeLine{118   \textcolor{comment}{! which can then be used to change the top of ocean boundary condition used in}}
\DoxyCodeLine{119   \textcolor{comment}{! the ocean model. This routine is taken from the add\_shelf\_flux subroutine}}
\DoxyCodeLine{120   \textcolor{comment}{! within the ice shelf model.}}
\DoxyCodeLine{121 }
\DoxyCodeLine{122   \textcolor{keywordflow}{if} (.not.\textcolor{keyword}{associated}(cs)) \textcolor{keywordflow}{return}}
\DoxyCodeLine{123   \textcolor{keywordflow}{if} (.not.(\textcolor{keyword}{associated}(fluxes\%area\_berg) .and. \textcolor{keyword}{associated}(fluxes\%ustar\_berg) .and. \&}
\DoxyCodeLine{124             \textcolor{keyword}{associated}(fluxes\%mass\_berg) ) ) \textcolor{keywordflow}{return}}
\DoxyCodeLine{125   \textcolor{keywordflow}{if} (.not.(\textcolor{keyword}{associated}(fluxes\%frac\_shelf\_h) .and. \textcolor{keyword}{associated}(fluxes\%ustar\_shelf)) ) \textcolor{keywordflow}{return}}
\DoxyCodeLine{126 }
\DoxyCodeLine{127 }
\DoxyCodeLine{128   \textcolor{keywordflow}{if} (.not.(\textcolor{keyword}{associated}(fluxes\%area\_berg) .and. \textcolor{keyword}{associated}(fluxes\%ustar\_berg) .and. \&}
\DoxyCodeLine{129             \textcolor{keyword}{associated}(fluxes\%mass\_berg) ) ) \textcolor{keywordflow}{return}}
\DoxyCodeLine{130   \textcolor{keywordflow}{if} (.not. use\_ice\_shelf) \textcolor{keywordflow}{then}}
\DoxyCodeLine{131     fluxes\%frac\_shelf\_h(:,:) = 0.}
\DoxyCodeLine{132     fluxes\%ustar\_shelf(:,:) = 0.}
\DoxyCodeLine{133 \textcolor{keywordflow}{  endif}}
\DoxyCodeLine{134   \textcolor{keywordflow}{do} j=jsd,jed ; \textcolor{keywordflow}{do} i=isd,ied ; \textcolor{keywordflow}{if} (g\%areaT(i,j) > 0.0) \textcolor{keywordflow}{then}}
\DoxyCodeLine{135     fluxes\%frac\_shelf\_h(i,j) = fluxes\%frac\_shelf\_h(i,j) + fluxes\%area\_berg(i,j)}
\DoxyCodeLine{136     fluxes\%ustar\_shelf(i,j)  = fluxes\%ustar\_shelf(i,j)  + fluxes\%ustar\_berg(i,j)}
\DoxyCodeLine{137 \textcolor{keywordflow}{  endif} ;\textcolor{keywordflow}{ enddo} ;\textcolor{keywordflow}{ enddo}}
\DoxyCodeLine{138 }
\DoxyCodeLine{139   \textcolor{comment}{!Zero'ing out other fluxes under the tabular icebergs}}
\DoxyCodeLine{140   \textcolor{keywordflow}{if} (cs\%berg\_area\_threshold >= 0.) \textcolor{keywordflow}{then}}
\DoxyCodeLine{141     i\_dt\_lhf = 1.0 / (us\%s\_to\_T*time\_step * cs\%latent\_heat\_fusion)}
\DoxyCodeLine{142     \textcolor{keywordflow}{do} j=jsd,jed ; \textcolor{keywordflow}{do} i=isd,ied}
\DoxyCodeLine{143       \textcolor{keywordflow}{if} (fluxes\%frac\_shelf\_h(i,j) > cs\%berg\_area\_threshold) \textcolor{keywordflow}{then}}
\DoxyCodeLine{144         \textcolor{comment}{! Only applying for ice shelf covering most of cell.}}
\DoxyCodeLine{145 }
\DoxyCodeLine{146         \textcolor{keywordflow}{if} (\textcolor{keyword}{associated}(fluxes\%sw)) fluxes\%sw(i,j) = 0.0}
\DoxyCodeLine{147         \textcolor{keywordflow}{if} (\textcolor{keyword}{associated}(fluxes\%lw)) fluxes\%lw(i,j) = 0.0}
\DoxyCodeLine{148         \textcolor{keywordflow}{if} (\textcolor{keyword}{associated}(fluxes\%latent)) fluxes\%latent(i,j) = 0.0}
\DoxyCodeLine{149         \textcolor{keywordflow}{if} (\textcolor{keyword}{associated}(fluxes\%evap)) fluxes\%evap(i,j) = 0.0}
\DoxyCodeLine{150 }
\DoxyCodeLine{151         \textcolor{comment}{! Add frazil formation diagnosed by the ocean model [Q R Z ~> J m-2] in the}}
\DoxyCodeLine{152         \textcolor{comment}{! form of surface layer evaporation [R Z T-1 ~> kg m-2 s-1]. Update lprec in the}}
\DoxyCodeLine{153         \textcolor{comment}{! control structure for diagnostic purposes.}}
\DoxyCodeLine{154 }
\DoxyCodeLine{155         \textcolor{keywordflow}{if} (\textcolor{keyword}{allocated}(sfc\_state\%frazil)) \textcolor{keywordflow}{then}}
\DoxyCodeLine{156           fraz = sfc\_state\%frazil(i,j) * i\_dt\_lhf}
\DoxyCodeLine{157           \textcolor{keywordflow}{if} (\textcolor{keyword}{associated}(fluxes\%evap))  fluxes\%evap(i,j)  = fluxes\%evap(i,j)  - fraz}
\DoxyCodeLine{158         \textcolor{comment}{! if (associated(fluxes\%lprec)) fluxes\%lprec(i,j) = fluxes\%lprec(i,j) - fraz}}
\DoxyCodeLine{159           sfc\_state\%frazil(i,j) = 0.0}
\DoxyCodeLine{160 \textcolor{keywordflow}{        endif}}
\DoxyCodeLine{161 }
\DoxyCodeLine{162         \textcolor{comment}{!Alon: Should these be set to zero too?}}
\DoxyCodeLine{163         \textcolor{keywordflow}{if} (\textcolor{keyword}{associated}(fluxes\%sens)) fluxes\%sens(i,j) = 0.0}
\DoxyCodeLine{164         \textcolor{keywordflow}{if} (\textcolor{keyword}{associated}(fluxes\%salt\_flux)) fluxes\%salt\_flux(i,j) = 0.0}
\DoxyCodeLine{165         \textcolor{keywordflow}{if} (\textcolor{keyword}{associated}(fluxes\%lprec)) fluxes\%lprec(i,j) = 0.0}
\DoxyCodeLine{166 \textcolor{keywordflow}{      endif}}
\DoxyCodeLine{167 \textcolor{keywordflow}{    enddo} ;\textcolor{keywordflow}{ enddo}}
\DoxyCodeLine{168 \textcolor{keywordflow}{  endif}}
\DoxyCodeLine{169 }

\end{DoxyCode}
\mbox{\Hypertarget{namespacemom__marine__ice_af84733e6afc851704bbfd1051aea0487}\label{namespacemom__marine__ice_af84733e6afc851704bbfd1051aea0487}} 
\index{mom\_marine\_ice@{mom\_marine\_ice}!iceberg\_forces@{iceberg\_forces}}
\index{iceberg\_forces@{iceberg\_forces}!mom\_marine\_ice@{mom\_marine\_ice}}
\subsubsection{\texorpdfstring{iceberg\_forces()}{iceberg\_forces()}}
{\footnotesize\ttfamily subroutine, public mom\+\_\+marine\+\_\+ice\+::iceberg\+\_\+forces (\begin{DoxyParamCaption}\item[{type(ocean\+\_\+grid\+\_\+type), intent(inout)}]{G,  }\item[{type(mech\+\_\+forcing), intent(inout)}]{forces,  }\item[{logical, intent(in)}]{use\+\_\+ice\+\_\+shelf,  }\item[{type(surface), intent(inout)}]{sfc\+\_\+state,  }\item[{real, intent(in)}]{time\+\_\+step,  }\item[{type(\mbox{\hyperlink{structmom__marine__ice_1_1marine__ice__cs}{marine\+\_\+ice\+\_\+cs}}), pointer}]{CS }\end{DoxyParamCaption})}



add\+\_\+berg\+\_\+flux\+\_\+to\+\_\+shelf adds rigidity and ice-\/area coverage due to icebergs to the forces type fields, and adds ice-\/areal coverage and modifies various thermodynamic fluxes due to the presence of icebergs. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in,out}}  & {\em g} & The ocean\textquotesingle{}s grid structure \\
\hline
\mbox{\texttt{ in,out}}  & {\em forces} & A structure with the driving mechanical forces \\
\hline
\mbox{\texttt{ in,out}}  & {\em sfc\+\_\+state} & A structure containing fields that describe the surface state of the ocean. \\
\hline
\mbox{\texttt{ in}}  & {\em use\+\_\+ice\+\_\+shelf} & If true, this configuration uses ice shelves. \\
\hline
\mbox{\texttt{ in}}  & {\em time\+\_\+step} & The coupling time step \mbox{[}s\mbox{]}. \\
\hline
 & {\em cs} & Pointer to the control structure for M\+O\+M\+\_\+marine\+\_\+ice \\
\hline
\end{DoxyParams}


Definition at line 46 of file M\+O\+M\+\_\+marine\+\_\+ice.\+F90.


\begin{DoxyCode}{0}
\DoxyCodeLine{46   \textcolor{keywordtype}{type}(ocean\_grid\_type), \textcolor{keywordtype}{intent(inout)} :: G\textcolor{comment}{       !< The ocean's grid structure}}
\DoxyCodeLine{47   \textcolor{keywordtype}{type}(mech\_forcing),    \textcolor{keywordtype}{intent(inout)} :: forces\textcolor{comment}{  !< A structure with the driving mechanical forces}}
\DoxyCodeLine{48   \textcolor{keywordtype}{type}(surface),         \textcolor{keywordtype}{intent(inout)} :: sfc\_state\textcolor{comment}{ !< A structure containing fields that}}
\DoxyCodeLine{49 \textcolor{comment}{                                                    !! describe the surface state of the ocean.}}
\DoxyCodeLine{50   \textcolor{keywordtype}{logical},               \textcolor{keywordtype}{intent(in)}    :: use\_ice\_shelf\textcolor{comment}{  !< If true, this configuration uses ice shelves.}}
\DoxyCodeLine{51 \textcolor{keywordtype}{  real},                  \textcolor{keywordtype}{intent(in)}    :: time\_step\textcolor{comment}{  !< The coupling time step [s].}}
\DoxyCodeLine{52   \textcolor{keywordtype}{type}(marine\_ice\_CS),   \textcolor{keywordtype}{pointer}       :: CS\textcolor{comment}{      !< Pointer to the control structure for MOM\_marine\_ice}}
\DoxyCodeLine{53 }
\DoxyCodeLine{54 \textcolor{keywordtype}{  real} :: kv\_rho\_ice \textcolor{comment}{! The viscosity of ice divided by its density [L4 Z-2 T-1 R-1 ~> m5 kg-1 s-1].}}
\DoxyCodeLine{55   \textcolor{keywordtype}{integer} :: i, j, is, ie, js, je}
\DoxyCodeLine{56   is = g\%isc ; ie = g\%iec ; js = g\%jsc ; je = g\%jec}
\DoxyCodeLine{57   \textcolor{comment}{!This routine adds iceberg data to the ice shelf data (if ice shelf is used)}}
\DoxyCodeLine{58   \textcolor{comment}{!which can then be used to change the top of ocean boundary condition used in}}
\DoxyCodeLine{59   \textcolor{comment}{!the ocean model. This routine is taken from the add\_shelf\_flux subroutine}}
\DoxyCodeLine{60   \textcolor{comment}{!within the ice shelf model.}}
\DoxyCodeLine{61 }
\DoxyCodeLine{62   \textcolor{keywordflow}{if} (.not.\textcolor{keyword}{associated}(cs)) \textcolor{keywordflow}{return}}
\DoxyCodeLine{63 }
\DoxyCodeLine{64   \textcolor{keywordflow}{if} (.not.(\textcolor{keyword}{associated}(forces\%area\_berg) .and.  \textcolor{keyword}{associated}(forces\%mass\_berg) ) ) \textcolor{keywordflow}{return}}
\DoxyCodeLine{65 }
\DoxyCodeLine{66   \textcolor{keywordflow}{if} (.not.(\textcolor{keyword}{associated}(forces\%frac\_shelf\_u) .and. \textcolor{keyword}{associated}(forces\%frac\_shelf\_v) .and. \&}
\DoxyCodeLine{67             \textcolor{keyword}{associated}(forces\%rigidity\_ice\_u) .and. \textcolor{keyword}{associated}(forces\%rigidity\_ice\_v)) ) \textcolor{keywordflow}{return}}
\DoxyCodeLine{68 }
\DoxyCodeLine{69   \textcolor{comment}{! This section sets or augments the values of fields in forces.}}
\DoxyCodeLine{70   \textcolor{keywordflow}{if} (.not. use\_ice\_shelf) \textcolor{keywordflow}{then}}
\DoxyCodeLine{71     forces\%frac\_shelf\_u(:,:) = 0.0 ; forces\%frac\_shelf\_v(:,:) = 0.0}
\DoxyCodeLine{72 \textcolor{keywordflow}{  endif}}
\DoxyCodeLine{73   \textcolor{keywordflow}{if} (.not. forces\%accumulate\_rigidity) \textcolor{keywordflow}{then}}
\DoxyCodeLine{74     forces\%rigidity\_ice\_u(:,:) = 0.0 ; forces\%rigidity\_ice\_v(:,:) = 0.0}
\DoxyCodeLine{75 \textcolor{keywordflow}{  endif}}
\DoxyCodeLine{76 }
\DoxyCodeLine{77   \textcolor{keyword}{call }pass\_var(forces\%area\_berg, g\%domain, to\_all+omit\_corners, halo=1, complete=.false.)}
\DoxyCodeLine{78   \textcolor{keyword}{call }pass\_var(forces\%mass\_berg, g\%domain, to\_all+omit\_corners, halo=1, complete=.true.)}
\DoxyCodeLine{79   kv\_rho\_ice = cs\%kv\_iceberg / cs\%density\_iceberg}
\DoxyCodeLine{80   \textcolor{keywordflow}{do} j=js,je ; \textcolor{keywordflow}{do} i=is-1,ie}
\DoxyCodeLine{81     \textcolor{keywordflow}{if} ((g\%areaT(i,j) + g\%areaT(i+1,j) > 0.0)) \& \textcolor{comment}{! .and. (G\%dxdy\_u(I,j) > 0.0)) \&}}
\DoxyCodeLine{82       forces\%frac\_shelf\_u(i,j) = forces\%frac\_shelf\_u(i,j) + \&}
\DoxyCodeLine{83            (forces\%area\_berg(i,j)*g\%areaT(i,j) + forces\%area\_berg(i+1,j)*g\%areaT(i+1,j)) / \&}
\DoxyCodeLine{84            (g\%areaT(i,j) + g\%areaT(i+1,j))}
\DoxyCodeLine{85     forces\%rigidity\_ice\_u(i,j) = forces\%rigidity\_ice\_u(i,j) + kv\_rho\_ice * \&}
\DoxyCodeLine{86                         min(forces\%mass\_berg(i,j), forces\%mass\_berg(i+1,j))}
\DoxyCodeLine{87 \textcolor{keywordflow}{  enddo} ;\textcolor{keywordflow}{ enddo}}
\DoxyCodeLine{88   \textcolor{keywordflow}{do} j=js-1,je ; \textcolor{keywordflow}{do} i=is,ie}
\DoxyCodeLine{89     \textcolor{keywordflow}{if} ((g\%areaT(i,j) + g\%areaT(i,j+1) > 0.0)) \& \textcolor{comment}{! .and. (G\%dxdy\_v(i,J) > 0.0)) \&}}
\DoxyCodeLine{90       forces\%frac\_shelf\_v(i,j) = forces\%frac\_shelf\_v(i,j) + \&}
\DoxyCodeLine{91            (forces\%area\_berg(i,j)*g\%areaT(i,j) + forces\%area\_berg(i,j+1)*g\%areaT(i,j+1)) / \&}
\DoxyCodeLine{92            (g\%areaT(i,j) + g\%areaT(i,j+1))}
\DoxyCodeLine{93     forces\%rigidity\_ice\_v(i,j) = forces\%rigidity\_ice\_v(i,j) + kv\_rho\_ice * \&}
\DoxyCodeLine{94                          min(forces\%mass\_berg(i,j), forces\%mass\_berg(i,j+1))}
\DoxyCodeLine{95 \textcolor{keywordflow}{  enddo} ;\textcolor{keywordflow}{ enddo}}
\DoxyCodeLine{96 }

\end{DoxyCode}
\mbox{\Hypertarget{namespacemom__marine__ice_a72f210b9737887a318aa7dd2779e8850}\label{namespacemom__marine__ice_a72f210b9737887a318aa7dd2779e8850}} 
\index{mom\_marine\_ice@{mom\_marine\_ice}!marine\_ice\_init@{marine\_ice\_init}}
\index{marine\_ice\_init@{marine\_ice\_init}!mom\_marine\_ice@{mom\_marine\_ice}}
\subsubsection{\texorpdfstring{marine\_ice\_init()}{marine\_ice\_init()}}
{\footnotesize\ttfamily subroutine, public mom\+\_\+marine\+\_\+ice\+::marine\+\_\+ice\+\_\+init (\begin{DoxyParamCaption}\item[{type(time\+\_\+type), intent(in), target}]{Time,  }\item[{type(ocean\+\_\+grid\+\_\+type), intent(in)}]{G,  }\item[{type(param\+\_\+file\+\_\+type), intent(in)}]{param\+\_\+file,  }\item[{type(diag\+\_\+ctrl), intent(inout), target}]{diag,  }\item[{type(\mbox{\hyperlink{structmom__marine__ice_1_1marine__ice__cs}{marine\+\_\+ice\+\_\+cs}}), pointer}]{CS }\end{DoxyParamCaption})}



Initialize control structure for M\+O\+M\+\_\+marine\+\_\+ice. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em time} & Current model time \\
\hline
\mbox{\texttt{ in}}  & {\em g} & Ocean grid structure \\
\hline
\mbox{\texttt{ in}}  & {\em param\+\_\+file} & Runtime parameter handles \\
\hline
\mbox{\texttt{ in,out}}  & {\em diag} & Diagnostics control structure \\
\hline
 & {\em cs} & Pointer to the control structure for M\+O\+M\+\_\+marine\+\_\+ice \\
\hline
\end{DoxyParams}


Definition at line 174 of file M\+O\+M\+\_\+marine\+\_\+ice.\+F90.


\begin{DoxyCode}{0}
\DoxyCodeLine{174   \textcolor{keywordtype}{type}(time\_type), \textcolor{keywordtype}{target}, \textcolor{keywordtype}{intent(in)}    :: Time\textcolor{comment}{ !< Current model time}}
\DoxyCodeLine{175   \textcolor{keywordtype}{type}(ocean\_grid\_type),   \textcolor{keywordtype}{intent(in)}    :: G\textcolor{comment}{ !< Ocean grid structure}}
\DoxyCodeLine{176   \textcolor{keywordtype}{type}(param\_file\_type),   \textcolor{keywordtype}{intent(in)}    :: param\_file\textcolor{comment}{ !< Runtime parameter handles}}
\DoxyCodeLine{177   \textcolor{keywordtype}{type}(diag\_ctrl), \textcolor{keywordtype}{target}, \textcolor{keywordtype}{intent(inout)} :: diag\textcolor{comment}{ !< Diagnostics control structure}}
\DoxyCodeLine{178   \textcolor{keywordtype}{type}(marine\_ice\_CS),     \textcolor{keywordtype}{pointer}       :: CS\textcolor{comment}{   !< Pointer to the control structure for MOM\_marine\_ice}}
\DoxyCodeLine{179 \textcolor{comment}{! This include declares and sets the variable "version".}}
\DoxyCodeLine{180 \textcolor{preprocessor}{\#include "version\_variable.h"}}
\DoxyCodeLine{181 \textcolor{preprocessor}{}  \textcolor{keywordtype}{character(len=40)}  :: mdl = \textcolor{stringliteral}{"MOM\_marine\_ice"}  \textcolor{comment}{! This module's name.}}
\DoxyCodeLine{182 }
\DoxyCodeLine{183   \textcolor{keywordflow}{if} (\textcolor{keyword}{associated}(cs)) \textcolor{keywordflow}{then}}
\DoxyCodeLine{184     \textcolor{keyword}{call }mom\_error(warning, \textcolor{stringliteral}{"marine\_ice\_init called with an associated control structure."})}
\DoxyCodeLine{185     \textcolor{keywordflow}{return}}
\DoxyCodeLine{186   \textcolor{keywordflow}{else} ; \textcolor{keyword}{allocate}(cs) ;\textcolor{keywordflow}{ endif}}
\DoxyCodeLine{187 }
\DoxyCodeLine{188   \textcolor{comment}{! Write all relevant parameters to the model log.}}
\DoxyCodeLine{189   \textcolor{keyword}{call }log\_version(mdl, version)}
\DoxyCodeLine{190 }
\DoxyCodeLine{191   \textcolor{keyword}{call }get\_param(param\_file, mdl, \textcolor{stringliteral}{"KV\_ICEBERG"},  cs\%kv\_iceberg, \&}
\DoxyCodeLine{192                  \textcolor{stringliteral}{"The viscosity of the icebergs"},  \&}
\DoxyCodeLine{193                  units=\textcolor{stringliteral}{"m2 s-1"}, default=1.0e10, scale=g\%US\%Z\_to\_L**2*g\%US\%m\_to\_L**2*g\%US\%T\_to\_s)}
\DoxyCodeLine{194   \textcolor{keyword}{call }get\_param(param\_file, mdl, \textcolor{stringliteral}{"DENSITY\_ICEBERGS"},  cs\%density\_iceberg, \&}
\DoxyCodeLine{195                  \textcolor{stringliteral}{"A typical density of icebergs."}, units=\textcolor{stringliteral}{"kg m-3"}, default=917.0, scale=g\%US\%kg\_m3\_to\_R)}
\DoxyCodeLine{196   \textcolor{keyword}{call }get\_param(param\_file, mdl, \textcolor{stringliteral}{"LATENT\_HEAT\_FUSION"}, cs\%latent\_heat\_fusion, \&}
\DoxyCodeLine{197                  \textcolor{stringliteral}{"The latent heat of fusion."}, units=\textcolor{stringliteral}{"J/kg"}, default=hlf, scale=g\%US\%J\_kg\_to\_Q)}
\DoxyCodeLine{198   \textcolor{keyword}{call }get\_param(param\_file, mdl, \textcolor{stringliteral}{"BERG\_AREA\_THRESHOLD"}, cs\%berg\_area\_threshold, \&}
\DoxyCodeLine{199                  \textcolor{stringliteral}{"Fraction of grid cell which iceberg must occupy, so that fluxes "}//\&}
\DoxyCodeLine{200                  \textcolor{stringliteral}{"below berg are set to zero. Not applied for negative "}//\&}
\DoxyCodeLine{201                  \textcolor{stringliteral}{"values."}, units=\textcolor{stringliteral}{"non-dim"}, default=-1.0)}
\DoxyCodeLine{202 }

\end{DoxyCode}
