\hypertarget{interfacemom__diag__mediator_1_1downsample__diag__field}{}\doxysection{mom\+\_\+diag\+\_\+mediator\+::downsample\+\_\+diag\+\_\+field Interface Reference}
\label{interfacemom__diag__mediator_1_1downsample__diag__field}\index{mom\_diag\_mediator::downsample\_diag\_field@{mom\_diag\_mediator::downsample\_diag\_field}}


\doxysubsection{Detailed Description}
Down sample a diagnostic field. 

Definition at line 85 of file M\+O\+M\+\_\+diag\+\_\+mediator.\+F90.

\doxysubsection*{Private functions}
\begin{DoxyCompactItemize}
\item 
subroutine \mbox{\hyperlink{interfacemom__diag__mediator_1_1downsample__diag__field_adf283fbf18c82328c5d60c234825035c}{downsample\+\_\+diag\+\_\+field\+\_\+2d}} (locfield, locfield\+\_\+dsamp, dl, diag\+\_\+cs, diag, isv, iev, jsv, jev, mask)
\begin{DoxyCompactList}\small\item\em This subroutine allocates and computes a downsampled array from an input array It also determines the diagnostics-\/compurte indices for the downsampled array 2d interface. \end{DoxyCompactList}\item 
subroutine \mbox{\hyperlink{interfacemom__diag__mediator_1_1downsample__diag__field_a07cc00aefbff6d202e2ab470aaa63554}{downsample\+\_\+diag\+\_\+field\+\_\+3d}} (locfield, locfield\+\_\+dsamp, dl, diag\+\_\+cs, diag, isv, iev, jsv, jev, mask)
\begin{DoxyCompactList}\small\item\em This subroutine allocates and computes a downsampled array from an input array It also determines the diagnostics-\/compurte indices for the downsampled array 3d interface. \end{DoxyCompactList}\end{DoxyCompactItemize}


\doxysubsection{Detailed Description}
Down sample a diagnostic field. 

Definition at line 85 of file M\+O\+M\+\_\+diag\+\_\+mediator.\+F90.



\doxysubsection{Functions and subroutines}
\mbox{\Hypertarget{interfacemom__diag__mediator_1_1downsample__diag__field_adf283fbf18c82328c5d60c234825035c}\label{interfacemom__diag__mediator_1_1downsample__diag__field_adf283fbf18c82328c5d60c234825035c}} 
\index{mom\_diag\_mediator::downsample\_diag\_field@{mom\_diag\_mediator::downsample\_diag\_field}!downsample\_diag\_field\_2d@{downsample\_diag\_field\_2d}}
\index{downsample\_diag\_field\_2d@{downsample\_diag\_field\_2d}!mom\_diag\_mediator::downsample\_diag\_field@{mom\_diag\_mediator::downsample\_diag\_field}}
\doxysubsubsection{\texorpdfstring{downsample\_diag\_field\_2d()}{downsample\_diag\_field\_2d()}}
{\footnotesize\ttfamily subroutine mom\+\_\+diag\+\_\+mediator\+::downsample\+\_\+diag\+\_\+field\+::downsample\+\_\+diag\+\_\+field\+\_\+2d (\begin{DoxyParamCaption}\item[{real, dimension(\+:,\+:), pointer}]{locfield,  }\item[{real, dimension(\+:,\+:), intent(inout), allocatable}]{locfield\+\_\+dsamp,  }\item[{integer, intent(in)}]{dl,  }\item[{type(\mbox{\hyperlink{structmom__diag__mediator_1_1diag__ctrl}{diag\+\_\+ctrl}}), intent(in)}]{diag\+\_\+cs,  }\item[{type(\mbox{\hyperlink{structmom__diag__mediator_1_1diag__type}{diag\+\_\+type}}), intent(in)}]{diag,  }\item[{integer, intent(inout)}]{isv,  }\item[{integer, intent(inout)}]{iev,  }\item[{integer, intent(inout)}]{jsv,  }\item[{integer, intent(inout)}]{jev,  }\item[{real, dimension(\+:,\+:), intent(in), optional, target}]{mask }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [private]}}



