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 3228 for branches/2011/dev_NEMO_MERGE_2011/DOC/TexFiles/Chapters/Chap_LBC.tex – NEMO

Ignore:
Timestamp:
2011-12-20T12:39:04+01:00 (12 years ago)
Author:
davestorkey
Message:

Update documentation for BDY changes at 3.4.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2011/dev_NEMO_MERGE_2011/DOC/TexFiles/Chapters/Chap_LBC.tex

    r3221 r3228  
    742742 
    743743%-----------------------------------------nambdy-------------------------------------------- 
    744 %-    cn_mask    =  ''                        !  name of mask file (if ln_bdy_mask=.TRUE.) 
    745 %-    cn_dta_frs_T  = 'bdydata_grid_T.nc'     !  name of data file (T-points) 
    746 %-    cn_dta_frs_U  = 'bdydata_grid_U.nc'     !  name of data file (U-points) 
    747 %-    cn_dta_frs_V  = 'bdydata_grid_V.nc'     !  name of data file (V-points) 
    748 %-    cn_dta_fla_T  = 'bdydata_bt_grid_T.nc'  !  name of data file for Flather condition (T-points) 
    749 %-    cn_dta_fla_U  = 'bdydata_bt_grid_U.nc'  !  name of data file for Flather condition (U-points) 
    750 %-    cn_dta_fla_V  = 'bdydata_bt_grid_V.nc'  !  name of data file for Flather condition (V-points) 
    751 %-    ln_clim    = .false.                    !  contain 1 (T) or 12 (F) time dumps and be cyclic 
    752 %-    ln_vol     = .true.                     !  total volume correction (see volbdy parameter) 
    753 %-    ln_mask    = .false.                    !  boundary mask from filbdy_mask (T) or boundaries are on edges of domain (F) 
    754 %-    ln_tides   = .true.                     !  Apply tidal harmonic forcing with Flather condition 
    755 %-    ln_dyn_fla = .true.                     !  Apply Flather condition to velocities 
    756 %-    ln_tra_frs = .false.                    !  Apply FRS condition to temperature and salinity 
    757 %-    ln_dyn_frs = .false.                    !  Apply FRS condition to velocities 
    758 %-    nn_rimwidth    =  9                     !  width of the relaxation zone 
    759 %-    nn_dtactl      =  1                     !  = 0, bdy data are equal to the initial state 
    760 %-                                            !  = 1, bdy data are read in 'bdydata   .nc' files 
    761 %-    nn_volctl      =  0                     !  = 0, the total water flux across open boundaries is zero 
    762 %-                                            !  = 1, the total volume of the system is conserved 
    763744\namdisplay{nambdy}  
     745%----------------------------------------------------------------------------------------------- 
     746%-----------------------------------------nambdy_index-------------------------------------------- 
     747\namdisplay{nambdy_index}  
     748%----------------------------------------------------------------------------------------------- 
     749%-----------------------------------------nambdy_dta-------------------------------------------- 
     750\namdisplay{nambdy_dta}  
     751%----------------------------------------------------------------------------------------------- 
     752%-----------------------------------------nambdy_dta-------------------------------------------- 
     753\namdisplay{nambdy_dta2}  
    764754%----------------------------------------------------------------------------------------------- 
    765755 
     
    774764The BDY module was modelled on the OBC module and shares many features 
    775765and a similar coding structure \citep{Chanut2005}. 
     766 
     767The BDY module is completely rewritten at NEMO 3.4 and there is a new 
     768set of namelists. Boundary data files used with earlier versions of 
     769NEMO may need to be re-ordered to work with this version. See the 
     770section on the Input Boundary Data Files for details. 
     771 
     772%---------------------------------------------- 
     773\subsection{The namelists} 
     774\label{BDY_namelist} 
     775 
     776It is possible to define more than one boundary ``set'' and apply 
     777different boundary conditions to each set. The number of boundary 
     778sets is defined by \np{nb\_bdy}.  Each boundary set may be defined 
     779as a set of straight line segments in a namelist 
     780(\np{ln\_coords\_file}=.false.) or read in from a file 
     781(\np{ln\_coords\_file}=.true.). If the set is defined in a namelist, 
     782then the namelists nambdy\_index must be included separately, one for 
     783each set. If the set is defined by a file, then a 
     784``coordinates.bdy.nc'' file must be provided. The coordinates.bdy file 
     785is analagous to the usual NEMO ``coordinates.nc'' file. In the example 
     786above, there are two boundary sets, the first of which is defined via 
     787a file and the second is defined in a namelist. For more details of 
     788the definition of the boundary geometry see section 
     789\ref{BDY_geometry}. 
     790 
     791For each boundary set a boundary 
     792condition has to be chosen for the barotropic solution (``u2d'': 
     793sea-surface height and barotropic velocities), for the baroclinic 
     794velocities (``u3d''), and for the active tracers\footnote{The BDY 
     795  module does not deal with passive tracers at this version} 
     796(``tra''). For each set of variables there is a choice of algorithm 
     797and a choice for the data, eg. for the active tracers the algorithm is 
     798set by \np{nn\_tra} and the choice of data is set by 
     799\np{nn\_tra\_dta}.  
     800 
     801The choice of algorithm is currently as follows: 
     802 
     803\mbox{} 
     804 
     805\begin{itemize} 
     806\item[0.] No boundary condition applied. So the solution will ``see'' 
     807  the land points around the edge of the edge of the domain. 
     808\item[1.] Flow Relaxation Scheme (FRS) available for all variables.  
     809\item[2.] Flather radiation scheme for the barotropic variables. The 
     810  Flather scheme is not compatible with the filtered free surface 
     811  ({\it dynspg\_ts}).  
     812\end{itemize} 
     813 
     814\mbox{} 
     815 
     816The main choice for the boundary data is 
     817to use initial conditions as boundary data (\np{nn\_tra\_dta}=0) or to 
     818use external data from a file (\np{nn\_tra\_dta}=1). For the 
     819barotropic solution there is also the option to use tidal 
     820harmonic forcing either by itself or in addition to other external 
     821data.  
     822 
     823If external boundary data is required then the nambdy\_dta namelist 
     824must be defined. One nambdy\_dta namelist is required for each boundary 
     825set in the order in which the boundary sets are defined in nambdy. In 
     826the example given, two boundary sets have been defined and so there 
     827are two nambdy\_dta namelists. The boundary data is read in using the 
     828fldread module, so the nambdy\_dta namelist is in the format required 
     829for fldread. For each variable required, the filename, the frequency 
     830of the files and the frequency of the data in the files is given. Also 
     831whether or not time-interpolation is required and whether the data is 
     832climatological (time-cyclic) data. Note that on-the-fly spatial 
     833interpolation of boundary data is not available at this version.  
     834 
     835In the example namelists given, two boundary sets are defined. The 
     836first set is defined via a file and applies FRS conditions to 
     837temperature and salinity and Flather conditions to the barotropic 
     838variables. External data is provided in daily files (from a 
     839large-scale model). Tidal harmonic forcing is also used. The second 
     840set is defined in a namelist. FRS conditions are applied on 
     841temperature and salinity and climatological data is read from external 
     842files.  
    776843 
    777844%---------------------------------------------- 
     
    832899Note that the sea-surface height gradient in \eqref{Eq_bdy_fla1} 
    833900is a spatial gradient across the model boundary, so that $\eta_{e}$ is 
    834 defined on the $T$ points with $nbrdta=1$ and $\eta$ is defined on the 
    835 $T$ points with $nbrdta=2$. $U$ and $U_{e}$ are defined on the $U$ or 
    836 $V$ points with $nbrdta=1$, $i.e.$ between the two $T$ grid points. 
    837  
    838 %---------------------------------------------- 
    839 \subsection{Choice of schemes} 
    840 \label{BDY_choice_of_schemes} 
    841  
    842 The Flow Relaxation Scheme may be applied separately to the 
    843 temperature and salinity (\np{ln\_tra\_frs} = true) and 
    844 the velocity fields (\np{ln\_dyn\_frs} = true). Flather 
    845 radiation conditions may be applied using externally defined 
    846 barotropic velocities and sea-surface height (\np{ln\_dyn\_fla} = true)  
    847 or using tidal harmonics fields (\np{ln\_tides} = true)  
    848 or both. FRS and Flather conditions may be applied simultaneously.  
    849 A typical configuration where all possible conditions might be used is a tidal,  
    850 shelf-seas model, where the barotropic boundary conditions are fixed  
    851 with the Flather scheme using tidal harmonics and possibly output  
    852 from a large-scale model, and FRS conditions are applied to the tracers  
    853 and baroclinic velocity fields, using fields from a large-scale model. 
    854  
    855 Note that FRS conditions will work with the filtered 
    856 (\key{dynspg\_flt}) or time-split (\key{dynspg\_ts}) solutions for the 
    857 surface pressure gradient. The Flather condition will only work for 
    858 the time-split solution (\key{dynspg\_ts}). FRS conditions are applied 
    859 at the end of the main model time step. Flather conditions are applied 
    860 during the barotropic subcycle in the time-split solution.  
     901defined on the $T$ points with $nbr=1$ and $\eta$ is defined on the 
     902$T$ points with $nbr=2$. $U$ and $U_{e}$ are defined on the $U$ or 
     903$V$ points with $nbr=1$, $i.e.$ between the two $T$ grid points. 
    861904 
    862905%---------------------------------------------- 
     
    864907\label{BDY_geometry} 
    865908 
    866 The definition of the open boundary is completely flexible. An example 
    867 is shown in Fig.~\ref{Fig_LBC_bdy_geom}. The boundary zone is 
    868 defined by a series of index arrays read in from the input boundary 
    869 data files: $nbidta$, $nbjdta$, and $nbrdta$. The first two of these 
    870 define the global $(i,j)$ indices of each point in the boundary zone 
    871 and the $nbrdta$ array defines the discrete distance from the boundary 
    872 with $nbrdta=1$ meaning that the point is next to the edge of the 
    873 model domain and $nbrdta>1$ showing that the point is increasingly 
    874 further away from the edge of the model domain. These arrays are 
    875 defined separately for each of the $T$, $U$ and $V$ grids, but the 
    876 relationship between the points is assumed to be as in Fig. 
    877 \ref{Fig_LBC_bdy_geom} with the $T$ points forming the outermost row 
    878 of the boundary and the first row of velocities normal to the boundary 
    879 being inside the first row of $T$ points. The order in which the 
    880 points are defined is unimportant.  
     909Each open boundary set is defined as a list of points. The information 
     910is stored in the arrays $nbi$, $nbj$, and $nbr$ in the $idx\_bdy$ 
     911structure.  The $nbi$ and $nbj$ arrays 
     912define the local $(i,j)$ indices of each point in the boundary zone 
     913and the $nbr$ array defines the discrete distance from the boundary 
     914with $nbr=1$ meaning that the point is next to the edge of the 
     915model domain and $nbr>1$ showing that the point is increasingly 
     916further away from the edge of the model domain. A set of $nbi$, $nbj$, 
     917and $nbr$ arrays is defined for each of the $T$, $U$ and $V$ 
     918grids. Figure \ref{Fig_LBC_bdy_geom} shows an example of an irregular 
     919boundary.  
     920 
     921The boundary geometry for each set may be defined in a namelist 
     922nambdy\_index or by reading in a ``coordinates.bdy.nc'' file. The 
     923nambdy\_index namelist defines a series of straight-line segments for 
     924north, east, south and west boundaries. For the northern boundary, 
     925\np{nbdysegn} gives the number of segments, \np{jpjnob} gives the $j$ 
     926index for each segment and \np{jpindt} and \np{jpinft} give the start 
     927and end $i$ indices for each segment with similar for the other 
     928boundaries. These segments define a list of $T$ grid points along the 
     929outermost row of the boundary ($nbr\,=\, 1$). The code deduces the $U$ and 
     930$V$ points and also the points for $nbr\,>\, 1$ if 
     931$nn\_rimwidth\,>\,1$. 
     932 
     933The boundary geometry may also be defined from a 
     934``coordinates.bdy.nc'' file. Figure \ref{Fig_LBC_nc_header} 
     935gives an example of the header information from such a file. The file 
     936should contain the index arrays for each of the $T$, $U$ and $V$ 
     937grids. The arrays must be in order of increasing $nbr$. Note that the 
     938$nbi$, $nbj$ values in the file are global values and are converted to 
     939local values in the code. Typically this file will be used to generate 
     940external boundary data via interpolation and so will also contain the 
     941latitudes and longitudes of each point as shown. However, this is not 
     942necessary to run the model.  
     943 
     944For some choices of irregular boundary the model domain may contain 
     945areas of ocean which are not part of the computational domain. For 
     946example if an open boundary is defined along an isobath, say at the 
     947shelf break, then the areas of ocean outside of this boundary will 
     948need to be masked out. This can be done by reading a mask file defined 
     949as \np{cn\_mask\_file} in the nam\_bdy namelist. Only one mask file is 
     950used even if multiple boundary sets are defined. 
    881951 
    882952%>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
     
    892962\label{BDY_data} 
    893963 
    894 The input data files for the FRS conditions are defined in the 
    895 namelist as \np{cn\_dta\_frs\_T}, \np{cn\_dta\_frs\_U},  
    896 \np{cn\_dta\_frs\_V}. The input data files for the Flather conditions 
    897 are defined in the namelist as \np{cn\_dta\_fla\_T},  
    898 \np{cn\_dta\_fla\_U}, \np{cn\_dta\_fla\_V}.  
    899  
    900 The netcdf header of a typical input data file is shown in Fig.~\ref{Fig_LBC_nc_header}.  
    901 The file contains the index arrays which define the boundary geometry  
    902 as noted above and the data arrays for each field.   
    903 The data arrays are dimensioned on: a time dimension; $xb$  
    904 which is the index of the boundary data point in the horizontal;  
    905 and $yb$ which is a degenerate dimension of 1 to enable 
    906 the file to be read by the standard NEMO I/O routines. The 3D fields 
    907 also have a depth dimension. 
    908  
    909 If \np{ln\_clim} is set to \textit{false}, the model expects the 
    910 units of the time axis to have the form shown in 
    911 Fig.~\ref{Fig_LBC_nc_header}, $i.e.$ {\it ``seconds since yyyy-mm-dd 
    912 hh:mm:ss''} The fields are then linearly interpolated to the model 
    913 time at each timestep. Note that for this option, the time axis of the 
    914 input files must completely span the time period of the model 
    915 integration. If \np{ln\_clim} is set to \textit{true} (climatological 
    916 boundary forcing), the model will expect either a single set of annual 
    917 mean fields (constant boundary forcing) or 12 sets of monthly mean 
    918 fields in the input files. 
    919  
    920 As in the OBC module there is an option to use initial conditions as 
    921 boundary conditions. This is chosen by setting 
    922 \np{nn\_dtactl}~=~0. However, since the model defines the boundary 
    923 geometry by reading the boundary index arrays from the input files, 
    924 it is still necessary to provide a set of input files in this 
    925 case. They need only contain the boundary index arrays, $nbidta$, 
    926 \textit{nbjdta}, \textit{nbrdta}. 
     964The data files contain the data arrays 
     965in the order in which the points are defined in the $nbi$ and $nbj$ 
     966arrays. The data arrays are dimensioned on: a time dimension; 
     967$xb$ which is the index of the boundary data point in the horizontal; 
     968and $yb$ which is a degenerate dimension of 1 to enable the file to be 
     969read by the standard NEMO I/O routines. The 3D fields also have a 
     970depth dimension.  
     971 
     972At Version 3.4 there are new restrictions on the order in which the 
     973boundary points are defined (and therefore restrictions on the order 
     974of the data in the file). In particular: 
     975 
     976\mbox{} 
     977 
     978\begin{enumerate} 
     979\item The data points must be in order of increasing $nbr$, ie. all 
     980  the $nbr=1$ points, then all the $nbr=2$ points etc. 
     981\item All the data for a particular boundary set must be in the same 
     982  order. (Prior to 3.4 it was possible to define barotropic data in a 
     983  different order to the data for tracers and baroclinic velocities).  
     984\end{enumerate} 
     985 
     986\mbox{} 
     987 
     988These restrictions mean that data files used with previous versions of 
     989the model may not work with version 3.4. A fortran utility 
     990{\it bdy\_reorder} exists in the TOOLS directory which will re-order the 
     991data in old BDY data files.  
    927992 
    928993%>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
     
    930995\includegraphics[width=1.0\textwidth]{./TexFiles/Figures/Fig_LBC_nc_header.pdf} 
    931996\caption {     \label{Fig_LBC_nc_header}  
    932 Example of header of netcdf input data file for BDY} 
     997Example of the header for a coordinates.bdy.nc file} 
    933998\end{center}   \end{figure} 
    934999%>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
     
    9401005There is an option to force the total volume in the regional model to be constant,  
    9411006similar to the option in the OBC module. This is controlled  by the \np{nn\_volctl}  
    942 parameter in the namelist. A value of\np{nn\_volctl}~=~0 indicates that this option is not used.  
     1007parameter in the namelist. A value of \np{nn\_volctl}~=~0 indicates that this option is not used.  
    9431008If  \np{nn\_volctl}~=~1 then a correction is applied to the normal velocities  
    9441009around the boundary at each timestep to ensure that the integrated volume flow  
     
    9471012flux across the surface and the correction velocity corrects for this as well. 
    9481013 
    949  
     1014If more than one boundary set is used then volume correction is 
     1015applied to all boundaries at once. 
     1016 
     1017\newpage 
    9501018%---------------------------------------------- 
    9511019\subsection{Tidal harmonic forcing} 
    9521020\label{BDY_tides} 
    9531021 
     1022%-----------------------------------------nambdy_tide-------------------------------------------- 
     1023\namdisplay{nambdy_tide}  
     1024%----------------------------------------------------------------------------------------------- 
     1025 
    9541026To be written.... 
    9551027 
Note: See TracChangeset for help on using the changeset viewer.