Skip to content

Commit

Permalink
master: reintegrating ww3_uprstr_PublicRelease Valb issues #50255, #3…
Browse files Browse the repository at this point in the history
…9742 and #39741, which

* Adding remove print* in ww3_uprstr
* Adding regression tests ww3_ta1 and documentation

Former-commit-id: d4f892a17c3b1a86ce5b4ed5472f7dfa01cddd12
  • Loading branch information
Ali authored and ali.abdolali committed Oct 23, 2018
1 parent cc2374c commit 389c05e
Show file tree
Hide file tree
Showing 147 changed files with 7,279 additions and 344 deletions.
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -77,3 +77,7 @@ model/bin/w3prnt
model/bin/w3split
model/wwatch3.env
model/bin/wwatch3.env
*.swp
*/*.swp
*/*/*.swp
*/*/*/*.swp
96 changes: 53 additions & 43 deletions manual/run/ww3_uprstr.tex
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ \subsubsection{The Restart File Processor} \label{sec:ww3uprstr}
\proddeff{Input}{ww3\_uprstr.inp}{Input file for restart file
post-processor.}{10}
\proddefa{mod\_def.ww3}{Model definition file.}{20}
\proddefa{restart.ww3}{Restart File}{-}
\proddefa{XXXX.grbtxt}{SWH Analysis file in grbtxt format.}{10}
\proddeff{Output}{restart001.ww3}{Updated restart file.}{-}
\proddefa{restart.ww3}{Restart File}{ }
\proddefa{XXXX.grbtxt}{SWH Analysis file in grbtxt format.}{123}
\proddeff{Output}{restart001.ww3}{Updated restart file.}{ }

\inpfile{ww3_uprstr.tex}

Expand All @@ -18,23 +18,23 @@ \subsubsection{The Restart File Processor} \label{sec:ww3uprstr}

The majority of the observations for the sea surface wave field is
observations of the diagnostic variable: Significant Wave Height (SWH).
Therefore, the wave data assimilation (WDA) often happens in the SWH
space and subsequently this information has to be transfered to the
Therefore, the wave data assimilation (WDA) often takes space in the SWH
space and subsequently this information has to be transfered to the
prognostic space, wave spectrum (WS) to be imposed as boundary and/or
initial condition (BIC).

\subparagraph{Purpose of the \textbf{ww3\_uprstr} } Redistribution of
the energy from the analysis of the SWH field to the field of WS as
they have been saved at the restart file.
\subparagraph{Purpose of the \textbf{ww3\_uprstr} \newline } Redistribution of
the energy from the analysis of the SWH field to the field of WS saved
in the restart file.

\subparagraph{Core algorithm \newline }
The \textbf{ww3\_uprstr} sets the SWH of the background spectrum equal to
The \textbf{ww3\_uprstr} sets the SWH of the background spectra equal to
the SWH of the analysis and modifies the shape of the spectrum according
to the user's prescibed spectrum shape. The \textbf{ww3\_uprstr} has been
implemented as an extension of the restart reader and it requires as inputs:
the restart file, the SWH of the analysis, and the \textbf{ww3\_uprstr.inp}
(see above) with the user's defined options; additional files may be
required.
required in order to reduce the calculations on the fly.

\paragraph{How to Use the ww3\_uprstr \newline}
To use the \textbf{ww3\_uprstr}, the users have to follow the same logic
Expand All @@ -43,17 +43,20 @@ \subsubsection{The Restart File Processor} \label{sec:ww3uprstr}
\begin{enumerate}
\item \textbf{Download the source code} \newline
The \textbf{ww3\_uprstr} source code is included to the official WAVEWATCH III
release, starting with the version 6.03.
release, starting with the version x.xx.
\item \textbf{Compile the code} \newline
The \textbf{ww3\_uprstr} is compiled the same way as all the auxiliary programs
of WAVEWATCH III, see the appropriate section of the manual. For debugging outputs,
use the \textbf{T} flag at the switch file.
\item \textbf{Test the executable} \newline
The regression test \textbf{ww3\_ta1} can be used for testing the different
options of \textbf{ww3\_uprstr}.
\item \textbf{Run the ww3\_uprstr} \newline
Description of steps to run the \textbf{ww3\_uprstr}:
\begin {description}
\item{Required Input files: \newline}
\begin{itemize}
\item \textbf{Restart file.} This file has been created by WW3 during the warmup run
\item \textbf{Restart file.} This file has been created by WW3 during the hindcast run
of the model or during the previous cycle.
Expected filename: \textbf{restart.ww3}.
\item \textbf{mod\_def.ww3}
Expand All @@ -77,8 +80,8 @@ \subsubsection{The Restart File Processor} \label{sec:ww3uprstr}
\newline
\item To run the executable: \newline
\textgreater \$EXE/ww3\_uprstr \newline
If all the inputs are correctly prepared, a new restart file,
(\textbf{restart001.ww3}), will be created. The \textbf{ww3\_uprstr}
If all the inputs are correctly prepared, a new restart file
(\textbf{restart001.ww3}) will be created. The \textbf{ww3\_uprstr}
exports the updated spectra in the same format as the restart.ww3.
To be applied as BIC for the initialization of the next prediction cycle,
it has to be renamed: \newline
Expand All @@ -95,6 +98,10 @@ \subsubsection{The Restart File Processor} \label{sec:ww3uprstr}
the \textbf{ww3\_uprstr}; there is not backwards compatibility.
\item The starting time of the assimilation defined at \textbf{ww3\_uprstr.inp}
has to be the same with the time at the restart file.
\item By using the \textbf{T}, the \textbf{ww3\_uprstr.inp} exports the fields of
SWH from the background restart file, the analysis and of the updated restart file.
In addition, the spectra from the restart files before and after and the update are
exported as text files.
\end{itemize}
}
}
Expand All @@ -120,43 +127,55 @@ \subsubsection{The Restart File Processor} \label{sec:ww3uprstr}

The following UPD options are available:
\begin{enumerate}
\item UPD0C:: Option 0C All the spectra are updated with a constant
fac=(SWH\_Bckg-SWH\_Anl)/SWH\_Anl.
\item UPD0F:: Option 0F All the spectra are updated with a constant
fac=SWH\_Anl/SWH\_Bckg.
\item UPD1 :: Option 1 The fac(x,y,frq,theta), is weighted according to
the \% of energy at each spectral bin; fac the same as UPDOF.
\item UPD2 :: Option 2 The fac(x,y,frq,theta), is calculated at
each grid point according to SWH\_Bckg and SWH\_Anl
\item UPD0C:: \textbf{ELIMINATED from version x.xx} Option 0C All the spectra are
updated with a constant: \newline
\(fac=(SWH\_Bckg-SWH\_Anl)/SWH\_Anl \).
\item UPD0F:: Option 0F All the spectra are updated with a constant: \newline
\(fac=SWH\_Anl/SWH\_Bckg \).
\item UPD1 :: \textbf{ELIMINATED from version x.xx} Option 1 The fac(x,y,frq,theta),
is weighted according to the \% of energy at each spectral bin; fac the same as UPDOF.
\item UPD2 :: Option 2 The fac(x,y,frq,theta), is calculated at each grid point
according to SWH\_Bckg and SWH\_Anl
\item UPD3 :: Option 3 The update factor is a surface with the shape of
the background spectrum.
the background spectrum.
\item UPD4 :: [NOT INCLUDED in the current version, just keeping the spot]
Option 4 The generalization of the UPD3. The update factor is the sum of surfaces
which are applied on the background spectrum
Option 4 The generalization of the UPD3. The update factor is the sum of surfaces
which are applied on the background spectrum. The algorithm requires the mapping
of each partition on the individual spectra; the map is used to determine the weighting
surfaces.
\end{enumerate}

Any additional method for the redistribution of the energy to the WS could be added
by adding a new entry at the namelist of the \textbf{ww3\_uprstr.inp}.
by extending the input file and adding the source code to the \textbf{ww3\_uprstr.ftn}.

\subparagraph{Example \newline}
In this section, an example of the simplest WDA application is discussed.
The figure ~\ref{fig:waveDAflowchart} shows how the \textbf{ww3\_uprstr}
is used in the framework of a simple wave analysis system. \newline

A WW3 run (from the previous cycle or from the warm up of the model) provides the
A WW3 run (from the previous cycle or from the hindcast) provides the
background field of SWH and the corresponding restart file at the appropriate time.
The format of the background SWH field has to be compatible with the WDA module inputs.

\begin{figure} \begin{center}
\includegraphics[width=0.9\textwidth]{./run/waveDA.eps}
\caption{Flowchart of simplified wave data assimilation system,
showing the role of the {ww3\_uprstr}, the required input files,
and the resulted output of the updated restart file.}
\label{fig:waveDAflowchart} \botline
\end{center}
\end{figure}

The WDA module uses the background field and the available observations
for the time of analysis, produces the analysis (\textbf{XXXX.grbtxt}) and exports
the field of SWH in grbtxt format.
for the time of analysis, produces the analysis and exports
the field of SWH in grbtxt format (\textbf{XXXX.grbtxt}) .

The analysis file, the mod\_def.ww3, the restart.ww3 file and the ww3\_uprstr.inp
are the input files for the \textbf{ww3\_uprstr}. If all the options and input
files are correctly prepared, it takes approxmately one minute to update a grid
of 260000 grid nodes and generate the output on a single processor.
The analysis file, the \textbf{mod\_def.ww3}, the \textbf{restart.ww3} file and
the \textbf{ww3\_uprstr.inp} are the input files for the \textbf{ww3\_uprstr}.
If all the options and input files are correctly prepared, it takes approxmately
one minute to update a grid of 260000 grid nodes and generate the output on a single processor.
The updated restart file has to be renamed, at the expected file name, in the case of this
example restart.ww3. \newline
example to \textbf{restart.ww3}. \newline

\fbox{
\parbox{\textwidth}{
Expand All @@ -168,15 +187,6 @@ \subsubsection{The Restart File Processor} \label{sec:ww3uprstr}
}
}

\begin{figure} \begin{center}
\includegraphics[width=0.9\textwidth]{./run/waveDA.eps}
\caption{Flowchart of simplified wave data assimilation system,
showing the role of the {ww3\_uprstr}, the required input files,
and the resulted output of the updated restart file.}
\label{fig:waveDAflowchart} \botline
\end{center}
\end{figure}

%\paragraph{How to Update the ww3\_uprstr \newline}
%Add data readers, mainly for machine independent binary data and wgrib2.

Expand Down
Loading

0 comments on commit 389c05e

Please sign in to comment.