\hypertarget{interfaceocean__model__mod_1_1ocean__model__data__get}{}\section{ocean\+\_\+model\+\_\+mod\+:\+:ocean\+\_\+model\+\_\+data\+\_\+get Interface Reference}
\label{interfaceocean__model__mod_1_1ocean__model__data__get}\index{ocean\+\_\+model\+\_\+mod\+::ocean\+\_\+model\+\_\+data\+\_\+get@{ocean\+\_\+model\+\_\+mod\+::ocean\+\_\+model\+\_\+data\+\_\+get}}


\subsection{Detailed Description}
This interface extracts a named scalar field or array from the ocean surface or public type. 

Definition at line 84 of file ocean\+\_\+model\+\_\+\+M\+O\+M.\+F90.

\subsection*{Private functions}
\begin{DoxyCompactItemize}
\item 
subroutine \hyperlink{interfaceocean__model__mod_1_1ocean__model__data__get_a844a7b9a4d1dade9cf657ac00477db94}{ocean\+\_\+model\+\_\+data1d\+\_\+get} (OS, Ocean, name, value)
\begin{DoxyCompactList}\small\item\em This subroutine extracts a named scalar field from the ocean surface or public type. \end{DoxyCompactList}\item 
subroutine \hyperlink{interfaceocean__model__mod_1_1ocean__model__data__get_ad493240c6eb21e329541b378db546924}{ocean\+\_\+model\+\_\+data2d\+\_\+get} (OS, Ocean, name, array2D, isc, jsc)
\begin{DoxyCompactList}\small\item\em This subroutine extracts a named 2-\/D field from the ocean surface or public type. \end{DoxyCompactList}\end{DoxyCompactItemize}


\subsection{Detailed Description}
This interface extracts a named scalar field or array from the ocean surface or public type. 

Definition at line 84 of file ocean\+\_\+model\+\_\+\+M\+O\+M.\+F90.



\subsection{Functions and subroutines}
\mbox{\Hypertarget{interfaceocean__model__mod_1_1ocean__model__data__get_a844a7b9a4d1dade9cf657ac00477db94}\label{interfaceocean__model__mod_1_1ocean__model__data__get_a844a7b9a4d1dade9cf657ac00477db94}} 
\index{ocean\+\_\+model\+\_\+mod\+::ocean\+\_\+model\+\_\+data\+\_\+get@{ocean\+\_\+model\+\_\+mod\+::ocean\+\_\+model\+\_\+data\+\_\+get}!ocean\+\_\+model\+\_\+data1d\+\_\+get@{ocean\+\_\+model\+\_\+data1d\+\_\+get}}
\index{ocean\+\_\+model\+\_\+data1d\+\_\+get@{ocean\+\_\+model\+\_\+data1d\+\_\+get}!ocean\+\_\+model\+\_\+mod\+::ocean\+\_\+model\+\_\+data\+\_\+get@{ocean\+\_\+model\+\_\+mod\+::ocean\+\_\+model\+\_\+data\+\_\+get}}
\subsubsection{\texorpdfstring{ocean\+\_\+model\+\_\+data1d\+\_\+get()}{ocean\_model\_data1d\_get()}}
{\footnotesize\ttfamily subroutine ocean\+\_\+model\+\_\+mod\+::ocean\+\_\+model\+\_\+data\+\_\+get\+::ocean\+\_\+model\+\_\+data1d\+\_\+get (\begin{DoxyParamCaption}\item[{type(\hyperlink{structocean__model__mod_1_1ocean__state__type}{ocean\+\_\+state\+\_\+type}), pointer}]{OS,  }\item[{type(\hyperlink{structocean__model__mod_1_1ocean__public__type}{ocean\+\_\+public\+\_\+type}), intent(in)}]{Ocean,  }\item[{character(len=$\ast$), intent(in)}]{name,  }\item[{real, intent(out)}]{value }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [private]}}



This subroutine extracts a named scalar field from the ocean surface or public type. 


