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 3227 for trunk/DOC/TexFiles/Chapters/Chap_LBC.tex – NEMO

Ignore:
Timestamp:
2011-12-20T11:28:43+01:00 (12 years ago)
Author:
davestorkey
Message:

Update BDY documentation.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/DOC/TexFiles/Chapters/Chap_LBC.tex

    r2414 r3227  
    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. 
     904 
     905%% %---------------------------------------------- 
     906%% \subsection{Compatibility of schemes} 
     907%% \label{BDY_choice_of_schemes} 
     908%%  
     909%% The Flow Relaxation Scheme may be applied separately to the 
     910%% temperature and salinity (\np{ln\_tra\_frs} = true) and 
     911%% the velocity fields (\np{ln\_dyn\_frs} = true). Flather 
     912%% radiation conditions may be applied using externally defined 
     913%% barotropic velocities and sea-surface height (\np{ln\_dyn\_fla} = true)  
     914%% or using tidal harmonics fields (\np{ln\_tides} = true)  
     915%% or both. FRS and Flather conditions may be applied simultaneously.  
     916%% A typical configuration where all possible conditions might be used is a tidal,  
     917%% shelf-seas model, where the barotropic boundary conditions are fixed  
     918%% with the Flather scheme using tidal harmonics and possibly output  
     919%% from a large-scale model, and FRS conditions are applied to the tracers  
     920%% and baroclinic velocity fields, using fields from a large-scale model. 
     921%%  
     922%% Note that FRS conditions will work with the filtered 
     923%% (\key{dynspg\_flt}) or time-split (\key{dynspg\_ts}) solutions for the 
     924%% surface pressure gradient. The Flather condition will only work for 
     925%% the time-split solution (\key{dynspg\_ts}). FRS conditions are applied 
     926%% at the end of the main model time step. Flather conditions are applied 
     927%% during the barotropic subcycle in the time-split solution.  
    861928 
    862929%---------------------------------------------- 
     
    864931\label{BDY_geometry} 
    865932 
    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.  
     933%% The definition of the open boundary is completely flexible. An example 
     934%% is shown in Fig.~\ref{Fig_LBC_bdy_geom}. The boundary zone is 
     935%% defined by a series of index arrays read in from the input boundary 
     936%% data files: $nbidta$, $nbjdta$, and $nbrdta$. The first two of these 
     937%% define the global $(i,j)$ indices of each point in the boundary zone 
     938%% and the $nbrdta$ array defines the discrete distance from the boundary 
     939%% with $nbrdta=1$ meaning that the point is next to the edge of the 
     940%% model domain and $nbrdta>1$ showing that the point is increasingly 
     941%% further away from the edge of the model domain. These arrays are 
     942%% defined separately for each of the $T$, $U$ and $V$ grids, but the 
     943%% relationship between the points is assumed to be as in Fig. 
     944%% \ref{Fig_LBC_bdy_geom} with the $T$ points forming the outermost row 
     945%% of the boundary and the first row of velocities normal to the boundary 
     946%% being inside the first row of $T$ points. The order in which the 
     947%% points are defined is unimportant.  
     948 
     949Each open boundary set is defined as a list of points. The information 
     950is stored in the arrays $nbi$, $nbj$, and $nbr$ in the $idx\_bdy$ 
     951structure.  The $nbi$ and $nbj$ arrays 
     952define the local $(i,j)$ indices of each point in the boundary zone 
     953and the $nbr$ array defines the discrete distance from the boundary 
     954with $nbr=1$ meaning that the point is next to the edge of the 
     955model domain and $nbr>1$ showing that the point is increasingly 
     956further away from the edge of the model domain. A set of $nbi$, $nbj$, 
     957and $nbr$ arrays is defined for each of the $T$, $U$ and $V$ 
     958grids. Figure \ref{Fig_LBC_bdy_geom} shows an example of an irregular 
     959boundary.  
     960 
     961The boundary geometry for each set may be defined in a namelist 
     962nambdy\_index or by reading in a ``coordinates.bdy.nc'' file. The 
     963nambdy\_index namelist defines a series of straight-line segments for 
     964north, east, south and west boundaries. For the northern boundary, 
     965\np{nbdysegn} gives the number of segments, \np{jpjnob} gives the $j$ 
     966index for each segment and \np{jpindt} and \np{jpinft} give the start 
     967and end $i$ indices for each segment with similar for the other 
     968boundaries. These segments define a list of $T$ grid points along the 
     969outermost row of the boundary ($nbr\,=\, 1$). The code deduces the $U$ and 
     970$V$ points and also the points for $nbr\,>\, 1$ if 
     971$nn\_rimwidth\,>\,1$. 
     972 
     973The boundary geometry may also be defined from a 
     974``coordinates.bdy.nc'' file. Figure \ref{Fig_LBC_nc_header} 
     975gives an example of the header information from such a file. The file 
     976should contain the index arrays for each of the $T$, $U$ and $V$ 
     977grids. The arrays must be in order of increasing $nbr$. Note that the 
     978$nbi$, $nbj$ values in the file are global values and are converted to 
     979local values in the code. Typically this file will be used to generate 
     980external boundary data via interpolation and so will also contain the 
     981latitudes and longitudes of each point as shown. However, this is not 
     982necessary to run the model.  
     983 
     984For some choices of irregular boundary the model domain may contain 
     985areas of ocean which are not part of the computational domain. For 
     986example if an open boundary is defined along an isobath, say at the 
     987shelf break, then the areas of ocean outside of this boundary will 
     988need to be masked out. This can be done by reading a mask file defined 
     989as \np{cn\_mask\_file} in the nam\_bdy namelist. Only one mask file is 
     990used even if multiple boundary sets are defined. 
    881991 
    882992%>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
     
    8921002\label{BDY_data} 
    8931003 
    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}. 
     1004The data files contain the data arrays 
     1005in the order in which the points are defined in the $nbi$ and $nbj$ 
     1006arrays. The data arrays are dimensioned on: a time dimension; 
     1007$xb$ which is the index of the boundary data point in the horizontal; 
     1008and $yb$ which is a degenerate dimension of 1 to enable the file to be 
     1009read by the standard NEMO I/O routines. The 3D fields also have a 
     1010depth dimension.  
     1011 
     1012At Version 3.4 there are new restrictions on the order in which the 
     1013boundary points are defined (and therefore restrictions on the order 
     1014of the data in the file). In particular: 
     1015 
     1016\mbox{} 
     1017 
     1018\begin{enumerate} 
     1019\item The data points must be in order of increasing $nbr$, ie. all 
     1020  the $nbr=1$ points, then all the $nbr=2$ points etc. 
     1021\item All the data for a particular boundary set must be in the same 
     1022  order. (Prior to 3.4 it was possible to define barotropic data in a 
     1023  different order to the data for tracers and baroclinic velocities).  
     1024\end{enumerate} 
     1025 
     1026\mbox{} 
     1027 
     1028These restrictions mean that data files used with previous versions of 
     1029the model may not work with version 3.4. A fortran utility 
     1030{\it bdy\_reorder} exists in the TOOLS directory which will re-order the 
     1031data in old BDY data files.  
    9271032 
    9281033%>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
     
    9301035\includegraphics[width=1.0\textwidth]{./TexFiles/Figures/Fig_LBC_nc_header.pdf} 
    9311036\caption {     \label{Fig_LBC_nc_header}  
    932 Example of header of netcdf input data file for BDY} 
     1037Example of the header for a coordinates.bdy.nc file} 
    9331038\end{center}   \end{figure} 
    9341039%>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
     
    9401045There is an option to force the total volume in the regional model to be constant,  
    9411046similar 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.  
     1047parameter in the namelist. A value of \np{nn\_volctl}~=~0 indicates that this option is not used.  
    9431048If  \np{nn\_volctl}~=~1 then a correction is applied to the normal velocities  
    9441049around the boundary at each timestep to ensure that the integrated volume flow  
     
    9471052flux across the surface and the correction velocity corrects for this as well. 
    9481053 
     1054If more than one boundary set is used then volume correction is 
     1055applied to all boundaries at once. 
    9491056 
    9501057%---------------------------------------------- 
     
    9521059\label{BDY_tides} 
    9531060 
     1061%-----------------------------------------nambdy_tide-------------------------------------------- 
     1062\namdisplay{nambdy_tide}  
     1063%----------------------------------------------------------------------------------------------- 
     1064 
    9541065To be written.... 
    9551066 
Note: See TracChangeset for help on using the changeset viewer.