This subroutine allocates and computes a downsampled array from an input array It also determines the diagnostics-\/compurte indices for the downsampled array 2d interface. 


\begin{DoxyParams}[1]{Parameters}
 & {\em locfield} & Input array pointer \\
\hline
\mbox{\texttt{ in,out}}  & {\em locfield\+\_\+dsamp} & Output (downsampled) array \\
\hline
\mbox{\texttt{ in}}  & {\em diag\+\_\+cs} & Structure used to regulate diagnostic output \\
\hline
\mbox{\texttt{ in}}  & {\em diag} & A structure describing the diagnostic to post \\
\hline
\mbox{\texttt{ in}}  & {\em dl} & Level of down sampling \\
\hline
\mbox{\texttt{ in,out}}  & {\em isv} & i-\/start index for diagnostics \\
\hline
\mbox{\texttt{ in,out}}  & {\em iev} & i-\/end index for diagnostics \\
\hline
\mbox{\texttt{ in,out}}  & {\em jsv} & j-\/start index for diagnostics \\
\hline
\mbox{\texttt{ in,out}}  & {\em jev} & j-\/end index for diagnostics \\
\hline
\mbox{\texttt{ in}}  & {\em mask} & If present, use this real array as the data mask. \\
\hline
\end{DoxyParams}


Definition at line 3875 of file M\+O\+M\+\_\+diag\+\_\+mediator.\+F90.


