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 11422 for NEMO/branches/2019/fix_vvl_ticket1791/doc/latex/NEMO/subfiles/chap_misc.tex – NEMO

Ignore:
Timestamp:
2019-08-08T15:40:47+02:00 (5 years ago)
Author:
jchanut
Message:

#1791, merge with trunk

Location:
NEMO/branches/2019/fix_vvl_ticket1791/doc
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • NEMO/branches/2019/fix_vvl_ticket1791/doc

    • Property svn:ignore deleted
  • NEMO/branches/2019/fix_vvl_ticket1791/doc/latex

    • Property svn:ignore
      •  

        old new  
        1 *.aux 
        2 *.bbl 
        3 *.blg 
        4 *.dvi 
        5 *.fdb* 
        6 *.fls 
        7 *.idx 
        8 *.ilg 
        9 *.ind 
        10 *.log 
        11 *.maf 
        12 *.mtc* 
        13 *.out 
        14 *.pdf 
        15 *.toc 
        16 _minted-* 
         1figures 
  • NEMO/branches/2019/fix_vvl_ticket1791/doc/latex/NEMO

    • Property svn:ignore deleted
  • NEMO/branches/2019/fix_vvl_ticket1791/doc/latex/NEMO/subfiles/chap_misc.tex

    r10601 r11422  
    3030are much narrow than even a single ocean grid-point. 
    3131 
    32 We describe briefly here the three methods that can be used in \NEMO to handle such improperly resolved straits. 
    33 The first two consist of opening the strait by hand while ensuring that the mass exchanges through 
    34 the strait are not too large by either artificially reducing the surface of the strait grid-cells or, 
    35 locally increasing the lateral friction. 
    36 In the third one, the strait is closed but exchanges of mass, heat and salt across the land are allowed. 
    37 Note that such modifications are so specific to a given configuration that no attempt has been made to 
    38 set them in a generic way. 
    39 However, examples of how they can be set up is given in the ORCA 2\deg and 0.5\deg configurations. 
    40 For example, for details of implementation in ORCA2, search: \texttt{IF( cp\_cfg == "orca" .AND. jp\_cfg == 2 )} 
     32We describe briefly here the two methods that can be used in \NEMO to handle such 
     33improperly resolved straits. The methods consist of opening the strait while ensuring 
     34that the mass exchanges through the strait are not too large by either artificially 
     35reducing the cross-sectional area of the strait grid-cells or, locally increasing the 
     36lateral friction. 
    4137 
    4238% ------------------------------------------------------------------------------------------------------------- 
     
    4642\label{subsec:MISC_strait_hand} 
    4743 
    48 $\bullet$ reduced scale factor in the cross-strait direction to a value in better agreement with 
    49 the true mean width of the strait (\autoref{fig:MISC_strait_hand}). 
    50 This technique is sometime called "partially open face" or "partially closed cells". 
    51 The key issue here is only to reduce the faces of $T$-cell 
    52 (\ie change the value of the horizontal scale factors at $u$- or $v$-point) but not the volume of the $T$-cell. 
    53 Indeed, reducing the volume of strait $T$-cell can easily produce a numerical instability at 
    54 that grid point that would require a reduction of the model time step. 
    55 The changes associated with strait management are done in \mdl{domhgr}, 
    56 just after the definition or reading of the horizontal scale factors.  
    57  
    58 $\bullet$ increase of the viscous boundary layer thickness by local increase of the fmask value at the coast 
    59 (\autoref{fig:MISC_strait_hand}). 
    60 This is done in \mdl{dommsk} together with the setting of the coastal value of fmask (see  \autoref{sec:LBC_coast}). 
     44The first method involves reducing the scale factor in the cross-strait direction to a 
     45value in better agreement with the true mean width of the strait 
     46(\autoref{fig:MISC_strait_hand}).  This technique is sometime called "partially open face" 
     47or "partially closed cells".  The key issue here is only to reduce the faces of $T$-cell 
     48(\ie change the value of the horizontal scale factors at $u$- or $v$-point) but not the 
     49volume of the $T$-cell.  Indeed, reducing the volume of strait $T$-cell can easily produce 
     50a numerical instability at that grid point which would require a reduction of the model 
     51time step.  Thus to instigate a local change in the width of a Strait requires two steps: 
     52 
     53\begin{itemize} 
     54 
     55\item Add \texttt{e1e2u} and \texttt{e1e2v} arrays to the \np{cn\_domcfg} file. These 2D 
     56arrays should contain the products of the unaltered values of: $\texttt{e1u}*\texttt{e2u}$ 
     57and $\texttt{e1u}*\texttt{e2v}$ respectively. That is the original surface areas of $u$- 
     58and $v$- cells respectively.  These areas are usually defined by the corresponding product 
     59within the \NEMO code but the presence of \texttt{e1e2u} and \texttt{e1e2v} in the 
     60\np{cn\_domcfg} file will suppress this calculation and use the supplied fields instead. 
     61If the model domain is provided by user-supplied code in \mdl{usrdef\_hgr}, then this 
     62routine should also return \texttt{e1e2u} and \texttt{e1e2v} and set the integer return 
     63argument \texttt{ie1e2u\_v} to a non-zero value. Values other than 0 for this argument 
     64will suppress the calculation of the areas. 
     65 
     66\item Change values of \texttt{e2u} or \texttt{e1v} (either in the \np{cn\_domcfg} file or 
     67via code in  \mdl{usrdef\_hgr}), whereever a Strait reduction is required. The choice of 
     68whether to alter \texttt{e2u} or \texttt{e1v} depends. respectively,  on whether the 
     69Strait in question is North-South orientated (\eg Gibraltar) or East-West orientated (\eg 
     70Lombok). 
     71 
     72\end{itemize} 
     73 
     74 
     75The second method is to increase the viscous boundary layer thickness by a local increase 
     76of the fmask value at the coast. This method can also be effective in wider passages.  The 
     77concept is illustarted in the second part of  \autoref{fig:MISC_strait_hand} and changes 
     78to specific locations can be coded in \mdl{usrdef\_fmask}. The \forcode{usr_def_fmask} 
     79routine is always called after \texttt{fmask} has been defined according to the choice of 
     80lateral boundary condition as discussed in \autoref{sec:LBC_coast}. The default version of 
     81\mdl{usrdef\_fmask} contains settings specific to ORCA2 and ORCA1 configurations. These are 
     82meant as examples only; it is up to the user to verify settings and provide alternatives 
     83for their own configurations. The default \forcode{usr_def_fmask} makes no changes to 
     84\texttt{fmask} for any other configuration. 
    6185 
    6286%>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
    6387\begin{figure}[!tbp] 
    6488  \begin{center} 
    65     \includegraphics[width=0.80\textwidth]{Fig_Gibraltar} 
    66     \includegraphics[width=0.80\textwidth]{Fig_Gibraltar2} 
     89    \includegraphics[width=\textwidth]{Fig_Gibraltar} 
     90    \includegraphics[width=\textwidth]{Fig_Gibraltar2} 
    6791    \caption{ 
    6892      \protect\label{fig:MISC_strait_hand} 
     
    84108\begin{figure}[!tbp] 
    85109  \begin{center} 
    86     \includegraphics[width=1.0\textwidth]{Fig_closea_mask_example} 
     110    \includegraphics[width=\textwidth]{Fig_closea_mask_example} 
    87111    \caption{ 
    88112      \protect\label{fig:closea_mask_example} 
     
    102126% Closed seas 
    103127% ================================================================ 
    104 \section{Closed seas (\protect\mdl{closea})} 
     128\section[Closed seas (\textit{closea.F90})] 
     129{Closed seas (\protect\mdl{closea})} 
    105130\label{sec:MISC_closea} 
    106131 
     
    122147 
    123148\begin{enumerate} 
    124 \item{{\bf No ``closea\_mask'' field is included in domain configuration 
     149\item{{\bfseries No ``closea\_mask'' field is included in domain configuration 
    125150  file.} In this case the closea module does nothing.} 
    126151 
    127 \item{{\bf A field called closea\_mask is included in the domain 
     152\item{{\bfseries A field called closea\_mask is included in the domain 
    128153configuration file and ln\_closea=.false. in namelist namcfg.} In this 
    129154case the inland seas defined by the closea\_mask field are filled in 
     
    131156closea\_mask that is nonzero is set to be a land point.} 
    132157 
    133 \item{{\bf A field called closea\_mask is included in the domain 
     158\item{{\bfseries A field called closea\_mask is included in the domain 
    134159configuration file and ln\_closea=.true. in namelist namcfg.} Each 
    135160inland sea or group of inland seas is set to a positive integer value 
     
    140165closea\_mask is zero).} 
    141166 
    142 \item{{\bf Fields called closea\_mask and closea\_mask\_rnf are 
     167\item{{\bfseries Fields called closea\_mask and closea\_mask\_rnf are 
    143168included in the domain configuration file and ln\_closea=.true. in 
    144169namelist namcfg.} This option works as for option 3, except that if 
     
    154179ocean.} 
    155180 
    156 \item{{\bf Fields called closea\_mask and closea\_mask\_emp are 
     181\item{{\bfseries Fields called closea\_mask and closea\_mask\_emp are 
    157182included in the domain configuration file and ln\_closea=.true. in 
    158183namelist namcfg.} This option works the same as option 4 except that 
     
    174199\subsection{Simple subsetting of input files via NetCDF attributes} 
    175200 
    176 The extended grids for use with the under-shelf ice cavities will result in redundant rows around Antarctica if 
    177 the ice cavities are not active. 
    178 A simple mechanism for subsetting input files associated with the extended domains has been implemented to 
    179 avoid the need to maintain different sets of input fields for use with or without active ice cavities. 
    180 The existing 'zoom' options are overly complex for this task and marked for deletion anyway. 
    181 This alternative subsetting operates for the j-direction only and works by optionally looking for and 
    182 using a global file attribute (named: \np{open\_ocean\_jstart}) to determine the starting j-row for input. 
    183 The use of this option is best explained with an example: 
    184 consider an ORCA1 configuration using the extended grid bathymetry and coordinate files: 
    185 \vspace{-10pt} 
    186 \ifile{eORCA1\_bathymetry\_v2} 
    187 \ifile{eORCA1\_coordinates} 
    188 \noindent These files define a horizontal domain of 362x332. 
    189 Assuming the first row with open ocean wet points in the non-isf bathymetry for this set is row 42 
    190 (\fortran indexing) then the formally correct setting for \np{open\_ocean\_jstart} is 41. 
    191 Using this value as the first row to be read will result in a 362x292 domain which is the same size as 
    192 the original ORCA1 domain. 
    193 Thus the extended coordinates and bathymetry files can be used with all the original input files for ORCA1 if 
    194 the ice cavities are not active (\np{ln\_isfcav = .false.}). 
    195 Full instructions for achieving this are: 
    196  
    197 \noindent Add the new attribute to any input files requiring a j-row offset, i.e: 
    198 \vspace{-10pt} 
     201The extended grids for use with the under-shelf ice cavities will result in redundant rows 
     202around Antarctica if the ice cavities are not active.  A simple mechanism for subsetting 
     203input files associated with the extended domains has been implemented to avoid the need to 
     204maintain different sets of input fields for use with or without active ice cavities.  This 
     205subsetting operates for the j-direction only and works by optionally looking for and using 
     206a global file attribute (named: \np{open\_ocean\_jstart}) to determine the starting j-row 
     207for input.  The use of this option is best explained with an example:  
     208\medskip 
     209 
     210\noindent Consider an ORCA1 
     211configuration using the extended grid domain configuration file: \ifile{eORCA1\_domcfg.nc} 
     212This file define a horizontal domain of 362x332.  The first row with 
     213open ocean wet points in the non-isf bathymetry for this set is row 42 (\fortran indexing) 
     214then the formally correct setting for \np{open\_ocean\_jstart} is 41.  Using this value as 
     215the first row to be read will result in a 362x292 domain which is the same size as the 
     216original ORCA1 domain.  Thus the extended domain configuration file can be used with all 
     217the original input files for ORCA1 if the ice cavities are not active (\np{ln\_isfcav = 
     218.false.}).  Full instructions for achieving this are: 
     219 
     220\begin{itemize} 
     221\item  Add the new attribute to any input files requiring a j-row offset, i.e: 
     222\begin{cmds}  
     223ncatted  -a open_ocean_jstart,global,a,d,41 eORCA1_domcfg.nc  
     224\end{cmds} 
     225 
     226\item Add the logical switch \np{ln\_use\_jattr} to \ngn{namcfg} in the configuration 
     227namelist (if it is not already there) and set \np{.true.} 
     228\end{itemize} 
     229 
     230\noindent Note that with this option, the j-size of the global domain is (extended 
     231j-size minus \np{open\_ocean\_jstart} + 1 ) and this must match the \texttt{jpjglo} value 
     232for the configuration. This means an alternative version of \ifile{eORCA1\_domcfg.nc} must 
     233be created for when \np{ln\_use\_jattr} is active. The \texttt{ncap2} tool provides a 
     234convenient way of achieving this: 
     235 
    199236\begin{cmds} 
    200 ncatted  -a open_ocean_jstart,global,a,d,41 eORCA1_coordinates.nc  
    201 ncatted  -a open_ocean_jstart,global,a,d,41 eORCA1_bathymetry_v2.nc 
     237ncap2 -s 'jpjglo=292' eORCA1_domcfg.nc nORCA1_domcfg.nc 
    202238\end{cmds} 
    203   
    204 \noindent Add the logical switch to \ngn{namcfg} in the configuration namelist and set true: 
    205 %--------------------------------------------namcfg-------------------------------------------------------- 
    206  
    207 \nlst{namcfg} 
    208 %-------------------------------------------------------------------------------------------------------------- 
    209  
    210 \noindent Note the j-size of the global domain is the (extended j-size minus \np{open\_ocean\_jstart} + 1 ) and 
    211 this must match the size of all datasets other than bathymetry and coordinates currently. 
    212 However the option can be extended to any global, 2D and 3D, netcdf, input field by adding the: 
    213 \vspace{-10pt} 
     239 
     240The domain configuration file is unique in this respect since it also contains the value 
     241of \texttt{jpjglo} that is read and used by the model. Any other global, 2D and 3D, 
     242netcdf, input field can be prepared for use in a reduced domain by adding the 
     243\texttt{open\_ocean\_jstart} attribute to the file's  global attributes. In particular 
     244this is true for any field that is read by \NEMO using the following optional argument to 
     245the appropriate call to \np{iom\_get}. 
    214246\begin{forlines} 
    215247lrowattr=ln_use_jattr 
    216248\end{forlines} 
    217 optional argument to the appropriate \np{iom\_get} call and the \np{open\_ocean\_jstart} attribute to 
    218 the corresponding input files. 
    219 It remains the users responsibility to set \np{jpjdta} and \np{jpjglo} values in 
    220 the \np{namelist\_cfg} file according to their needs. 
    221  
    222 %>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
    223 \begin{figure}[!ht] 
    224   \begin{center} 
    225     \includegraphics[width=0.90\textwidth]{Fig_LBC_zoom} 
    226     \caption{ 
    227       \protect\label{fig:LBC_zoom} 
    228       Position of a model domain compared to the data input domain when the zoom functionality is used. 
    229     } 
    230   \end{center} 
    231 \end{figure} 
    232 %>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
    233  
     249 
     250Currently, only the domain configuration variables make use of this optional argument so 
     251this facility is of little practical use except for tests where no other external input 
     252files are needed or you wish to use an extended domain configuration with inputs from 
     253earlier, non-extended configurations. Alternatively, it should be possible to exclude 
     254empty rows for extended domain, forced ocean runs using interpolation on the fly, by 
     255adding the optional argument to \texttt{iom\_get} calls for the weights and initial 
     256conditions. Experimenting with this remains an exercise for the user. 
    234257 
    235258% ================================================================ 
    236259% Accuracy and Reproducibility 
    237260% ================================================================ 
    238 \section{Accuracy and reproducibility (\protect\mdl{lib\_fortran})} 
     261\section[Accuracy and reproducibility (\textit{lib\_fortran.F90})] 
     262{Accuracy and reproducibility (\protect\mdl{lib\_fortran})} 
    239263\label{sec:MISC_fortran} 
    240264 
    241 \subsection{Issues with intrinsinc SIGN function (\protect\key{nosignedzero})} 
     265\subsection[Issues with intrinsinc SIGN function (\texttt{\textbf{key\_nosignedzero}})] 
     266{Issues with intrinsinc SIGN function (\protect\key{nosignedzero})} 
    242267\label{subsec:MISC_sign} 
    243268 
     
    272297and their propagation and accumulation cause uncertainty in final simulation reproducibility on 
    273298different numbers of processors. 
    274 To avoid so, based on \citet{He_Ding_JSC01} review of different technics, 
     299To avoid so, based on \citet{he.ding_JS01} review of different technics, 
    275300we use a so called self-compensated summation method. 
    276301The idea is to estimate the roundoff error, store it in a buffer, and then add it back in the next addition.  
     
    314339This alternative method should give identical results to the default \textsc{ALLGATHER} method and 
    315340is recommended for large values of \np{jpni}. 
    316 The new method is activated by setting \np{ln\_nnogather} to be true ({\bf nammpp}). 
     341The new method is activated by setting \np{ln\_nnogather} to be true (\ngn{nammpp}). 
    317342The reproducibility of results using the two methods should be confirmed for each new, 
    318343non-reference configuration. 
Note: See TracChangeset for help on using the changeset viewer.