New URL for NEMO forge!   http://forge.nemo-ocean.eu

Since March 2022 along with NEMO 4.2 release, the code development moved to a self-hosted GitLab.
This present forge is now archived and remained online for history.
Changeset 11218 for NEMO/trunk – NEMO

Changeset 11218 for NEMO/trunk


Ignore:
Timestamp:
2019-07-05T11:19:53+02:00 (5 years ago)
Author:
mdrudi
Message:

revision of chap_DIA.tex in NEMO doc

File:
1 edited

Legend:

Unmodified
Added
Removed
  • NEMO/trunk/doc/latex/NEMO/subfiles/chap_DIA.tex

    r11179 r11218  
    2525the same run performed in one step. 
    2626It should be noted that this requires that the restart file contains two consecutive time steps for 
    27 all the prognostic variables, and that it is saved in the same binary format as the one used by the computer that 
    28 is to read it (in particular, 32 bits binary IEEE format must not be used for this file). 
     27all the prognostic variables. 
    2928 
    3029The output listing and file(s) are predefined but should be checked and eventually adapted to the user's needs. 
     
    3837the writing work is distributed over the processors in massively parallel computing. 
    3938A complete description of the use of this I/O server is presented in the next section. 
    40  
    41 By default, \key{iomput} is not defined, 
    42 NEMO produces NetCDF with the old IOIPSL library which has been kept for compatibility and its easy installation. 
    43 However, the IOIPSL library is quite inefficient on parallel machines and, since version 3.2, 
    44 many diagnostic options have been added presuming the use of \key{iomput}. 
    45 The usefulness of the default IOIPSL-based option is expected to reduce with each new release. 
    46 If \key{iomput} is not defined, output files and content are defined in the \mdl{diawri} module and 
    47 contain mean (or instantaneous if \key{diainstant} is defined) values over a regular period of 
    48 nn\_write time-steps (namelist parameter).  
    4939 
    5040%\gmcomment{                    % start of gmcomment 
     
    9181in a very easy way. 
    9282All details of iomput functionalities are listed in the following subsections. 
    93 Examples of the XML files that control the outputs can be found in: \path{NEMOGCM/CONFIG/ORCA2_LIM/EXP00/iodef.xml}, 
    94 \path{NEMOGCM/CONFIG/SHARED/field_def.xml} and \path{NEMOGCM/CONFIG/SHARED/domain_def.xml}. \\ 
     83Examples of the XML files that control the outputs can be found in:  
     84\path{cfgs/ORCA2_ICE_PISCES/EXPREF/iodef.xml}, 
     85\path{cfgs/SHARED/field_def_nemo-oce.xml}, 
     86\path{cfgs/SHARED/field_def_nemo-pisces.xml}, 
     87\path{cfgs/SHARED/field_def_nemo-ice.xml} and \path{cfgs/SHARED/domain_def_nemo.xml}. \\ 
    9588 
    9689The second functionality targets output performance when running in parallel (\key{mpp\_mpi}). 
     
    10194 
    10295In version 3.6, the iom\_put interface depends on 
    103 an external code called \href{https://forge.ipsl.jussieu.fr/ioserver/browser/XIOS/branchs/xios-1.0}{XIOS-1.0}  
     96an external code called \href{https://forge.ipsl.jussieu.fr/ioserver/browser/XIOS/branchs/xios-2.5}{XIOS-2.5}  
    10497(use of revision 618 or higher is required). 
    10598This new IO server can take advantage of the parallel I/O functionality of NetCDF4 to 
     
    257250See the installation guide on the \href{http://forge.ipsl.jussieu.fr/ioserver/wiki}{XIOS} wiki for help and guidance. 
    258251NEMO will need to link to the compiled XIOS library. 
    259 The \href{https://forge.ipsl.jussieu.fr/nemo/wiki/Users/ModelInterfacing/InputsOutputs#Inputs-OutputsusingXIOS} 
    260 {XIOS with NEMO} guide provides an example illustration of how this can be achieved. 
     252The \href{https://forge.ipsl.jussieu.fr/nemo/chrome/site/doc/NEMO/guide/html/install.html#extract-and-install-xios} 
     253{Extract and install XIOS} guide provides an example illustration of how this can be achieved. 
    261254 
    262255\subsubsection{Add your own outputs} 
     
    269262\begin{enumerate} 
    270263\item[1.] 
    271   in NEMO code, add a \forcode{CALL iom\_put( 'identifier', array )} where you want to output a 2D or 3D array. 
     264  in NEMO code, add a \forcode{CALL iom_put( 'identifier', array )} where you want to output a 2D or 3D array. 
    272265\item[2.] 
    273266  If necessary, add \forcode{USE iom ! I/O manager library} to the list of used modules in 
     
    442435\xmlline|<context src="./nemo_def.xml" />| 
    443436  
    444 \noindent In NEMO, by default, the field and domain definition is done in 2 separate files: 
    445 \path{NEMOGCM/CONFIG/SHARED/field_def.xml} and \path{NEMOGCM/CONFIG/SHARED/domain_def.xml} that 
     437\noindent In NEMO, by default, the field definition is done in 3 separate files ( 
     438\path{cfgs/SHARED/field_def_nemo-oce.xml}, 
     439\path{cfgs/SHARED/field_def_nemo-pisces.xml} and 
     440\path{cfgs/SHARED/field_def_nemo-ice.xml} ) and the  domain definition is done in another file ( \path{cfgs/SHARED/domain_def_nemo.xml} ) 
     441that 
    446442are included in the main iodef.xml file through the following commands: 
    447443\begin{xmllines} 
    448 <field_definition src="./field_def.xml" /> 
    449 <domain_definition src="./domain_def.xml" /> 
     444<context id="nemo" src="./context_nemo.xml"/>  
    450445\end{xmllines} 
    451446 
     
    508503 
    509504Secondly, the group can be used to replace a list of elements. 
    510 Several examples of groups of fields are proposed at the end of the file \path{CONFIG/SHARED/field_def.xml}. 
     505Several examples of groups of fields are proposed at the end of the XML field files ( 
     506\path{cfgs/SHARED/field_def_nemo-oce.xml}, 
     507\path{cfgs/SHARED/field_def_nemo-pisces.xml} and 
     508\path{cfgs/SHARED/field_def_nemo-ice.xml} ) . 
    511509For example, a short list of the usual variables related to the U grid: 
    512510 
     
    514512<field_group id="groupU" > 
    515513   <field field_ref="uoce"  /> 
    516    <field field_ref="suoce" /> 
     514   <field field_ref="ssu" /> 
    517515   <field field_ref="utau"  /> 
    518516</field_group> 
     
    538536the tag family domain. 
    539537It must therefore be done in the domain part of the XML file.  
    540 For example, in \path{CONFIG/SHARED/domain_def.xml}, we provide the following example of a definition of  
     538For example, in \path{cfgs/SHARED/domain_def.xml}, we provide the following example of a definition of  
    541539a 5 by 5 box with the bottom left corner at point (10,10). 
    542540 
    543541\begin{xmllines} 
    544 <domain_group id="grid_T"> 
    545    <domain id="myzoom" zoom_ibegin="10" zoom_jbegin="10" zoom_ni="5" zoom_nj="5" /> 
     542<domain id="myzoomT" domain_ref="grid_T"> 
     543   <zoom_domain ibegin="10" jbegin="10" ni="5" nj="5" /> 
    546544\end{xmllines} 
    547545 
     
    551549\begin{xmllines} 
    552550<file id="myfile_vzoom" output_freq="1d" > 
    553    <field field_ref="toce" domain_ref="myzoom"/> 
     551   <field field_ref="toce" domain_ref="myzoomT"/> 
    554552</file> 
    555553\end{xmllines} 
     
    576574\subsubsection{Define vertical zooms} 
    577575 
    578 Vertical zooms are defined through the attributs zoom\_begin and zoom\_end of the tag family axis. 
     576Vertical zooms are defined through the attributs zoom\_begin and zoom\_n of the tag family axis. 
    579577It must therefore be done in the axis part of the XML file. 
    580 For example, in \path{NEMOGCM/CONFIG/ORCA2_LIM/iodef_demo.xml}, we provide the following example: 
    581  
    582 \begin{xmllines} 
    583 <axis_group id="deptht" long_name="Vertical T levels" unit="m" positive="down" > 
    584    <axis id="deptht" /> 
    585    <axis id="deptht_myzoom" zoom_begin="1" zoom_end="10" /> 
     578For example, in \path{cfgs/ORCA2_ICE_PISCES/EXPREF/iodef_demo.xml}, we provide the following example: 
     579 
     580\begin{xmllines} 
     581<axis_definition> 
     582   <axis id="deptht" long_name="Vertical T levels" unit="m" positive="down" /> 
     583   <axis id="deptht_zoom" azix_ref="deptht" > 
     584      <zoom_axis zoom_begin="1" zoom_n="10" /> 
     585   </axis> 
    586586\end{xmllines} 
    587587 
     
    765765\end{xmllines} 
    766766 
    767 Note that, then the code is crashing, writting real4 variables forces a numerical convection from  
     767Note that, then the code is crashing, writting real4 variables forces a numerical conversion from  
    768768real8 to real4 which will create an internal error in NetCDF and will avoid the creation of the output files. 
    769769Forcing double precision outputs with prec="8" (for example in the field\_definition) will avoid this problem. 
     
    13181318\subsection{CF metadata standard compliance} 
    13191319 
    1320 Output from the XIOS-1.0 IO server is compliant with  
     1320Output from the XIOS IO server is compliant with  
    13211321\href{http://cfconventions.org/Data/cf-conventions/cf-conventions-1.5/build/cf-conventions.html}{version 1.5} of 
    13221322the CF metadata standard.  
     
    13411341Chunking and compression can lead to significant reductions in file sizes for a small runtime overhead. 
    13421342For a fuller discussion on chunking and other performance issues the reader is referred to 
    1343 the NetCDF4 documentation found \href{http://www.unidata.ucar.edu/software/netcdf/docs/netcdf.html#Chunking}{here}. 
     1343the NetCDF4 documentation found \href{https://www.unidata.ucar.edu/software/netcdf/docs/netcdf_perf_chunking.html}{here}. 
    13441344 
    13451345The new features are only available when the code has been linked with a NetCDF4 library 
     
    14641464(\ie at the end of each $dyn\cdots.F90$ and/or $tra\cdots.F90$ routines). 
    14651465This capability is controlled by options offered in \ngn{namtrd} namelist. 
    1466 Note that the output are done with xIOS, and therefore the \key{IOM} is required. 
     1466Note that the output are done with XIOS, and therefore the \key{iomput} is required. 
    14671467 
    14681468What is done depends on the \ngn{namtrd} logical set to \forcode{.true.}: 
     
    14901490 
    14911491Note that the mixed layer tendency diagnostic can also be used on biogeochemical models via  
    1492 the \key{trdtrc} and \key{trdmld\_trc} CPP keys. 
     1492the \key{trdtrc} and \key{trdmxl\_trc} CPP keys. 
    14931493 
    14941494\textbf{Note that} in the current version (v3.6), many changes has been introduced but not fully tested. 
     
    15091509The on-line computation of floats advected either by the three dimensional velocity field or constraint to 
    15101510remain at a given depth ($w = 0$ in the computation) have been introduced in the system during the CLIPPER project. 
    1511 Options are defined by \ngn{namflo} namelis variables. 
     1511Options are defined by \ngn{namflo} namelist variables. 
    15121512The algorithm used is based either on the work of \cite{blanke.raynaud_JPO97} (default option), 
    15131513or on a $4^th$ Runge-Hutta algorithm (\np{ln\_flork4}\forcode{ = .true.}). 
     
    15221522In case of Ariane convention, input filename is \np{init\_float\_ariane}. 
    15231523Its format is: \\ 
    1524 {\scriptsize \texttt{I J K nisobfl itrash itrash}} 
     1524{\scriptsize \texttt{I J K nisobfl itrash}} 
    15251525 
    15261526\noindent with: 
     
    15801580In that case, output filename is trajec\_float. 
    15811581 
    1582 Another possiblity of writing format is Netcdf (\np{ln\_flo\_ascii}\forcode{ = .false.}). 
    1583 There are 2 possibilities: 
    1584  
    1585 - if (\key{iomput}) is used, outputs are selected in  iodef.xml. 
     1582Another possiblity of writing format is Netcdf (\np{ln\_flo\_ascii}\forcode{ = .false.}) with 
     1583\key{iomput} and outputs selected in iodef.xml. 
    15861584Here it is an example of specification to put in files description section: 
    15871585 
     
    16001598\end{xmllines} 
    16011599 
    1602  -  if (\key{iomput}) is not used, a file called \ifile{trajec\_float} will be created by IOIPSL library. 
    1603  
    1604  See also \href{http://stockage.univ-brest.fr/~grima/Ariane/}{here} the web site describing the off-line use of 
    1605  this marvellous diagnostic tool. 
    16061600 
    16071601% ------------------------------------------------------------------------------------------------------------- 
     
    16121606\label{sec:DIA_diag_harm} 
    16131607 
    1614 %------------------------------------------namdia_harm---------------------------------------------------- 
     1608%------------------------------------------nam_diaharm---------------------------------------------------- 
    16151609% 
    16161610\nlst{nam_diaharm} 
     
    16201614This on-line Harmonic analysis is actived with \key{diaharm}. 
    16211615 
    1622 Some parameters are available in namelist \ngn{namdia\_harm}: 
     1616Some parameters are available in namelist \ngn{nam\_diaharm}: 
    16231617 
    16241618 - \np{nit000\_han} is the first time step used for harmonic analysis 
     
    16691663 
    16701664Each section is defined by the coordinates of its 2 extremities. 
    1671 The pathways between them are contructed using tools which can be found in \texttt{NEMOGCM/TOOLS/SECTIONS\_DIADCT} 
    1672 and are written in a binary file \texttt{section\_ijglobal.diadct\_ORCA2\_LIM} which is later read in by 
     1665The pathways between them are contructed using tools which can be found in \texttt{tools/SECTIONS\_DIADCT} 
     1666and are written in a binary file \texttt{section\_ijglobal.diadct} which is later read in by 
    16731667NEMO to compute on-line transports. 
    16741668 
     
    16891683\subsubsection{Creating a binary file containing the pathway of each section} 
    16901684 
    1691 In \texttt{NEMOGCM/TOOLS/SECTIONS\_DIADCT/run}, 
     1685In \texttt{tools/SECTIONS\_DIADCT/run}, 
    16921686the file \textit{ {list\_sections.ascii\_global}} contains a list of all the sections that are to be computed 
    16931687(this list of sections is based on MERSEA project metrics). 
     
    17381732   
    17391733 The script \texttt{job.ksh} computes the pathway for each section and creates a binary file 
    1740  \texttt{section\_ijglobal.diadct\_ORCA2\_LIM} which is read by NEMO. \\ 
     1734 \texttt{section\_ijglobal.diadct} which is read by NEMO. \\ 
    17411735 
    17421736 It is possible to use this tools for new configuations: \texttt{job.ksh} has to be updated with 
Note: See TracChangeset for help on using the changeset viewer.