\begin{DoxyCode}{0}
\DoxyCodeLine{3876 \textcolor{keywordtype}{  real}, \textcolor{keywordtype}{dimension(:,:)}, \textcolor{keywordtype}{pointer} :: locfield\textcolor{comment}{ !< Input array pointer}}
\DoxyCodeLine{3877 \textcolor{keywordtype}{  real}, \textcolor{keywordtype}{dimension(:,:)}, \textcolor{keywordtype}{allocatable}, \textcolor{keywordtype}{intent(inout)} :: locfield\_dsamp\textcolor{comment}{ !< Output (downsampled) array}}
\DoxyCodeLine{3878   \textcolor{keywordtype}{type}(diag\_ctrl),   \textcolor{keywordtype}{intent(in)} :: diag\_CS\textcolor{comment}{ !< Structure used to regulate diagnostic output}}
\DoxyCodeLine{3879   \textcolor{keywordtype}{type}(diag\_type),   \textcolor{keywordtype}{intent(in)} :: diag\textcolor{comment}{    !< A structure describing the diagnostic to post}}
\DoxyCodeLine{3880   \textcolor{keywordtype}{integer}, \textcolor{keywordtype}{intent(in)} :: dl\textcolor{comment}{                !< Level of down sampling}}
\DoxyCodeLine{3881   \textcolor{keywordtype}{integer}, \textcolor{keywordtype}{intent(inout)} :: isv\textcolor{comment}{            !< i-\/start index for diagnostics}}
\DoxyCodeLine{3882   \textcolor{keywordtype}{integer}, \textcolor{keywordtype}{intent(inout)} :: iev\textcolor{comment}{            !< i-\/end index for diagnostics}}
\DoxyCodeLine{3883   \textcolor{keywordtype}{integer}, \textcolor{keywordtype}{intent(inout)} :: jsv\textcolor{comment}{            !< j-\/start index for diagnostics}}
\DoxyCodeLine{3884   \textcolor{keywordtype}{integer}, \textcolor{keywordtype}{intent(inout)} :: jev\textcolor{comment}{            !< j-\/end index for diagnostics}}
\DoxyCodeLine{3885 \textcolor{keywordtype}{  real},    \textcolor{keywordtype}{optional},\textcolor{keywordtype}{target}, \textcolor{keywordtype}{intent(in)} :: mask(:,:)\textcolor{comment}{ !< If present, use this real array as the data mask.}}
\DoxyCodeLine{3886   \textcolor{comment}{! Locals}}
\DoxyCodeLine{3887 \textcolor{keywordtype}{  real}, \textcolor{keywordtype}{dimension(:,:)}, \textcolor{keywordtype}{pointer} :: locmask}
\DoxyCodeLine{3888   \textcolor{keywordtype}{integer} :: f1,f2,isv\_o,jsv\_o}
\DoxyCodeLine{3889 }
\DoxyCodeLine{3890   locmask => null()}
\DoxyCodeLine{3891   \textcolor{comment}{!Get the correct indices corresponding to input field}}
\DoxyCodeLine{3892   \textcolor{comment}{!Shape of the input diag field}}
\DoxyCodeLine{3893   f1=\textcolor{keyword}{size}(locfield,1)}
\DoxyCodeLine{3894   f2=\textcolor{keyword}{size}(locfield,2)}
\DoxyCodeLine{3895   \textcolor{comment}{!Save the extents of the original (fine) domain}}
\DoxyCodeLine{3896   isv\_o=isv;jsv\_o=jsv}
\DoxyCodeLine{3897   \textcolor{comment}{!Get the shape of the downsampled field and overwrite isv,iev,jsv,jev with them}}
\DoxyCodeLine{3898   \textcolor{keyword}{call }downsample\_diag\_indices\_get(f1,f2, dl, diag\_cs,isv,iev,jsv,jev)}
\DoxyCodeLine{3899   \textcolor{comment}{!Set the non-\/downsampled mask, it must be associated and initialized}}
\DoxyCodeLine{3900   \textcolor{keywordflow}{if} (\textcolor{keyword}{present}(mask)) \textcolor{keywordflow}{then}}
\DoxyCodeLine{3901      locmask => mask}
\DoxyCodeLine{3902   \textcolor{keywordflow}{elseif} (\textcolor{keyword}{associated}(diag\%axes\%mask2d)) \textcolor{keywordflow}{then}}
\DoxyCodeLine{3903      locmask => diag\%axes\%mask2d}
\DoxyCodeLine{3904   \textcolor{keywordflow}{else}}
\DoxyCodeLine{3905      \textcolor{keyword}{call }mom\_error(fatal, \textcolor{stringliteral}{"{}downsample\_diag\_field\_2d: Cannot downsample without a mask!!! "{}})}
\DoxyCodeLine{3906 \textcolor{keywordflow}{  endif}}
\DoxyCodeLine{3907 }
\DoxyCodeLine{3908   \textcolor{keyword}{call }downsample\_field(locfield, locfield\_dsamp, dl, diag\%xyz\_method, locmask, diag\_cs,diag, \&}
\DoxyCodeLine{3909                       isv\_o,jsv\_o,isv,iev,jsv,jev)}
\DoxyCodeLine{3910 }

\end{DoxyCode}
\mbox{\Hypertarget{interfacemom__diag__mediator_1_1downsample__diag__field_a07cc00aefbff6d202e2ab470aaa63554}\label{interfacemom__diag__mediator_1_1downsample__diag__field_a07cc00aefbff6d202e2ab470aaa63554}} 
\index{mom\_diag\_mediator::downsample\_diag\_field@{mom\_diag\_mediator::downsample\_diag\_field}!downsample\_diag\_field\_3d@{downsample\_diag\_field\_3d}}
\index{downsample\_diag\_field\_3d@{downsample\_diag\_field\_3d}!mom\_diag\_mediator::downsample\_diag\_field@{mom\_diag\_mediator::downsample\_diag\_field}}
\doxysubsubsection{\texorpdfstring{downsample\_diag\_field\_3d()}{downsample\_diag\_field\_3d()}}
{\footnotesize\ttfamily subroutine mom\+\_\+diag\+\_\+mediator\+::downsample\+\_\+diag\+\_\+field\+::downsample\+\_\+diag\+\_\+field\+\_\+3d (\begin{DoxyParamCaption}\item[{real, dimension(\+:,\+:,\+:), pointer}]{locfield,  }\item[{real, dimension(\+:,\+:,\+:), intent(inout), allocatable}]{locfield\+\_\+dsamp,  }\item[{integer, intent(in)}]{dl,  }\item[{type(\mbox{\hyperlink{structmom__diag__mediator_1_1diag__ctrl}{diag\+\_\+ctrl}}), intent(in)}]{diag\+\_\+cs,  }\item[{type(\mbox{\hyperlink{structmom__diag__mediator_1_1diag__type}{diag\+\_\+type}}), intent(in)}]{diag,  }\item[{integer, intent(inout)}]{isv,  }\item[{integer, intent(inout)}]{iev,  }\item[{integer, intent(inout)}]{jsv,  }\item[{integer, intent(inout)}]{jev,  }\item[{real, dimension(\+:,\+:,\+:), intent(in), optional, target}]{mask }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [private]}}



