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

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

Undo previous change (committed in error).

File:
1 edited

Legend:

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

    r3227 r3230  
    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 
    744763\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}  
    754764%----------------------------------------------------------------------------------------------- 
    755765 
     
    764774The BDY module was modelled on the OBC module and shares many features 
    765775and a similar coding structure \citep{Chanut2005}. 
    766  
    767 The BDY module is completely rewritten at NEMO 3.4 and there is a new 
    768 set of namelists. Boundary data files used with earlier versions of 
    769 NEMO may need to be re-ordered to work with this version. See the 
    770 section on the Input Boundary Data Files for details. 
    771  
    772 %---------------------------------------------- 
    773 \subsection{The namelists} 
    774 \label{BDY_namelist} 
    775  
    776 It is possible to define more than one boundary ``set'' and apply 
    777 different boundary conditions to each set. The number of boundary 
    778 sets is defined by \np{nb\_bdy}.  Each boundary set may be defined 
    779 as 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, 
    782 then the namelists nambdy\_index must be included separately, one for 
    783 each set. If the set is defined by a file, then a 
    784 ``coordinates.bdy.nc'' file must be provided. The coordinates.bdy file 
    785 is analagous to the usual NEMO ``coordinates.nc'' file. In the example 
    786 above, there are two boundary sets, the first of which is defined via 
    787 a file and the second is defined in a namelist. For more details of 
    788 the definition of the boundary geometry see section 
    789 \ref{BDY_geometry}. 
    790  
    791 For each boundary set a boundary 
    792 condition has to be chosen for the barotropic solution (``u2d'': 
    793 sea-surface height and barotropic velocities), for the baroclinic 
    794 velocities (``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 
    797 and a choice for the data, eg. for the active tracers the algorithm is 
    798 set by \np{nn\_tra} and the choice of data is set by 
    799 \np{nn\_tra\_dta}.  
    800  
    801 The 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  
    816 The main choice for the boundary data is 
    817 to use initial conditions as boundary data (\np{nn\_tra\_dta}=0) or to 
    818 use external data from a file (\np{nn\_tra\_dta}=1). For the 
    819 barotropic solution there is also the option to use tidal 
    820 harmonic forcing either by itself or in addition to other external 
    821 data.  
    822  
    823 If external boundary data is required then the nambdy\_dta namelist 
    824 must be defined. One nambdy\_dta namelist is required for each boundary 
    825 set in the order in which the boundary sets are defined in nambdy. In 
    826 the example given, two boundary sets have been defined and so there 
    827 are two nambdy\_dta namelists. The boundary data is read in using the 
    828 fldread module, so the nambdy\_dta namelist is in the format required 
    829 for fldread. For each variable required, the filename, the frequency 
    830 of the files and the frequency of the data in the files is given. Also 
    831 whether or not time-interpolation is required and whether the data is 
    832 climatological (time-cyclic) data. Note that on-the-fly spatial 
    833 interpolation of boundary data is not available at this version.  
    834  
    835 In the example namelists given, two boundary sets are defined. The 
    836 first set is defined via a file and applies FRS conditions to 
    837 temperature and salinity and Flather conditions to the barotropic 
    838 variables. External data is provided in daily files (from a 
    839 large-scale model). Tidal harmonic forcing is also used. The second 
    840 set is defined in a namelist. FRS conditions are applied on 
    841 temperature and salinity and climatological data is read from external 
    842 files.  
    843776 
    844777%---------------------------------------------- 
     
    899832Note that the sea-surface height gradient in \eqref{Eq_bdy_fla1} 
    900833is a spatial gradient across the model boundary, so that $\eta_{e}$ is 
    901 defined 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.  
     834defined 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 
     842The Flow Relaxation Scheme may be applied separately to the 
     843temperature and salinity (\np{ln\_tra\_frs} = true) and 
     844the velocity fields (\np{ln\_dyn\_frs} = true). Flather 
     845radiation conditions may be applied using externally defined 
     846barotropic velocities and sea-surface height (\np{ln\_dyn\_fla} = true)  
     847or using tidal harmonics fields (\np{ln\_tides} = true)  
     848or both. FRS and Flather conditions may be applied simultaneously.  
     849A typical configuration where all possible conditions might be used is a tidal,  
     850shelf-seas model, where the barotropic boundary conditions are fixed  
     851with the Flather scheme using tidal harmonics and possibly output  
     852from a large-scale model, and FRS conditions are applied to the tracers  
     853and baroclinic velocity fields, using fields from a large-scale model. 
     854 
     855Note that FRS conditions will work with the filtered 
     856(\key{dynspg\_flt}) or time-split (\key{dynspg\_ts}) solutions for the 
     857surface pressure gradient. The Flather condition will only work for 
     858the time-split solution (\key{dynspg\_ts}). FRS conditions are applied 
     859at the end of the main model time step. Flather conditions are applied 
     860during the barotropic subcycle in the time-split solution.  
    928861 
    929862%---------------------------------------------- 
     
    931864\label{BDY_geometry} 
    932865 
    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  
    949 Each open boundary set is defined as a list of points. The information 
    950 is stored in the arrays $nbi$, $nbj$, and $nbr$ in the $idx\_bdy$ 
    951 structure.  The $nbi$ and $nbj$ arrays 
    952 define the local $(i,j)$ indices of each point in the boundary zone 
    953 and the $nbr$ array defines the discrete distance from the boundary 
    954 with $nbr=1$ meaning that the point is next to the edge of the 
    955 model domain and $nbr>1$ showing that the point is increasingly 
    956 further away from the edge of the model domain. A set of $nbi$, $nbj$, 
    957 and $nbr$ arrays is defined for each of the $T$, $U$ and $V$ 
    958 grids. Figure \ref{Fig_LBC_bdy_geom} shows an example of an irregular 
    959 boundary.  
    960  
    961 The boundary geometry for each set may be defined in a namelist 
    962 nambdy\_index or by reading in a ``coordinates.bdy.nc'' file. The 
    963 nambdy\_index namelist defines a series of straight-line segments for 
    964 north, east, south and west boundaries. For the northern boundary, 
    965 \np{nbdysegn} gives the number of segments, \np{jpjnob} gives the $j$ 
    966 index for each segment and \np{jpindt} and \np{jpinft} give the start 
    967 and end $i$ indices for each segment with similar for the other 
    968 boundaries. These segments define a list of $T$ grid points along the 
    969 outermost 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  
    973 The boundary geometry may also be defined from a 
    974 ``coordinates.bdy.nc'' file. Figure \ref{Fig_LBC_nc_header} 
    975 gives an example of the header information from such a file. The file 
    976 should contain the index arrays for each of the $T$, $U$ and $V$ 
    977 grids. 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 
    979 local values in the code. Typically this file will be used to generate 
    980 external boundary data via interpolation and so will also contain the 
    981 latitudes and longitudes of each point as shown. However, this is not 
    982 necessary to run the model.  
    983  
    984 For some choices of irregular boundary the model domain may contain 
    985 areas of ocean which are not part of the computational domain. For 
    986 example if an open boundary is defined along an isobath, say at the 
    987 shelf break, then the areas of ocean outside of this boundary will 
    988 need to be masked out. This can be done by reading a mask file defined 
    989 as \np{cn\_mask\_file} in the nam\_bdy namelist. Only one mask file is 
    990 used even if multiple boundary sets are defined. 
     866The definition of the open boundary is completely flexible. An example 
     867is shown in Fig.~\ref{Fig_LBC_bdy_geom}. The boundary zone is 
     868defined by a series of index arrays read in from the input boundary 
     869data files: $nbidta$, $nbjdta$, and $nbrdta$. The first two of these 
     870define the global $(i,j)$ indices of each point in the boundary zone 
     871and the $nbrdta$ array defines the discrete distance from the boundary 
     872with $nbrdta=1$ meaning that the point is next to the edge of the 
     873model domain and $nbrdta>1$ showing that the point is increasingly 
     874further away from the edge of the model domain. These arrays are 
     875defined separately for each of the $T$, $U$ and $V$ grids, but the 
     876relationship between the points is assumed to be as in Fig. 
     877\ref{Fig_LBC_bdy_geom} with the $T$ points forming the outermost row 
     878of the boundary and the first row of velocities normal to the boundary 
     879being inside the first row of $T$ points. The order in which the 
     880points are defined is unimportant.  
    991881 
    992882%>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
     
    1002892\label{BDY_data} 
    1003893 
    1004 The data files contain the data arrays 
    1005 in the order in which the points are defined in the $nbi$ and $nbj$ 
    1006 arrays. The data arrays are dimensioned on: a time dimension; 
    1007 $xb$ which is the index of the boundary data point in the horizontal; 
    1008 and $yb$ which is a degenerate dimension of 1 to enable the file to be 
    1009 read by the standard NEMO I/O routines. The 3D fields also have a 
    1010 depth dimension.  
    1011  
    1012 At Version 3.4 there are new restrictions on the order in which the 
    1013 boundary points are defined (and therefore restrictions on the order 
    1014 of 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  
    1028 These restrictions mean that data files used with previous versions of 
    1029 the 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 
    1031 data in old BDY data files.  
     894The input data files for the FRS conditions are defined in the 
     895namelist 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 
     897are defined in the namelist as \np{cn\_dta\_fla\_T},  
     898\np{cn\_dta\_fla\_U}, \np{cn\_dta\_fla\_V}.  
     899 
     900The netcdf header of a typical input data file is shown in Fig.~\ref{Fig_LBC_nc_header}.  
     901The file contains the index arrays which define the boundary geometry  
     902as noted above and the data arrays for each field.   
     903The data arrays are dimensioned on: a time dimension; $xb$  
     904which is the index of the boundary data point in the horizontal;  
     905and $yb$ which is a degenerate dimension of 1 to enable 
     906the file to be read by the standard NEMO I/O routines. The 3D fields 
     907also have a depth dimension. 
     908 
     909If \np{ln\_clim} is set to \textit{false}, the model expects the 
     910units of the time axis to have the form shown in 
     911Fig.~\ref{Fig_LBC_nc_header}, $i.e.$ {\it ``seconds since yyyy-mm-dd 
     912hh:mm:ss''} The fields are then linearly interpolated to the model 
     913time at each timestep. Note that for this option, the time axis of the 
     914input files must completely span the time period of the model 
     915integration. If \np{ln\_clim} is set to \textit{true} (climatological 
     916boundary forcing), the model will expect either a single set of annual 
     917mean fields (constant boundary forcing) or 12 sets of monthly mean 
     918fields in the input files. 
     919 
     920As in the OBC module there is an option to use initial conditions as 
     921boundary conditions. This is chosen by setting 
     922\np{nn\_dtactl}~=~0. However, since the model defines the boundary 
     923geometry by reading the boundary index arrays from the input files, 
     924it is still necessary to provide a set of input files in this 
     925case. They need only contain the boundary index arrays, $nbidta$, 
     926\textit{nbjdta}, \textit{nbrdta}. 
    1032927 
    1033928%>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
     
    1035930\includegraphics[width=1.0\textwidth]{./TexFiles/Figures/Fig_LBC_nc_header.pdf} 
    1036931\caption {     \label{Fig_LBC_nc_header}  
    1037 Example of the header for a coordinates.bdy.nc file} 
     932Example of header of netcdf input data file for BDY} 
    1038933\end{center}   \end{figure} 
    1039934%>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
     
    1045940There is an option to force the total volume in the regional model to be constant,  
    1046941similar to the option in the OBC module. This is controlled  by the \np{nn\_volctl}  
    1047 parameter in the namelist. A value of \np{nn\_volctl}~=~0 indicates that this option is not used.  
     942parameter in the namelist. A value of\np{nn\_volctl}~=~0 indicates that this option is not used.  
    1048943If  \np{nn\_volctl}~=~1 then a correction is applied to the normal velocities  
    1049944around the boundary at each timestep to ensure that the integrated volume flow  
     
    1052947flux across the surface and the correction velocity corrects for this as well. 
    1053948 
    1054 If more than one boundary set is used then volume correction is 
    1055 applied to all boundaries at once. 
    1056949 
    1057950%---------------------------------------------- 
     
    1059952\label{BDY_tides} 
    1060953 
    1061 %-----------------------------------------nambdy_tide-------------------------------------------- 
    1062 \namdisplay{nambdy_tide}  
    1063 %----------------------------------------------------------------------------------------------- 
    1064  
    1065954To be written.... 
    1066955 
Note: See TracChangeset for help on using the changeset viewer.