\hypertarget{interfacemom__diag__mediator_1_1downsample__diag__field}{}\section{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}}


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

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

\subsection*{Private functions}
\begin{DoxyCompactItemize}
\item 
subroutine \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 \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}


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

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



\subsection{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}}
\subsubsection{\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(\hyperlink{structmom__diag__mediator_1_1diag__ctrl}{diag\+\_\+ctrl}), intent(in)}]{diag\+\_\+cs,  }\item[{type(\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{\tt in,out}  & {\em locfield\+\_\+dsamp} & Output (downsampled) array\\
\hline
\mbox{\tt in}  & {\em diag\+\_\+cs} & Structure used to regulate diagnostic output\\
\hline
\mbox{\tt in}  & {\em diag} & A structure describing the diagnostic to post\\
\hline
\mbox{\tt in}  & {\em dl} & Level of down sampling\\
\hline
\mbox{\tt in,out}  & {\em isv} & i-\/start index for diagnostics\\
\hline
\mbox{\tt in,out}  & {\em iev} & i-\/end index for diagnostics\\
\hline
\mbox{\tt in,out}  & {\em jsv} & j-\/start index for diagnostics\\
\hline
\mbox{\tt in,out}  & {\em jev} & j-\/end index for diagnostics\\
\hline
\mbox{\tt in}  & {\em mask} & If present, use this real array as the data mask. \\
\hline
\end{DoxyParams}


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


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


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


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