This subroutine allocates and computes a downsampled array from an input array It also determines the diagnostics-\/compurte indices for the downsampled array 3d interface. 


\begin{DoxyParams}[1]{Parameters}
 & {\em locfield} & Input array pointer \\
\hline
\mbox{\texttt{ in,out}}  & {\em locfield\+\_\+dsamp} & Output (downsampled) array \\
\hline
\mbox{\texttt{ in}}  & {\em diag\+\_\+cs} & Structure used to regulate diagnostic output \\
\hline
\mbox{\texttt{ in}}  & {\em diag} & A structure describing the diagnostic to post \\
\hline
\mbox{\texttt{ in}}  & {\em dl} & Level of down sampling \\
\hline
\mbox{\texttt{ in,out}}  & {\em isv} & i-\/start index for diagnostics \\
\hline
\mbox{\texttt{ in,out}}  & {\em iev} & i-\/end index for diagnostics \\
\hline
\mbox{\texttt{ in,out}}  & {\em jsv} & j-\/start index for diagnostics \\
\hline
\mbox{\texttt{ in,out}}  & {\em jev} & j-\/end index for diagnostics \\
\hline
\mbox{\texttt{ in}}  & {\em mask} & If present, use this real array as the data mask. \\
\hline
\end{DoxyParams}


Definition at line 3834 of file M\+O\+M\+\_\+diag\+\_\+mediator.\+F90.


