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 11339 for NEMO/trunk/doc/latex/NEMO/subfiles/chap_misc.tex – NEMO

Ignore:
Timestamp:
2019-07-24T17:10:21+02:00 (5 years ago)
Author:
acc
Message:

Update of chap_misc.tex for v4.0 compatibility

File:
1 edited

Legend:

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

    r11179 r11339  
    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%>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
     
    175199\subsection{Simple subsetting of input files via NetCDF attributes} 
    176200 
    177 The extended grids for use with the under-shelf ice cavities will result in redundant rows around Antarctica if 
    178 the ice cavities are not active. 
    179 A simple mechanism for subsetting input files associated with the extended domains has been implemented to 
    180 avoid the need to maintain different sets of input fields for use with or without active ice cavities. 
    181 The existing 'zoom' options are overly complex for this task and marked for deletion anyway. 
    182 This alternative subsetting operates for the j-direction only and works by optionally looking for and 
    183 using a global file attribute (named: \np{open\_ocean\_jstart}) to determine the starting j-row for input. 
    184 The use of this option is best explained with an example: 
    185 consider an ORCA1 configuration using the extended grid bathymetry and coordinate files: 
    186 \vspace{-10pt} 
    187 \ifile{eORCA1\_bathymetry\_v2} 
    188 \ifile{eORCA1\_coordinates} 
    189 \noindent These files define a horizontal domain of 362x332. 
    190 Assuming the first row with open ocean wet points in the non-isf bathymetry for this set is row 42 
    191 (\fortran indexing) then the formally correct setting for \np{open\_ocean\_jstart} is 41. 
    192 Using this value as the first row to be read will result in a 362x292 domain which is the same size as 
    193 the original ORCA1 domain. 
    194 Thus the extended coordinates and bathymetry files can be used with all the original input files for ORCA1 if 
    195 the ice cavities are not active (\np{ln\_isfcav = .false.}). 
    196 Full instructions for achieving this are: 
    197  
    198 \noindent Add the new attribute to any input files requiring a j-row offset, i.e: 
    199 \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 
    200236\begin{cmds} 
    201 ncatted  -a open_ocean_jstart,global,a,d,41 eORCA1_coordinates.nc  
    202 ncatted  -a open_ocean_jstart,global,a,d,41 eORCA1_bathymetry_v2.nc 
     237ncap2 -s 'jpjglo=292' eORCA1_domcfg.nc nORCA1_domcfg.nc 
    203238\end{cmds} 
    204   
    205 \noindent Add the logical switch to \ngn{namcfg} in the configuration namelist and set true: 
    206 %--------------------------------------------namcfg-------------------------------------------------------- 
    207  
    208 \nlst{namcfg} 
    209 %-------------------------------------------------------------------------------------------------------------- 
    210  
    211 \noindent Note the j-size of the global domain is the (extended j-size minus \np{open\_ocean\_jstart} + 1 ) and 
    212 this must match the size of all datasets other than bathymetry and coordinates currently. 
    213 However the option can be extended to any global, 2D and 3D, netcdf, input field by adding the: 
    214 \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}. 
    215246\begin{forlines} 
    216247lrowattr=ln_use_jattr 
    217248\end{forlines} 
    218 optional argument to the appropriate \np{iom\_get} call and the \np{open\_ocean\_jstart} attribute to 
    219 the corresponding input files. 
    220 It remains the users responsibility to set \np{jpjdta} and \np{jpjglo} values in 
    221 the \np{namelist\_cfg} file according to their needs. 
    222  
    223 %>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
    224 \begin{figure}[!ht] 
    225   \begin{center} 
    226     \includegraphics[width=\textwidth]{Fig_LBC_zoom} 
    227     \caption{ 
    228       \protect\label{fig:LBC_zoom} 
    229       Position of a model domain compared to the data input domain when the zoom functionality is used. 
    230     } 
    231   \end{center} 
    232 \end{figure} 
    233 %>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
    234  
     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. 
    235257 
    236258% ================================================================ 
Note: See TracChangeset for help on using the changeset viewer.