\begin{DoxyParams}[1]{Parameters}
 & {\em os} & A pointer to the structure containing the internal ocean state (intent in).\\
\hline
\mbox{\tt in}  & {\em ocean} & A structure containing various publicly visible ocean surface fields.\\
\hline
\mbox{\tt in}  & {\em name} & The name of the field to extract\\
\hline
\mbox{\tt out}  & {\em value} & The value of the named field \\
\hline
\end{DoxyParams}


Definition at line 1075 of file ocean\+\_\+model\+\_\+\+M\+O\+M.\+F90.


\begin{DoxyCode}
1075   \textcolor{keywordtype}{type}(ocean\_state\_type),     \textcolor{keywordtype}{pointer}    :: os\textcolor{comment}{    !< A pointer to the structure containing the}
1076 \textcolor{comment}{                                                  !! internal ocean state (intent in).}
1077   \textcolor{keywordtype}{type}(ocean\_public\_type),    \textcolor{keywordtype}{intent(in)} :: ocean\textcolor{comment}{ !< A structure containing various publicly}
1078 \textcolor{comment}{                                                  !! visible ocean surface fields.}
1079   \textcolor{keywordtype}{character(len=*)}          , \textcolor{keywordtype}{intent(in)} :: name\textcolor{comment}{  !< The name of the field to extract}
1080   \textcolor{keywordtype}{real}                      , \textcolor{keywordtype}{intent(out)}:: \textcolor{keywordtype}{value}\textcolor{comment}{ !< The value of the named field}
1081 
1082   \textcolor{keywordflow}{if} (.not.\textcolor{keyword}{associated}(os)) \textcolor{keywordflow}{return}
1083   \textcolor{keywordflow}{if} (.not.os%is\_ocean\_pe) \textcolor{keywordflow}{return}
1084 
1085   \textcolor{keywordflow}{select case}(name)
1086   \textcolor{keywordflow}{case}(\textcolor{stringliteral}{'c\_p'})
1087     \textcolor{keywordtype}{value} = os%C\_p
1088 \textcolor{keywordflow}{  case default}
1089     \textcolor{keyword}{call }mom\_error(fatal,\textcolor{stringliteral}{'get\_ocean\_grid\_data1D: unknown argument name='}//name)
1090 \textcolor{keywordflow}{  end select}
1091 
\end{DoxyCode}
\mbox{\Hypertarget{interfaceocean__model__mod_1_1ocean__model__data__get_ad493240c6eb21e329541b378db546924}\label{interfaceocean__model__mod_1_1ocean__model__data__get_ad493240c6eb21e329541b378db546924}} 
\index{ocean\+\_\+model\+\_\+mod\+::ocean\+\_\+model\+\_\+data\+\_\+get@{ocean\+\_\+model\+\_\+mod\+::ocean\+\_\+model\+\_\+data\+\_\+get}!ocean\+\_\+model\+\_\+data2d\+\_\+get@{ocean\+\_\+model\+\_\+data2d\+\_\+get}}
\index{ocean\+\_\+model\+\_\+data2d\+\_\+get@{ocean\+\_\+model\+\_\+data2d\+\_\+get}!ocean\+\_\+model\+\_\+mod\+::ocean\+\_\+model\+\_\+data\+\_\+get@{ocean\+\_\+model\+\_\+mod\+::ocean\+\_\+model\+\_\+data\+\_\+get}}
\subsubsection{\texorpdfstring{ocean\+\_\+model\+\_\+data2d\+\_\+get()}{ocean\_model\_data2d\_get()}}
{\footnotesize\ttfamily subroutine ocean\+\_\+model\+\_\+mod\+::ocean\+\_\+model\+\_\+data\+\_\+get\+::ocean\+\_\+model\+\_\+data2d\+\_\+get (\begin{DoxyParamCaption}\item[{type(\hyperlink{structocean__model__mod_1_1ocean__state__type}{ocean\+\_\+state\+\_\+type}), pointer}]{OS,  }\item[{type(\hyperlink{structocean__model__mod_1_1ocean__public__type}{ocean\+\_\+public\+\_\+type}), intent(in)}]{Ocean,  }\item[{character(len=$\ast$), intent(in)}]{name,  }\item[{real, dimension(isc\+:,jsc\+:), intent(out)}]{array2D,  }\item[{integer, intent(in)}]{isc,  }\item[{integer, intent(in)}]{jsc }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [private]}}



This subroutine extracts a named 2-\/D field from the ocean surface or public type. 


\begin{DoxyParams}[1]{Parameters}
 & {\em os} & A pointer to the structure containing the internal ocean state (intent in).\\
\hline
\mbox{\tt in}  & {\em ocean} & A structure containing various publicly visible ocean surface fields.\\
\hline
\mbox{\tt in}  & {\em name} & The name of the field to extract\\
\hline
\mbox{\tt out}  & {\em array2d} & The values of the named field, it must cover only the computational domain\\
\hline
\mbox{\tt in}  & {\em isc} & The starting i-\/index of array2D\\
\hline
\mbox{\tt in}  & {\em jsc} & The starting j-\/index of array2D \\
\hline
\end{DoxyParams}


Definition at line 1013 of file ocean\+\_\+model\+\_\+\+M\+O\+M.\+F90.


\begin{DoxyCode}
1013   \textcolor{keywordtype}{use }\hyperlink{namespacemom__constants}{mom\_constants}\textcolor{keywordtype}{, only} : celsius\_kelvin\_offset
1014   \textcolor{keywordtype}{type}(ocean\_state\_type),     \textcolor{keywordtype}{pointer}    :: os\textcolor{comment}{    !< A pointer to the structure containing the}
1015 \textcolor{comment}{                                                  !! internal ocean state (intent in).}
1016   \textcolor{keywordtype}{type}(ocean\_public\_type),    \textcolor{keywordtype}{intent(in)} :: ocean\textcolor{comment}{ !< A structure containing various publicly}
1017 \textcolor{comment}{                                                  !! visible ocean surface fields.}
1018   \textcolor{keywordtype}{character(len=*)}          , \textcolor{keywordtype}{intent(in)} :: name\textcolor{comment}{  !< The name of the field to extract}
1019   \textcolor{keywordtype}{real}, \textcolor{keywordtype}{dimension(isc:,jsc:)}, \textcolor{keywordtype}{intent(out)}:: array2d\textcolor{comment}{ !< The values of the named field, it must}
1020 \textcolor{comment}{                                                  !! cover only the computational domain}
1021   \textcolor{keywordtype}{integer}                   , \textcolor{keywordtype}{intent(in)} :: isc\textcolor{comment}{   !< The starting i-index of array2D}
1022   \textcolor{keywordtype}{integer}                   , \textcolor{keywordtype}{intent(in)} :: jsc\textcolor{comment}{   !< The starting j-index of array2D}
1023 
1024   \textcolor{keywordtype}{integer} :: g\_isc, g\_iec, g\_jsc, g\_jec,g\_isd, g\_ied, g\_jsd, g\_jed, i, j
1025 
1026   \textcolor{keywordflow}{if} (.not.\textcolor{keyword}{associated}(os)) \textcolor{keywordflow}{return}
1027   \textcolor{keywordflow}{if} (.not.os%is\_ocean\_pe) \textcolor{keywordflow}{return}
1028 
1029 \textcolor{comment}{! The problem is %areaT is on MOM domain but Ice\_Ocean\_Boundary%... is on mpp domain.}
1030 \textcolor{comment}{! We want to return the MOM data on the mpp (compute) domain}
1031 \textcolor{comment}{! Get MOM domain extents}
1032   \textcolor{keyword}{call }mpp\_get\_compute\_domain(os%grid%Domain%mpp\_domain, g\_isc, g\_iec, g\_jsc, g\_jec)
1033   \textcolor{keyword}{call }mpp\_get\_data\_domain   (os%grid%Domain%mpp\_domain, g\_isd, g\_ied, g\_jsd, g\_jed)
1034 
1035   g\_isc = g\_isc-g\_isd+1 ; g\_iec = g\_iec-g\_isd+1 ; g\_jsc = g\_jsc-g\_jsd+1 ; g\_jec = g\_jec-g\_jsd+1
1036 
1037 
1038   \textcolor{keywordflow}{select case}(name)
1039   \textcolor{keywordflow}{case}(\textcolor{stringliteral}{'area'})
1040      array2d(isc:,jsc:) = os%US%L\_to\_m**2*os%grid%areaT(g\_isc:g\_iec,g\_jsc:g\_jec)
1041   \textcolor{keywordflow}{case}(\textcolor{stringliteral}{'mask'})
1042      array2d(isc:,jsc:) = os%grid%mask2dT(g\_isc:g\_iec,g\_jsc:g\_jec)
1043 \textcolor{comment}{!OR same result}
1044 \textcolor{comment}{!     do j=g\_jsc,g\_jec ; do i=g\_isc,g\_iec}
1045 \textcolor{comment}{!        array2D(isc+i-g\_isc,jsc+j-g\_jsc) = OS%grid%mask2dT(i,j)}
1046 \textcolor{comment}{!     enddo ; enddo}
1047   \textcolor{keywordflow}{case}(\textcolor{stringliteral}{'t\_surf'})
1048      array2d(isc:,jsc:) = ocean%t\_surf(isc:,jsc:)-celsius\_kelvin\_offset
1049   \textcolor{keywordflow}{case}(\textcolor{stringliteral}{'t\_pme'})
1050      array2d(isc:,jsc:) = ocean%t\_surf(isc:,jsc:)-celsius\_kelvin\_offset
1051   \textcolor{keywordflow}{case}(\textcolor{stringliteral}{'t\_runoff'})
1052      array2d(isc:,jsc:) = ocean%t\_surf(isc:,jsc:)-celsius\_kelvin\_offset
1053   \textcolor{keywordflow}{case}(\textcolor{stringliteral}{'t\_calving'})
1054      array2d(isc:,jsc:) = ocean%t\_surf(isc:,jsc:)-celsius\_kelvin\_offset
1055   \textcolor{keywordflow}{case}(\textcolor{stringliteral}{'btfHeat'})
1056      array2d(isc:,jsc:) = 0
1057   \textcolor{keywordflow}{case}(\textcolor{stringliteral}{'cos\_rot'})
1058      array2d(isc:,jsc:) = os%grid%cos\_rot(g\_isc:g\_iec,g\_jsc:g\_jec) \textcolor{comment}{! =1}
1059   \textcolor{keywordflow}{case}(\textcolor{stringliteral}{'sin\_rot'})
1060      array2d(isc:,jsc:) = os%grid%sin\_rot(g\_isc:g\_iec,g\_jsc:g\_jec) \textcolor{comment}{! =0}
1061   \textcolor{keywordflow}{case}(\textcolor{stringliteral}{'s\_surf'})
1062      array2d(isc:,jsc:) = ocean%s\_surf(isc:,jsc:)
1063   \textcolor{keywordflow}{case}(\textcolor{stringliteral}{'sea\_lev'})
1064      array2d(isc:,jsc:) = ocean%sea\_lev(isc:,jsc:)
1065   \textcolor{keywordflow}{case}(\textcolor{stringliteral}{'frazil'})
1066      array2d(isc:,jsc:) = ocean%frazil(isc:,jsc:)
1067 \textcolor{keywordflow}{  case default}
1068      \textcolor{keyword}{call }mom\_error(fatal,\textcolor{stringliteral}{'get\_ocean\_grid\_data2D: unknown argument name='}//name)
1069 \textcolor{keywordflow}{  end select}
1070 
\end{DoxyCode}


The documentation for this interface was generated from the following file\+:\begin{DoxyCompactItemize}
\item 
/home/cermak/src/\+M\+O\+M6.\+devrob/config\+\_\+src/coupled\+\_\+driver/ocean\+\_\+model\+\_\+\+M\+O\+M.\+F90\end{DoxyCompactItemize}