\begin{DoxyCode}{0}
\DoxyCodeLine{3835 \textcolor{keywordtype}{  real}, \textcolor{keywordtype}{dimension(:,:,:)}, \textcolor{keywordtype}{pointer} :: locfield\textcolor{comment}{  !< Input array pointer}}
\DoxyCodeLine{3836 \textcolor{keywordtype}{  real}, \textcolor{keywordtype}{dimension(:,:,:)}, \textcolor{keywordtype}{allocatable}, \textcolor{keywordtype}{intent(inout)} :: locfield\_dsamp\textcolor{comment}{ !< Output (downsampled) array}}
\DoxyCodeLine{3837   \textcolor{keywordtype}{type}(diag\_ctrl),   \textcolor{keywordtype}{intent(in)} :: diag\_CS\textcolor{comment}{ !< Structure used to regulate diagnostic output}}
\DoxyCodeLine{3838   \textcolor{keywordtype}{type}(diag\_type),   \textcolor{keywordtype}{intent(in)} :: diag\textcolor{comment}{    !< A structure describing the diagnostic to post}}
\DoxyCodeLine{3839   \textcolor{keywordtype}{integer}, \textcolor{keywordtype}{intent(in)} :: dl\textcolor{comment}{                !< Level of down sampling}}
\DoxyCodeLine{3840   \textcolor{keywordtype}{integer}, \textcolor{keywordtype}{intent(inout)} :: isv\textcolor{comment}{            !< i-\/start index for diagnostics}}
\DoxyCodeLine{3841   \textcolor{keywordtype}{integer}, \textcolor{keywordtype}{intent(inout)} :: iev\textcolor{comment}{            !< i-\/end index for diagnostics}}
\DoxyCodeLine{3842   \textcolor{keywordtype}{integer}, \textcolor{keywordtype}{intent(inout)} :: jsv\textcolor{comment}{            !< j-\/start index for diagnostics}}
\DoxyCodeLine{3843   \textcolor{keywordtype}{integer}, \textcolor{keywordtype}{intent(inout)} :: jev\textcolor{comment}{            !< j-\/end index for diagnostics}}
\DoxyCodeLine{3844 \textcolor{keywordtype}{  real},    \textcolor{keywordtype}{optional},\textcolor{keywordtype}{target}, \textcolor{keywordtype}{intent(in)} :: mask(:,:,:)\textcolor{comment}{ !< If present, use this real array as the data mask.}}
\DoxyCodeLine{3845   \textcolor{comment}{! Locals}}
\DoxyCodeLine{3846 \textcolor{keywordtype}{  real}, \textcolor{keywordtype}{dimension(:,:,:)}, \textcolor{keywordtype}{pointer} :: locmask}
\DoxyCodeLine{3847   \textcolor{keywordtype}{integer} :: f1,f2,isv\_o,jsv\_o}
\DoxyCodeLine{3848 }
\DoxyCodeLine{3849   locmask => null()}
\DoxyCodeLine{3850   \textcolor{comment}{!Get the correct indices corresponding to input field}}
\DoxyCodeLine{3851   \textcolor{comment}{!Shape of the input diag field}}
\DoxyCodeLine{3852   f1=\textcolor{keyword}{size}(locfield,1)}
\DoxyCodeLine{3853   f2=\textcolor{keyword}{size}(locfield,2)}
\DoxyCodeLine{3854   \textcolor{comment}{!Save the extents of the original (fine) domain}}
\DoxyCodeLine{3855   isv\_o=isv;jsv\_o=jsv}
\DoxyCodeLine{3856   \textcolor{comment}{!Get the shape of the downsampled field and overwrite isv,iev,jsv,jev with them}}
\DoxyCodeLine{3857   \textcolor{keyword}{call }downsample\_diag\_indices\_get(f1,f2, dl, diag\_cs,isv,iev,jsv,jev)}
\DoxyCodeLine{3858   \textcolor{comment}{!Set the non-\/downsampled mask, it must be associated and initialized}}
\DoxyCodeLine{3859   \textcolor{keywordflow}{if} (\textcolor{keyword}{present}(mask)) \textcolor{keywordflow}{then}}
\DoxyCodeLine{3860      locmask => mask}
\DoxyCodeLine{3861   \textcolor{keywordflow}{elseif} (\textcolor{keyword}{associated}(diag\%axes\%mask3d)) \textcolor{keywordflow}{then}}
\DoxyCodeLine{3862      locmask => diag\%axes\%mask3d}
\DoxyCodeLine{3863   \textcolor{keywordflow}{else}}
\DoxyCodeLine{3864      \textcolor{keyword}{call }mom\_error(fatal, \textcolor{stringliteral}{"{}downsample\_diag\_field\_3d: Cannot downsample without a mask!!! "{}})}
\DoxyCodeLine{3865 \textcolor{keywordflow}{  endif}}
\DoxyCodeLine{3866 }
\DoxyCodeLine{3867   \textcolor{keyword}{call }downsample\_field(locfield, locfield\_dsamp, dl, diag\%xyz\_method, locmask, diag\_cs, diag, \&}
\DoxyCodeLine{3868                       isv\_o,jsv\_o,isv,iev,jsv,jev)}
\DoxyCodeLine{3869 }

\end{DoxyCode}


The documentation for this interface was generated from the following file\+:\begin{DoxyCompactItemize}
\item 
/home/cermak/src/\+M\+O\+M6.\+devrob/src/framework/M\+O\+M\+\_\+diag\+\_\+mediator.\+F90\end{DoxyCompactItemize}
