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 3116 – NEMO

Changeset 3116


Ignore:
Timestamp:
2011-11-15T21:55:40+01:00 (11 years ago)
Author:
cetlod
Message:

dev_NEMO_MERGE_2011: add in changes dev_NOC_UKMO_MERGE developments

Location:
branches/2011/dev_NEMO_MERGE_2011
Files:
1 deleted
127 edited
23 copied

Legend:

Unmodified
Added
Removed
  • branches/2011/dev_NEMO_MERGE_2011/DOC/TexFiles/Biblio/Biblio.bib

    r3104 r3116  
    13171317} 
    13181318 
     1319@ARTICLE{HollowayOM86, 
     1320  author = {Greg Holloway}, 
     1321  title = {A Shelf Wave/Topographic Pump Drives Mean Coastal Circulation (part I)}, 
     1322  journal = OM, 
     1323  year = {1986}, 
     1324  volume = {68},   
     1325} 
     1326 
     1327@ARTICLE{HollowayJPO92, 
     1328  author = {Greg Holloway}, 
     1329  title = {Representing Topographic Stress for Large-Scale Ocean Models}, 
     1330  journal = JPO, 
     1331  year = {1992}, 
     1332  volume = {22},   
     1333  pages = {1033--1046}, 
     1334} 
     1335 
     1336@ARTICLE{HollowayJPO94, 
     1337  author = {Michael Eby and Greg Holloway}, 
     1338  title = {Sensitivity of a Large-Scale Ocean Model to a Parameterization of Topographic Stress}, 
     1339  journal = JPO, 
     1340  year = {1994}, 
     1341  volume = {24},   
     1342  pages = {2577--2587}, 
     1343} 
     1344 
     1345@ARTICLE{HollowayJGR09, 
     1346  author = {Greg Holloway and Zeliang Wang}, 
     1347  title = {Representing eddy stress in an Arctic Ocean model}, 
     1348  journal = JGR, 
     1349  year = {2009}, 
     1350  doi = {10.1029/2008JC005169},   
     1351} 
     1352 
     1353@ARTICLE{HollowayOM08, 
     1354  author = {Mathew Maltrud and Greg Holloway}, 
     1355  title = {Implementing biharmonic neptune in a global eddying ocean model}, 
     1356  journal = OM, 
     1357  year = {2008}, 
     1358  volume = {21},   
     1359  pages = {22--34}, 
     1360} 
     1361 
    13191362@ARTICLE{Hordoir_al_CD08, 
    13201363  author = {R. Hordoir and J. Polcher and J.-C. Brun-Cottan and G. Madec}, 
     
    13461389  volume = {23}, 
    13471390  pages = {2428--2446} 
     1391} 
     1392 
     1393@ARTICLE{Hunke2008, 
     1394  author = {E.C. Hunke and W.H. Lipscomb}, 
     1395  title = {CICE: the Los Alamos sea ice model documentation and software user's manual,  
     1396        Version 4.0}, 
     1397  publisher = {LA-CC-06-012, Los Alamos National Laboratory, N.M.}, 
     1398  year = {2008} 
    13481399} 
    13491400 
  • branches/2011/dev_NEMO_MERGE_2011/DOC/TexFiles/Chapters/Chap_ASM.tex

    r3092 r3116  
    1515The ASM code adds the functionality to apply increments to the model variables:  
    1616temperature, salinity, sea surface height, velocity and sea ice concentration.  
    17 These are read into the model from a NetCDF file which may be produced by data 
    18 assimilation.  The code can also output model background fields which are used 
     17These are read into the model from a NetCDF file which may be produced by separate data 
     18assimilation code.  The code can also output model background fields which are used 
    1919as an input to data assimilation code. This is all controlled by the namelist 
    2020\textit{nam\_asminc}.  There is a brief description of all the namelist options 
  • branches/2011/dev_NEMO_MERGE_2011/DOC/TexFiles/Chapters/Chap_DYN.tex

    r3084 r3116  
    610610documented or tested.  
    611611 
    612 $\bullet$ Traditional coding (see for example \citet{Madec_al_JPO96}: (\np{ln\_dynhpg\_sco}=true,  
    613 \np{ln\_dynhpg\_hel}=true) 
     612$\bullet$ Traditional coding (see for example \citet{Madec_al_JPO96}: (\np{ln\_dynhpg\_sco}=true) 
    614613\begin{equation} \label{Eq_dynhpg_sco} 
    615614\left\{ \begin{aligned} 
     
    624623\eqref{Eq_dynhpg_zco_surf} - \eqref{Eq_dynhpg_zco}, and $z_T$ is the depth of  
    625624the $T$-point evaluated from the sum of the vertical scale factors at the $w$-point  
    626 ($e_{3w}$). The version \np{ln\_dynhpg\_hel}=true has been added by Aike  
    627 Beckmann and involves a redefinition of the relative position of $T$-points relative  
    628 to $w$-points.  
    629  
    630 $\bullet$ Weighted density Jacobian (WDJ) \citep{Song1998} (\np{ln\_dynhpg\_wdj}=true) 
     625($e_{3w}$).  
    631626 
    632627$\bullet$ Density Jacobian with cubic polynomial scheme (DJC) \citep{Shchepetkin_McWilliams_OM05}  
    633628(\np{ln\_dynhpg\_djc}=true) 
    634629 
    635 $\bullet$ Rotated axes scheme (rot) \citep{Thiem_Berntsen_OM06} (\np{ln\_dynhpg\_rot}=true) 
    636  
    637 Note that expression \eqref{Eq_dynhpg_sco} is used when the variable volume  
     630$\bullet$ Pressure Jacobian scheme (prj) \citep{Thiem_Berntsen_OM06} (\np{ln\_dynhpg\_prj}=true) 
     631 
     632Note that expression \eqref{Eq_dynhpg_sco} is commonly used when the variable volume  
    638633formulation is activated (\key{vvl}) because in that case, even with a flat bottom,  
    639634the coordinate surfaces are not horizontal but follow the free surface  
    640 \citep{Levier2007}. The other pressure gradient options are not yet available. 
     635\citep{Levier2007}. Only the pressure jacobian scheme (\np{ln\_dynhpg\_prj}=true) is available as an  
     636alternative to the default \np{ln\_dynhpg\_sco}=true when \key{vvl} is active.  The pressure Jacobian scheme uses  
     637a constrained cubic spline to reconstruct the density profile across the water column. This method 
     638maintains the monotonicity between the density nodes and is of a higher order than the linear 
     639interpolation method. The pressure can be calculated by analytical integration of the density profile and 
     640a pressure Jacobian method is used to solve the horizontal pressure gradient. This method should 
     641provide a more accurate calculation of the horizontal pressure gradient than the standard scheme. 
    641642 
    642643%-------------------------------------------------------------------------------------------------------------- 
     
    11641165 
    11651166% ================================================================ 
     1167% Neptune effect  
     1168% ================================================================ 
     1169\section  [Neptune effect (\textit{dynnept})] 
     1170                {Neptune effect (\mdl{dynnept})} 
     1171\label{DYN_nept} 
     1172 
     1173The "Neptune effect" (thus named in \citep{HollowayOM86}) is a 
     1174parameterisation of the potentially large effect of topographic form stress 
     1175(caused by eddies) in driving the ocean circulation. Originally developed for 
     1176low-resolution models, in which it was applied via a Laplacian (second-order) 
     1177diffusion-like term in the momentum equation, it can also be applied in eddy 
     1178permitting or resolving models, in which a more scale-selective bilaplacian 
     1179(fourth-order) implementation is preferred. This mechanism has a 
     1180significant effect on boundary currents (including undercurrents), and the 
     1181upwelling of deep water near continental shelves. 
     1182 
     1183The theoretical basis for the method can be found in  
     1184\citep{HollowayJPO92}, including the explanation of why form stress is not 
     1185necessarily a drag force, but may actually drive the flow.  
     1186\citep{HollowayJPO94} demonstrate the effects of the parameterisation in 
     1187the GFDL-MOM model, at a horizontal resolution of about 1.8 degrees.  
     1188\citep{HollowayOM08} demonstrate the biharmonic version of the 
     1189parameterisation in a global run of the POP model, with an average horizontal 
     1190grid spacing of about 32km. 
     1191 
     1192The NEMO implementation is a simplified form of that supplied by 
     1193Greg Holloway, the testing of which was described in \citep{HollowayJGR09}. 
     1194The major simplification is that a time invariant Neptune velocity 
     1195field is assumed.  This is computed only once, during start-up, and 
     1196made available to the rest of the code via a module.  Vertical 
     1197diffusive terms are also ignored, and the model topography itself 
     1198is used, rather than a separate topographic dataset as in 
     1199\citep{HollowayOM08}.  This implementation is only in the iso-level 
     1200formulation, as is the case anyway for the bilaplacian operator. 
     1201 
     1202The velocity field is derived from a transport stream function given by: 
     1203 
     1204\begin{equation} \label{Eq_dynnept_sf} 
     1205\psi = -fL^2H 
     1206\end{equation} 
     1207 
     1208where $L$ is a latitude-dependant length scale given by: 
     1209 
     1210\begin{equation} \label{Eq_dynnept_ls} 
     1211L = l_1 + (l_2 -l_1)\left ( {1 + \cos 2\phi \over 2 } \right ) 
     1212\end{equation} 
     1213 
     1214where $\phi$ is latitude and $l_1$ and $l_2$ are polar and equatorial length scales respectively. 
     1215Neptune velocity components, $u^*$, $v^*$ are derived from the stremfunction as: 
     1216 
     1217\begin{equation} \label{Eq_dynnept_vel} 
     1218u^* = -{1\over H} {\partial \psi \over \partial y}\ \ \  ,\ \ \ v^* = {1\over H} {\partial \psi \over \partial x} 
     1219\end{equation} 
     1220 
     1221\smallskip 
     1222%----------------------------------------------namdom---------------------------------------------------- 
     1223\namdisplay{namdyn_nept} 
     1224%-------------------------------------------------------------------------------------------------------- 
     1225\smallskip 
     1226 
     1227The Neptune effect is enabled when \np{ln\_neptsimp}=true (default=false). 
     1228\np{ln\_smooth\_neptvel} controls whether a scale-selective smoothing is applied 
     1229to the Neptune effect flow field (default=false) (this smoothing method is as 
     1230used by Holloway).  \np{rn\_tslse} and \np{rn\_tslsp} are the equatorial and 
     1231polar values respectively of the length-scale parameter $L$ used in determining 
     1232the Neptune stream function \eqref{Eq_dynnept_sf} and \eqref{Eq_dynnept_ls}. 
     1233Values at intermediate latitudes are given by a cosine fit, mimicking the 
     1234variation of the deformation radius with latitude.  The default values of 12km 
     1235and 3km are those given in \citep{HollowayJPO94}, appropriate for a coarse 
     1236resolution model. The finer resolution study of \citep{HollowayOM08} increased 
     1237the values of L by a factor of $\sqrt 2$ to 17km and 4.2km, thus doubling the 
     1238stream function for a given topography. 
     1239 
     1240The simple formulation for ($u^*$, $v^*$) can give unacceptably large velocities 
     1241in shallow water, and \citep{HollowayOM08} add an offset to the depth in the 
     1242denominator to control this problem. In this implementation we offer instead (at 
     1243the suggestion of G. Madec) the option of ramping down the Neptune flow field to 
     1244zero over a finite depth range. The switch \np{ln\_neptramp} activates this 
     1245option (default=false), in which case velocities at depths greater than 
     1246\np{rn\_htrmax} are unaltered, but ramp down linearly with depth to zero at a 
     1247depth of \np{rn\_htrmin} (and shallower). 
     1248 
     1249% ================================================================ 
  • branches/2011/dev_NEMO_MERGE_2011/DOC/TexFiles/Chapters/Chap_MISC.tex

    r2541 r3116  
    253253Note this implementation may be sensitive to the optimization level.  
    254254 
     255\subsection{MPP scalability} 
     256\label{MISC_mppsca} 
     257 
     258The default method of communicating values across the north-fold in distributed memory applications 
     259(\key{mpp\_mpi}) uses a \textsc{MPI\_ALLGATHER} function to exchange values from each processing 
     260region in the northern row with every other processing region in the northern row. This enables a 
     261global width array containing the top 4 rows to be collated on every northern row processor and then 
     262folded with a simple algorithm. Although conceptually simple, this "All to All" communication will 
     263hamper performance scalability for large numbers of northern row processors. From version 3.4 
     264onwards an alternative method is available which only performs direct "Peer to Peer" communications 
     265between each processor and its immediate "neighbours" across the fold line. This is achieved by 
     266using the default \textsc{MPI\_ALLGATHER} method during initialisation to help identify the "active" 
     267neighbours. Stored lists of these neighbours are then used in all subsequent north-fold exchanges to 
     268restrict exchanges to those between associated regions. The collated global width array for each 
     269region is thus only partially filled but is guaranteed to be set at all the locations actually 
     270required by each individual for the fold operation. This alternative method should give identical 
     271results to the default \textsc{ALLGATHER} method and is recommended for large values of \np{jpni}. 
     272The new method is activated by setting \np{ln\_nnogather} to be true ({\bf nammpp}). The 
     273reproducibility of results using the two methods should be confirmed for each new, non-reference 
     274configuration. 
    255275 
    256276% ================================================================ 
  • branches/2011/dev_NEMO_MERGE_2011/DOC/TexFiles/Chapters/Chap_OBS.tex

    r2483 r3116  
    1313$\ $\newline    % force a new line 
    1414 
    15 The observation and model comparison code (OBS) reads in observation files 
    16 (profile temperature and salinity, sea surface temperature, sea level anomaly, 
    17 sea ice concentration, and velocity) and calculates  an interpolated model equivalent 
    18 value at the observation location and nearest model timestep. The OBS code is 
    19 called from \np{opa.F90} in order to initialise the model and to calculate the 
    20 model equivalent values for observations on the 0th timestep. The code is then 
    21 called again after each timestep from \np{step.F90}. The code was originally 
    22 developed for use with NEMOVAR.  
    23  
    24 For all data types a 2D horizontal  interpolator is needed 
    25 to interpolate the model fields to the observation location. 
    26 For {\em in situ} profiles, a 1D vertical interpolator is needed in addition to 
    27 provide model fields at the observation depths. Currently this only works in 
    28 z-level model configurations, but is being developed to work with a 
    29 generalised vertical coordinate system. 
    30 Temperature data from moored buoys (TAO, TRITON, PIRATA) in the 
    31 ENACT/ENSEMBLES data-base are available as daily averaged quantities. For this 
    32 type of observation the 
    33 observation operator will compare such observations to the model temperature 
     15The observation and model comparison code (OBS) reads in observation files (profile 
     16temperature and salinity, sea surface temperature, sea level anomaly, sea ice concentration, 
     17and velocity) and calculates  an interpolated model equivalent value at the observation 
     18location and nearest model timestep. The resulting data are saved in a ``feedback'' file (or 
     19files). The code was originally developed for use with the NEMOVAR data assimilation code, but 
     20can be used for validation or verification of model or  any other data assimilation system. 
     21 
     22The OBS code is called from \np{opa.F90} for model initialisation and to calculate the model 
     23equivalent values for observations on the 0th timestep. The code is then called again after 
     24each timestep from \np{step.F90}. To build with the OBS code active \key{diaobs} must be 
     25set. 
     26 
     27For all data types a 2D horizontal  interpolator is needed to interpolate the model fields to 
     28the observation location. For {\em in situ} profiles, a 1D vertical interpolator is needed in 
     29addition to provide model fields at the observation depths. Currently this only works in 
     30z-level model configurations, but is being developed to work with a generalised vertical 
     31coordinate system. Temperature data from moored buoys (TAO, TRITON, PIRATA) in the 
     32ENACT/ENSEMBLES data-base are available as daily averaged quantities. For this type of 
     33observation the observation operator will compare such observations to the model temperature 
    3434fields averaged over one day. The relevant observation type may be specified in the namelist 
    35 using \np{endailyavtypes}. Otherwise the model value from the nearest 
    36 timestep to the observation time is used. 
    37  
    38 The resulting data are saved in a ``feedback'' file (or files) which can be used 
    39 for model validation and verification and also to provide information for data 
    40 assimilation. This code is controlled by the namelist \textit{nam\_obs}. To 
    41 build with the OBS code active \key{diaobs} must be set. 
    42  
    43 Section~\ref{OBS_example} introduces a test example of the observation operator 
    44 code including where to obtain data and how to setup the namelist. 
    45 Section~\ref{OBS_details} introduces some more technical details of the 
    46 different observation types used and also shows a more complete namelist. 
    47 Finally section~\ref{OBS_theory} introduces some of the theoretical aspects of 
    48 the observation operator including interpolation methods and running on multiple 
    49 processors.  
     35using \np{endailyavtypes}. Otherwise the model value from the nearest timestep to the 
     36observation time is used. 
     37 
     38The code is controlled by the namelist \textit{nam\_obs}. See the following sections for more 
     39details on setting up the namelist.  
     40 
     41Section~\ref{OBS_example} introduces a test example of the observation operator code including 
     42where to obtain data and how to setup the namelist. Section~\ref{OBS_details} introduces some 
     43more technical details of the different observation types used and also shows a more complete 
     44namelist. Section~\ref{OBS_theory} introduces some of the theoretical aspects of the 
     45observation operator including interpolation methods and running on multiple processors. 
     46Section~\ref{OBS_obsutils} introduces some utilities to help working with the files produced 
     47by the OBS code. 
    5048 
    5149% ================================================================ 
     
    6967\item Add the following to the NEMO namelist to run the observation 
    7068operator on this data. Set the \np{enactfiles} namelist parameter to the 
    71 observation  file name (or link in to \np{profiles\_01\.nc}): 
     69observation  file name: 
    7270\end{enumerate} 
    7371 
     
    7674%------------------------------------------------------------------------------------------------------------- 
    7775 
    78 The option \np{ln\_t3d} and \np{ln\_s3d} switch on the temperature and salinity 
     76The options \np{ln\_t3d} and \np{ln\_s3d} switch on the temperature and salinity 
    7977profile observation operator code. The \np{ln\_ena} switch turns on the reading 
    8078of ENACT/ENSEMBLES type profile data. The filename or array of filenames are 
     
    8886Setting \np{ln\_grid\_global} means that the code distributes the observations 
    8987evenly between processors. Alternatively each processor will work with 
    90 observations located within the model subdomain. 
    91  
    92 The NEMOVAR system contains utilities to plot the feedback files, convert and 
    93 recombine the files. These are available on request from the NEMOVAR team. 
     88observations located within the model subdomain (see section~\ref{OBS_parallel}). 
     89 
     90A number of utilities are now provided to plot the feedback files, convert and 
     91recombine the files. These are explained in more detail in section~\ref{OBS_obsutils}. 
    9492 
    9593\section{Technical details} 
     
    713711 
    714712\subsection{Parallel aspects of horizontal interpolation} 
     713\label{OBS_parallel} 
    715714 
    716715For horizontal interpolation, there is the basic problem that the 
     
    779778\subsection{Vertical interpolation operator} 
    780779 
    781 The vertical interpolation is achieved using either a cubic spline or 
     780Vertical interpolation is achieved using either a cubic spline or 
    782781linear interpolation. For the cubic spline, the top and 
    783782bottom boundary conditions for the second derivative of the  
    784783interpolating polynomial in the spline are set to zero. 
    785784At the bottom boundary, this is done using the land-ocean mask. 
     785 
     786\newpage 
     787 
     788\section{Observation Utilities} 
     789\label{OBS_obsutils} 
     790 
     791Some tools for viewing and processing of observation and feedback files are provided in the 
     792NEMO repository for convenience. These include OBSTOOLS which are a collection of Fortran 
     793programs which are helpful to deal with feedback files. They do such tasks as observation file 
     794conversion, printing of file contents, some basic statistical analysis of feedback files. The 
     795other tool is an IDL program called dataplot which uses a graphical interface to visualise 
     796observations and feedback files. OBSTOOLS and dataplot are described in more detail below.   
     797 
     798\subsection{Obstools} 
     799 
     800A series of Fortran utilities is provided with NEMO called OBSTOOLS. This are helpful in 
     801handling observation files and the feedback file output from the NEMO observation operator. 
     802The utilities are as follows 
     803 
     804\subsubsection{corio2fb} 
     805 
     806The program corio2fb converts profile observation files from the Coriolis format to the 
     807standard feedback format. The program is called in the following way: 
     808 
     809\begin{alltt} 
     810\footnotesize 
     811\begin{verbatim} 
     812corio2fb.exe outputfile inputfile1 inputfile2 ... 
     813\end{verbatim} 
     814\end{alltt} 
     815 
     816\subsubsection{enact2fb} 
     817 
     818The program enact2fb converts profile observation files from the ENACT format to the standard 
     819feedback format. The program is called in the following way: 
     820 
     821\begin{alltt} 
     822\footnotesize 
     823\begin{verbatim} 
     824enact2fb.exe outputfile inputfile1 inputfile2 ... 
     825\end{verbatim} 
     826\end{alltt} 
     827 
     828\subsubsection{fbcomb} 
     829 
     830The program fbcomb combines multiple feedback files produced by individual processors in an 
     831MPI run of NEMO into a single feedback file. The program is called in the following way: 
     832 
     833\begin{alltt} 
     834\footnotesize 
     835\begin{verbatim} 
     836fbcomb.exe outputfile inputfile1 inputfile2 ... 
     837\end{verbatim} 
     838\end{alltt} 
     839 
     840\subsubsection{fbmatchup} 
     841 
     842The program fbmatchup will match observations from two feedback files. The program is called 
     843in the following way: 
     844 
     845\begin{alltt} 
     846\footnotesize 
     847\begin{verbatim} 
     848fbmatchup.exe outputfile inputfile1 varname1 inputfile2 varname2 ... 
     849\end{verbatim} 
     850\end{alltt} 
     851 
     852 
     853\subsubsection{fbprint} 
     854 
     855The program fbprint will print the contents of a feedback file or files to standard output. 
     856Selected information can be output using optional arguments. The program is called in the 
     857following way: 
     858 
     859\begin{alltt} 
     860\footnotesize 
     861\begin{verbatim} 
     862fbprint.exe [options] inputfile 
     863 
     864options: 
     865     -b            shorter output 
     866     -q            Select observations based on QC flags 
     867     -Q            Select observations based on QC flags 
     868     -B            Select observations based on QC flags 
     869     -u            unsorted 
     870     -s ID         select station ID   
     871     -t TYPE       select observation type 
     872     -v NUM1-NUM2  select variable range to print by number  
     873                      (default all) 
     874     -a NUM1-NUM2  select additional variable range to print by number  
     875                      (default all) 
     876     -e NUM1-NUM2  select extra variable range to print by number  
     877                      (default all) 
     878     -d            output date range 
     879     -D            print depths 
     880     -z            use zipped files 
     881\end{verbatim} 
     882\end{alltt} 
     883 
     884\subsubsection{fbsel} 
     885 
     886The program fbsel will select or subsample observations. The program is called in the 
     887following way: 
     888 
     889\begin{alltt} 
     890\footnotesize 
     891\begin{verbatim} 
     892fbsel.exe <input filename> <output filename> 
     893\end{verbatim} 
     894\end{alltt} 
     895 
     896\subsubsection{fbstat} 
     897 
     898The program fbstat will output summary statistics in different global areas into a number of 
     899files. The program is called in the following way: 
     900 
     901\begin{alltt} 
     902\footnotesize 
     903\begin{verbatim} 
     904fbstat.exe [-nmlev] <filenames> 
     905\end{verbatim} 
     906\end{alltt} 
     907 
     908\subsubsection{fbthin} 
     909 
     910The program fbthin will thin the data to 1 degree resolution. The code could easily be 
     911modified to thin to a different resolution. The program is called in the following way: 
     912 
     913\begin{alltt} 
     914\footnotesize 
     915\begin{verbatim} 
     916fbthin.exe inputfile outputfile 
     917\end{verbatim} 
     918\end{alltt} 
     919 
     920\subsubsection{sla2fb} 
     921 
     922The program sla2fb will convert an AVISO SLA format file to feedback format. The program is 
     923called in the following way: 
     924 
     925\begin{alltt} 
     926\footnotesize 
     927\begin{verbatim} 
     928sla2fb.exe [-s type] outputfile inputfile1 inputfile2 ... 
     929 
     930Option: 
     931     -s            Select altimeter data_source 
     932\end{verbatim} 
     933\end{alltt} 
     934 
     935\subsubsection{vel2fb} 
     936 
     937The program vel2fb will convert TAO/PIRATA/RAMA currents files to feedback format. The program 
     938is called in the following way: 
     939 
     940\begin{alltt} 
     941\footnotesize 
     942\begin{verbatim} 
     943vel2fb.exe outputfile inputfile1 inputfile2 ... 
     944\end{verbatim} 
     945\end{alltt} 
     946 
     947\subsection{building the obstools} 
     948 
     949To build the obstools use in the tools directory use ./maketools -n OBSTOOLS -m [ARCH]. 
     950 
     951\subsection{Dataplot} 
     952 
     953An IDL program called dataplot is included which uses a graphical interface to visualise 
     954observations and feedback files. It is possible to zoom in, plot individual profiles and 
     955calculate some basic statistics. To plot some data run IDL and then: 
     956\begin{alltt} 
     957\footnotesize 
     958\begin{verbatim} 
     959IDL> dataplot, "filename" 
     960\end{verbatim} 
     961\end{alltt} 
     962 
     963To read multiple files into dataplot, for example multiple feedback files from different 
     964processors or from different days, the easiest method is to use the spawn command to generate 
     965a list of files which can then be passed to dataplot. 
     966\begin{alltt} 
     967\footnotesize 
     968\begin{verbatim} 
     969IDL> spawn, 'ls profb*.nc', files 
     970IDL> dataplot, files 
     971\end{verbatim} 
     972\end{alltt} 
     973 
     974Fig~\ref{fig:obsdataplotmain} shows the main window which is launched when dataplot starts. 
     975This is split into three parts. At the top there is a menu bar which contains a variety of 
     976drop down menus. Areas - zooms into prespecified regions; plot - plots the data as a 
     977timeseries or a T-S diagram if appropriate; Find - allows data to be searched; Config - sets 
     978various configuration options. 
     979 
     980The middle part is a plot of the geographical location of the observations. This will plot the 
     981observation value, the model background value or observation minus background value depending 
     982on the option selected in the radio button at the bottom of the window. The plotting colour 
     983range can be changed by clicking on the colour bar. The title of the plot gives some basic 
     984information about the date range and depth range shown, the extreme values, and the mean and 
     985rms values. It is possible to zoom in using a drag-box. You may also zoom in or out using the 
     986mouse wheel. 
     987 
     988The bottom part of the window controls what is visible in the plot above. There are two bars 
     989which select the level range plotted (for profile data). The other bars below select the date 
     990range shown. The bottom of the figure allows the option to plot the mean, root mean square, 
     991standard deviation or mean square values. As mentioned above you can choose to plot the 
     992observation value, the model background value or observation minus background value. The next 
     993group of radio buttons selects the map projection. This can either be regular latitude 
     994longitude grid, or north or south polar stereographic. The next group of radio buttons will 
     995plot bad observations, switch to salinity and plot density for profile observations. The 
     996rightmost group of buttons will print the plot window as a postscript, save it as png, or exit 
     997from dataplot. 
     998 
     999%>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
     1000\begin{figure}     \begin{center} 
     1001%\includegraphics[width=10cm,height=12cm,angle=-90.]{./TexFiles/Figures/Fig_OBS_dataplot_main} 
     1002\includegraphics[width=9cm,angle=-90.]{./TexFiles/Figures/Fig_OBS_dataplot_main} 
     1003\caption{      \label{fig:obsdataplotmain} 
     1004Main window of dataplot.} 
     1005\end{center}     \end{figure} 
     1006%>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
     1007 
     1008If a profile point is clicked with the mouse button a plot of the observation and background 
     1009values as a function of depth (Fig~\ref{fig:obsdataplotprofile}). 
     1010 
     1011%>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
     1012\begin{figure}     \begin{center} 
     1013%\includegraphics[width=10cm,height=12cm,angle=-90.]{./TexFiles/Figures/Fig_OBS_dataplot_prof} 
     1014\includegraphics[width=7cm,angle=-90.]{./TexFiles/Figures/Fig_OBS_dataplot_prof} 
     1015\caption{      \label{fig:obsdataplotprofile} 
     1016Profile plot from dataplot produced by right clicking on a point in the main window.} 
     1017\end{center}     \end{figure} 
     1018%>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
     1019 
     1020 
     1021 
     1022 
  • branches/2011/dev_NEMO_MERGE_2011/DOC/TexFiles/Chapters/Chap_SBC.tex

    r3105 r3116  
    641641\footnote{The \key{oasis4} exist. It activates portion of the code that are still under development.}.  
    642642It has been successfully used to interface \NEMO to most of the European atmospheric  
    643 GCM (ARPEGE, ECHAM, ECMWF, HadAM, LMDz),  
     643GCM (ARPEGE, ECHAM, ECMWF, HadAM, HadGAM, LMDz),  
    644644as well as to \href{http://wrf-model.org/}{WRF} (Weather Research and Forecasting Model). 
    645645 
     
    649649When PISCES biogeochemical model (\key{top} and \key{pisces}) is also used in the coupled system,  
    650650the whole carbon cycle is computed by defining \key{cpl\_carbon\_cycle}. In this case,  
    651 CO$_2$ fluxes are exchanged between the atmosphere and the ice-ocean system. 
     651CO$_2$ fluxes will be exchanged between the atmosphere and the ice-ocean system (and need to be activated 
     652in namsbc{\_}cpl). 
     653 
     654The new namelist above allows control of various aspects of the coupling fields (particularly for 
     655vectors) and now allows for any coupling fields to have multiple sea ice categories (as required by LIM3 
     656and CICE).  When indicating a multi-category coupling field in namsbc{\_}cpl the number of categories will be 
     657determined by the number used in the sea ice model.  In some limited cases it may be possible to specify  
     658single category coupling fields even when the sea ice model is running with multiple categories - in this 
     659case the user should examine the code to be sure the assumptions made are satisfactory.  In cases where 
     660this is definitely not possible the model should abort with an error message.  The new code has been tested using 
     661ECHAM with LIM2, and HadGAM3 with CICE but although it will compile with \key{lim3} additional minor code changes 
     662may be required to run using LIM3. 
    652663 
    653664 
     
    10011012ice-ocean fluxes, that are combined with the air-sea fluxes using the ice fraction of  
    10021013each model cell to provide the surface ocean fluxes. Note that the activation of a  
    1003 sea-ice model is is done by defining a CPP key (\key{lim2} or \key{lim3}).  
    1004 The activation automatically ovewrite the read value of nn{\_}ice to its appropriate  
    1005 value ($i.e.$ $2$ for LIM-2 and $3$ for LIM-3). 
     1014sea-ice model is is done by defining a CPP key (\key{lim2}, \key{lim3} or \key{cice}).  
     1015The activation automatically overwrites the read value of nn{\_}ice to its appropriate  
     1016value ($i.e.$ $2$ for LIM-2, $3$ for LIM-3 or $4$ for CICE). 
    10061017\end{description} 
    10071018 
    10081019% {Description of Ice-ocean interface to be added here or in LIM 2 and 3 doc ?} 
     1020 
     1021\subsection   [Interface to CICE (\textit{sbcice\_cice})] 
     1022         {Interface to CICE (\mdl{sbcice\_cice})} 
     1023\label{SBC_cice} 
     1024 
     1025It is now possible to couple a global NEMO configuration (without AGRIF) to the CICE sea-ice 
     1026model by using \key{cice}.  The CICE code can be obtained from  
     1027\href{http://oceans11.lanl.gov/trac/CICE/}{LANL} and the additional 'hadgem3' drivers will be required,  
     1028even with the latest code release.  Input grid files consistent with those used in NEMO will also be needed,  
     1029and CICE CPP keys \textbf{ORCA\_GRID}, \textbf{CICE\_IN\_NEMO} and \textbf{coupled} should be used (seek advice from UKMO  
     1030if necessary).  Currently the code is only designed to work when using the CORE forcing option for NEMO (with 
     1031\textit{calc\_strair~=~true} and \textit{calc\_Tsfc~=~true} in the CICE name-list), or alternatively when NEMO  
     1032is coupled to the HadGAM3 atmosphere model (with \textit{calc\_strair~=~false} and \textit{calc\_Tsfc~=~false}). 
     1033The code is intended to be used with \np{nn\_fsbc} set to 1 (although coupling ocean and ice less frequently  
     1034should work, it is possible the calculation of some of the ocean-ice fluxes needs to be modified slightly - the 
     1035user should check that results are not significantly different to the standard case). 
     1036 
     1037There are two options for the technical coupling between NEMO and CICE.  The standard version allows 
     1038complete flexibility for the domain decompositions in the individual models, but this is at the expense of global 
     1039gather and scatter operations in the coupling which become very expensive on larger numbers of processors. The 
     1040alternative option (using \key{nemocice\_decomp} for both NEMO and CICE) ensures that the domain decomposition is 
     1041identical in both models (provided domain parameters are set appropriately, and  
     1042\textit{processor\_shape~=~square-ice} and \textit{distribution\_wght~=~block} in the CICE name-list) and allows 
     1043much more efficient direct coupling on individual processors.  This solution scales much better although it is at  
     1044the expense of having more idle CICE processors in areas where there is no sea ice. 
     1045 
    10091046 
    10101047% ------------------------------------------------------------------------------------------------------------- 
  • branches/2011/dev_NEMO_MERGE_2011/DOC/TexFiles/Chapters/Chap_ZDF.tex

    r3104 r3116  
    11% ================================================================ 
    2 % Chapter Ñ Vertical Ocean Physics (ZDF) 
     2% Chapter Vertical Ocean Physics (ZDF) 
    33% ================================================================ 
    44\chapter{Vertical Ocean Physics (ZDF)} 
     
    563563the clipping factor is of crucial importance for the entrainment depth predicted in  
    564564stably stratified situations, and that its value has to be chosen in accordance  
    565 with the algebraic model for the turbulent ßuxes. The clipping is only activated  
     565with the algebraic model for the turbulent fluxes. The clipping is only activated  
    566566if \np{ln\_length\_lim}=true, and the $c_{lim}$ is set to the \np{rn\_clim\_galp} value. 
    567567 
     
    10051005reduced as necessary to ensure stability; these changes are not reported. 
    10061006 
     1007Limits on the bottom friction coefficient are not imposed if the user has elected to 
     1008handle the bottom friction implicitly (see \S\ref{ZDF_bfr_imp}). The number of potential 
     1009breaches of the explicit stability criterion are still reported for information purposes. 
     1010 
     1011% ------------------------------------------------------------------------------------------------------------- 
     1012%       Implicit Bottom Friction 
     1013% ------------------------------------------------------------------------------------------------------------- 
     1014\subsection{Implicit Bottom Friction (\np{ln\_bfrimp}$=$\textit{T})} 
     1015\label{ZDF_bfr_imp} 
     1016 
     1017An optional implicit form of bottom friction has been implemented to improve 
     1018model stability. We recommend this option for shelf sea and coastal ocean applications, especially  
     1019for split-explicit time splitting. This option can be invoked by setting \np{ln\_bfrimp}  
     1020to \textit{true} in the \textit{nambfr} namelist. This option requires \np{ln\_zdfexp} to be \textit{false}  
     1021in the \textit{namzdf} namelist.  
     1022 
     1023This implementation is realised in \mdl{dynzdf\_imp} and \mdl{dynspg\_ts}. In \mdl{dynzdf\_imp}, the  
     1024bottom boundary condition is implemented implicitly. 
     1025 
     1026\begin{equation} \label{Eq_dynzdf_bfr} 
     1027\left.{\left( {\frac{A^{vm} }{e_3 }\ \frac{\partial \textbf{U}_h}{\partial k}} \right)} \right|_{mbk} 
     1028    = \binom{c_{b}^{u}u^{n+1}_{mbk}}{c_{b}^{v}v^{n+1}_{mbk}} 
     1029\end{equation} 
     1030 
     1031where $mbk$ is the layer number of the bottom wet layer. superscript $n+1$ means the velocity used in the 
     1032friction formula is to be calculated, so, it is implicit. 
     1033 
     1034If split-explicit time splitting is used, care must be taken to avoid the double counting of 
     1035the bottom friction in the 2-D barotropic momentum equations. As NEMO only updates the barotropic  
     1036pressure gradient and Coriolis' forcing terms in the 2-D barotropic calculation, we need to remove 
     1037the bottom friction induced by these two terms which has been included in the 3-D momentum trend  
     1038and update it with the latest value. On the other hand, the bottom friction contributed by the 
     1039other terms (e.g. the advection term, viscosity term) has been included in the 3-D momentum equations 
     1040and should not be added in the 2-D barotropic mode. 
     1041 
     1042The implementation of the implicit bottom friction in \mdl{dynspg\_ts} is done in two steps as the 
     1043following: 
     1044 
     1045\begin{equation} \label{Eq_dynspg_ts_bfr1} 
     1046\frac{\textbf{U}_{med}-\textbf{U}^{m-1}}{2\Delta t}=-g\nabla\eta-f\textbf{k}\times\textbf{U}^{m}+c_{b} 
     1047\left(\textbf{U}_{med}-\textbf{U}^{m-1}\right) 
     1048\end{equation} 
     1049\begin{equation} \label{Eq_dynspg_ts_bfr2} 
     1050\frac{\textbf{U}^{m+1}-\textbf{U}_{med}}{2\Delta t}=\textbf{T}+ 
     1051\left(g\nabla\eta^{'}+f\textbf{k}\times\textbf{U}^{'}\right)- 
     10522\Delta t_{bc}c_{b}\left(g\nabla\eta^{'}+f\textbf{k}\times\textbf{u}_{b}\right) 
     1053\end{equation} 
     1054 
     1055where $\textbf{T}$ is the vertical integrated 3-D momentum trend. We assume the leap-frog time-stepping 
     1056is used here. $\Delta t$ is the barotropic mode time step and $\Delta t_{bc}$ is the baroclinic mode time step. 
     1057 $c_{b}$ is the friction coefficient. $\eta$ is the sea surface level calculated in the barotropic loops 
     1058while $\eta^{'}$ is the sea surface level used in the 3-D baroclinic mode. $\textbf{u}_{b}$ is the bottom 
     1059layer horizontal velocity. 
     1060 
     1061 
     1062 
     1063 
    10071064% ------------------------------------------------------------------------------------------------------------- 
    10081065%       Bottom Friction with split-explicit time splitting 
    10091066% ------------------------------------------------------------------------------------------------------------- 
    1010 \subsection{Bottom Friction with split-explicit time splitting} 
     1067\subsection{Bottom Friction with split-explicit time splitting (\np{ln\_bfrimp}$=$\textit{F})} 
    10111068\label{ZDF_bfr_ts} 
    10121069 
     
    10171074{\key{dynspg\_flt}). Extra attention is required, however, when using  
    10181075split-explicit time stepping (\key{dynspg\_ts}). In this case the free surface  
    1019 equation is solved with a small time step \np{nn\_baro}*\np{rn\_rdt}, while the three  
    1020 dimensional prognostic variables are solved with a longer time step that is a  
    1021 multiple of \np{rn\_rdt}. The trend in the barotropic momentum due to bottom  
     1076equation is solved with a small time step \np{rn\_rdt}/\np{nn\_baro}, while the three  
     1077dimensional prognostic variables are solved with the longer time step  
     1078of \np{rn\_rdt} seconds. The trend in the barotropic momentum due to bottom  
    10221079friction appropriate to this method is that given by the selected parameterisation  
    10231080($i.e.$ linear or non-linear bottom friction) computed with the evolving velocities  
     
    10421099\end{enumerate} 
    10431100 
    1044 Note that the use of an implicit formulation 
     1101Note that the use of an implicit formulation within the barotropic loop 
    10451102for the bottom friction trend means that any limiting of the bottom friction coefficient  
    10461103in \mdl{dynbfr} does not adversely affect the solution when using split-explicit time  
    10471104splitting. This is because the major contribution to bottom friction is likely to come from  
    1048 the barotropic component which uses the unrestricted value of the coefficient. 
    1049  
    1050 The implicit formulation takes the form: 
     1105the barotropic component which uses the unrestricted value of the coefficient. However, if the 
     1106limiting is thought to be having a major effect (a more likely prospect in coastal and shelf seas 
     1107applications) then the fully implicit form of the bottom friction should be used (see \S\ref{ZDF_bfr_imp} )  
     1108which can be selected by setting \np{ln\_bfrimp} $=$ \textit{true}. 
     1109 
     1110Otherwise, the implicit formulation takes the form: 
    10511111\begin{equation} \label{Eq_zdfbfr_implicitts} 
    10521112 \bar{U}^{t+ \rdt} = \; \left [ \bar{U}^{t-\rdt}\; + 2 \rdt\;RHS \right ] / \left [ 1 - 2 \rdt \;c_b^{u} / H_e \right ]   
     
    11151175The essential goal of the parameterization is to represent the momentum  
    11161176exchange between the barotropic tides and the unrepresented internal waves  
    1117 induced by the tidal ßow over rough topography in a stratified ocean.  
     1177induced by the tidal flow over rough topography in a stratified ocean.  
    11181178In the current version of \NEMO, the map is built from the output of  
    11191179the barotropic global ocean tide model MOG2D-G \citep{Carrere_Lyard_GRL03}. 
  • branches/2011/dev_NEMO_MERGE_2011/DOC/TexFiles/Chapters/Introduction.tex

    r2570 r3116  
    6363\citep{OASIS2006}. Two-way nesting is also available through an interface to the 
    6464AGRIF package (Adaptative Grid Refinement in \textsc{Fortran}) \citep{Debreu_al_CG2008}. 
     65The interface code for coupling to an alternative sea ice model (CICE, \citet{Hunke2008}) is now  
     66available although this is currently only designed for global domains, without the use of AGRIF. 
    6567 
    6668Other model characteristics are the lateral boundary conditions (chapter~\ref{LBC}).   
  • branches/2011/dev_NEMO_MERGE_2011/DOC/TexFiles/Namelist/nambfr

    r2540 r3116  
    99   ln_bfr2d    = .false.   !  horizontal variation of the bottom friction coef (read a 2D mask file ) 
    1010   rn_bfrien   =    50.    !  local multiplying factor of bfr (ln_bfr2d=T) 
     11   ln_bfrimp   = .false.   !  implicit bottom friction (requires ln_zdfexp = .false. if true) 
    1112/ 
  • branches/2011/dev_NEMO_MERGE_2011/DOC/TexFiles/Namelist/namdyn_hpg

    r2540 r3116  
    55   ln_hpg_zps  = .true.    !  z-coordinate - partial steps (interpolation) 
    66   ln_hpg_sco  = .false.   !  s-coordinate (standard jacobian formulation) 
    7    ln_hpg_hel  = .false.   !  s-coordinate (helsinki modification) 
    8    ln_hpg_wdj  = .false.   !  s-coordinate (weighted density jacobian) 
    97   ln_hpg_djc  = .false.   !  s-coordinate (Density Jacobian with Cubic polynomial) 
    10    ln_hpg_rot  = .false.   !  s-coordinate (ROTated axes scheme) 
    11    rn_gamma    = 0.e0      !  weighting coefficient (wdj scheme) 
     8   ln_hpg_prj  = .false.   !  s-coordinate (Pressure Jacobian scheme) 
    129   ln_dynhpg_imp = .false. !  time stepping: semi-implicit time scheme  (T) 
    1310                                 !           centered      time scheme  (F) 
  • branches/2011/dev_NEMO_MERGE_2011/DOC/TexFiles/Namelist/namobs_example

    r2298 r3116  
    5757   ln_s3d = .true. 
    5858   ln_ena = .true. 
    59    enactfiles = 'profiles_01.nc' 
     59   enactfiles = 'enact.1.nc' 
    6060   ln_grid_global = .true. 
    6161   ln_grid_search_lookup = .true. 
  • branches/2011/dev_NEMO_MERGE_2011/DOC/TexFiles/Namelist/namsbc_cpl

    r2540 r3116  
    22&namsbc_cpl    !   coupled ocean/atmosphere model                       ("key_coupled") 
    33!----------------------------------------------------------------------- 
    4 !                                      ! send 
    5 cn_snd_temperature= 'weighted oce and ice'  !  'oce only' 'weighted oce and ice' 'mixed oce-ice' 
    6 cn_snd_albedo     = 'weighted ice'          !  'none' 'weighted ice' 'mixed oce-ice' 
    7 cn_snd_thickness  = 'none'                  !  'none' 'weighted ice and snow' 
    8 cn_snd_crt_nature = 'none'                  !  'none' 'oce only' 'weighted oce and ice' 'mixed oce-ice' 
    9 cn_snd_crt_refere = 'spherical'             !  'spherical' 'cartesian' 
    10 cn_snd_crt_orient = 'eastward-northward'    !  'eastward-northward' or 'local grid' 
    11 cn_snd_crt_grid   = 'T'                     !  'T' 
    12 !                                      ! receive 
    13 cn_rcv_w10m       = 'none'                  !  'none' 'coupled' 
    14 cn_rcv_taumod     = 'coupled'               !  'none' 'coupled' 
    15 cn_rcv_tau_nature = 'oce only'              !  'oce only' 'oce and ice' 'mixed oce-ice' 
    16 cn_rcv_tau_refere = 'cartesian'             !  'spherical' 'cartesian' 
    17 cn_rcv_tau_orient = 'eastward-northward'    !  'eastward-northward' or 'local grid' 
    18 cn_rcv_tau_grid   = 'U,V'                   !  'T' 'U,V' 'U,V,F' 'U,V,I' 'T,F' 'T,I' 'T,U,V' 
    19 cn_rcv_dqnsdt     = 'coupled'               !  'none' 'coupled' 
    20 cn_rcv_qsr        = 'oce and ice'           !  'conservative' 'oce and ice' 'mixed oce-ice' 
    21 cn_rcv_qns        = 'oce and ice'           !  'conservative' 'oce and ice' 'mixed oce-ice' 
    22 cn_rcv_emp        = 'conservative'          !  'conservative' 'oce and ice' 'mixed oce-ice' 
    23 cn_rcv_rnf        = 'coupled'               !  'coupled' 'climato' 'mixed' 
    24 cn_rcv_cal        = 'coupled'               !  'none' 'coupled' 
     4!                    !     description       !  multiple  !    vector   !      vector          ! vector ! 
     5!                    !                       ! categories !  reference  !    orientation       ! grids  ! 
     6! send 
     7sn_snd_temp   =       'weighted oce and ice' ,    'no'    ,     ''      ,         ''           ,   ''     
     8sn_snd_alb    =       'weighted ice'         ,    'no'    ,     ''      ,         ''           ,   ''     
     9sn_snd_thick  =       'none'                 ,    'no'    ,     ''      ,         ''           ,   ''     
     10sn_snd_crt    =       'none'                 ,    'no'    , 'spherical' , 'eastward-northward' ,  'T'        
     11sn_snd_co2    =       'coupled'              ,    'no'    ,     ''      ,         ''           ,   ''         
     12! receive 
     13sn_rcv_w10m   =       'none'                 ,    'no'    ,     ''      ,         ''          ,   ''     
     14sn_rcv_taumod =       'coupled'              ,    'no'    ,     ''      ,         ''          ,   ''     
     15sn_rcv_tau    =       'oce only'             ,    'no'    , 'cartesian' , 'eastward-northward',  'U,V'    
     16sn_rcv_dqnsdt =       'coupled'              ,    'no'    ,     ''      ,         ''          ,   ''     
     17sn_rcv_qsr    =       'oce and ice'          ,    'no'    ,     ''      ,         ''          ,   ''     
     18sn_rcv_qns    =       'oce and ice'          ,    'no'    ,     ''      ,         ''          ,   ''     
     19sn_rcv_emp    =       'conservative'         ,    'no'    ,     ''      ,         ''          ,   ''     
     20sn_rcv_rnf    =       'coupled'              ,    'no'    ,     ''      ,         ''          ,   ''     
     21sn_rcv_cal    =       'coupled'              ,    'no'    ,     ''      ,         ''          ,   ''     
     22sn_rcv_co2    =       'coupled'              ,    'no'    ,     ''      ,         ''          ,   ''     
    2523/ 
  • branches/2011/dev_NEMO_MERGE_2011/DOC/TexFiles/Namelist/namtra_ldf

    r2540 r3116  
    99   ln_traldf_hor    =  .false.  !  horizontal (geopotential)            (require "key_ldfslp" when ln_sco=T) 
    1010   ln_traldf_iso    =  .true.   !  iso-neutral                          (require "key_ldfslp") 
    11    ln_traldf_grif   =  .false.  !  griffies skew flux formulation       (require "key_ldfslp")  ! UNDER TEST, DO NOT USE 
    12    ln_traldf_gdia   =  .false.  !  griffies operator strfn diagnostics  (require "key_ldfslp")  ! UNDER TEST, DO NOT USE 
     11   ln_traldf_grif   =  .false.  !  griffies skew flux formulation       (require "key_ldfslp") 
     12   ln_traldf_gdia   =  .false.  !  griffies operator strfn diagnostics  (require "key_ldfslp") 
     13   ln_triad_iso     =  .false.  !  griffies operator calculates triads twice => pure lateral mixing in ML (require "key_ldfslp") 
     14   ln_botmix_grif   =  .false.  !  griffies operator with lateral mixing on bottom (require "key_ldfslp") 
    1315   !                       !  Coefficient 
    1416   rn_aht_0         =  2000.    !  horizontal eddy diffusivity for tracers [m2/s] 
  • branches/2011/dev_NEMO_MERGE_2011/NEMOGCM/ARCH/arch-ALTIX_NAUTILUS4.fcm

    r2364 r3116  
    2222# Note use of -Bstatic because the library root directories are not accessible to the back-end compute nodes 
    2323%NCDF_LIB            -L%HDF5_HOME/lib -L%NCDF_HOME/lib -Bstatic -lnetcdf -lhdf5_fortran -lhdf5_hl -lhdf5 -Bdynamic -lz 
    24 %FC                  mpif90 
     24%FC                  ifort 
    2525%FCFLAGS             -r8 -O3 -xT -ip -vec-report0 
    2626%FFLAGS              -r8 -O3 -xT -ip -vec-report0 
    27 %LD                  mpif90 
     27%LD                  ifort 
    2828%FPPFLAGS            -P -C -traditional 
    29 %LDFLAGS 
     29%LDFLAGS             -lmpi 
    3030%AR                  ar  
    3131%ARFLAGS             -r 
  • branches/2011/dev_NEMO_MERGE_2011/NEMOGCM/CONFIG/AMM12_PISCES/EXP00/namelist

    r3113 r3116  
    9494/ 
    9595!----------------------------------------------------------------------- 
    96 &namdta_tem    !   data : temperature                                   ("key_dtatem") 
    97 !----------------------------------------------------------------------- 
    98 !              ! file name ! frequency (hours)    ! variable ! time interp. ! clim  !'yearly' or ! weights  ! rotation ! 
    99 !              !           !  (if <0  months)     !   name   !  (logical)   ! (T/F) ! 'monthly'  ! filename ! pairing  ! 
    100    sn_tem = 'data_1m_potential_temperature_nomask', -1,'votemper',  .true.  , .true., 'yearly'   , ' '      , ' ' 
     96&namtsd    !   data : Temperature  & Salinity 
     97!----------------------------------------------------------------------- 
     98!          ! file name ! frequency (hours)    ! variable ! time interp. ! clim  !'yearly' or ! weights  ! rotation ! 
     99!          !           !  (if <0  months)     !   name   !  (logical)   ! (T/F) ! 'monthly'  ! filename ! pairing  ! 
     100   sn_tem  = 'data_1m_potential_temperature_nomask', -1,'votemper',  .true.  , .true., 'yearly'   , ' '      , ' ' 
     101   sn_sal  = 'data_1m_salinity_nomask'             , -1,'vosaline',  .true.  , .true., 'yearly'   , ''       , ' ' 
    101102   ! 
    102    cn_dir       = './'     !  root directory for the location of the runoff files 
    103 / 
    104 !----------------------------------------------------------------------- 
    105 &namdta_sal    !   data : salinity                                      ("key_dtasal") 
    106 !----------------------------------------------------------------------- 
    107 !              ! file name ! frequency (hours)    ! variable ! time interp. ! clim  !'yearly' or ! weights  ! rotation ! 
    108 !              !           !  (if <0  months)     !   name   !   (logical)  ! (T/F) ! 'monthly'  ! filename ! pairing  ! 
    109    sn_sal      =  'data_1m_salinity_nomask',  -1  ,'vosaline',    .true.    , .true., 'yearly'   , ''       , ' ' 
    110    ! 
    111    cn_dir      = './'      !  root directory for the location of the runoff files 
    112 / 
    113  
     103   cn_dir        = './'     !  root directory for the location of the runoff files 
     104   ln_tsd_init   = .false.   !  Initialisation of ocean T & S with T &S input data (T) or not (F) 
     105   ln_tsd_tradmp = .false.   !  damping of ocean T & S toward T &S input data (T) or not (F) 
     106/ 
    114107!!====================================================================== 
    115108!!            ***  Surface Boundary Condition namelists  *** 
  • branches/2011/dev_NEMO_MERGE_2011/NEMOGCM/CONFIG/AMM12_PISCES/EXP00/namelist_pisces

    r3034 r3116  
    1515&nampisext     !   air-sea exchange 
    1616!,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, 
    17    atcco2     = 287.    ! atmospheric pCO2 
     17   ln_co2int  =  .false. ! read atm pco2 from a file (T) or constant (F) 
     18   atcco2     =  287.    ! Constant value atmospheric pCO2 - ln_co2int = F 
     19   clname     =  'atcco2.txt'  ! Name of atm pCO2 file - ln_co2int = T 
     20   nn_offset  =  0       ! Offset model-data start year - ln_co2int = T 
     21!                        ! If your model year is iyy, nn_offset=(years(1)-iyy)  
     22!                        ! then the first atmospheric CO2 record read is at years(1) 
     23/ 
     24!''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' 
     25&nampisatm     !  Atmospheric prrssure  
     26!,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, 
     27!              !  file name   ! frequency (hours) ! variable   ! time interp. !  clim  ! 'yearly'/ ! weights  ! rotation ! 
     28!              !              !  (if <0  months)  !   name     !   (logical)  !  (T/F) ! 'monthly' ! filename ! pairing  ! 
     29   sn_patm     = 'presatm'    ,     -1            , 'patm'     ,  .true.      , .true. ,   'yearly'  , ''       , '' 
     30   cn_dir      = './'     !  root directory for the location of the dynamical files 
     31! 
     32   ln_presatm  = .true.   ! constant atmopsheric pressure (F) or from a file (T) 
    1833/ 
    1934!''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' 
    2035&nampisbio     !   biological parameters 
    2136!,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, 
    22    part       =  0.85    ! part of calcite not dissolved in guts 
    23    nrdttrc    =  1       ! time step frequency for biology 
    24    wsbio      =  2.      ! POC sinking speed 
    25    xkmort     =  1.E-7   ! half saturation constant for mortality 
    26    ferat3     =  3.E-6   ! Fe/C in zooplankton  
    27    wsbio2     =  30.     ! Big particles sinking speed 
     37   nrdttrc    =  1        ! time step frequency for biology 
     38   wsbio      =  2.       ! POC sinking speed 
     39   xkmort     =  1.E-7    ! half saturation constant for mortality 
     40   ferat3     =  10.E-6   ! Fe/C in zooplankton  
     41   wsbio2     =  30.      ! Big particles sinking speed 
    2842/ 
    2943!''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' 
     
    3145!,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, 
    3246   conc0      =  2.e-6    ! Phosphate half saturation 
    33    conc1      =  10E-6    ! Phosphate half saturation for diatoms 
    34    conc2      =  0.01E-9  ! Iron half saturation for phyto 
    35    conc2m     =  0.08E-9  ! Max iron half saturation for phyto 
    36    conc3      =  0.1E-9   ! Iron half saturation for diatoms 
    37    conc3m     =  0.4E-9   ! Maxi iron half saturation for diatoms 
     47   conc1      =  8E-6     ! Phosphate half saturation for diatoms 
     48   conc2      =  2E-9     ! Iron half saturation for phyto 
     49   conc2m     =  4E-9     ! Max iron half saturation for phyto 
     50   conc3      =  3E-9     ! Iron half saturation for diatoms 
     51   conc3m     =  9E-9     ! Maxi iron half saturation for diatoms 
     52   xsizedia   =  5.E-7    ! Minimum size criteria for diatoms 
     53   xsizephy   =  1.E-6    ! Minimum size criteria for phyto 
    3854   concnnh4   =  1.E-7    ! NH4 half saturation for phyto 
    39    concdnh4   =  5.E-7    ! NH4 half saturation for diatoms 
     55   concdnh4   =  4.E-7    ! NH4 half saturation for diatoms 
    4056   xksi1      =  2.E-6    ! half saturation constant for Si uptake 
    4157   xksi2      =  3.33E-6  ! half saturation constant for Si/C 
    4258   xkdoc      =  417.E-6  ! half-saturation constant of DOC remineralization 
    43    caco3r     =  0.15     ! mean rain ratio 
     59   concfebac  =  3.E-11   ! Half-saturation for Fe limitation of Bacteria 
     60   qnfelim    =  7.E-6    ! Optimal quota of phyto 
     61   qdfelim    =  7.E-6    ! Optimal quota of diatoms 
     62   caco3r     =  0.16     ! mean rain ratio 
    4463/ 
    4564!''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' 
    4665&nampisprod     !   parameters for phytoplankton growth 
    4766!,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, 
    48    pislope    =  3.       ! P-I slope   
    49    pislope2   =  3.       ! P-I slope  for diatoms 
     67   pislope    =  3.       ! P-I slope 
     68   pislope2   =  2.       ! P-I slope  for diatoms 
    5069   excret     =  0.05     ! excretion ratio of phytoplankton 
    5170   excret2    =  0.05     ! excretion ratio of diatoms 
     71   ln_newprod =  .false.  ! Enable new parame. of production (T/F)  
     72   bresp      =  0.00333  ! Basal respiration rate 
    5273   chlcnm     =  0.033    ! Minimum Chl/C in nanophytoplankton 
    53    chlcdm     =  0.05     ! Minimum Chl/C in diatoms 
    54    fecnm      =  10E-6    ! Maximum Fe/C in nanophytoplankton 
    55    fecdm      =  15E-6    ! Minimum Fe/C in diatoms 
     74   chlcdm     =  0.04     ! Minimum Chl/C in diatoms 
     75   chlcmin    =  0.0033   ! Maximum Chl/c in phytoplankton 
     76   fecnm      =  40E-6    ! Maximum Fe/C in nanophytoplankton 
     77   fecdm      =  40E-6    ! Minimum Fe/C in diatoms 
    5678   grosip     =  0.151    ! mean Si/C ratio 
    5779/ 
     
    6890&nampismes     !   parameters for mesozooplankton 
    6991!,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, 
     92   part2      =  0.75    ! part of calcite not dissolved in mesozoo guts 
    7093   grazrat2   =  0.7      ! maximal mesozoo grazing rate 
    7194   resrat2    =  0.005    ! exsudation rate of mesozooplankton 
    7295   mzrat2     =  0.03     ! mesozooplankton mortality rate 
    7396   xprefc     =  1.       ! zoo preference for phyto 
    74    xprefp     =  0.2      ! zoo preference for POC 
     97   xprefp     =  0.3      ! zoo preference for POC 
    7598   xprefz     =  1.       ! zoo preference for zoo 
    76    xprefpoc   =  0.2      ! zoo preference for poc 
     99   xprefpoc   =  0.3      ! zoo preference for poc 
     100   xthresh2zoo = 1E-8     ! zoo feeding threshold for mesozooplankton  
     101   xthresh2dia = 1E-8     ! diatoms feeding threshold for mesozooplankton  
     102   xthresh2phy = 2E-7     ! nanophyto feeding threshold for mesozooplankton  
     103   xthresh2poc = 1E-8     ! poc feeding threshold for mesozooplankton  
     104   xthresh2   =  0.       ! Food threshold for grazing 
    77105   xkgraz2    =  20.E-6   ! half sturation constant for meso grazing 
    78    epsher2    =  0.33     ! Efficicency of Mesozoo growth  
     106   epsher2    =  0.33     ! Efficicency of Mesozoo growth 
    79107   sigma2     =  0.6      ! Fraction of mesozoo excretion as DOM 
    80108   unass2     =  0.3      ! non assimilated fraction of P by mesozoo 
    81    grazflux   =  5.e3     ! flux-feeding rate 
     109   grazflux   =  3.e3     ! flux-feeding rate 
    82110/ 
    83111!''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' 
    84112&nampiszoo     !   parameters for microzooplankton 
    85113!,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, 
    86    grazrat    =  4.0      ! maximal zoo grazing rate    
     114   part       =  0.5      ! part of calcite not dissolved in microzoo gutsa 
     115   grazrat    =  3.0      ! maximal zoo grazing rate 
    87116   resrat     =  0.03     ! exsudation rate of zooplankton 
    88117   mzrat      =  0.0      ! zooplankton mortality rate 
    89    xpref2c    =  0.1      ! Microzoo preference for POM  
    90    xpref2p    =  0.45     ! Microzoo preference for Nanophyto 
    91    xpref2d    =  0.45     ! Microzoo preference for Diatoms 
    92    xkgraz     =  20.E-6   ! half sturation constant for grazing  
     118   xpref2c    =  0.1      ! Microzoo preference for POM 
     119   xpref2p    =  1.       ! Microzoo preference for Nanophyto 
     120   xpref2d    =  0.6      ! Microzoo preference for Diatoms 
     121   xthreshdia =  1.E-8    ! Diatoms feeding threshold for microzooplankton  
     122   xthreshphy =  2.E-7    ! Nanophyto feeding threshold for microzooplankton  
     123   xthreshpoc =  1.E-8    ! POC feeding threshold for microzooplankton  
     124   xthresh    =  0.       ! Food threshold for feeding 
     125   xkgraz     =  20.E-6   ! half sturation constant for grazing 
    93126   epsher     =  0.33     ! Efficiency of microzoo growth 
    94127   sigma1     =  0.6      ! Fraction of microzoo excretion as DOM 
     
    98131&nampisrem     !   parameters for remineralization 
    99132!,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, 
    100    xremik    =  0.3       ! remineralization rate of DOC 
     133   xremik    =  0.25      ! remineralization rate of DOC 
    101134   xremip    =  0.025     ! remineralisation rate of POC 
    102135   nitrif    =  0.05      ! NH4 nitrification rate 
    103    xsirem    =  0.015     ! remineralization rate of Si 
     136   xsirem    =  0.003     ! remineralization rate of Si 
     137   xsiremlab =  0.025     ! fast remineralization rate of Si 
     138   xsilab    =  0.31      ! Fraction of labile biogenic silica 
    104139   xlam1     =  0.005     ! scavenging rate of Iron 
    105    oxymin    =  1.E-6     ! Half-saturation constant for anoxia  
     140   oxymin    =  1.E-6     ! Half-saturation constant for anoxia 
     141   ligand    =  0.6E-9    ! Ligands concentration 
    106142/ 
    107143!''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' 
    108144&nampiscal     !   parameters for Calcite chemistry 
    109145!,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, 
    110    kdca       =  0.327e3  ! calcite dissolution rate constant (1/time) 
     146   kdca       =  6.       ! calcite dissolution rate constant (1/time) 
    111147   nca        =  1.       ! order of dissolution reaction (dimensionless) 
    112148/ 
     
    114150&nampissed     !   parameters for inputs deposition 
    115151!,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, 
    116    ln_dustfer  =  .false.   ! boolean for dust input from the atmosphere 
    117    ln_river    =  .false.  ! boolean for river input of nutrients 
     152!              !  file name        ! frequency (hours) ! variable   ! time interp. !  clim  ! 'yearly'/ ! weights  ! rotation ! 
     153!              !                   !  (if <0  months)  !   name     !   (logical)  !  (T/F) ! 'monthly' ! filename ! pairing  ! 
     154   sn_dust     = 'dust.orca'       ,     -1            , 'dust'     ,  .true.      , .true. ,   'yearly'  , ''       , '' 
     155   sn_riverdic = 'river.orca'      ,    -12            , 'riverdic' ,  .false.     , .true. ,   'yearly'  , ''       , '' 
     156   sn_riverdoc = 'river.orca'      ,    -12            , 'riverdoc' ,  .false.     , .true. ,   'yearly'  , ''       , '' 
     157   sn_ndepo    = 'ndeposition.orca',    -12            , 'ndep'     ,  .false.     , .true. ,   'yearly'  , ''       , '' 
     158   sn_ironsed  = 'bathy.orca'      ,    -12            , 'bathy'    ,  .false.     , .true. ,   'yearly'  , ''       , '' 
     159! 
     160   cn_dir      = './'      !  root directory for the location of the dynamical files 
     161   ln_dust     =  .false.   ! boolean for dust input from the atmosphere 
     162   ln_river    =  .false.   ! boolean for river input of nutrients 
    118163   ln_ndepo    =  .false.   ! boolean for atmospheric deposition of N 
    119    ln_sedinput =  .false.   ! boolean for Fe input from sediments 
     164   ln_ironsed =  .false.   ! boolean for Fe input from sediments 
    120165   sedfeinput  =  1E-9     ! Coastal release of Iron 
    121    dustsolub   =  0.014    ! Solubility of the dust 
     166   dustsolub   =  0.02     ! Solubility of the dust 
     167   wdust       =  2.0      ! Dust sinking speed 
     168   nitrfix     =  1E-7     ! Nitrogen fixation rate 
     169   diazolight  =  50.      ! Diazotrophs sensitivity to light (W/m2) 
     170   concfediaz  =  1.E-10   ! Diazotrophs half-saturation Cste for Iron 
    122171/ 
    123172!''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' 
     
    140189/ 
    141190!''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' 
    142 &nampisdia     !   additional 2D/3D tracers diagnostics ("key_trc_diaadd") 
    143 !,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, 
    144    nn_writedia  =  5475   !  time step frequency for tracers diagnostics 
    145 ! 
     191&nampisdia     !   additional 2D/3D tracers diagnostics  
     192!,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, 
    146193!              !    name   !           title of the field          !     units      ! 
    147194!              !           !                                       !                !   
     
    175222!,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, 
    176223   ln_pisdmp    =  .true.     !  Relaxation fo some tracers to a mean value 
    177 / 
     224   nn_pisdmp    =  5475       !  Frequency of Relaxation  
     225/ 
  • branches/2011/dev_NEMO_MERGE_2011/NEMOGCM/CONFIG/AMM12_PISCES/EXP00/namelist_top

    r3034 r3116  
    11!!>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
    22!! NEMO/TOP1 :  1 - tracer definition                     (namtrc    ) 
    3 !! namelists    2 - dynamical tracer trends               (namtrc_trd) 
     3!!              2 - tracer data initialisation            (namtrc_dta) 
    44!!              3 - tracer advection                      (namtrc_adv) 
    55!!              4 - tracer lateral diffusion              (namtrc_ldf) 
    66!!              5 - tracer vertical physics               (namtrc_zdf) 
    77!!              6 - tracer newtonian damping              (namtrc_dmp) 
     8!!              7 - dynamical tracer trends               (namtrc_trd) 
     9!!              8 - tracer output diagonstics             (namtrc_dia) 
    810!>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
    911!''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' 
    1012&namtrc     !   tracers definition 
    1113!,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, 
    12    nn_dttrc      =  1       !  time step frequency for passive sn_tracers       
     14   nn_dttrc      =  1        !  time step frequency for passive sn_tracers       
    1315   nn_writetrc   =  10     !  time step frequency for sn_tracer outputs 
    1416   ln_rsttr      = .false.   !  start from a restart file (T) or not (F) 
     
    1820   cn_trcrst_in  = "restart_trc"   !  suffix of pass. sn_tracer restart name (input) 
    1921   cn_trcrst_out = "restart_trc"   !  suffix of pass. sn_tracer restart name (output) 
     22   ln_trcdta     =   .false. !  Initialisation from data input file (T) or not (F) 
    2023! 
    2124!              !    name   !           title of the field              !   units    ! initial data ! save   ! 
    2225!              !           !                                           !            ! from file    ! or not !  
    2326!              !           !                                           !            ! or not       !        ! 
    24    sn_tracer(1)   = 'DIC     ' , 'Dissolved inorganic Concentration      ',  'mol-C/L' ,  .false.     ,  .true. 
    25    sn_tracer(2)   = 'Alkalini' , 'Total Alkalinity Concentration         ',  'eq/L '   ,  .false.     ,  .true. 
    26    sn_tracer(3)   = 'O2      ' , 'Dissolved Oxygen Concentration         ',  'mol-C/L' ,  .false.     ,  .true. 
     27   sn_tracer(1)   = 'DIC     ' , 'Dissolved inorganic Concentration      ',  'mol-C/L' ,  .true.     ,  .true. 
     28   sn_tracer(2)   = 'Alkalini' , 'Total Alkalinity Concentration         ',  'eq/L '   ,  .true.     ,  .true. 
     29   sn_tracer(3)   = 'O2      ' , 'Dissolved Oxygen Concentration         ',  'mol-C/L' ,  .true.     ,  .true. 
    2730   sn_tracer(4)   = 'CaCO3   ' , 'Calcite Concentration                  ',  'mol-C/L' ,  .false.    ,  .true. 
    28    sn_tracer(5)   = 'PO4     ' , 'Phosphate Concentration                ',  'mol-C/L' ,  .false.     ,  .true. 
     31   sn_tracer(5)   = 'PO4     ' , 'Phosphate Concentration                ',  'mol-C/L' ,  .true.     ,  .true. 
    2932   sn_tracer(6)   = 'POC     ' , 'Small organic carbon Concentration     ',  'mol-C/L' ,  .false.    ,  .true. 
    30    sn_tracer(7)   = 'Si      ' , 'Silicate Concentration                 ',  'mol-C/L' ,  .false.     ,  .true. 
     33   sn_tracer(7)   = 'Si      ' , 'Silicate Concentration                 ',  'mol-C/L' ,  .true.     ,  .true. 
    3134   sn_tracer(8)   = 'PHY     ' , 'Nanophytoplankton Concentration        ',  'mol-C/L' ,  .false.    ,  .true. 
    3235   sn_tracer(9)   = 'ZOO     ' , 'Microzooplankton Concentration         ',  'mol-C/L' ,  .false.    ,  .true. 
     
    3538   sn_tracer(12)  = 'ZOO2    ' , 'Mesozooplankton Concentration          ',  'mol-C/L' ,  .false.    ,  .true. 
    3639   sn_tracer(13)  = 'BSi     ' , 'Diatoms Silicate Concentration         ',  'mol-C/L' ,  .false.    ,  .true. 
    37    sn_tracer(14)  = 'Fer     ' , 'Dissolved Iron Concentration           ',  'mol-C/L' ,  .false.     ,  .true. 
     40   sn_tracer(14)  = 'Fer     ' , 'Dissolved Iron Concentration           ',  'mol-C/L' ,  .true.     ,  .true. 
    3841   sn_tracer(15)  = 'BFe     ' , 'Big iron particles Concentration       ',  'mol-C/L' ,  .false.    ,  .true. 
    3942   sn_tracer(16)  = 'GOC     ' , 'Big organic carbon Concentration       ',  'mol-C/L' ,  .false.    ,  .true. 
     
    4447   sn_tracer(21)  = 'NCHL    ' , 'Nano chlorophyl Concentration          ',  'mol-C/L' ,  .false.    ,  .true. 
    4548   sn_tracer(22)  = 'DCHL    ' , 'Diatoms chlorophyl Concentration       ',  'mol-C/L' ,  .false.    ,  .true. 
    46    sn_tracer(23)  = 'NO3     ' , 'Nitrates Concentration                 ',  'mol-C/L' ,  .false.     ,  .true. 
     49   sn_tracer(23)  = 'NO3     ' , 'Nitrates Concentration                 ',  'mol-C/L' ,  .true.     ,  .true. 
    4750   sn_tracer(24)  = 'NH4     ' , 'Ammonium Concentration                 ',  'mol-C/L' ,  .false.    ,  .true. 
     51/ 
     52!----------------------------------------------------------------------- 
     53&namtrc_dta      !    Initialisation from data input file 
     54!----------------------------------------------------------------------- 
     55! 
     56!                !  file name               ! frequency (hours) ! variable   ! time interp. !  clim  ! 'yearly'/ ! weights  ! rotation ! 
     57!                !                          !  (if <0  months)  !   name     !   (logical)  !  (T/F) ! 'monthly' ! filename ! pairing  ! 
     58   sn_trcdta(1)  = 'data_DIC_nomask'        ,        -12        ,  'DIC'     ,    .false.   , .true. , 'yearly'  , ''       , '' 
     59   sn_trcdta(2)  = 'data_Alkalini_nomask'   ,        -12        ,  'Alkalini',    .false.   , .true. , 'yearly'  , ''       , '' 
     60   sn_trcdta(3)  = 'data_O2_nomask'         ,        -1         ,  'O2'      ,    .true.    , .true. , 'yearly'  , ''       , '' 
     61   sn_trcdta(5)  = 'data_PO4_nomask'        ,        -1         ,  'PO4'     ,    .true.    , .true. , 'yearly'  , ''       , '' 
     62   sn_trcdta(7)  = 'data_Si_nomask'         ,        -1         ,  'Si'      ,    .true.    , .true. , 'yearly'  , ''       , '' 
     63   sn_trcdta(10) = 'data_DOC_nomask'        ,        -12        ,  'DOC'     ,    .false.   , .true. , 'yearly'  , ''       , '' 
     64   sn_trcdta(14) = 'data_Fer_nomask'        ,        -12        ,  'Fer'     ,    .false.   , .true. , 'yearly'  , ''       , '' 
     65   sn_trcdta(23) = 'data_NO3_nomask'        ,        -1         ,  'NO3'     ,    .true.    , .true. , 'yearly'  , ''       , '' 
     66! 
     67   cn_dir        =  './'      !  root directory for the location of the data files 
     68   rn_trfac(1)   =   1.0e-06  !  multiplicative factor 
     69   rn_trfac(2)   =   1.0e-06  !  -      -      -     - 
     70   rn_trfac(3)   =  44.6e-06  !  -      -      -     - 
     71   rn_trfac(5)   = 122.0e-06  !  -      -      -     - 
     72   rn_trfac(7)   =   1.0e-06  !  -      -      -     - 
     73   rn_trfac(10)  =   1.0      !  -      -      -     - 
     74   rn_trfac(14)  =   1.0      !  -      -      -     - 
     75   rn_trfac(23)  =   7.6e-06  !  -      -      -     - 
    4876/ 
    4977!----------------------------------------------------------------------- 
     
    6997   ln_trcldf_iso    =  .true.   !     iso-neutral                       (require "key_ldfslp") 
    7098!                               !  Coefficient 
     99   rn_ahtrc_0       =  2000.    !  horizontal eddy diffusivity for tracers [m2/s] 
    71100   rn_ahtrb_0       =     0.    !     background eddy diffusivity for ldf_iso [m2/s] 
    72101/ 
     
    83112/ 
    84113!----------------------------------------------------------------------- 
    85 &namtrc_dmp    !   passive tracer newtonian damping    ('key_tradmp && key_trcdmp') 
     114&namtrc_dmp    !   passive tracer newtonian damping    
    86115!----------------------------------------------------------------------- 
     116   ln_trcdmp   =  .false.  !  add a damping termn (T) or not (F) 
    87117   nn_hdmp_tr  =   -1      !  horizontal shape =-1, damping in Med and Red Seas only 
    88118                           !                   =XX, damping poleward of XX degrees (XX>0) 
     
    107137   ln_trdtrc(1)  =   .true. 
    108138   ln_trdtrc(2)  =   .true. 
    109    ln_trdtrc(3)  =   .false. 
    110    ln_trdtrc(4)  =   .false. 
    111    ln_trdtrc(5)  =   .false. 
    112    ln_trdtrc(6)  =   .false. 
    113    ln_trdtrc(7)  =   .false. 
    114    ln_trdtrc(8)  =   .false. 
    115    ln_trdtrc(9)  =   .false. 
    116    ln_trdtrc(10) =   .false. 
    117    ln_trdtrc(11) =   .false. 
    118    ln_trdtrc(12) =   .false. 
    119    ln_trdtrc(13) =   .false. 
    120    ln_trdtrc(14) =   .false. 
    121    ln_trdtrc(15) =   .false. 
    122    ln_trdtrc(16) =   .false. 
    123    ln_trdtrc(17) =   .false. 
    124    ln_trdtrc(18) =   .false. 
    125    ln_trdtrc(19) =   .false. 
    126    ln_trdtrc(20) =   .false. 
    127    ln_trdtrc(21) =   .false. 
    128    ln_trdtrc(22) =   .false. 
    129139   ln_trdtrc(23) =   .true. 
    130    ln_trdtrc(24) =   .false. 
    131140/ 
     141!----------------------------------------------------------------------- 
     142&namtrc_dia       !   parameters for passive tracer additional diagnostics 
     143!---------------------------------------------------------------------- 
     144   ln_diatrc     =  .false.  !  save additional diag. (T) or not (F) 
     145   nn_writedia   =  5475     !  time step frequency for diagnostics 
     146/ 
  • branches/2011/dev_NEMO_MERGE_2011/NEMOGCM/CONFIG/AMM12_PISCES/cpp_AMM12_PISCES.fcm

    r3110 r3116  
    1  bld::tool::fppkeys key_top key_pisces key_diatrc key_bdy key_vectopt_loop key_amm_12km  key_dynspg_ts key_ldfslp  key_zdfgls  key_vvl key_diainstant key_mpp_mpi 
     1 bld::tool::fppkeys key_top key_pisces key_bdy key_vectopt_loop key_amm_12km  key_dynspg_ts key_ldfslp  key_zdfgls  key_vvl key_diainstant key_mpp_mpi 
  • branches/2011/dev_NEMO_MERGE_2011/NEMOGCM/CONFIG/GYRE/EXP00/namelist

    r3105 r3116  
    33!! namelists    2 - Domain           (namzgr, namzgr_sco, namdom, namtsd) 
    44!!              3 - Surface boundary (namsbc, namsbc_ana, namsbc_flx, namsbc_clio, namsbc_core 
    5 !!                                    namsbc_cpl, namsbc_cpl_co2 namtra_qsr, namsbc_rnf,  
     5!!                                    namsbc_cpl, namtra_qsr, namsbc_rnf,  
    66!!                                    namsbc_apr, namsbc_ssr, namsbc_alb) 
    77!!              4 - lateral boundary (namlbc, namcla, namobc, namagrif, nambdy, nambdy_tide) 
     
    114114!!   namsbc_mfs      MFS  bulk formulae formulation 
    115115!!   namsbc_cpl      CouPLed            formulation                     ("key_coupled") 
    116 !!   namsbc_cpl_co2  coupled ocean/biogeo/atmosphere model              ("key_cpl_carbon_cycle") 
    117116!!   namtra_qsr      penetrative solar radiation 
    118117!!   namsbc_rnf      river runoffs 
     
    222221&namsbc_cpl    !   coupled ocean/atmosphere model                       ("key_coupled") 
    223222!----------------------------------------------------------------------- 
    224 !                                      ! send 
    225 cn_snd_temperature= 'weighted oce and ice'  !  'oce only' 'weighted oce and ice' 'mixed oce-ice' 
    226 cn_snd_albedo     = 'weighted ice'          !  'none' 'weighted ice' 'mixed oce-ice' 
    227 cn_snd_thickness  = 'none'                  !  'none' 'weighted ice and snow' 
    228 cn_snd_crt_nature = 'none'                  !  'none' 'oce only' 'weighted oce and ice' 'mixed oce-ice' 
    229 cn_snd_crt_refere = 'spherical'             !  'spherical' 'cartesian' 
    230 cn_snd_crt_orient = 'eastward-northward'    !  'eastward-northward' or 'local grid' 
    231 cn_snd_crt_grid   = 'T'                     !  'T' 
    232 !                                      ! receive 
    233 cn_rcv_w10m       = 'none'                  !  'none' 'coupled' 
    234 cn_rcv_taumod     = 'coupled'               !  'none' 'coupled' 
    235 cn_rcv_tau_nature = 'oce only'              !  'oce only' 'oce and ice' 'mixed oce-ice' 
    236 cn_rcv_tau_refere = 'cartesian'             !  'spherical' 'cartesian' 
    237 cn_rcv_tau_orient = 'eastward-northward'    !  'eastward-northward' or 'local grid' 
    238 cn_rcv_tau_grid   = 'U,V'                   !  'T' 'U,V' 'U,V,F' 'U,V,I' 'T,F' 'T,I' 'T,U,V' 
    239 cn_rcv_dqnsdt     = 'coupled'               !  'none' 'coupled' 
    240 cn_rcv_qsr        = 'oce and ice'           !  'conservative' 'oce and ice' 'mixed oce-ice' 
    241 cn_rcv_qns        = 'oce and ice'           !  'conservative' 'oce and ice' 'mixed oce-ice' 
    242 cn_rcv_emp        = 'conservative'          !  'conservative' 'oce and ice' 'mixed oce-ice' 
    243 cn_rcv_rnf        = 'coupled'               !  'coupled' 'climato' 'mixed' 
    244 cn_rcv_cal        = 'coupled'               !  'none' 'coupled' 
    245 / 
    246 !----------------------------------------------------------------------- 
    247 &namsbc_cpl_co2   !   coupled ocean/biogeo/atmosphere model             ("key_cpl_carbon_cycle") 
    248 !----------------------------------------------------------------------- 
    249    cn_snd_co2     = 'coupled'         ! send    : 'none' 'coupled' 
    250    cn_rcv_co2     = 'coupled'         ! receive : 'none' 'coupled' 
     223!                    !     description       !  multiple  !    vector   !      vector          ! vector ! 
     224!                    !                       ! categories !  reference  !    orientation       ! grids  ! 
     225! send 
     226sn_snd_temp   =       'weighted oce and ice' ,    'no'    ,     ''      ,         ''           ,   ''     
     227sn_snd_alb    =       'weighted ice'         ,    'no'    ,     ''      ,         ''           ,   ''     
     228sn_snd_thick  =       'none'                 ,    'no'   ,     ''      ,         ''           ,   ''     
     229sn_snd_crt    =       'none'                 ,    'no'    , 'spherical' , 'eastward-northward' ,  'T'        
     230sn_snd_co2    =       'coupled'              ,    'no'    ,     ''      ,         ''           ,   ''         
     231! receive 
     232sn_rcv_w10m   =       'none'                 ,    'no'    ,     ''      ,         ''          ,   ''     
     233sn_rcv_taumod =       'coupled'              ,    'no'    ,     ''      ,         ''          ,   ''     
     234sn_rcv_tau    =       'oce only'             ,    'no'    , 'cartesian' , 'eastward-northward',  'U,V'    
     235sn_rcv_dqnsdt =       'coupled'              ,    'no'    ,     ''      ,         ''          ,   ''     
     236sn_rcv_qsr    =       'oce and ice'          ,    'no'    ,     ''      ,         ''          ,   ''     
     237sn_rcv_qns    =       'oce and ice'          ,    'no'    ,     ''      ,         ''          ,   ''     
     238sn_rcv_emp    =       'conservative'         ,    'no'    ,     ''      ,         ''          ,   ''     
     239sn_rcv_rnf    =       'coupled'              ,    'no'    ,     ''      ,         ''          ,   ''     
     240sn_rcv_cal    =       'coupled'              ,    'no'    ,     ''      ,         ''          ,   ''     
     241sn_rcv_co2    =       'coupled'              ,    'no'    ,     ''      ,         ''          ,   ''     
    251242/ 
    252243!----------------------------------------------------------------------- 
     
    402393&nambdy        !  unstructured open boundaries                          ("key_bdy") 
    403394!----------------------------------------------------------------------- 
    404    cn_mask     =  ''                     !  name of mask file (ln_mask=T) 
    405    cn_dta_frs_T= 'bdydata_grid_T.nc'     !  name of data file (T-points) 
    406    cn_dta_frs_U= 'bdydata_grid_U.nc'     !  name of data file (U-points) 
    407    cn_dta_frs_V= 'bdydata_grid_V.nc'     !  name of data file (V-points) 
    408    cn_dta_fla_T= 'bdydata_bt_grid_T.nc'  !  name of data file for Flather condition (T-points) 
    409    cn_dta_fla_U= 'bdydata_bt_grid_U.nc'  !  name of data file for Flather condition (U-points) 
    410    cn_dta_fla_V= 'bdydata_bt_grid_V.nc'  !  name of data file for Flather condition (V-points) 
    411  
    412    ln_clim     = .false.   !  contain 1 (T) or 12 (F) time dumps and be cyclic 
    413    ln_vol      = .false.   !  total volume correction (see volbdy parameter) 
    414    ln_mask     = .false.   !  boundary mask from filbdy_mask (T), boundaries are on edges of domain (F) 
    415    ln_tides    = .false.   !  Apply tidal harmonic forcing with Flather condition 
    416    ln_dyn_fla  = .false.   !  Apply Flather condition to velocities 
    417    ln_tra_frs  = .false.   !  Apply FRS condition to temperature and salinity  
    418    ln_dyn_frs  = .false.   !  Apply FRS condition to velocities 
    419    nn_rimwidth =  9        !  width of the relaxation zone 
    420    nn_dtactl   =  1        !  = 0, bdy data are equal to the initial state 
     395    nb_bdy = 1                            !  number of open boundary sets        
     396    ln_coords_file = .true.               !  =T : read bdy coordinates from file 
     397    cn_coords_file = 'coordinates.bdy.nc' !  bdy coordinates files 
     398    ln_mask_file = .false.                !  =T : read mask from file 
     399    cn_mask_file = ''                     !  name of mask file (if ln_mask_file=.TRUE.) 
     400    nn_dyn2d      =  2                    !  boundary conditions for barotropic fields 
     401    nn_dyn2d_dta  =  3                    !  = 0, bdy data are equal to the initial state 
     402                                          !  = 1, bdy data are read in 'bdydata   .nc' files 
     403                                          !  = 2, use tidal harmonic forcing data from files 
     404                                          !  = 3, use external data AND tidal harmonic forcing 
     405    nn_dyn3d      =  0                    !  boundary conditions for baroclinic velocities 
     406    nn_dyn3d_dta  =  0                    !  = 0, bdy data are equal to the initial state 
    421407                           !  = 1, bdy data are read in 'bdydata   .nc' files 
    422    nn_volctl   =  0        !  = 0, the total water flux across open boundaries is zero 
    423                            !  = 1, the total volume of the system is conserved 
    424 / 
    425 !----------------------------------------------------------------------- 
    426 &nambdy_tide   !  tidal forcing at unstructured boundaries               
    427 !----------------------------------------------------------------------- 
    428    filtide     = 'bdytide_'           !  file name root of tidal forcing files 
    429    tide_cpt    = 'M2','S1'            !  names of tidal components used 
    430    tide_speed  = 28.984106, 15.000001 !  phase speeds of tidal components (deg/hour) 
    431    ln_tide_date= .false.              !  adjust tidal harmonics for start date of run 
    432 / 
    433  
     408    nn_tra        =  1                    !  boundary conditions for T and S 
     409    nn_tra_dta    =  1                    !  = 0, bdy data are equal to the initial state 
     410                           !  = 1, bdy data are read in 'bdydata   .nc' files 
     411    nn_rimwidth  = 10                      !  width of the relaxation zone 
     412    nn_dmp2d_in  = 0                      ! 
     413    nn_dmp2d_out = 0                      ! 
     414    nn_dmp2d_in  = 0                      ! 
     415    nn_dmp2d_out = 0                      ! 
     416    ln_vol     = .false.                  !  total volume correction (see nn_volctl parameter) 
     417    nn_volctl  = 1                        !  = 0, the total water flux across open boundaries is zero 
     418/ 
     419!----------------------------------------------------------------------- 
     420&nambdy_dta      !  open boundaries - external data           ("key_bdy") 
     421!----------------------------------------------------------------------- 
     422!              !   file name    ! frequency (hours) !  variable  ! time interpol. !  clim   ! 'yearly'/ ! weights  ! rotation ! 
     423!              !                !  (if <0  months)  !    name    !    (logical)   !  (T/F)  ! 'monthly' ! filename ! pairing  ! 
     424   bn_ssh =     'amm12_bdyT_u2d' ,         24        , 'sossheig' ,     .true.     , .false. ,  'daily'  ,    ''    ,   '' 
     425   bn_u2d =     'amm12_bdyU_u2d' ,         24        , 'vobtcrtx' ,     .true.     , .false. ,  'daily'  ,    ''    ,   '' 
     426   bn_v2d =     'amm12_bdyV_u2d' ,         24        , 'vobtcrty' ,     .true.     , .false. ,  'daily'  ,    ''    ,   '' 
     427   bn_u3d  =    'amm12_bdyU_u3d' ,         24        , 'vozocrtx' ,     .true.     , .false. ,  'daily'  ,    ''    ,   '' 
     428   bn_v3d  =    'amm12_bdyV_u3d' ,         24        , 'vomecrty' ,     .true.     , .false. ,  'daily'  ,    ''    ,   '' 
     429   bn_tem  =    'amm12_bdyT_tra' ,         24        , 'votemper' ,     .true.     , .false. ,  'daily'  ,    ''    ,   '' 
     430   bn_sal  =    'amm12_bdyT_tra' ,         24        , 'vosaline' ,     .true.     , .false. ,  'daily'  ,    ''    ,   '' 
     431   cn_dir  =    'bdydta/' 
     432   ln_full_vel = .false. 
     433/ 
     434!----------------------------------------------------------------------- 
     435&nambdy_tide     ! tidal forcing at open boundaries               
     436!----------------------------------------------------------------------- 
     437   filtide      = 'bdydta/amm12_bdytide_'         !  file name root of tidal forcing files 
     438    tide_cpt(1)   ='Q1'  !  names of tidal components used 
     439    tide_cpt(2)   ='O1'  !  names of tidal components used 
     440    tide_cpt(3)   ='P1'  !  names of tidal components used 
     441    tide_cpt(4)   ='S1'  !  names of tidal components used 
     442    tide_cpt(5)   ='K1'  !  names of tidal components used 
     443    tide_cpt(6)   ='2N2' !  names of tidal components used 
     444    tide_cpt(7)   ='MU2' !  names of tidal components used 
     445    tide_cpt(8)   ='N2'  !  names of tidal components used 
     446    tide_cpt(9)   ='NU2' !  names of tidal components used 
     447    tide_cpt(10)   ='M2'  !  names of tidal components used 
     448    tide_cpt(11)   ='L2'  !  names of tidal components used 
     449    tide_cpt(12)   ='T2'  !  names of tidal components used 
     450    tide_cpt(13)   ='S2'  !  names of tidal components used 
     451    tide_cpt(14)   ='K2'  !  names of tidal components used 
     452    tide_cpt(15)   ='M4'  !  names of tidal components used 
     453    tide_speed(1)   = 13.398661 !  phase speeds of tidal components (deg/hour) 
     454    tide_speed(2)   = 13.943036 !  phase speeds of tidal components (deg/hour) 
     455    tide_speed(3)   = 14.958932 !  phase speeds of tidal components (deg/hour) 
     456    tide_speed(4)   = 15.000001 !  phase speeds of tidal components (deg/hour) 
     457    tide_speed(5)   = 15.041069 !  phase speeds of tidal components (deg/hour) 
     458    tide_speed(6)   = 27.895355 !  phase speeds of tidal components (deg/hour) 
     459    tide_speed(7)   = 27.968210 !  phase speeds of tidal components (deg/hour) 
     460    tide_speed(8)   = 28.439730 !  phase speeds of tidal components (deg/hour) 
     461    tide_speed(9)   = 28.512585 !  phase speeds of tidal components (deg/hour) 
     462    tide_speed(10)   = 28.984106 !  phase speeds of tidal components (deg/hour) 
     463    tide_speed(11)   = 29.528479 !  phase speeds of tidal components (deg/hour) 
     464    tide_speed(12)   = 29.958935 !  phase speeds of tidal components (deg/hour) 
     465    tide_speed(13)   = 30.000002 !  phase speeds of tidal components (deg/hour) 
     466    tide_speed(14)   = 30.082138 !  phase speeds of tidal components (deg/hour) 
     467    tide_speed(15)   = 57.968212 !  phase speeds of tidal components (deg/hour) 
     468    ln_tide_date = .true.               !  adjust tidal harmonics for start date of run 
     469/ 
    434470!!====================================================================== 
    435471!!                 ***  Bottom boundary condition  *** 
     
    450486   ln_bfr2d    = .false.   !  horizontal variation of the bottom friction coef (read a 2D mask file ) 
    451487   rn_bfrien   =    50.    !  local multiplying factor of bfr (ln_bfr2d = .true.) 
     488   ln_bfrimp   = .true.    !  implicit bottom friction (requires ln_zdfexp = .false. if true) 
    452489/ 
    453490!----------------------------------------------------------------------- 
     
    496533   ln_traadv_muscl2 =  .false.  !  MUSCL2 scheme + cen2 at boundaries   
    497534   ln_traadv_ubs    =  .false.  !  UBS scheme                  
    498    ln_traadv_qck    =  .false.  !  QUCIKEST scheme                  
     535   ln_traadv_qck    =  .false.  !  QUICKEST scheme                  
    499536/ 
    500537!----------------------------------------------------------------------- 
     
    508545   ln_traldf_hor    =  .false.  !  horizontal (geopotential)            (require "key_ldfslp" when ln_sco=T) 
    509546   ln_traldf_iso    =  .true.   !  iso-neutral                          (require "key_ldfslp") 
    510    ln_traldf_grif   =  .false.  !  griffies skew flux formulation       (require "key_ldfslp")  ! UNDER TEST, DO NOT USE 
    511    ln_traldf_gdia   =  .false.  !  griffies operator strfn diagnostics  (require "key_ldfslp")  ! UNDER TEST, DO NOT USE 
     547   ln_traldf_grif   =  .false.  !  griffies skew flux formulation       (require "key_ldfslp") 
     548   ln_traldf_gdia   =  .false.  !  griffies operator strfn diagnostics  (require "key_ldfslp") 
     549   ln_triad_iso     =  .false.  !  griffies operator calculates triads twice => pure lateral mixing in ML (require "key_ldfslp") 
     550   ln_botmix_grif   =  .false.  !  griffies operator with lateral mixing on bottom (require "key_ldfslp") 
    512551   !                       !  Coefficient 
    513552   rn_aht_0         =  1000.    !  horizontal eddy diffusivity for tracers [m2/s] 
     
    562601   ln_hpg_zps  = .false.   !  z-coordinate - partial steps (interpolation) 
    563602   ln_hpg_sco  = .false.   !  s-coordinate (standard jacobian formulation) 
    564    ln_hpg_hel  = .false.   !  s-coordinate (helsinki modification) 
    565    ln_hpg_wdj  = .false.   !  s-coordinate (weighted density jacobian) 
    566603   ln_hpg_djc  = .false.   !  s-coordinate (Density Jacobian with Cubic polynomial) 
    567    ln_hpg_rot  = .false.   !  s-coordinate (ROTated axes scheme) 
    568    rn_gamma    = 0.e0      !  weighting coefficient (wdj scheme) 
     604   ln_hpg_prj  = .false.   !  s-coordinate (Pressure Jacobian scheme) 
    569605   ln_dynhpg_imp = .false. !  time stepping: semi-implicit time scheme  (T) 
    570606                                 !           centered      time scheme  (F) 
     
    735771                           !  buffer blocking send or immediate non-blocking sends, resp. 
    736772   nn_buffer   =   0       !  size in bytes of exported buffer ('B' case), 0 no exportation 
     773   ln_nnogather=  .false.  !  activate code to avoid mpi_allgather use at the northfold 
    737774   jpni        =   0       !  jpni   number of processors following i (set automatically if < 1)      
    738775   jpnj        =   0       !  jpnj   number of processors following j (set automatically if < 1)      
     
    926963   cn_dir_cdg  = './'  !  root directory for the location of drag coefficient files 
    927964/ 
     965!----------------------------------------------------------------------- 
     966&namdyn_nept  !   Neptune effect (simplified: lateral and vertical diffusions removed) 
     967!----------------------------------------------------------------------- 
     968   ! Suggested lengthscale values are those of Eby & Holloway (1994) for a coarse model 
     969   ln_neptsimp       = .false.  ! yes/no use simplified neptune 
     970 
     971   ln_smooth_neptvel = .false.  ! yes/no smooth zunep, zvnep 
     972   rn_tslse          =  1.2e4   ! value of lengthscale L at the equator 
     973   rn_tslsp          =  3.0e3   ! value of lengthscale L at the pole 
     974   ! Specify whether to ramp down the Neptune velocity in shallow 
     975   ! water, and if so the depth range controlling such ramping down 
     976   ln_neptramp       = .false.  ! ramp down Neptune velocity in shallow water 
     977   rn_htrmin         =  100.0   ! min. depth of transition range 
     978   rn_htrmax         =  200.0   ! max. depth of transition range 
     979/ 
  • branches/2011/dev_NEMO_MERGE_2011/NEMOGCM/CONFIG/ORCA2_LIM/EXP00/1_namelist

    r3104 r3116  
    33!! namelists    2 - Domain           (namzgr, namzgr_sco, namdom, namdta_tem, namdta_sal) 
    44!!              3 - Surface boundary (namsbc, namsbc_ana, namsbc_flx, namsbc_clio, namsbc_core 
    5 !!                                    namsbc_cpl, namsbc_cpl_co2 namtra_qsr, namsbc_rnf,  
     5!!                                    namsbc_cpl, namtra_qsr, namsbc_rnf,  
    66!!                                    namsbc_apr, namsbc_ssr, namsbc_alb) 
    77!!              4 - lateral boundary (namlbc, namcla, namobc, namagrif, nambdy, nambdy_tide) 
     
    121121!!   namsbc_core     CORE bulk formulea formulation 
    122122!!   namsbc_cpl      CouPLed            formulation                     ("key_coupled") 
    123 !!   namsbc_cpl_co2  coupled ocean/biogeo/atmosphere model              ("key_cpl_carbon_cycle") 
    124123!!   namtra_qsr      penetrative solar radiation 
    125124!!   namsbc_rnf      river runoffs 
     
    212211&namsbc_cpl    !   coupled ocean/atmosphere model                       ("key_coupled") 
    213212!----------------------------------------------------------------------- 
    214 !                                      ! send 
    215 cn_snd_temperature= 'weighted oce and ice'  !  'oce only' 'weighted oce and ice' 'mixed oce-ice' 
    216 cn_snd_albedo     = 'weighted ice'          !  'none' 'weighted ice' 'mixed oce-ice' 
    217 cn_snd_thickness  = 'none'                  !  'none' 'weighted ice and snow' 
    218 cn_snd_crt_nature = 'none'                  !  'none' 'oce only' 'weighted oce and ice' 'mixed oce-ice' 
    219 cn_snd_crt_refere = 'spherical'             !  'spherical' 'cartesian' 
    220 cn_snd_crt_orient = 'eastward-northward'    !  'eastward-northward' or 'local grid' 
    221 cn_snd_crt_grid   = 'T'                     !  'T' 
    222 !                                      ! receive 
    223 cn_rcv_w10m       = 'none'                  !  'none' 'coupled' 
    224 cn_rcv_taumod     = 'coupled'               !  'none' 'coupled' 
    225 cn_rcv_tau_nature = 'oce only'              !  'oce only' 'oce and ice' 'mixed oce-ice' 
    226 cn_rcv_tau_refere = 'cartesian'             !  'spherical' 'cartesian' 
    227 cn_rcv_tau_orient = 'eastward-northward'    !  'eastward-northward' or 'local grid' 
    228 cn_rcv_tau_grid   = 'U,V'                   !  'T' 'U,V' 'U,V,F' 'U,V,I' 'T,F' 'T,I' 'T,U,V' 
    229 cn_rcv_dqnsdt     = 'coupled'               !  'none' 'coupled' 
    230 cn_rcv_qsr        = 'oce and ice'           !  'conservative' 'oce and ice' 'mixed oce-ice' 
    231 cn_rcv_qns        = 'oce and ice'           !  'conservative' 'oce and ice' 'mixed oce-ice' 
    232 cn_rcv_emp        = 'conservative'          !  'conservative' 'oce and ice' 'mixed oce-ice' 
    233 cn_rcv_rnf        = 'coupled'               !  'coupled' 'climato' 'mixed' 
    234 cn_rcv_cal        = 'coupled'               !  'none' 'coupled' 
    235 / 
    236 !----------------------------------------------------------------------- 
    237 &namsbc_cpl_co2   !   coupled ocean/biogeo/atmosphere model             ("key_cpl_carbon_cycle") 
    238 !----------------------------------------------------------------------- 
    239    cn_snd_co2     = 'coupled'         ! send    : 'none' 'coupled' 
    240    cn_rcv_co2     = 'coupled'         ! receive : 'none' 'coupled' 
     213!                    !     description       !  multiple  !    vector   !      vector          ! vector ! 
     214!                    !                       ! categories !  reference  !    orientation       ! grids  ! 
     215! send 
     216sn_snd_temp   =       'weighted oce and ice' ,    'no'    ,     ''      ,         ''           ,   ''     
     217sn_snd_alb    =       'weighted ice'         ,    'no'    ,     ''      ,         ''           ,   ''     
     218sn_snd_thick  =       'none'                 ,    'no'   ,     ''      ,         ''           ,   ''     
     219sn_snd_crt    =       'none'                 ,    'no'    , 'spherical' , 'eastward-northward' ,  'T'        
     220sn_snd_co2    =       'coupled'              ,    'no'    ,     ''      ,         ''           ,   ''         
     221! receive 
     222sn_rcv_w10m   =       'none'                 ,    'no'    ,     ''      ,         ''          ,   ''     
     223sn_rcv_taumod =       'coupled'              ,    'no'    ,     ''      ,         ''          ,   ''     
     224sn_rcv_tau    =       'oce only'             ,    'no'    , 'cartesian' , 'eastward-northward',  'U,V'    
     225sn_rcv_dqnsdt =       'coupled'              ,    'no'    ,     ''      ,         ''          ,   ''     
     226sn_rcv_qsr    =       'oce and ice'          ,    'no'    ,     ''      ,         ''          ,   ''     
     227sn_rcv_qns    =       'oce and ice'          ,    'no'    ,     ''      ,         ''          ,   ''     
     228sn_rcv_emp    =       'conservative'         ,    'no'    ,     ''      ,         ''          ,   ''     
     229sn_rcv_rnf    =       'coupled'              ,    'no'    ,     ''      ,         ''          ,   ''     
     230sn_rcv_cal    =       'coupled'              ,    'no'    ,     ''      ,         ''          ,   ''     
     231sn_rcv_co2    =       'coupled'              ,    'no'    ,     ''      ,         ''          ,   ''     
    241232/ 
    242233!----------------------------------------------------------------------- 
     
    369360&nambdy        !  unstructured open boundaries                          ("key_bdy") 
    370361!----------------------------------------------------------------------- 
    371    cn_mask     =  ''                     !  name of mask file (ln_mask=T) 
    372    cn_dta_frs_T= 'bdydata_grid_T.nc'     !  name of data file (T-points) 
    373    cn_dta_frs_U= 'bdydata_grid_U.nc'     !  name of data file (U-points) 
    374    cn_dta_frs_V= 'bdydata_grid_V.nc'     !  name of data file (V-points) 
    375    cn_dta_fla_T= 'bdydata_bt_grid_T.nc'  !  name of data file for Flather condition (T-points) 
    376    cn_dta_fla_U= 'bdydata_bt_grid_U.nc'  !  name of data file for Flather condition (U-points) 
    377    cn_dta_fla_V= 'bdydata_bt_grid_V.nc'  !  name of data file for Flather condition (V-points) 
    378  
    379    ln_clim     = .false.   !  contain 1 (T) or 12 (F) time dumps and be cyclic 
    380    ln_vol      = .false.   !  total volume correction (see volbdy parameter) 
    381    ln_mask     = .false.   !  boundary mask from filbdy_mask (T), boundaries are on edges of domain (F) 
    382    ln_tides    = .false.   !  Apply tidal harmonic forcing with Flather condition 
    383    ln_dyn_fla  = .false.   !  Apply Flather condition to velocities 
    384    ln_tra_frs  = .false.   !  Apply FRS condition to temperature and salinity  
    385    ln_dyn_frs  = .false.   !  Apply FRS condition to velocities 
    386    nn_rimwidth =  9        !  width of the relaxation zone 
    387    nn_dtactl   =  1        !  = 0, bdy data are equal to the initial state 
     362    nb_bdy = 1                            !  number of open boundary sets        
     363    ln_coords_file = .true.               !  =T : read bdy coordinates from file 
     364    cn_coords_file = 'coordinates.bdy.nc' !  bdy coordinates files 
     365    ln_mask_file = .false.                !  =T : read mask from file 
     366    cn_mask_file = ''                     !  name of mask file (if ln_mask_file=.TRUE.) 
     367    nn_dyn2d      =  2                    !  boundary conditions for barotropic fields 
     368    nn_dyn2d_dta  =  3                    !  = 0, bdy data are equal to the initial state 
     369                                          !  = 1, bdy data are read in 'bdydata   .nc' files 
     370                                          !  = 2, use tidal harmonic forcing data from files 
     371                                          !  = 3, use external data AND tidal harmonic forcing 
     372    nn_dyn3d      =  0                    !  boundary conditions for baroclinic velocities 
     373    nn_dyn3d_dta  =  0                    !  = 0, bdy data are equal to the initial state 
    388374                           !  = 1, bdy data are read in 'bdydata   .nc' files 
    389    nn_volctl   =  0        !  = 0, the total water flux across open boundaries is zero 
    390                            !  = 1, the total volume of the system is conserved 
    391 / 
    392 !----------------------------------------------------------------------- 
    393 &nambdy_tide   !  tidal forcing at unstructured boundaries               
    394 !----------------------------------------------------------------------- 
    395    filtide     = 'bdytide_'           !  file name root of tidal forcing files 
    396    tide_cpt    = 'M2','S1'            !  names of tidal components used 
    397    tide_speed  = 28.984106, 15.000001 !  phase speeds of tidal components (deg/hour) 
    398    ln_tide_date= .false.              !  adjust tidal harmonics for start date of run 
    399 / 
    400  
     375    nn_tra        =  1                    !  boundary conditions for T and S 
     376    nn_tra_dta    =  1                    !  = 0, bdy data are equal to the initial state 
     377                           !  = 1, bdy data are read in 'bdydata   .nc' files 
     378    nn_rimwidth  = 10                      !  width of the relaxation zone 
     379    nn_dmp2d_in  = 0                      ! 
     380    nn_dmp2d_out = 0                      ! 
     381    nn_dmp2d_in  = 0                      ! 
     382    nn_dmp2d_out = 0                      ! 
     383    ln_vol     = .false.                  !  total volume correction (see nn_volctl parameter) 
     384    nn_volctl  = 1                        !  = 0, the total water flux across open boundaries is zero 
     385/ 
     386!----------------------------------------------------------------------- 
     387&nambdy_dta      !  open boundaries - external data           ("key_bdy") 
     388!----------------------------------------------------------------------- 
     389!              !   file name    ! frequency (hours) !  variable  ! time interpol. !  clim   ! 'yearly'/ ! weights  ! rotation ! 
     390!              !                !  (if <0  months)  !    name    !    (logical)   !  (T/F)  ! 'monthly' ! filename ! pairing  ! 
     391   bn_ssh =     'amm12_bdyT_u2d' ,         24        , 'sossheig' ,     .true.     , .false. ,  'daily'  ,    ''    ,   '' 
     392   bn_u2d =     'amm12_bdyU_u2d' ,         24        , 'vobtcrtx' ,     .true.     , .false. ,  'daily'  ,    ''    ,   '' 
     393   bn_v2d =     'amm12_bdyV_u2d' ,         24        , 'vobtcrty' ,     .true.     , .false. ,  'daily'  ,    ''    ,   '' 
     394   bn_u3d  =    'amm12_bdyU_u3d' ,         24        , 'vozocrtx' ,     .true.     , .false. ,  'daily'  ,    ''    ,   '' 
     395   bn_v3d  =    'amm12_bdyV_u3d' ,         24        , 'vomecrty' ,     .true.     , .false. ,  'daily'  ,    ''    ,   '' 
     396   bn_tem  =    'amm12_bdyT_tra' ,         24        , 'votemper' ,     .true.     , .false. ,  'daily'  ,    ''    ,   '' 
     397   bn_sal  =    'amm12_bdyT_tra' ,         24        , 'vosaline' ,     .true.     , .false. ,  'daily'  ,    ''    ,   '' 
     398   cn_dir  =    'bdydta/' 
     399   ln_full_vel = .false. 
     400/ 
     401!----------------------------------------------------------------------- 
     402&nambdy_tide     ! tidal forcing at open boundaries               
     403!----------------------------------------------------------------------- 
     404   filtide      = 'bdydta/amm12_bdytide_'         !  file name root of tidal forcing files 
     405    tide_cpt(1)   ='Q1'  !  names of tidal components used 
     406    tide_cpt(2)   ='O1'  !  names of tidal components used 
     407    tide_cpt(3)   ='P1'  !  names of tidal components used 
     408    tide_cpt(4)   ='S1'  !  names of tidal components used 
     409    tide_cpt(5)   ='K1'  !  names of tidal components used 
     410    tide_cpt(6)   ='2N2' !  names of tidal components used 
     411    tide_cpt(7)   ='MU2' !  names of tidal components used 
     412    tide_cpt(8)   ='N2'  !  names of tidal components used 
     413    tide_cpt(9)   ='NU2' !  names of tidal components used 
     414    tide_cpt(10)   ='M2'  !  names of tidal components used 
     415    tide_cpt(11)   ='L2'  !  names of tidal components used 
     416    tide_cpt(12)   ='T2'  !  names of tidal components used 
     417    tide_cpt(13)   ='S2'  !  names of tidal components used 
     418    tide_cpt(14)   ='K2'  !  names of tidal components used 
     419    tide_cpt(15)   ='M4'  !  names of tidal components used 
     420    tide_speed(1)   = 13.398661 !  phase speeds of tidal components (deg/hour) 
     421    tide_speed(2)   = 13.943036 !  phase speeds of tidal components (deg/hour) 
     422    tide_speed(3)   = 14.958932 !  phase speeds of tidal components (deg/hour) 
     423    tide_speed(4)   = 15.000001 !  phase speeds of tidal components (deg/hour) 
     424    tide_speed(5)   = 15.041069 !  phase speeds of tidal components (deg/hour) 
     425    tide_speed(6)   = 27.895355 !  phase speeds of tidal components (deg/hour) 
     426    tide_speed(7)   = 27.968210 !  phase speeds of tidal components (deg/hour) 
     427    tide_speed(8)   = 28.439730 !  phase speeds of tidal components (deg/hour) 
     428    tide_speed(9)   = 28.512585 !  phase speeds of tidal components (deg/hour) 
     429    tide_speed(10)   = 28.984106 !  phase speeds of tidal components (deg/hour) 
     430    tide_speed(11)   = 29.528479 !  phase speeds of tidal components (deg/hour) 
     431    tide_speed(12)   = 29.958935 !  phase speeds of tidal components (deg/hour) 
     432    tide_speed(13)   = 30.000002 !  phase speeds of tidal components (deg/hour) 
     433    tide_speed(14)   = 30.082138 !  phase speeds of tidal components (deg/hour) 
     434    tide_speed(15)   = 57.968212 !  phase speeds of tidal components (deg/hour) 
     435    ln_tide_date = .true.               !  adjust tidal harmonics for start date of run 
     436/ 
    401437!!====================================================================== 
    402438!!                 ***  Bottom boundary condition  *** 
     
    417453   ln_bfr2d    = .false.   !  horizontal variation of the bottom friction coef (read a 2D mask file ) 
    418454   rn_bfrien   =    50.    !  local multiplying factor of bfr (ln_bfr2d=T) 
     455   ln_bfrimp   = .true.    !  implicit bottom friction (requires ln_zdfexp = .false. if true) 
    419456/ 
    420457!----------------------------------------------------------------------- 
     
    528565   ln_hpg_zps  = .true.    !  z-coordinate - partial steps (interpolation) 
    529566   ln_hpg_sco  = .false.   !  s-coordinate (standard jacobian formulation) 
    530    ln_hpg_hel  = .false.   !  s-coordinate (helsinki modification) 
    531    ln_hpg_wdj  = .false.   !  s-coordinate (weighted density jacobian) 
    532567   ln_hpg_djc  = .false.   !  s-coordinate (Density Jacobian with Cubic polynomial) 
    533    ln_hpg_rot  = .false.   !  s-coordinate (ROTated axes scheme) 
    534    rn_gamma    = 0.e0      !  weighting coefficient (wdj scheme) 
     568   ln_hpg_prj  = .false.   !  s-coordinate (Pressure Jacobian scheme) 
    535569   ln_dynhpg_imp = .false. !  time stepping: semi-implicit time scheme  (T) 
    536570                                 !           centered      time scheme  (F) 
  • branches/2011/dev_NEMO_MERGE_2011/NEMOGCM/CONFIG/ORCA2_LIM/EXP00/namelist

    r3105 r3116  
    33!! namelists    2 - Domain           (namzgr, namzgr_sco, namdom, namtsd) 
    44!!              3 - Surface boundary (namsbc, namsbc_ana, namsbc_flx, namsbc_clio, namsbc_core 
    5 !!                                    namsbc_cpl, namsbc_cpl_co2 namtra_qsr, namsbc_rnf,  
     5!!                                    namsbc_cpl, namtra_qsr, namsbc_rnf,  
    66!!                                    namsbc_apr, namsbc_ssr, namsbc_alb) 
    77!!              4 - lateral boundary (namlbc, namcla, namobc, namagrif, nambdy, nambdy_tide) 
     
    114114!!   namsbc_mfs      MFS  bulk formulae formulation 
    115115!!   namsbc_cpl      CouPLed            formulation                     ("key_coupled") 
    116 !!   namsbc_cpl_co2  coupled ocean/biogeo/atmosphere model              ("key_cpl_carbon_cycle") 
    117116!!   namtra_qsr      penetrative solar radiation 
    118117!!   namsbc_rnf      river runoffs 
     
    222221&namsbc_cpl    !   coupled ocean/atmosphere model                       ("key_coupled") 
    223222!----------------------------------------------------------------------- 
    224 !                                      ! send 
    225 cn_snd_temperature= 'weighted oce and ice'  !  'oce only' 'weighted oce and ice' 'mixed oce-ice' 
    226 cn_snd_albedo     = 'weighted ice'          !  'none' 'weighted ice' 'mixed oce-ice' 
    227 cn_snd_thickness  = 'none'                  !  'none' 'weighted ice and snow' 
    228 cn_snd_crt_nature = 'none'                  !  'none' 'oce only' 'weighted oce and ice' 'mixed oce-ice' 
    229 cn_snd_crt_refere = 'spherical'             !  'spherical' 'cartesian' 
    230 cn_snd_crt_orient = 'eastward-northward'    !  'eastward-northward' or 'local grid' 
    231 cn_snd_crt_grid   = 'T'                     !  'T' 
    232 !                                      ! receive 
    233 cn_rcv_w10m       = 'none'                  !  'none' 'coupled' 
    234 cn_rcv_taumod     = 'coupled'               !  'none' 'coupled' 
    235 cn_rcv_tau_nature = 'oce only'              !  'oce only' 'oce and ice' 'mixed oce-ice' 
    236 cn_rcv_tau_refere = 'cartesian'             !  'spherical' 'cartesian' 
    237 cn_rcv_tau_orient = 'eastward-northward'    !  'eastward-northward' or 'local grid' 
    238 cn_rcv_tau_grid   = 'U,V'                   !  'T' 'U,V' 'U,V,F' 'U,V,I' 'T,F' 'T,I' 'T,U,V' 
    239 cn_rcv_dqnsdt     = 'coupled'               !  'none' 'coupled' 
    240 cn_rcv_qsr        = 'oce and ice'           !  'conservative' 'oce and ice' 'mixed oce-ice' 
    241 cn_rcv_qns        = 'oce and ice'           !  'conservative' 'oce and ice' 'mixed oce-ice' 
    242 cn_rcv_emp        = 'conservative'          !  'conservative' 'oce and ice' 'mixed oce-ice' 
    243 cn_rcv_rnf        = 'coupled'               !  'coupled' 'climato' 'mixed' 
    244 cn_rcv_cal        = 'coupled'               !  'none' 'coupled' 
    245 / 
    246 !----------------------------------------------------------------------- 
    247 &namsbc_cpl_co2   !   coupled ocean/biogeo/atmosphere model             ("key_cpl_carbon_cycle") 
    248 !----------------------------------------------------------------------- 
    249    cn_snd_co2     = 'coupled'         ! send    : 'none' 'coupled' 
    250    cn_rcv_co2     = 'coupled'         ! receive : 'none' 'coupled' 
     223!                    !     description       !  multiple  !    vector   !      vector          ! vector ! 
     224!                    !                       ! categories !  reference  !    orientation       ! grids  ! 
     225! send 
     226sn_snd_temp   =       'weighted oce and ice' ,    'no'    ,     ''      ,         ''           ,   ''     
     227sn_snd_alb    =       'weighted ice'         ,    'no'    ,     ''      ,         ''           ,   ''     
     228sn_snd_thick  =       'none'                 ,    'no'   ,     ''      ,         ''           ,   ''     
     229sn_snd_crt    =       'none'                 ,    'no'    , 'spherical' , 'eastward-northward' ,  'T'        
     230sn_snd_co2    =       'coupled'              ,    'no'    ,     ''      ,         ''           ,   ''         
     231! receive 
     232sn_rcv_w10m   =       'none'                 ,    'no'    ,     ''      ,         ''          ,   ''     
     233sn_rcv_taumod =       'coupled'              ,    'no'    ,     ''      ,         ''          ,   ''     
     234sn_rcv_tau    =       'oce only'             ,    'no'    , 'cartesian' , 'eastward-northward',  'U,V'    
     235sn_rcv_dqnsdt =       'coupled'              ,    'no'    ,     ''      ,         ''          ,   ''     
     236sn_rcv_qsr    =       'oce and ice'          ,    'no'    ,     ''      ,         ''          ,   ''     
     237sn_rcv_qns    =       'oce and ice'          ,    'no'    ,     ''      ,         ''          ,   ''     
     238sn_rcv_emp    =       'conservative'         ,    'no'    ,     ''      ,         ''          ,   ''     
     239sn_rcv_rnf    =       'coupled'              ,    'no'    ,     ''      ,         ''          ,   ''     
     240sn_rcv_cal    =       'coupled'              ,    'no'    ,     ''      ,         ''          ,   ''     
     241sn_rcv_co2    =       'coupled'              ,    'no'    ,     ''      ,         ''          ,   ''     
    251242/ 
    252243!----------------------------------------------------------------------- 
     
    397388&nambdy        !  unstructured open boundaries                          ("key_bdy") 
    398389!----------------------------------------------------------------------- 
    399    cn_mask     =  ''                     !  name of mask file (ln_mask=T) 
    400    cn_dta_frs_T= 'bdydata_grid_T.nc'     !  name of data file (T-points) 
    401    cn_dta_frs_U= 'bdydata_grid_U.nc'     !  name of data file (U-points) 
    402    cn_dta_frs_V= 'bdydata_grid_V.nc'     !  name of data file (V-points) 
    403    cn_dta_fla_T= 'bdydata_bt_grid_T.nc'  !  name of data file for Flather condition (T-points) 
    404    cn_dta_fla_U= 'bdydata_bt_grid_U.nc'  !  name of data file for Flather condition (U-points) 
    405    cn_dta_fla_V= 'bdydata_bt_grid_V.nc'  !  name of data file for Flather condition (V-points) 
    406  
    407    ln_clim     = .false.   !  contain 1 (T) or 12 (F) time dumps and be cyclic 
    408    ln_vol      = .false.   !  total volume correction (see volbdy parameter) 
    409    ln_mask     = .false.   !  boundary mask from filbdy_mask (T), boundaries are on edges of domain (F) 
    410    ln_tides    = .false.   !  Apply tidal harmonic forcing with Flather condition 
    411    ln_dyn_fla  = .false.   !  Apply Flather condition to velocities 
    412    ln_tra_frs  = .false.   !  Apply FRS condition to temperature and salinity  
    413    ln_dyn_frs  = .false.   !  Apply FRS condition to velocities 
    414    nn_rimwidth =  9        !  width of the relaxation zone 
    415    nn_dtactl   =  1        !  = 0, bdy data are equal to the initial state 
     390    nb_bdy = 1                            !  number of open boundary sets        
     391    ln_coords_file = .true.               !  =T : read bdy coordinates from file 
     392    cn_coords_file = 'coordinates.bdy.nc' !  bdy coordinates files 
     393    ln_mask_file = .false.                !  =T : read mask from file 
     394    cn_mask_file = ''                     !  name of mask file (if ln_mask_file=.TRUE.) 
     395    nn_dyn2d      =  2                    !  boundary conditions for barotropic fields 
     396    nn_dyn2d_dta  =  3                    !  = 0, bdy data are equal to the initial state 
     397                                          !  = 1, bdy data are read in 'bdydata   .nc' files 
     398                                          !  = 2, use tidal harmonic forcing data from files 
     399                                          !  = 3, use external data AND tidal harmonic forcing 
     400    nn_dyn3d      =  0                    !  boundary conditions for baroclinic velocities 
     401    nn_dyn3d_dta  =  0                    !  = 0, bdy data are equal to the initial state 
    416402                           !  = 1, bdy data are read in 'bdydata   .nc' files 
    417    nn_volctl   =  0        !  = 0, the total water flux across open boundaries is zero 
    418                            !  = 1, the total volume of the system is conserved 
    419 / 
    420 !----------------------------------------------------------------------- 
    421 &nambdy_tide   !  tidal forcing at unstructured boundaries               
    422 !----------------------------------------------------------------------- 
    423    filtide     = 'bdytide_'           !  file name root of tidal forcing files 
    424    tide_cpt    = 'M2','S1'            !  names of tidal components used 
    425    tide_speed  = 28.984106, 15.000001 !  phase speeds of tidal components (deg/hour) 
    426    ln_tide_date= .false.              !  adjust tidal harmonics for start date of run 
    427 / 
    428  
     403    nn_tra        =  1                    !  boundary conditions for T and S 
     404    nn_tra_dta    =  1                    !  = 0, bdy data are equal to the initial state 
     405                           !  = 1, bdy data are read in 'bdydata   .nc' files 
     406    nn_rimwidth  = 10                      !  width of the relaxation zone 
     407    nn_dmp2d_in  = 0                      ! 
     408    nn_dmp2d_out = 0                      ! 
     409    nn_dmp2d_in  = 0                      ! 
     410    nn_dmp2d_out = 0                      ! 
     411    ln_vol     = .false.                  !  total volume correction (see nn_volctl parameter) 
     412    nn_volctl  = 1                        !  = 0, the total water flux across open boundaries is zero 
     413/ 
     414!----------------------------------------------------------------------- 
     415&nambdy_dta      !  open boundaries - external data           ("key_bdy") 
     416!----------------------------------------------------------------------- 
     417!              !   file name    ! frequency (hours) !  variable  ! time interpol. !  clim   ! 'yearly'/ ! weights  ! rotation ! 
     418!              !                !  (if <0  months)  !    name    !    (logical)   !  (T/F)  ! 'monthly' ! filename ! pairing  ! 
     419   bn_ssh =     'amm12_bdyT_u2d' ,         24        , 'sossheig' ,     .true.     , .false. ,  'daily'  ,    ''    ,   '' 
     420   bn_u2d =     'amm12_bdyU_u2d' ,         24        , 'vobtcrtx' ,     .true.     , .false. ,  'daily'  ,    ''    ,   '' 
     421   bn_v2d =     'amm12_bdyV_u2d' ,         24        , 'vobtcrty' ,     .true.     , .false. ,  'daily'  ,    ''    ,   '' 
     422   bn_u3d  =    'amm12_bdyU_u3d' ,         24        , 'vozocrtx' ,     .true.     , .false. ,  'daily'  ,    ''    ,   '' 
     423   bn_v3d  =    'amm12_bdyV_u3d' ,         24        , 'vomecrty' ,     .true.     , .false. ,  'daily'  ,    ''    ,   '' 
     424   bn_tem  =    'amm12_bdyT_tra' ,         24        , 'votemper' ,     .true.     , .false. ,  'daily'  ,    ''    ,   '' 
     425   bn_sal  =    'amm12_bdyT_tra' ,         24        , 'vosaline' ,     .true.     , .false. ,  'daily'  ,    ''    ,   '' 
     426   cn_dir  =    'bdydta/' 
     427   ln_full_vel = .false. 
     428/ 
     429!----------------------------------------------------------------------- 
     430&nambdy_tide     ! tidal forcing at open boundaries               
     431!----------------------------------------------------------------------- 
     432   filtide      = 'bdydta/amm12_bdytide_'         !  file name root of tidal forcing files 
     433    tide_cpt(1)   ='Q1'  !  names of tidal components used 
     434    tide_cpt(2)   ='O1'  !  names of tidal components used 
     435    tide_cpt(3)   ='P1'  !  names of tidal components used 
     436    tide_cpt(4)   ='S1'  !  names of tidal components used 
     437    tide_cpt(5)   ='K1'  !  names of tidal components used 
     438    tide_cpt(6)   ='2N2' !  names of tidal components used 
     439    tide_cpt(7)   ='MU2' !  names of tidal components used 
     440    tide_cpt(8)   ='N2'  !  names of tidal components used 
     441    tide_cpt(9)   ='NU2' !  names of tidal components used 
     442    tide_cpt(10)   ='M2'  !  names of tidal components used 
     443    tide_cpt(11)   ='L2'  !  names of tidal components used 
     444    tide_cpt(12)   ='T2'  !  names of tidal components used 
     445    tide_cpt(13)   ='S2'  !  names of tidal components used 
     446    tide_cpt(14)   ='K2'  !  names of tidal components used 
     447    tide_cpt(15)   ='M4'  !  names of tidal components used 
     448    tide_speed(1)   = 13.398661 !  phase speeds of tidal components (deg/hour) 
     449    tide_speed(2)   = 13.943036 !  phase speeds of tidal components (deg/hour) 
     450    tide_speed(3)   = 14.958932 !  phase speeds of tidal components (deg/hour) 
     451    tide_speed(4)   = 15.000001 !  phase speeds of tidal components (deg/hour) 
     452    tide_speed(5)   = 15.041069 !  phase speeds of tidal components (deg/hour) 
     453    tide_speed(6)   = 27.895355 !  phase speeds of tidal components (deg/hour) 
     454    tide_speed(7)   = 27.968210 !  phase speeds of tidal components (deg/hour) 
     455    tide_speed(8)   = 28.439730 !  phase speeds of tidal components (deg/hour) 
     456    tide_speed(9)   = 28.512585 !  phase speeds of tidal components (deg/hour) 
     457    tide_speed(10)   = 28.984106 !  phase speeds of tidal components (deg/hour) 
     458    tide_speed(11)   = 29.528479 !  phase speeds of tidal components (deg/hour) 
     459    tide_speed(12)   = 29.958935 !  phase speeds of tidal components (deg/hour) 
     460    tide_speed(13)   = 30.000002 !  phase speeds of tidal components (deg/hour) 
     461    tide_speed(14)   = 30.082138 !  phase speeds of tidal components (deg/hour) 
     462    tide_speed(15)   = 57.968212 !  phase speeds of tidal components (deg/hour) 
     463    ln_tide_date = .true.               !  adjust tidal harmonics for start date of run 
     464/ 
    429465!!====================================================================== 
    430466!!                 ***  Bottom boundary condition  *** 
     
    445481   ln_bfr2d    = .false.   !  horizontal variation of the bottom friction coef (read a 2D mask file ) 
    446482   rn_bfrien   =    50.    !  local multiplying factor of bfr (ln_bfr2d=T) 
     483   ln_bfrimp   = .true.    !  implicit bottom friction (requires ln_zdfexp = .false. if true) 
    447484/ 
    448485!----------------------------------------------------------------------- 
     
    491528   ln_traadv_muscl2 =  .false.  !  MUSCL2 scheme + cen2 at boundaries   
    492529   ln_traadv_ubs    =  .false.  !  UBS scheme                  
    493    ln_traadv_qck    =  .false.  !  QUCIKEST scheme                  
     530   ln_traadv_qck    =  .false.  !  QUICKEST scheme                  
    494531/ 
    495532!----------------------------------------------------------------------- 
     
    503540   ln_traldf_hor    =  .false.  !  horizontal (geopotential)            (require "key_ldfslp" when ln_sco=T) 
    504541   ln_traldf_iso    =  .true.   !  iso-neutral                          (require "key_ldfslp") 
    505    ln_traldf_grif   =  .false.  !  griffies skew flux formulation       (require "key_ldfslp")  ! UNDER TEST, DO NOT USE 
    506    ln_traldf_gdia   =  .false.  !  griffies operator strfn diagnostics  (require "key_ldfslp")  ! UNDER TEST, DO NOT USE 
    507    !                       !  Coefficient 
     542   ln_traldf_grif   =  .false.  !  griffies skew flux formulation       (require "key_ldfslp") 
     543   ln_traldf_gdia   =  .false.  !  griffies operator strfn diagnostics  (require "key_ldfslp") 
     544   ln_triad_iso     =  .false.  !  griffies operator calculates triads twice => pure lateral mixing in ML (require "key_ldfslp") 
     545   ln_botmix_grif   =  .false.  !  griffies operator with lateral mixing on bottom (require "key_ldfslp") 
     546                         !  Coefficient 
    508547   rn_aht_0         =  2000.    !  horizontal eddy diffusivity for tracers [m2/s] 
    509548   rn_ahtb_0        =     0.    !  background eddy diffusivity for ldf_iso [m2/s] 
     
    557596   ln_hpg_zps  = .true.    !  z-coordinate - partial steps (interpolation) 
    558597   ln_hpg_sco  = .false.   !  s-coordinate (standard jacobian formulation) 
    559    ln_hpg_hel  = .false.   !  s-coordinate (helsinki modification) 
    560    ln_hpg_wdj  = .false.   !  s-coordinate (weighted density jacobian) 
    561598   ln_hpg_djc  = .false.   !  s-coordinate (Density Jacobian with Cubic polynomial) 
    562    ln_hpg_rot  = .false.   !  s-coordinate (ROTated axes scheme) 
    563    rn_gamma    = 0.e0      !  weighting coefficient (wdj scheme) 
     599   ln_hpg_prj  = .false.   !  s-coordinate (Pressure Jacobian scheme) 
    564600   ln_dynhpg_imp = .false. !  time stepping: semi-implicit time scheme  (T) 
    565601                                 !           centered      time scheme  (F) 
     
    730766                           !  buffer blocking send or immediate non-blocking sends, resp. 
    731767   nn_buffer   =   0       !  size in bytes of exported buffer ('B' case), 0 no exportation 
     768   ln_nnogather=  .false.  !  activate code to avoid mpi_allgather use at the northfold 
    732769   jpni        =   0       !  jpni   number of processors following i (set automatically if < 1) 
    733770   jpnj        =   0       !  jpnj   number of processors following j (set automatically if < 1) 
     
    931968   cn_dir_cdg  = './'  !  root directory for the location of drag coefficient files 
    932969/ 
     970!----------------------------------------------------------------------- 
     971&namdyn_nept  !   Neptune effect (simplified: lateral and vertical diffusions removed) 
     972!----------------------------------------------------------------------- 
     973   ! Suggested lengthscale values are those of Eby & Holloway (1994) for a coarse model 
     974   ln_neptsimp       = .false.  ! yes/no use simplified neptune 
     975 
     976   ln_smooth_neptvel = .false.  ! yes/no smooth zunep, zvnep 
     977   rn_tslse          =  1.2e4   ! value of lengthscale L at the equator 
     978   rn_tslsp          =  3.0e3   ! value of lengthscale L at the pole 
     979   ! Specify whether to ramp down the Neptune velocity in shallow 
     980   ! water, and if so the depth range controlling such ramping down 
     981   ln_neptramp       = .true.   ! ramp down Neptune velocity in shallow water 
     982   rn_htrmin         =  100.0   ! min. depth of transition range 
     983   rn_htrmax         =  200.0   ! max. depth of transition range 
     984/ 
     985>>>>>>> .merge-right.r3114 
  • branches/2011/dev_NEMO_MERGE_2011/NEMOGCM/CONFIG/ORCA2_OFF_PISCES/EXP00/namelist

    r3105 r3116  
    33!! namelists    2 - Domain           (namzgr, namzgr_sco, namdom, namtsd) 
    44!!              3 - Surface boundary (namsbc, namsbc_ana, namsbc_flx, namsbc_clio, namsbc_core 
    5 !!                                    namsbc_cpl, namsbc_cpl_co2 namtra_qsr, namsbc_rnf,  
     5!!                                    namsbc_cpl, namtra_qsr, namsbc_rnf,  
    66!!                                    namsbc_apr, namsbc_ssr, namsbc_alb) 
    77!!              4 - lateral boundary (namlbc, namcla, namobc, namagrif, nambdy, nambdy_tide) 
     
    114114!!   namsbc_mfs      MFS  bulk formulae formulation 
    115115!!   namsbc_cpl      CouPLed            formulation                     ("key_coupled") 
    116 !!   namsbc_cpl_co2  coupled ocean/biogeo/atmosphere model              ("key_cpl_carbon_cycle") 
    117116!!   namtra_qsr      penetrative solar radiation 
    118117!!   namsbc_rnf      river runoffs 
     
    222221&namsbc_cpl    !   coupled ocean/atmosphere model                       ("key_coupled") 
    223222!----------------------------------------------------------------------- 
    224 !                                      ! send 
    225 cn_snd_temperature= 'weighted oce and ice'  !  'oce only' 'weighted oce and ice' 'mixed oce-ice' 
    226 cn_snd_albedo     = 'weighted ice'          !  'none' 'weighted ice' 'mixed oce-ice' 
    227 cn_snd_thickness  = 'none'                  !  'none' 'weighted ice and snow' 
    228 cn_snd_crt_nature = 'none'                  !  'none' 'oce only' 'weighted oce and ice' 'mixed oce-ice' 
    229 cn_snd_crt_refere = 'spherical'             !  'spherical' 'cartesian' 
    230 cn_snd_crt_orient = 'eastward-northward'    !  'eastward-northward' or 'local grid' 
    231 cn_snd_crt_grid   = 'T'                     !  'T' 
    232 !                                      ! receive 
    233 cn_rcv_w10m       = 'none'                  !  'none' 'coupled' 
    234 cn_rcv_taumod     = 'coupled'               !  'none' 'coupled' 
    235 cn_rcv_tau_nature = 'oce only'              !  'oce only' 'oce and ice' 'mixed oce-ice' 
    236 cn_rcv_tau_refere = 'cartesian'             !  'spherical' 'cartesian' 
    237 cn_rcv_tau_orient = 'eastward-northward'    !  'eastward-northward' or 'local grid' 
    238 cn_rcv_tau_grid   = 'U,V'                   !  'T' 'U,V' 'U,V,F' 'U,V,I' 'T,F' 'T,I' 'T,U,V' 
    239 cn_rcv_dqnsdt     = 'coupled'               !  'none' 'coupled' 
    240 cn_rcv_qsr        = 'oce and ice'           !  'conservative' 'oce and ice' 'mixed oce-ice' 
    241 cn_rcv_qns        = 'oce and ice'           !  'conservative' 'oce and ice' 'mixed oce-ice' 
    242 cn_rcv_emp        = 'conservative'          !  'conservative' 'oce and ice' 'mixed oce-ice' 
    243 cn_rcv_rnf        = 'coupled'               !  'coupled' 'climato' 'mixed' 
    244 cn_rcv_cal        = 'coupled'               !  'none' 'coupled' 
    245 / 
    246 !----------------------------------------------------------------------- 
    247 &namsbc_cpl_co2   !   coupled ocean/biogeo/atmosphere model             ("key_cpl_carbon_cycle") 
    248 !----------------------------------------------------------------------- 
    249    cn_snd_co2     = 'coupled'         ! send    : 'none' 'coupled' 
    250    cn_rcv_co2     = 'coupled'         ! receive : 'none' 'coupled' 
    251 / 
    252 !----------------------------------------------------------------------- 
     223!                    !     description       !  multiple  !    vector   !      vector          ! vector ! 
     224!                    !                       ! categories !  reference  !    orientation       ! grids  ! 
     225! send 
     226sn_snd_temp   =       'weighted oce and ice' ,    'no'    ,     ''      ,         ''           ,   ''     
     227sn_snd_alb    =       'weighted ice'         ,    'no'    ,     ''      ,         ''           ,   ''     
     228sn_snd_thick  =       'none'                 ,    'no'   ,     ''      ,         ''           ,   ''     
     229sn_snd_crt    =       'none'                 ,    'no'    , 'spherical' , 'eastward-northward' ,  'T'        
     230sn_snd_co2    =       'coupled'              ,    'no'    ,     ''      ,         ''           ,   ''         
     231! receive 
     232sn_rcv_w10m   =       'none'                 ,    'no'    ,     ''      ,         ''          ,   ''     
     233sn_rcv_taumod =       'coupled'              ,    'no'    ,     ''      ,         ''          ,   ''     
     234sn_rcv_tau    =       'oce only'             ,    'no'    , 'cartesian' , 'eastward-northward',  'U,V'    
     235sn_rcv_dqnsdt =       'coupled'              ,    'no'    ,     ''      ,         ''          ,   ''     
     236sn_rcv_qsr    =       'oce and ice'          ,    'no'    ,     ''      ,         ''          ,   ''     
     237sn_rcv_qns    =       'oce and ice'          ,    'no'    ,     ''      ,         ''          ,   ''     
     238sn_rcv_emp    =       'conservative'         ,    'no'    ,     ''      ,         ''          ,   ''     
     239sn_rcv_rnf    =       'coupled'              ,    'no'    ,     ''      ,         ''          ,   ''     
     240sn_rcv_cal    =       'coupled'              ,    'no'    ,     ''      ,         ''          ,   ''     
     241sn_rcv_co2    =       'coupled'              ,    'no'    ,     ''      ,         ''          ,   ''     
     242/ 
    253243&namtra_qsr    !   penetrative solar radiation 
    254244!----------------------------------------------------------------------- 
     
    380370&nambdy        !  unstructured open boundaries                          ("key_bdy") 
    381371!----------------------------------------------------------------------- 
    382    cn_mask     =  ''                     !  name of mask file (ln_mask=T) 
    383    cn_dta_frs_T= 'bdydata_grid_T.nc'     !  name of data file (T-points) 
    384    cn_dta_frs_U= 'bdydata_grid_U.nc'     !  name of data file (U-points) 
    385    cn_dta_frs_V= 'bdydata_grid_V.nc'     !  name of data file (V-points) 
    386    cn_dta_fla_T= 'bdydata_bt_grid_T.nc'  !  name of data file for Flather condition (T-points) 
    387    cn_dta_fla_U= 'bdydata_bt_grid_U.nc'  !  name of data file for Flather condition (U-points) 
    388    cn_dta_fla_V= 'bdydata_bt_grid_V.nc'  !  name of data file for Flather condition (V-points) 
    389  
    390    ln_clim     = .false.   !  contain 1 (T) or 12 (F) time dumps and be cyclic 
    391    ln_vol      = .false.   !  total volume correction (see volbdy parameter) 
    392    ln_mask     = .false.   !  boundary mask from filbdy_mask (T), boundaries are on edges of domain (F) 
    393    ln_tides    = .false.   !  Apply tidal harmonic forcing with Flather condition 
    394    ln_dyn_fla  = .false.   !  Apply Flather condition to velocities 
    395    ln_tra_frs  = .false.   !  Apply FRS condition to temperature and salinity  
    396    ln_dyn_frs  = .false.   !  Apply FRS condition to velocities 
    397    nn_rimwidth =  9        !  width of the relaxation zone 
    398    nn_dtactl   =  1        !  = 0, bdy data are equal to the initial state 
     372    nb_bdy = 1                            !  number of open boundary sets        
     373    ln_coords_file = .true.               !  =T : read bdy coordinates from file 
     374    cn_coords_file = 'coordinates.bdy.nc' !  bdy coordinates files 
     375    ln_mask_file = .false.                !  =T : read mask from file 
     376    cn_mask_file = ''                     !  name of mask file (if ln_mask_file=.TRUE.) 
     377    nn_dyn2d      =  2                    !  boundary conditions for barotropic fields 
     378    nn_dyn2d_dta  =  3                    !  = 0, bdy data are equal to the initial state 
     379                                          !  = 1, bdy data are read in 'bdydata   .nc' files 
     380                                          !  = 2, use tidal harmonic forcing data from files 
     381                                          !  = 3, use external data AND tidal harmonic forcing 
     382    nn_dyn3d      =  0                    !  boundary conditions for baroclinic velocities 
     383    nn_dyn3d_dta  =  0                    !  = 0, bdy data are equal to the initial state 
    399384                           !  = 1, bdy data are read in 'bdydata   .nc' files 
    400    nn_volctl   =  0        !  = 0, the total water flux across open boundaries is zero 
    401                            !  = 1, the total volume of the system is conserved 
    402 / 
    403 !----------------------------------------------------------------------- 
    404 &nambdy_tide   !  tidal forcing at unstructured boundaries               
    405 !----------------------------------------------------------------------- 
    406    filtide     = 'bdytide_'           !  file name root of tidal forcing files 
    407    tide_cpt    = 'M2','S1'            !  names of tidal components used 
    408    tide_speed  = 28.984106, 15.000001 !  phase speeds of tidal components (deg/hour) 
    409    ln_tide_date= .false.              !  adjust tidal harmonics for start date of run 
    410 / 
    411  
     385    nn_tra        =  1                    !  boundary conditions for T and S 
     386    nn_tra_dta    =  1                    !  = 0, bdy data are equal to the initial state 
     387                           !  = 1, bdy data are read in 'bdydata   .nc' files 
     388    nn_rimwidth  = 10                      !  width of the relaxation zone 
     389    nn_dmp2d_in  = 0                      ! 
     390    nn_dmp2d_out = 0                      ! 
     391    nn_dmp2d_in  = 0                      ! 
     392    nn_dmp2d_out = 0                      ! 
     393    ln_vol     = .false.                  !  total volume correction (see nn_volctl parameter) 
     394    nn_volctl  = 1                        !  = 0, the total water flux across open boundaries is zero 
     395/ 
     396!----------------------------------------------------------------------- 
     397&nambdy_dta      !  open boundaries - external data           ("key_bdy") 
     398!----------------------------------------------------------------------- 
     399!              !   file name    ! frequency (hours) !  variable  ! time interpol. !  clim   ! 'yearly'/ ! weights  ! rotation ! 
     400!              !                !  (if <0  months)  !    name    !    (logical)   !  (T/F)  ! 'monthly' ! filename ! pairing  ! 
     401   bn_ssh =     'amm12_bdyT_u2d' ,         24        , 'sossheig' ,     .true.     , .false. ,  'daily'  ,    ''    ,   '' 
     402   bn_u2d =     'amm12_bdyU_u2d' ,         24        , 'vobtcrtx' ,     .true.     , .false. ,  'daily'  ,    ''    ,   '' 
     403   bn_v2d =     'amm12_bdyV_u2d' ,         24        , 'vobtcrty' ,     .true.     , .false. ,  'daily'  ,    ''    ,   '' 
     404   bn_u3d  =    'amm12_bdyU_u3d' ,         24        , 'vozocrtx' ,     .true.     , .false. ,  'daily'  ,    ''    ,   '' 
     405   bn_v3d  =    'amm12_bdyV_u3d' ,         24        , 'vomecrty' ,     .true.     , .false. ,  'daily'  ,    ''    ,   '' 
     406   bn_tem  =    'amm12_bdyT_tra' ,         24        , 'votemper' ,     .true.     , .false. ,  'daily'  ,    ''    ,   '' 
     407   bn_sal  =    'amm12_bdyT_tra' ,         24        , 'vosaline' ,     .true.     , .false. ,  'daily'  ,    ''    ,   '' 
     408   cn_dir  =    'bdydta/' 
     409   ln_full_vel = .false. 
     410/ 
     411!----------------------------------------------------------------------- 
     412&nambdy_tide     ! tidal forcing at open boundaries               
     413!----------------------------------------------------------------------- 
     414   filtide      = 'bdydta/amm12_bdytide_'         !  file name root of tidal forcing files 
     415    tide_cpt(1)   ='Q1'  !  names of tidal components used 
     416    tide_cpt(2)   ='O1'  !  names of tidal components used 
     417    tide_cpt(3)   ='P1'  !  names of tidal components used 
     418    tide_cpt(4)   ='S1'  !  names of tidal components used 
     419    tide_cpt(5)   ='K1'  !  names of tidal components used 
     420    tide_cpt(6)   ='2N2' !  names of tidal components used 
     421    tide_cpt(7)   ='MU2' !  names of tidal components used 
     422    tide_cpt(8)   ='N2'  !  names of tidal components used 
     423    tide_cpt(9)   ='NU2' !  names of tidal components used 
     424    tide_cpt(10)   ='M2'  !  names of tidal components used 
     425    tide_cpt(11)   ='L2'  !  names of tidal components used 
     426    tide_cpt(12)   ='T2'  !  names of tidal components used 
     427    tide_cpt(13)   ='S2'  !  names of tidal components used 
     428    tide_cpt(14)   ='K2'  !  names of tidal components used 
     429    tide_cpt(15)   ='M4'  !  names of tidal components used 
     430    tide_speed(1)   = 13.398661 !  phase speeds of tidal components (deg/hour) 
     431    tide_speed(2)   = 13.943036 !  phase speeds of tidal components (deg/hour) 
     432    tide_speed(3)   = 14.958932 !  phase speeds of tidal components (deg/hour) 
     433    tide_speed(4)   = 15.000001 !  phase speeds of tidal components (deg/hour) 
     434    tide_speed(5)   = 15.041069 !  phase speeds of tidal components (deg/hour) 
     435    tide_speed(6)   = 27.895355 !  phase speeds of tidal components (deg/hour) 
     436    tide_speed(7)   = 27.968210 !  phase speeds of tidal components (deg/hour) 
     437    tide_speed(8)   = 28.439730 !  phase speeds of tidal components (deg/hour) 
     438    tide_speed(9)   = 28.512585 !  phase speeds of tidal components (deg/hour) 
     439    tide_speed(10)   = 28.984106 !  phase speeds of tidal components (deg/hour) 
     440    tide_speed(11)   = 29.528479 !  phase speeds of tidal components (deg/hour) 
     441    tide_speed(12)   = 29.958935 !  phase speeds of tidal components (deg/hour) 
     442    tide_speed(13)   = 30.000002 !  phase speeds of tidal components (deg/hour) 
     443    tide_speed(14)   = 30.082138 !  phase speeds of tidal components (deg/hour) 
     444    tide_speed(15)   = 57.968212 !  phase speeds of tidal components (deg/hour) 
     445    ln_tide_date = .true.               !  adjust tidal harmonics for start date of run 
     446/ 
    412447!!====================================================================== 
    413448!!                 ***  Bottom boundary condition  *** 
     
    428463   ln_bfr2d    = .false.   !  horizontal variation of the bottom friction coef (read a 2D mask file ) 
    429464   rn_bfrien   =    50.    !  local multiplying factor of bfr (ln_bfr2d=T) 
     465   ln_bfrimp   = .true.    !  implicit bottom friction (requires ln_zdfexp = .false. if true) 
    430466/ 
    431467!----------------------------------------------------------------------- 
     
    474510   ln_traadv_muscl2 =  .false.  !  MUSCL2 scheme + cen2 at boundaries   
    475511   ln_traadv_ubs    =  .false.  !  UBS scheme                  
    476    ln_traadv_qck    =  .false.  !  QUCIKEST scheme                  
     512   ln_traadv_qck    =  .false.  !  QUICKEST scheme 
    477513/ 
    478514!----------------------------------------------------------------------- 
     
    486522   ln_traldf_hor    =  .false.  !  horizontal (geopotential)            (require "key_ldfslp" when ln_sco=T) 
    487523   ln_traldf_iso    =  .true.   !  iso-neutral                          (require "key_ldfslp") 
    488    ln_traldf_grif   =  .false.  !  griffies skew flux formulation       (require "key_ldfslp")  ! UNDER TEST, DO NOT USE 
    489    ln_traldf_gdia   =  .false.  !  griffies operator strfn diagnostics  (require "key_ldfslp")  ! UNDER TEST, DO NOT USE 
    490    !                       !  Coefficient 
     524   ln_traldf_grif   =  .false.  !  griffies skew flux formulation       (require "key_ldfslp") 
     525   ln_traldf_gdia   =  .false.  !  griffies operator strfn diagnostics  (require "key_ldfslp") 
     526   ln_triad_iso     =  .false.  !  griffies operator calculates triads twice => pure lateral mixing in ML (require "key_ldfslp") 
     527   ln_botmix_grif   =  .false.  !  griffies operator with lateral mixing on bottom (require "key_ldfslp") 
     528                         !  Coefficient 
    491529   rn_aht_0         =  2000.    !  horizontal eddy diffusivity for tracers [m2/s] 
    492530   rn_ahtb_0        =     0.    !  background eddy diffusivity for ldf_iso [m2/s] 
     
    540578   ln_hpg_zps  = .true.    !  z-coordinate - partial steps (interpolation) 
    541579   ln_hpg_sco  = .false.   !  s-coordinate (standard jacobian formulation) 
    542    ln_hpg_hel  = .false.   !  s-coordinate (helsinki modification) 
    543    ln_hpg_wdj  = .false.   !  s-coordinate (weighted density jacobian) 
    544580   ln_hpg_djc  = .false.   !  s-coordinate (Density Jacobian with Cubic polynomial) 
    545    ln_hpg_rot  = .false.   !  s-coordinate (ROTated axes scheme) 
    546    rn_gamma    = 0.e0      !  weighting coefficient (wdj scheme) 
     581   ln_hpg_prj  = .false.   !  s-coordinate (Pressure Jacobian scheme) 
    547582   ln_dynhpg_imp = .false. !  time stepping: semi-implicit time scheme  (T) 
    548583                                 !           centered      time scheme  (F) 
     
    737772                           !  buffer blocking send or immediate non-blocking sends, resp. 
    738773   nn_buffer   =   0       !  size in bytes of exported buffer ('B' case), 0 no exportation 
     774   ln_nnogather=  .false.  !  activate code to avoid mpi_allgather use at the northfold 
    739775   jpni        =   0       !  jpni   number of processors following i (set automatically if < 1) 
    740776   jpnj        =   0       !  jpnj   number of processors following j (set automatically if < 1) 
     
    928964   cn_dir_cdg  = './'  !  root directory for the location of drag coefficient files 
    929965/ 
     966!----------------------------------------------------------------------- 
     967&namdyn_nept  !   Neptune effect (simplified: lateral and vertical diffusions removed) 
     968!----------------------------------------------------------------------- 
     969   ! Suggested lengthscale values are those of Eby & Holloway (1994) for a coarse model 
     970   ln_neptsimp       = .false.  ! yes/no use simplified neptune 
     971 
     972   ln_smooth_neptvel = .false.  ! yes/no smooth zunep, zvnep 
     973   rn_tslse          =  1.2e4   ! value of lengthscale L at the equator 
     974   rn_tslsp          =  3.0e3   ! value of lengthscale L at the pole 
     975   ! Specify whether to ramp down the Neptune velocity in shallow 
     976   ! water, and if so the depth range controlling such ramping down 
     977   ln_neptramp       = .false.  ! ramp down Neptune velocity in shallow water 
     978   rn_htrmin         =  100.0   ! min. depth of transition range 
     979   rn_htrmax         =  200.0   ! max. depth of transition range 
     980/ 
     981>>>>>>> .merge-right.r3114 
  • branches/2011/dev_NEMO_MERGE_2011/NEMOGCM/CONFIG/POMME/EXP00/namelist

    r3105 r3116  
    33!! namelists    2 - Domain           (namzgr, namzgr_sco, namdom, namtsd) 
    44!!              3 - Surface boundary (namsbc, namsbc_ana, namsbc_flx, namsbc_clio, namsbc_core 
    5 !!                                    namsbc_cpl, namsbc_cpl_co2 namtra_qsr, namsbc_rnf,  
     5!!                                    namsbc_cpl, namtra_qsr, namsbc_rnf,  
    66!!                                    namsbc_apr, namsbc_ssr, namsbc_alb) 
    77!!              4 - lateral boundary (namlbc, namcla, namobc, namagrif, nambdy, nambdy_tide) 
     
    114114!!   namsbc_mfs      MFS  bulk formulae formulation 
    115115!!   namsbc_cpl      CouPLed            formulation                     ("key_coupled") 
    116 !!   namsbc_cpl_co2  coupled ocean/biogeo/atmosphere model              ("key_cpl_carbon_cycle") 
    117116!!   namtra_qsr      penetrative solar radiation 
    118117!!   namsbc_rnf      river runoffs 
     
    222221&namsbc_cpl    !   coupled ocean/atmosphere model                       ("key_coupled") 
    223222!----------------------------------------------------------------------- 
    224 !                                      ! send 
    225 cn_snd_temperature= 'weighted oce and ice'  !  'oce only' 'weighted oce and ice' 'mixed oce-ice' 
    226 cn_snd_albedo     = 'weighted ice'          !  'none' 'weighted ice' 'mixed oce-ice' 
    227 cn_snd_thickness  = 'none'                  !  'none' 'weighted ice and snow' 
    228 cn_snd_crt_nature = 'none'                  !  'none' 'oce only' 'weighted oce and ice' 'mixed oce-ice' 
    229 cn_snd_crt_refere = 'spherical'             !  'spherical' 'cartesian' 
    230 cn_snd_crt_orient = 'eastward-northward'    !  'eastward-northward' or 'local grid' 
    231 cn_snd_crt_grid   = 'T'                     !  'T' 
    232 !                                      ! receive 
    233 cn_rcv_w10m       = 'none'                  !  'none' 'coupled' 
    234 cn_rcv_taumod     = 'coupled'               !  'none' 'coupled' 
    235 cn_rcv_tau_nature = 'oce only'              !  'oce only' 'oce and ice' 'mixed oce-ice' 
    236 cn_rcv_tau_refere = 'cartesian'             !  'spherical' 'cartesian' 
    237 cn_rcv_tau_orient = 'eastward-northward'    !  'eastward-northward' or 'local grid' 
    238 cn_rcv_tau_grid   = 'U,V'                   !  'T' 'U,V' 'U,V,F' 'U,V,I' 'T,F' 'T,I' 'T,U,V' 
    239 cn_rcv_dqnsdt     = 'coupled'               !  'none' 'coupled' 
    240 cn_rcv_qsr        = 'oce and ice'           !  'conservative' 'oce and ice' 'mixed oce-ice' 
    241 cn_rcv_qns        = 'oce and ice'           !  'conservative' 'oce and ice' 'mixed oce-ice' 
    242 cn_rcv_emp        = 'conservative'          !  'conservative' 'oce and ice' 'mixed oce-ice' 
    243 cn_rcv_rnf        = 'coupled'               !  'coupled' 'climato' 'mixed' 
    244 cn_rcv_cal        = 'coupled'               !  'none' 'coupled' 
    245 / 
    246 !----------------------------------------------------------------------- 
    247 &namsbc_cpl_co2   !   coupled ocean/biogeo/atmosphere model             ("key_cpl_carbon_cycle") 
    248 !----------------------------------------------------------------------- 
    249    cn_snd_co2     = 'coupled'         ! send    : 'none' 'coupled' 
    250    cn_rcv_co2     = 'coupled'         ! receive : 'none' 'coupled' 
     223!                    !     description       !  multiple  !    vector   !      vector          ! vector ! 
     224!                    !                       ! categories !  reference  !    orientation       ! grids  ! 
     225! send 
     226sn_snd_temp   =       'weighted oce and ice' ,    'no'    ,     ''      ,         ''           ,   ''     
     227sn_snd_alb    =       'weighted ice'         ,    'no'    ,     ''      ,         ''           ,   ''     
     228sn_snd_thick  =       'none'                 ,    'no'   ,     ''      ,         ''           ,   ''     
     229sn_snd_crt    =       'none'                 ,    'no'    , 'spherical' , 'eastward-northward' ,  'T'        
     230sn_snd_co2    =       'coupled'              ,    'no'    ,     ''      ,         ''           ,   ''         
     231! receive 
     232sn_rcv_w10m   =       'none'                 ,    'no'    ,     ''      ,         ''          ,   ''     
     233sn_rcv_taumod =       'coupled'              ,    'no'    ,     ''      ,         ''          ,   ''     
     234sn_rcv_tau    =       'oce only'             ,    'no'    , 'cartesian' , 'eastward-northward',  'U,V'    
     235sn_rcv_dqnsdt =       'coupled'              ,    'no'    ,     ''      ,         ''          ,   ''     
     236sn_rcv_qsr    =       'oce and ice'          ,    'no'    ,     ''      ,         ''          ,   ''     
     237sn_rcv_qns    =       'oce and ice'          ,    'no'    ,     ''      ,         ''          ,   ''     
     238sn_rcv_emp    =       'conservative'         ,    'no'    ,     ''      ,         ''          ,   ''     
     239sn_rcv_rnf    =       'coupled'              ,    'no'    ,     ''      ,         ''          ,   ''     
     240sn_rcv_cal    =       'coupled'              ,    'no'    ,     ''      ,         ''          ,   ''     
     241sn_rcv_co2    =       'coupled'              ,    'no'    ,     ''      ,         ''          ,   ''     
    251242/ 
    252243!----------------------------------------------------------------------- 
     
    402393&nambdy        !  unstructured open boundaries                          ("key_bdy") 
    403394!----------------------------------------------------------------------- 
    404    cn_mask     =  ''                     !  name of mask file (ln_mask=T) 
    405    cn_dta_frs_T= 'bdydata_grid_T.nc'     !  name of data file (T-points) 
    406    cn_dta_frs_U= 'bdydata_grid_U.nc'     !  name of data file (U-points) 
    407    cn_dta_frs_V= 'bdydata_grid_V.nc'     !  name of data file (V-points) 
    408    cn_dta_fla_T= 'bdydata_bt_grid_T.nc'  !  name of data file for Flather condition (T-points) 
    409    cn_dta_fla_U= 'bdydata_bt_grid_U.nc'  !  name of data file for Flather condition (U-points) 
    410    cn_dta_fla_V= 'bdydata_bt_grid_V.nc'  !  name of data file for Flather condition (V-points) 
    411  
    412    ln_clim     = .false.   !  contain 1 (T) or 12 (F) time dumps and be cyclic 
    413    ln_vol      = .false.   !  total volume correction (see volbdy parameter) 
    414    ln_mask     = .false.   !  boundary mask from filbdy_mask (T), boundaries are on edges of domain (F) 
    415    ln_tides    = .false.   !  Apply tidal harmonic forcing with Flather condition 
    416    ln_dyn_fla  = .false.   !  Apply Flather condition to velocities 
    417    ln_tra_frs  = .false.   !  Apply FRS condition to temperature and salinity  
    418    ln_dyn_frs  = .false.   !  Apply FRS condition to velocities 
    419    nn_rimwidth =  9        !  width of the relaxation zone 
    420    nn_dtactl   =  1        !  = 0, bdy data are equal to the initial state 
     395    nb_bdy = 1                            !  number of open boundary sets        
     396    ln_coords_file = .true.               !  =T : read bdy coordinates from file 
     397    cn_coords_file = 'coordinates.bdy.nc' !  bdy coordinates files 
     398    ln_mask_file = .false.                !  =T : read mask from file 
     399    cn_mask_file = ''                     !  name of mask file (if ln_mask_file=.TRUE.) 
     400    nn_dyn2d      =  2                    !  boundary conditions for barotropic fields 
     401    nn_dyn2d_dta  =  3                    !  = 0, bdy data are equal to the initial state 
     402                                          !  = 1, bdy data are read in 'bdydata   .nc' files 
     403                                          !  = 2, use tidal harmonic forcing data from files 
     404                                          !  = 3, use external data AND tidal harmonic forcing 
     405    nn_dyn3d      =  0                    !  boundary conditions for baroclinic velocities 
     406    nn_dyn3d_dta  =  0                    !  = 0, bdy data are equal to the initial state 
    421407                           !  = 1, bdy data are read in 'bdydata   .nc' files 
    422    nn_volctl   =  0        !  = 0, the total water flux across open boundaries is zero 
    423                            !  = 1, the total volume of the system is conserved 
    424 / 
    425 !----------------------------------------------------------------------- 
    426 &nambdy_tide   !  tidal forcing at unstructured boundaries               
    427 !----------------------------------------------------------------------- 
    428    filtide     = 'bdytide_'           !  file name root of tidal forcing files 
    429    tide_cpt    = 'M2','S1'            !  names of tidal components used 
    430    tide_speed  = 28.984106, 15.000001 !  phase speeds of tidal components (deg/hour) 
    431    ln_tide_date= .false.              !  adjust tidal harmonics for start date of run 
    432 / 
    433  
     408    nn_tra        =  1                    !  boundary conditions for T and S 
     409    nn_tra_dta    =  1                    !  = 0, bdy data are equal to the initial state 
     410                           !  = 1, bdy data are read in 'bdydata   .nc' files 
     411    nn_rimwidth  = 10                      !  width of the relaxation zone 
     412    nn_dmp2d_in  = 0                      ! 
     413    nn_dmp2d_out = 0                      ! 
     414    nn_dmp2d_in  = 0                      ! 
     415    nn_dmp2d_out = 0                      ! 
     416    ln_vol     = .false.                  !  total volume correction (see nn_volctl parameter) 
     417    nn_volctl  = 1                        !  = 0, the total water flux across open boundaries is zero 
     418/ 
     419!----------------------------------------------------------------------- 
     420&nambdy_dta      !  open boundaries - external data           ("key_bdy") 
     421!----------------------------------------------------------------------- 
     422!              !   file name    ! frequency (hours) !  variable  ! time interpol. !  clim   ! 'yearly'/ ! weights  ! rotation ! 
     423!              !                !  (if <0  months)  !    name    !    (logical)   !  (T/F)  ! 'monthly' ! filename ! pairing  ! 
     424   bn_ssh =     'amm12_bdyT_u2d' ,         24        , 'sossheig' ,     .true.     , .false. ,  'daily'  ,    ''    ,   '' 
     425   bn_u2d =     'amm12_bdyU_u2d' ,         24        , 'vobtcrtx' ,     .true.     , .false. ,  'daily'  ,    ''    ,   '' 
     426   bn_v2d =     'amm12_bdyV_u2d' ,         24        , 'vobtcrty' ,     .true.     , .false. ,  'daily'  ,    ''    ,   '' 
     427   bn_u3d  =    'amm12_bdyU_u3d' ,         24        , 'vozocrtx' ,     .true.     , .false. ,  'daily'  ,    ''    ,   '' 
     428   bn_v3d  =    'amm12_bdyV_u3d' ,         24        , 'vomecrty' ,     .true.     , .false. ,  'daily'  ,    ''    ,   '' 
     429   bn_tem  =    'amm12_bdyT_tra' ,         24        , 'votemper' ,     .true.     , .false. ,  'daily'  ,    ''    ,   '' 
     430   bn_sal  =    'amm12_bdyT_tra' ,         24        , 'vosaline' ,     .true.     , .false. ,  'daily'  ,    ''    ,   '' 
     431   cn_dir  =    'bdydta/' 
     432   ln_full_vel = .false. 
     433/ 
     434!----------------------------------------------------------------------- 
     435&nambdy_tide     ! tidal forcing at open boundaries               
     436!----------------------------------------------------------------------- 
     437   filtide      = 'bdydta/amm12_bdytide_'         !  file name root of tidal forcing files 
     438    tide_cpt(1)   ='Q1'  !  names of tidal components used 
     439    tide_cpt(2)   ='O1'  !  names of tidal components used 
     440    tide_cpt(3)   ='P1'  !  names of tidal components used 
     441    tide_cpt(4)   ='S1'  !  names of tidal components used 
     442    tide_cpt(5)   ='K1'  !  names of tidal components used 
     443    tide_cpt(6)   ='2N2' !  names of tidal components used 
     444    tide_cpt(7)   ='MU2' !  names of tidal components used 
     445    tide_cpt(8)   ='N2'  !  names of tidal components used 
     446    tide_cpt(9)   ='NU2' !  names of tidal components used 
     447    tide_cpt(10)   ='M2'  !  names of tidal components used 
     448    tide_cpt(11)   ='L2'  !  names of tidal components used 
     449    tide_cpt(12)   ='T2'  !  names of tidal components used 
     450    tide_cpt(13)   ='S2'  !  names of tidal components used 
     451    tide_cpt(14)   ='K2'  !  names of tidal components used 
     452    tide_cpt(15)   ='M4'  !  names of tidal components used 
     453    tide_speed(1)   = 13.398661 !  phase speeds of tidal components (deg/hour) 
     454    tide_speed(2)   = 13.943036 !  phase speeds of tidal components (deg/hour) 
     455    tide_speed(3)   = 14.958932 !  phase speeds of tidal components (deg/hour) 
     456    tide_speed(4)   = 15.000001 !  phase speeds of tidal components (deg/hour) 
     457    tide_speed(5)   = 15.041069 !  phase speeds of tidal components (deg/hour) 
     458    tide_speed(6)   = 27.895355 !  phase speeds of tidal components (deg/hour) 
     459    tide_speed(7)   = 27.968210 !  phase speeds of tidal components (deg/hour) 
     460    tide_speed(8)   = 28.439730 !  phase speeds of tidal components (deg/hour) 
     461    tide_speed(9)   = 28.512585 !  phase speeds of tidal components (deg/hour) 
     462    tide_speed(10)   = 28.984106 !  phase speeds of tidal components (deg/hour) 
     463    tide_speed(11)   = 29.528479 !  phase speeds of tidal components (deg/hour) 
     464    tide_speed(12)   = 29.958935 !  phase speeds of tidal components (deg/hour) 
     465    tide_speed(13)   = 30.000002 !  phase speeds of tidal components (deg/hour) 
     466    tide_speed(14)   = 30.082138 !  phase speeds of tidal components (deg/hour) 
     467    tide_speed(15)   = 57.968212 !  phase speeds of tidal components (deg/hour) 
     468    ln_tide_date = .true.               !  adjust tidal harmonics for start date of run 
     469/ 
    434470!!====================================================================== 
    435471!!                 ***  Bottom boundary condition  *** 
     
    450486   ln_bfr2d    = .false.   !  horizontal variation of the bottom friction coef (read a 2D mask file ) 
    451487   rn_bfrien   =    50.    !  local multiplying factor of bfr (ln_bfr2d=T) 
     488   ln_bfrimp   = .true.    !  implicit bottom friction (requires ln_zdfexp = .false. if true) 
    452489/ 
    453490!----------------------------------------------------------------------- 
     
    496533   ln_traadv_muscl2 =  .false.  !  MUSCL2 scheme + cen2 at boundaries   
    497534   ln_traadv_ubs    =  .false.  !  UBS scheme                  
    498    ln_traadv_qck    =  .false.  !  QUCIKEST scheme                  
     535   ln_traadv_qck    =  .false.  !  QUICKEST scheme                  
    499536/ 
    500537!----------------------------------------------------------------------- 
     
    508545   ln_traldf_hor    =  .false.  !  horizontal (geopotential)            (require "key_ldfslp" when ln_sco=T) 
    509546   ln_traldf_iso    =  .true.   !  iso-neutral                          (require "key_ldfslp") 
    510    ln_traldf_grif   =  .false.  !  griffies skew flux formulation       (require "key_ldfslp")  ! UNDER TEST, DO NOT USE 
    511    ln_traldf_gdia   =  .false.  !  griffies operator strfn diagnostics  (require "key_ldfslp")  ! UNDER TEST, DO NOT USE 
     547   ln_traldf_grif   =  .false.  !  griffies skew flux formulation       (require "key_ldfslp") 
     548   ln_traldf_gdia   =  .false.  !  griffies operator strfn diagnostics  (require "key_ldfslp") 
     549   ln_triad_iso     =  .false.  !  griffies operator calculates triads twice => pure lateral mixing in ML (require "key_ldfslp") 
     550   ln_botmix_grif   =  .false.  !  griffies operator with lateral mixing on bottom (require "key_ldfslp") 
    512551   !                       !  Coefficient 
    513552   rn_aht_0         =   300.    !  horizontal eddy diffusivity for tracers [m2/s] 
     
    562601   ln_hpg_zps  = .true.    !  z-coordinate - partial steps (interpolation) 
    563602   ln_hpg_sco  = .false.   !  s-coordinate (standard jacobian formulation) 
    564    ln_hpg_hel  = .false.   !  s-coordinate (helsinki modification) 
    565    ln_hpg_wdj  = .false.   !  s-coordinate (weighted density jacobian) 
    566603   ln_hpg_djc  = .false.   !  s-coordinate (Density Jacobian with Cubic polynomial) 
    567    ln_hpg_rot  = .false.   !  s-coordinate (ROTated axes scheme) 
    568    rn_gamma    = 0.e0      !  weighting coefficient (wdj scheme) 
     604   ln_hpg_prj  = .false.   !  s-coordinate (Pressure Jacobian scheme) 
    569605   ln_dynhpg_imp = .true.  !  time stepping: semi-implicit time scheme  (T) 
    570606                                 !           centered      time scheme  (F) 
     
    931967   cn_dir_cdg  = './'  !  root directory for the location of drag coefficient files 
    932968/ 
     969!----------------------------------------------------------------------- 
     970&namdyn_nept  !   Neptune effect (simplified: lateral and vertical diffusions removed) 
     971!----------------------------------------------------------------------- 
     972   ! Suggested lengthscale values are those of Eby & Holloway (1994) for a coarse model 
     973   ln_neptsimp       = .false.  ! yes/no use simplified neptune 
     974 
     975   ln_smooth_neptvel = .false.  ! yes/no smooth zunep, zvnep 
     976   rn_tslse          =  1.2e4   ! value of lengthscale L at the equator 
     977   rn_tslsp          =  3.0e3   ! value of lengthscale L at the pole 
     978   ! Specify whether to ramp down the Neptune velocity in shallow 
     979   ! water, and if so the depth range controlling such ramping down 
     980   ln_neptramp       = .false.  ! ramp down Neptune velocity in shallow water 
     981   rn_htrmin         =  100.0   ! min. depth of transition range 
     982   rn_htrmax         =  200.0   ! max. depth of transition range 
     983/ 
     984>>>>>>> .merge-right.r3114 
  • branches/2011/dev_NEMO_MERGE_2011/NEMOGCM/NEMO/LIM_SRC_2/limsbc_2.F90

    r2715 r3116  
    2727   USE sbc_ice          ! surface boundary condition: ice 
    2828   USE sbc_oce          ! surface boundary condition: ocean 
     29   USE sbccpl 
    2930 
    3031   USE albedo           ! albedo parameters 
     
    234235      !-----------------------------------------------! 
    235236 
    236       IF( lk_cpl ) THEN          ! coupled case 
    237          tn_ice(:,:,1) = sist(:,:)          ! sea-ice surface temperature        
    238          !                                  ! Computation of snow/ice and ocean albedo 
    239          CALL albedo_ice( tn_ice, reshape( hicif, (/jpi,jpj,1/) ), reshape( hsnif, (/jpi,jpj,1/) ), zalbp, zalb ) 
    240          alb_ice(:,:,1) =  0.5 * ( zalbp(:,:,1) + zalb (:,:,1) )   ! Ice albedo (mean clear and overcast skys) 
    241          CALL iom_put( "icealb_cea", alb_ice(:,:,1) * fr_i(:,:) )  ! ice albedo 
    242       ENDIF 
     237#if defined key_coupled 
     238      tn_ice(:,:,1) = sist(:,:)          ! sea-ice surface temperature        
     239      ht_i(:,:,1) = hicif(:,:) 
     240      ht_s(:,:,1) = hsnif(:,:) 
     241      a_i(:,:,1) = fr_i(:,:) 
     242      !                                  ! Computation of snow/ice and ocean albedo 
     243      CALL albedo_ice( tn_ice, ht_i, ht_s, zalbp, zalb ) 
     244      alb_ice(:,:,1) =  0.5 * ( zalbp(:,:,1) + zalb (:,:,1) )   ! Ice albedo (mean clear and overcast skys) 
     245      CALL iom_put( "icealb_cea", alb_ice(:,:,1) * fr_i(:,:) )  ! ice albedo 
     246#endif 
    243247 
    244248      IF(ln_ctl) THEN            ! control print 
  • branches/2011/dev_NEMO_MERGE_2011/NEMOGCM/NEMO/LIM_SRC_2/limthd_zdf_2.F90

    r2715 r3116  
    372372          DO ji = kideb, kiut 
    373373             sist_1d(ji) = MIN( ztsmlt(ji) , sist_1d(ji) ) 
     374             qla_ice_1d(ji) = -9999.   ! default definition, not used as parsub = 0. in this case 
    374375             zfcsu(ji)  = zksndh(ji) * ( ztbif(ji) - sist_1d(ji) ) 
    375376          END DO 
  • branches/2011/dev_NEMO_MERGE_2011/NEMOGCM/NEMO/OPA_SRC/BDY/bdy_oce.F90

    r2715 r3116  
    77   !!            3.0  !  2008-04  (NEMO team)  add in the reference version      
    88   !!            3.3  !  2010-09  (D. Storkey) add ice boundary conditions 
     9   !!            3.4  !  2011     (D. Storkey, J. Chanut) OBC-BDY merge 
    910   !!---------------------------------------------------------------------- 
    1011#if defined key_bdy  
     
    1920   PUBLIC 
    2021 
     22   TYPE, PUBLIC ::   OBC_INDEX    !: Indices and weights which define the open boundary 
     23      INTEGER,          DIMENSION(jpbgrd) ::  nblen 
     24      INTEGER,          DIMENSION(jpbgrd) ::  nblenrim 
     25      INTEGER, POINTER, DIMENSION(:,:)   ::  nbi 
     26      INTEGER, POINTER, DIMENSION(:,:)   ::  nbj 
     27      INTEGER, POINTER, DIMENSION(:,:)   ::  nbr 
     28      INTEGER, POINTER, DIMENSION(:,:)   ::  nbmap 
     29      REAL   , POINTER, DIMENSION(:,:)   ::  nbw 
     30      REAL   , POINTER, DIMENSION(:)     ::  flagu 
     31      REAL   , POINTER, DIMENSION(:)     ::  flagv 
     32   END TYPE OBC_INDEX 
     33 
     34   TYPE, PUBLIC ::   OBC_DATA     !: Storage for external data 
     35      REAL, POINTER, DIMENSION(:)     ::  ssh 
     36      REAL, POINTER, DIMENSION(:)     ::  u2d 
     37      REAL, POINTER, DIMENSION(:)     ::  v2d 
     38      REAL, POINTER, DIMENSION(:,:)   ::  u3d 
     39      REAL, POINTER, DIMENSION(:,:)   ::  v3d 
     40      REAL, POINTER, DIMENSION(:,:)   ::  tem 
     41      REAL, POINTER, DIMENSION(:,:)   ::  sal 
     42#if defined key_lim2 
     43      REAL, POINTER, DIMENSION(:)     ::  frld 
     44      REAL, POINTER, DIMENSION(:)     ::  hicif 
     45      REAL, POINTER, DIMENSION(:)     ::  hsnif 
     46#endif 
     47   END TYPE OBC_DATA 
     48 
    2149   !!---------------------------------------------------------------------- 
    2250   !! Namelist variables 
    2351   !!---------------------------------------------------------------------- 
    24    CHARACTER(len=80) ::   cn_mask        !: Name of unstruct. bdy mask file 
    25    CHARACTER(len=80) ::   cn_dta_frs_T   !: Name of unstruct. bdy data file at T points for FRS conditions 
    26    CHARACTER(len=80) ::   cn_dta_frs_U   !: Name of unstruct. bdy data file at U points for FRS conditions 
    27    CHARACTER(len=80) ::   cn_dta_frs_V   !: Name of unstruct. bdy data file at V points for FRS conditions 
    28    CHARACTER(len=80) ::   cn_dta_fla_T   !: Name of unstruct. bdy data file at T points for Flather scheme 
    29    CHARACTER(len=80) ::   cn_dta_fla_U   !: Name of unstruct. bdy data file at U points for Flather scheme 
    30    CHARACTER(len=80) ::   cn_dta_fla_V   !: Name of unstruct. bdy data file at V points for Flather scheme 
     52   CHARACTER(len=80), DIMENSION(jp_bdy) ::   cn_coords_file !: Name of bdy coordinates file 
     53   CHARACTER(len=80)                    ::   cn_mask_file   !: Name of bdy mask file 
    3154   ! 
    32    LOGICAL ::   ln_tides = .false.    !: =T apply tidal harmonic forcing along open boundaries 
    33    LOGICAL ::   ln_vol  = .false.     !: =T volume correction              
    34    LOGICAL ::   ln_mask = .false.     !: =T read bdymask from file 
    35    LOGICAL ::   ln_clim = .false.     !: =T bdy data files contain  1 time dump  (-->bdy forcing will be constant)  
    36    !                                  !                         or 12 months     (-->bdy forcing will be cyclic)  
    37    LOGICAL ::   ln_dyn_fla  = .false. !: =T Flather boundary conditions on barotropic velocities 
    38    LOGICAL ::   ln_dyn_frs  = .false. !: =T FRS boundary conditions on velocities 
    39    LOGICAL ::   ln_tra_frs  = .false. !: =T FRS boundary conditions on tracers (T and S) 
    40    LOGICAL ::   ln_ice_frs  = .false. !: =T FRS boundary conditions on seaice (leads fraction, ice depth, snow depth) 
     55   LOGICAL, DIMENSION(jp_bdy) ::   ln_coords_file           !: =T read bdy coordinates from file;  
     56   !                                                        !: =F read bdy coordinates from namelist 
     57   LOGICAL                    ::   ln_mask_file             !: =T read bdymask from file 
     58   LOGICAL                    ::   ln_vol                   !: =T volume correction              
    4159   ! 
    42    INTEGER ::   nn_rimwidth = 7       !: boundary rim width 
    43    INTEGER ::   nn_dtactl   = 1       !: = 0 use the initial state as bdy dta ; = 1 read it in a NetCDF file 
    44    INTEGER ::   nn_volctl   = 1       !: = 0 the total volume will have the variability of the surface Flux E-P  
    45    !                                  !  = 1 the volume will be constant during all the integration. 
     60   INTEGER                    ::   nb_bdy                   !: number of open boundary sets 
     61   INTEGER, DIMENSION(jp_bdy) ::   nn_rimwidth              !: boundary rim width for Flow Relaxation Scheme 
     62   INTEGER                    ::   nn_volctl                !: = 0 the total volume will have the variability of the surface Flux E-P  
     63   !                                                        !  = 1 the volume will be constant during all the integration. 
     64   INTEGER, DIMENSION(jp_bdy) ::   nn_dyn2d                 ! Choice of boundary condition for barotropic variables (U,V,SSH) 
     65   INTEGER, DIMENSION(jp_bdy) ::   nn_dyn2d_dta           !: = 0 use the initial state as bdy dta ;  
     66                                                            !: = 1 read it in a NetCDF file 
     67                                                            !: = 2 read tidal harmonic forcing from a NetCDF file 
     68                                                            !: = 3 read external data AND tidal harmonic forcing from NetCDF files 
     69   INTEGER, DIMENSION(jp_bdy) ::   nn_dyn3d                 ! Choice of boundary condition for baroclinic velocities  
     70   INTEGER, DIMENSION(jp_bdy) ::   nn_dyn3d_dta           !: = 0 use the initial state as bdy dta ;  
     71                                                            !: = 1 read it in a NetCDF file 
     72   INTEGER, DIMENSION(jp_bdy) ::   nn_tra                   ! Choice of boundary condition for active tracers (T and S) 
     73   INTEGER, DIMENSION(jp_bdy) ::   nn_tra_dta             !: = 0 use the initial state as bdy dta ;  
     74                                                            !: = 1 read it in a NetCDF file 
     75#if defined key_lim2 
     76   INTEGER, DIMENSION(jp_bdy) ::   nn_ice_lim2              ! Choice of boundary condition for sea ice variables  
     77   INTEGER, DIMENSION(jp_bdy) ::   nn_ice_lim2_dta          !: = 0 use the initial state as bdy dta ;  
     78                                                            !: = 1 read it in a NetCDF file 
     79#endif 
     80   ! 
     81   INTEGER, DIMENSION(jp_bdy) ::   nn_dmp2d_in              ! Damping timescale (days) for 2D solution for inward radiation or FRS  
     82   INTEGER, DIMENSION(jp_bdy) ::   nn_dmp2d_out             ! Damping timescale (days) for 2D solution for outward radiation  
     83   INTEGER, DIMENSION(jp_bdy) ::   nn_dmp3d_in              ! Damping timescale (days) for 3D solution for inward radiation or FRS  
     84   INTEGER, DIMENSION(jp_bdy) ::   nn_dmp3d_out             ! Damping timescale (days) for 3D solution for outward radiation 
    4685 
     86    
    4787   !!---------------------------------------------------------------------- 
    4888   !! Global variables 
     
    5292   REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:) ::   bdyvmask   !: Mask defining computational domain at V-points 
    5393 
     94   REAL(wp)                                    ::   bdysurftot !: Lateral surface of unstructured open boundary 
     95 
     96   REAL(wp), POINTER, DIMENSION(:,:)           ::   pssh       !:  
     97   REAL(wp), POINTER, DIMENSION(:,:)           ::   phur       !:  
     98   REAL(wp), POINTER, DIMENSION(:,:)           ::   phvr       !: Pointers for barotropic fields  
     99   REAL(wp), POINTER, DIMENSION(:,:)           ::   pu2d       !:  
     100   REAL(wp), POINTER, DIMENSION(:,:)           ::   pv2d       !:  
     101 
    54102   !!---------------------------------------------------------------------- 
    55    !! Unstructured open boundary data variables 
     103   !! open boundary data variables 
    56104   !!---------------------------------------------------------------------- 
    57    INTEGER, DIMENSION(jpbgrd) ::   nblen    = 0           !: Size of bdy data on a proc for each grid type 
    58    INTEGER, DIMENSION(jpbgrd) ::   nblenrim = 0           !: Size of bdy data on a proc for first rim ind 
    59    INTEGER, DIMENSION(jpbgrd) ::   nblendta = 0           !: Size of bdy data in file 
    60105 
    61    INTEGER, DIMENSION(jpbdim,jpbgrd) ::   nbi, nbj        !: i and j indices of bdy dta 
    62    INTEGER, DIMENSION(jpbdim,jpbgrd) ::   nbr             !: Discrete distance from rim points 
    63    INTEGER, DIMENSION(jpbdim,jpbgrd) ::   nbmap           !: Indices of data in file for data in memory  
    64      
    65    REAL(wp) ::   bdysurftot                               !: Lateral surface of unstructured open boundary 
    66  
    67    REAL(wp), DIMENSION(jpbdim)        ::   flagu, flagv   !: Flag for normal velocity compnt for velocity components 
    68    REAL(wp), DIMENSION(jpbdim,jpbgrd) ::   nbw            !: Rim weights of bdy data 
    69  
    70    REAL(wp), DIMENSION(jpbdim)     ::   sshbdy            !: Now clim of bdy sea surface height (Flather) 
    71    REAL(wp), DIMENSION(jpbdim)     ::   ubtbdy, vbtbdy    !: Now clim of bdy barotropic velocity components 
    72    REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:) ::   tbdy  , sbdy      !: Now clim of bdy temperature and salinity   
    73    REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:) ::   ubdy  , vbdy    !: Now clim of bdy velocity components 
    74    REAL(wp), DIMENSION(jpbdim) ::   sshtide               !: Tidal boundary array : SSH 
    75    REAL(wp), DIMENSION(jpbdim) ::   utide, vtide          !: Tidal boundary array : U and V 
    76 #if defined key_lim2 
    77    REAL(wp), DIMENSION(jpbdim) ::   frld_bdy    !: now ice leads fraction climatology    
    78    REAL(wp), DIMENSION(jpbdim) ::   hicif_bdy   !: Now ice  thickness climatology 
    79    REAL(wp), DIMENSION(jpbdim) ::   hsnif_bdy   !: now snow thickness 
    80 #endif 
     106   INTEGER,  DIMENSION(jp_bdy)                     ::   nn_dta            !: =0 => *all* data is set to initial conditions 
     107                                                                          !: =1 => some data to be read in from data files 
     108   REAL(wp), ALLOCATABLE, DIMENSION(:,:,:), TARGET ::   dta_global        !: workspace for reading in global data arrays 
     109   TYPE(OBC_INDEX), DIMENSION(jp_bdy), TARGET      ::   idx_bdy           !: bdy indices (local process) 
     110   TYPE(OBC_DATA) , DIMENSION(jp_bdy)              ::   dta_bdy           !: bdy external data (local process) 
    81111 
    82112   !!---------------------------------------------------------------------- 
     
    94124      !!---------------------------------------------------------------------- 
    95125      ! 
    96       ALLOCATE( bdytmask(jpi,jpj) , tbdy(jpbdim,jpk) , sbdy(jpbdim,jpk) ,     & 
    97          &      bdyumask(jpi,jpj) , ubdy(jpbdim,jpk) ,                        & 
    98          &      bdyvmask(jpi,jpj) , vbdy(jpbdim,jpk) ,                    STAT=bdy_oce_alloc ) 
     126      ALLOCATE( bdytmask(jpi,jpj) , bdyumask(jpi,jpj), bdyvmask(jpi,jpj),                    &   
     127         &      STAT=bdy_oce_alloc ) 
    99128         ! 
    100129      IF( lk_mpp             )   CALL mpp_sum ( bdy_oce_alloc ) 
     
    112141   !!====================================================================== 
    113142END MODULE bdy_oce 
     143 
  • branches/2011/dev_NEMO_MERGE_2011/NEMOGCM/NEMO/OPA_SRC/BDY/bdy_par.F90

    r2528 r3116  
    1717 
    1818   LOGICAL, PUBLIC, PARAMETER ::   lk_bdy  = .TRUE.   !: Unstructured Ocean Boundary Condition flag 
    19    INTEGER, PUBLIC, PARAMETER ::   jpbdta  = 20000    !: Max length of bdy field in file 
    20    INTEGER, PUBLIC, PARAMETER ::   jpbdim  = 20000    !: Max length of bdy field on a processor 
     19   INTEGER, PUBLIC, PARAMETER ::   jp_bdy  = 10       !: Maximum number of bdy sets 
    2120   INTEGER, PUBLIC, PARAMETER ::   jpbtime = 1000     !: Max number of time dumps per file 
    22    INTEGER, PUBLIC, PARAMETER ::   jpbgrd  = 6        !: Number of horizontal grid types used  (T, u, v, f) 
     21   INTEGER, PUBLIC, PARAMETER ::   jpbgrd  = 3        !: Number of horizontal grid types used  (T, U, V) 
     22 
     23   !! Flags for choice of schemes 
     24   INTEGER, PUBLIC, PARAMETER ::   jp_none         = 0        !: Flag for no open boundary condition 
     25   INTEGER, PUBLIC, PARAMETER ::   jp_frs          = 1        !: Flag for Flow Relaxation Scheme 
     26   INTEGER, PUBLIC, PARAMETER ::   jp_flather      = 2        !: Flag for Flather 
    2327#else 
    2428   !!---------------------------------------------------------------------- 
  • branches/2011/dev_NEMO_MERGE_2011/NEMOGCM/NEMO/OPA_SRC/BDY/bdydta.F90

    <
    r2977 r3116  
    1010   !!            3.3  !  2010-09  (E.O'Dea) modifications for Shelf configurations  
    1111   !!            3.3  !  2010-09  (D.Storkey) add ice boundary conditions 
     12   !!            3.4  ???????????????? 
    1213   !!---------------------------------------------------------------------- 
    1314#if defined key_bdy 
    1415   !!---------------------------------------------------------------------- 
    15    !!   'key_bdy'                     Unstructured Open Boundary Conditions 
    16    !!---------------------------------------------------------------------- 
    17    !!   bdy_dta_frs    : read u, v, t, s data along open boundaries 
    18    !!   bdy_dta_fla : read depth-mean velocities and elevation along open boundaries         
     16   !!   'key_bdy'                     Open Boundary Conditions 
     17   !!---------------------------------------------------------------------- 
     18   !!    bdy_dta        : read external data along open boundaries from file 
     19   !!    bdy_dta_init   : initialise arrays etc for reading of external data 
    1920   !!---------------------------------------------------------------------- 
    2021   USE oce             ! ocean dynamics and tracers 
    2122   USE dom_oce         ! ocean space and time domain 
    2223   USE phycst          ! physical constants 
    23    USE bdy_oce         ! ocean open boundary conditions 
     24   USE bdy_oce         ! ocean open boundary conditions   
    2425   USE bdytides        ! tidal forcing at boundaries 
    25    USE iom 
    26    USE ioipsl 
     26   USE fldread         ! read input fields 
     27   USE iom             ! IOM library 
    2728   USE in_out_manager  ! I/O logical units 
    2829#if defined key_lim2 
     
    3334   PRIVATE 
    3435 
    35    PUBLIC   bdy_dta_frs      ! routines called by step.F90 
    36    PUBLIC   bdy_dta_fla  
    37    PUBLIC   bdy_dta_alloc    ! routine called by bdy_init.F90 
    38  
    39    INTEGER ::   numbdyt, numbdyu, numbdyv                      ! logical units for T-, U-, & V-points data file, resp. 
    40    INTEGER ::   ntimes_bdy                                     ! exact number of time dumps in data files 
    41    INTEGER ::   nbdy_b, nbdy_a                                 ! record of bdy data file for before and after time step 
    42    INTEGER ::   numbdyt_bt, numbdyu_bt, numbdyv_bt             ! logical unit for T-, U- & V-points data file, resp. 
    43    INTEGER ::   ntimes_bdy_bt                                  ! exact number of time dumps in data files 
    44    INTEGER ::   nbdy_b_bt, nbdy_a_bt                           ! record of bdy data file for before and after time step 
    45  
    46    INTEGER, DIMENSION (jpbtime) ::   istep, istep_bt           ! time array in seconds in each data file 
    47  
    48    REAL(wp) ::  zoffset                                        ! time offset between time origin in file & start time of model run 
    49  
    50    REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) ::   tbdydta, sbdydta   ! time interpolated values of T and S bdy data    
    51    REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) ::   ubdydta, vbdydta   ! time interpolated values of U and V bdy data  
    52    REAL(wp), DIMENSION(jpbdim,2)     ::   ubtbdydta, vbtbdydta ! Arrays used for time interpolation of bdy data    
    53    REAL(wp), DIMENSION(jpbdim,2)     ::   sshbdydta            ! bdy data of ssh 
    54  
    55 #if defined key_lim2 
    56    REAL(wp), DIMENSION(jpbdim,2)     ::   frld_bdydta          ! } 
    57    REAL(wp), DIMENSION(jpbdim,2)     ::   hicif_bdydta         ! } Arrays used for time interp. of ice bdy data  
    58    REAL(wp), DIMENSION(jpbdim,2)     ::   hsnif_bdydta         ! } 
    59 #endif 
    60  
     36   PUBLIC   bdy_dta          ! routine called by step.F90 and dynspg_ts.F90 
     37   PUBLIC   bdy_dta_init     ! routine called by nemogcm.F90 
     38 
     39   INTEGER, ALLOCATABLE, DIMENSION(:)   ::   nb_bdy_fld        ! Number of fields to update for each boundary set. 
     40   INTEGER                              ::   nb_bdy_fld_sum    ! Total number of fields to update for all boundary sets. 
     41 
     42   LOGICAL,           DIMENSION(jp_bdy) ::   ln_full_vel_array ! =T => full velocities in 3D boundary conditions 
     43                                                               ! =F => baroclinic velocities in 3D boundary conditions 
     44 
     45   TYPE(FLD), PUBLIC, ALLOCATABLE, DIMENSION(:), TARGET ::   bf        ! structure of input fields (file informations, fields read) 
     46 
     47   TYPE(MAP_POINTER), ALLOCATABLE, DIMENSION(:) :: nbmap_ptr   ! array of pointers to nbmap 
     48 
     49#  include "domzgr_substitute.h90" 
    6150   !!---------------------------------------------------------------------- 
    6251   !! NEMO/OPA 3.3 , NEMO Consortium (2010) 
     
    6655CONTAINS 
    6756 
    68   FUNCTION bdy_dta_alloc() 
    69      !!---------------------------------------------------------------------- 
    70      USE lib_mpp, ONLY: ctl_warn, mpp_sum 
    71      ! 
    72      INTEGER :: bdy_dta_alloc 
    73      !!---------------------------------------------------------------------- 
    74      ! 
    75      ALLOCATE(tbdydta(jpbdim,jpk,2), sbdydta(jpbdim,jpk,2), & 
    76               ubdydta(jpbdim,jpk,2), vbdydta(jpbdim,jpk,2), Stat=bdy_dta_alloc) 
    77  
    78      IF( lk_mpp           ) CALL mpp_sum ( bdy_dta_alloc ) 
    79      IF(bdy_dta_alloc /= 0) CALL ctl_warn('bdy_dta_alloc: failed to allocate arrays') 
    80  
    81    END FUNCTION bdy_dta_alloc 
    82  
    83  
    84    SUBROUTINE bdy_dta_frs( kt ) 
     57      SUBROUTINE bdy_dta( kt, jit, time_offset ) 
    8558      !!---------------------------------------------------------------------- 
    86       !!                   ***  SUBROUTINE bdy_dta_frs  *** 
     59      !!                   ***  SUBROUTINE bdy_dta  *** 
    8760      !!                     
    88       !! ** Purpose :   Read unstructured boundary data for FRS condition. 
     61      !! ** Purpose :   Update external data for open boundary conditions 
    8962      !! 
    90       !! ** Method  :   At the first timestep, read in boundary data for two 
    91       !!                times from the file and time-interpolate. At other  
    92       !!                timesteps, check to see if we need another time from  
    93       !!                the file. If so read it in. Time interpolate. 
     63      !! ** Method  :   Use fldread.F90 
     64      !!                 
    9465      !!---------------------------------------------------------------------- 
    95       INTEGER, INTENT( in ) ::   kt   ! ocean time-step index (for timesplitting option, otherwise zero) 
     66      USE wrk_nemo, ONLY: wrk_in_use, wrk_not_released 
     67      USE wrk_nemo, ONLY: wrk_2d_22, wrk_2d_23   ! 2D workspace 
    9668      !! 
    97       CHARACTER(LEN=80), DIMENSION(3) ::   clfile               ! names of input files 
    98       CHARACTER(LEN=70 )              ::   clunits              ! units attribute of time coordinate 
    99       LOGICAL ::   lect                                         ! flag for reading 
    100       INTEGER ::   it, ib, ik, igrd                             ! dummy loop indices 
    101       INTEGER ::   igrd_start, igrd_end                         ! start and end of loops on igrd 
    102       INTEGER ::   idvar                                        ! netcdf var ID 
    103       INTEGER ::   iman, i15, imois                             ! Time variables for monthly clim forcing 
    104       INTEGER ::   ntimes_bdyt, ntimes_bdyu, ntimes_bdyv 
    105       INTEGER ::   itimer, totime 
    106       INTEGER ::   ii, ij                                       ! array addresses 
    107       INTEGER ::   ipi, ipj, ipk, inum                          ! local integers (NetCDF read) 
    108       INTEGER ::   iyear0, imonth0, iday0 
    109       INTEGER ::   ihours0, iminutes0, isec0 
    110       INTEGER ::   iyear, imonth, iday, isecs 
    111       INTEGER, DIMENSION(jpbtime) ::   istept, istepu, istepv   ! time arrays from data files 
    112       REAL(wp) ::   dayfrac, zxy, zoffsett 
    113       REAL(wp) ::   zoffsetu, zoffsetv 
    114       REAL(wp) ::   dayjul0, zdayjulini 
    115       REAL(wp), DIMENSION(jpbtime)      ::   zstepr             ! REAL time array from data files 
    116       REAL(wp), DIMENSION(jpbdta,1,jpk) ::   zdta               ! temporary array for data fields 
     69      INTEGER, INTENT( in )           ::   kt    ! ocean time-step index  
     70      INTEGER, INTENT( in ), OPTIONAL ::   jit   ! subcycle time-step index (for timesplitting option) 
     71      INTEGER, INTENT( in ), OPTIONAL ::   time_offset  ! time offset in units of timesteps. NB. if jit 
     72                                                        ! is present then units = subcycle timesteps. 
     73                                                        ! time_offset = 0 => get data at "now" time level 
     74                                                        ! time_offset = -1 => get data at "before" time level 
     75                                                        ! time_offset = +1 => get data at "after" time level 
     76                                                        ! etc. 
     77      !! 
     78      INTEGER     ::  ib_bdy, jfld, jstart, jend, ib, ii, ij, ik, igrd  ! local indices 
     79      INTEGER,          DIMENSION(jpbgrd) ::   ilen1  
     80      INTEGER, POINTER, DIMENSION(:)      ::   nblen, nblenrim  ! short cuts 
     81      !! 
    11782      !!--------------------------------------------------------------------------- 
    11883 
    119  
    120       IF( ln_dyn_frs .OR. ln_tra_frs    & 
    121          &               .OR. ln_ice_frs ) THEN  ! If these are both false then this routine does nothing 
    122  
    123       ! -------------------- ! 
    124       !    Initialization    ! 
    125       ! -------------------- ! 
    126  
    127       lect   = .false.           ! If true, read a time record 
    128  
    129       ! Some time variables for monthly climatological forcing: 
    130       ! ******************************************************* 
    131  
    132 !!gm  here  use directely daymod calendar variables 
    133   
    134       iman = INT( raamo )      ! Number of months in a year 
    135  
    136       i15 = INT( 2*REAL( nday, wp ) / ( REAL( nmonth_len(nmonth), wp ) + 0.5 ) ) 
    137       ! i15=0 if the current day is in the first half of the month, else i15=1 
    138  
    139       imois = nmonth + i15 - 1            ! imois is the first month record 
    140       IF( imois == 0 )   imois = iman 
    141  
    142       ! Time variable for non-climatological forcing: 
    143       ! ********************************************* 
    144       itimer = (kt-nit000+1)*rdt      ! current time in seconds for interpolation  
    145  
    146  
    147       !                                                !-------------------! 
    148       IF( kt == nit000 ) THEN                          !  First call only  ! 
    149          !                                             !-------------------! 
    150          istep(:) = 0 
    151          nbdy_b   = 0 
    152          nbdy_a   = 0 
    153  
    154          ! Get time information from bdy data file 
    155          ! *************************************** 
    156  
    157          IF(lwp) WRITE(numout,*) 
    158          IF(lwp) WRITE(numout,*)    'bdy_dta_frs : Initialize unstructured boundary data' 
    159          IF(lwp) WRITE(numout,*)    '~~~~~~~'  
    160  
    161          IF     ( nn_dtactl == 0 ) THEN 
    162             ! 
    163             IF(lwp) WRITE(numout,*) '          Bdy data are taken from initial conditions' 
    164             ! 
    165          ELSEIF (nn_dtactl == 1) THEN 
    166             ! 
    167             IF(lwp) WRITE(numout,*) '          Bdy data are read in netcdf files' 
    168             ! 
    169             dayfrac = adatrj  - REAL( itimer, wp ) / 86400.   ! day fraction at time step kt-1 
    170             dayfrac = dayfrac - INT ( dayfrac )               ! 
    171             totime  = ( nitend - nit000 + 1 ) * rdt           ! Total time of the run to verify that all the 
    172             !                                                 ! necessary time dumps in file are included 
    173             ! 
    174             clfile(1) = cn_dta_frs_T 
    175             clfile(2) = cn_dta_frs_U 
    176             clfile(3) = cn_dta_frs_V 
    177             !                                                   
    178             ! how many files are we to read in? 
    179             igrd_start = 1 
    180             igrd_end   = 3 
    181             IF(.NOT. ln_tra_frs .AND. .NOT. ln_ice_frs) THEN       ! No T-grid file. 
    182                igrd_start = 2 
    183             ELSEIF ( .NOT. ln_dyn_frs ) THEN                           ! No U-grid or V-grid file. 
    184                igrd_end   = 1          
    185             ENDIF 
    186  
    187             DO igrd = igrd_start, igrd_end                     !  loop over T, U & V grid  ! 
    188                !                                               !---------------------------! 
    189                CALL iom_open( clfile(igrd), inum ) 
    190                CALL iom_gettime( inum, zstepr, kntime=ntimes_bdy, cdunits=clunits )  
    191  
    192                SELECT CASE( igrd ) 
    193                   CASE (1)   ;   numbdyt = inum 
    194                   CASE (2)   ;   numbdyu = inum 
    195                   CASE (3)   ;   numbdyv = inum 
    196                END SELECT 
    197  
    198                ! Calculate time offset  
    199                READ(clunits,7000) iyear0, imonth0, iday0, ihours0, iminutes0, isec0 
    200                ! Convert time origin in file to julian days  
    201                isec0 = isec0 + ihours0*60.*60. + iminutes0*60. 
    202                CALL ymds2ju(iyear0, imonth0, iday0, REAL(isec0, wp), dayjul0) 
    203                ! Compute model initialization time  
    204                iyear  = ndastp / 10000 
    205                imonth = ( ndastp - iyear * 10000 ) / 100 
    206                iday   = ndastp - iyear * 10000 - imonth * 100 
    207                isecs  = dayfrac * 86400 
    208                CALL ymds2ju(iyear, imonth, iday, REAL(isecs, wp) , zdayjulini) 
    209                ! offset from initialization date: 
    210                zoffset = (dayjul0-zdayjulini)*86400 
    211                ! 
    212 7000           FORMAT('seconds since ', I4.4,'-',I2.2,'-',I2.2,' ',I2.2,':',I2.2,':',I2.2) 
    213  
    214                !! TO BE DONE... Check consistency between calendar from file  
    215                !! (available optionally from iom_gettime) and calendar in model  
    216                !! when calendar in model available outside of IOIPSL. 
    217  
    218                IF(lwp) WRITE(numout,*) 'number of times: ',ntimes_bdy 
    219                IF(lwp) WRITE(numout,*) 'offset: ',zoffset 
    220                IF(lwp) WRITE(numout,*) 'totime: ',totime 
    221                IF(lwp) WRITE(numout,*) 'zstepr: ',zstepr(1:ntimes_bdy) 
    222  
    223                ! Check that there are not too many times in the file.  
    224                IF( ntimes_bdy > jpbtime ) THEN 
    225                   WRITE(ctmp1,*) 'Check file: ', clfile(igrd), 'jpbtime= ', jpbtime, ' ntimes_bdy= ', ntimes_bdy 
    226                   CALL ctl_stop( 'Number of time dumps in files exceed jpbtime parameter', ctmp1 ) 
    227                ENDIF 
    228  
    229                ! Check that time array increases: 
    230                it = 1 
    231                DO WHILE( zstepr(it+1) > zstepr(it) .AND. it /= ntimes_bdy - 1 )  
    232                   it = it + 1 
    233                END DO 
    234                ! 
    235                IF( it /= ntimes_bdy-1 .AND. ntimes_bdy > 1 ) THEN 
    236                      WRITE(ctmp1,*) 'Check file: ', clfile(igrd) 
    237                      CALL ctl_stop( 'Time array in unstructured boundary data files',   & 
    238                         &           'does not continuously increase.'               , ctmp1 ) 
    239                ENDIF 
    240                ! 
    241                ! Check that times in file span model run time: 
    242                IF( zstepr(1) + zoffset > 0 ) THEN 
    243                      WRITE(ctmp1,*) 'Check file: ', clfile(igrd) 
    244                      CALL ctl_stop( 'First time dump in bdy file is after model initial time', ctmp1 ) 
    245                END IF 
    246                IF( zstepr(ntimes_bdy) + zoffset < totime ) THEN 
    247                      WRITE(ctmp1,*) 'Check file: ', clfile(igrd) 
    248                      CALL ctl_stop( 'Last time dump in bdy file is before model final time', ctmp1 ) 
    249                END IF 
    250                ! 
    251                SELECT CASE( igrd ) 
    252                   CASE (1) 
    253                     ntimes_bdyt = ntimes_bdy 
    254                     zoffsett = zoffset 
    255                     istept(:) = INT( zstepr(:) + zoffset ) 
    256                     numbdyt = inum 
    257                   CASE (2) 
    258                     ntimes_bdyu = ntimes_bdy 
    259                     zoffsetu = zoffset 
    260                     istepu(:) = INT( zstepr(:) + zoffset ) 
    261                     numbdyu = inum 
    262                   CASE (3) 
    263                     ntimes_bdyv = ntimes_bdy 
    264                     zoffsetv = zoffset 
    265                     istepv(:) = INT( zstepr(:) + zoffset ) 
    266                     numbdyv = inum 
    267                END SELECT 
    268                ! 
    269             END DO                                         ! end loop over T, U & V grid  
    270  
    271             IF (igrd_start == 1 .and. igrd_end == 3) THEN 
    272                ! Only test differences if we are reading in 3 files 
    273                ! Verify time consistency between files   
    274                IF( ntimes_bdyu /= ntimes_bdyt .OR. ntimes_bdyv /= ntimes_bdyt ) THEN 
    275                   CALL ctl_stop( 'Bdy data files must have the same number of time dumps',   & 
    276                   &           'Multiple time frequencies not implemented yet'  ) 
    277                ENDIF 
    278                ntimes_bdy = ntimes_bdyt 
    279                ! 
    280                IF( zoffsetu /= zoffsett .OR. zoffsetv /= zoffsett ) THEN 
    281                   CALL ctl_stop( 'Bdy data files must have the same time origin',   & 
    282                   &           'Multiple time frequencies not implemented yet' ) 
    283                ENDIF 
    284                zoffset = zoffsett 
    285             ENDIF 
    286  
    287             IF( igrd_start == 1 ) THEN   ;   istep(:) = istept(:) 
    288             ELSE                         ;   istep(:) = istepu(:) 
    289             ENDIF 
    290  
    291             ! Check number of time dumps:               
    292             IF( ntimes_bdy == 1 .AND. .NOT. ln_clim ) THEN 
    293               CALL ctl_stop( 'There is only one time dump in data files',   & 
    294                  &           'Choose ln_clim=.true. in namelist for constant bdy forcing.' ) 
    295             ENDIF 
    296  
    297             IF( ln_clim ) THEN 
    298               IF( ntimes_bdy /= 1 .AND. ntimes_bdy /= 12 ) THEN 
    299                  CALL ctl_stop( 'For climatological boundary forcing (ln_clim=.true.),',   & 
    300                     &           'bdy data files must contain 1 or 12 time dumps.' ) 
    301               ELSEIF( ntimes_bdy ==  1 ) THEN 
    302                 IF(lwp) WRITE(numout,*) 
    303                 IF(lwp) WRITE(numout,*) 'We assume constant boundary forcing from bdy data files' 
    304               ELSEIF( ntimes_bdy == 12 ) THEN 
    305                 IF(lwp) WRITE(numout,*) 
    306                 IF(lwp) WRITE(numout,*) 'We assume monthly (and cyclic) boundary forcing from bdy data files' 
    307               ENDIF 
    308             ENDIF 
    309  
    310             ! Find index of first record to read (before first model time).  
    311             it = 1 
    312             DO WHILE( istep(it+1) <= 0 .AND. it <= ntimes_bdy - 1 ) 
    313                it = it + 1 
    314             END DO 
    315             nbdy_b = it 
    316             ! 
    317             IF(lwp) WRITE(numout,*) 'Time offset is ',zoffset 
    318             IF(lwp) WRITE(numout,*) 'First record to read is ',nbdy_b 
    319  
    320          ENDIF ! endif (nn_dtactl == 1) 
    321  
    322  
    323          ! 1.2  Read first record in file if necessary (ie if nn_dtactl == 1) 
    324          ! ***************************************************************** 
    325  
    326          IF( nn_dtactl == 0 ) THEN      ! boundary data arrays are filled with initial conditions 
    327             ! 
    328             IF (ln_tra_frs) THEN 
    329                igrd = 1            ! T-points data  
    330                DO ib = 1, nblen(igrd) 
    331                   ii = nbi(ib,igrd) 
    332                   ij = nbj(ib,igrd) 
     84      IF(wrk_in_use(2, 22,23) ) THEN 
     85         CALL ctl_stop('bdy_dta: ERROR: requested workspace arrays are unavailable.')   ;   RETURN 
     86      END IF 
     87 
     88      ! Initialise data arrays once for all from initial conditions where required 
     89      !--------------------------------------------------------------------------- 
     90      IF( kt .eq. nit000 .and. .not. PRESENT(jit) ) THEN 
     91 
     92         ! Calculate depth-mean currents 
     93         !----------------------------- 
     94         pu2d => wrk_2d_22 
     95         pu2d => wrk_2d_23 
     96 
     97         pu2d(:,:) = 0.e0 
     98         pv2d(:,:) = 0.e0 
     99 
     100         DO ik = 1, jpkm1   !! Vertically integrated momentum trends 
     101             pu2d(:,:) = pu2d(:,:) + fse3u(:,:,ik) * umask(:,:,ik) * un(:,:,ik) 
     102             pv2d(:,:) = pv2d(:,:) + fse3v(:,:,ik) * vmask(:,:,ik) * vn(:,:,ik) 
     103         END DO 
     104         pu2d(:,:) = pu2d(:,:) * hur(:,:) 
     105         pv2d(:,:) = pv2d(:,:) * hvr(:,:) 
     106          
     107         DO ib_bdy = 1, nb_bdy 
     108 
     109            nblen => idx_bdy(ib_bdy)%nblen 
     110            nblenrim => idx_bdy(ib_bdy)%nblenrim 
     111 
     112            IF( nn_dyn2d(ib_bdy) .gt. 0 .and. nn_dyn2d_dta(ib_bdy) .eq. 0 ) THEN  
     113               IF( nn_dyn2d(ib_bdy) .eq. jp_frs ) THEN 
     114                  ilen1(:) = nblen(:) 
     115               ELSE 
     116                  ilen1(:) = nblenrim(:) 
     117               ENDIF 
     118               igrd = 1 
     119               DO ib = 1, ilen1(igrd) 
     120                  ii = idx_bdy(ib_bdy)%nbi(ib,igrd) 
     121                  ij = idx_bdy(ib_bdy)%nbj(ib,igrd) 
     122                  dta_bdy(ib_bdy)%ssh(ib) = sshn(ii,ij) * tmask(ii,ij,1)          
     123               END DO  
     124               igrd = 2 
     125               DO ib = 1, ilen1(igrd) 
     126                  ii = idx_bdy(ib_bdy)%nbi(ib,igrd) 
     127                  ij = idx_bdy(ib_bdy)%nbj(ib,igrd) 
     128                  dta_bdy(ib_bdy)%u2d(ib) = pu2d(ii,ij) * umask(ii,ij,1)          
     129               END DO  
     130               igrd = 3 
     131               DO ib = 1, ilen1(igrd) 
     132                  ii = idx_bdy(ib_bdy)%nbi(ib,igrd) 
     133                  ij = idx_bdy(ib_bdy)%nbj(ib,igrd) 
     134                  dta_bdy(ib_bdy)%v2d(ib) = pv2d(ii,ij) * vmask(ii,ij,1)          
     135               END DO  
     136            ENDIF 
     137 
     138            IF( nn_dyn3d(ib_bdy) .gt. 0 .and. nn_dyn3d_dta(ib_bdy) .eq. 0 ) THEN  
     139               IF( nn_dyn3d(ib_bdy) .eq. jp_frs ) THEN 
     140                  ilen1(:) = nblen(:) 
     141               ELSE 
     142                  ilen1(:) = nblenrim(:) 
     143               ENDIF 
     144               igrd = 2  
     145               DO ib = 1, ilen1(igrd) 
    333146                  DO ik = 1, jpkm1 
    334                      tbdy(ib,ik) = tsn(ii,ij,ik,jp_tem) 
    335                      sbdy(ib,ik) = tsn(ii,ij,ik,jp_sal) 
     147                     ii = idx_bdy(ib_bdy)%nbi(ib,igrd) 
     148                     ij = idx_bdy(ib_bdy)%nbj(ib,igrd) 
     149                     dta_bdy(ib_bdy)%u3d(ib,ik) =  ( un(ii,ij,ik) - pu2d(ii,ij) ) * umask(ii,ij,ik)          
     150                  END DO 
     151               END DO  
     152               igrd = 3  
     153               DO ib = 1, ilen1(igrd) 
     154                  DO ik = 1, jpkm1 
     155                     ii = idx_bdy(ib_bdy)%nbi(ib,igrd) 
     156                     ij = idx_bdy(ib_bdy)%nbj(ib,igrd) 
     157                     dta_bdy(ib_bdy)%v3d(ib,ik) =  ( vn(ii,ij,ik) - pv2d(ii,ij) ) * vmask(ii,ij,ik)          
     158                     END DO 
     159               END DO  
     160            ENDIF 
     161 
     162            IF( nn_tra(ib_bdy) .gt. 0 .and. nn_tra_dta(ib_bdy) .eq. 0 ) THEN  
     163               IF( nn_tra(ib_bdy) .eq. jp_frs ) THEN 
     164                  ilen1(:) = nblen(:) 
     165               ELSE 
     166                  ilen1(:) = nblenrim(:) 
     167               ENDIF 
     168               igrd = 1                       ! Everything is at T-points here 
     169               DO ib = 1, ilen1(igrd) 
     170                  DO ik = 1, jpkm1 
     171                     ii = idx_bdy(ib_bdy)%nbi(ib,igrd) 
     172                     ij = idx_bdy(ib_bdy)%nbj(ib,igrd) 
     173                     dta_bdy(ib_bdy)%tem(ib,ik) = tsn(ii,ij,ik,jp_tem) * tmask(ii,ij,ik)          
     174                     dta_bdy(ib_bdy)%sal(ib,ik) = tsn(ii,ij,ik,jp_sal) * tmask(ii,ij,ik)          
     175                  END DO 
     176               END DO  
     177            ENDIF 
     178 
     179#if defined key_lim2 
     180            IF( nn_ice_lim2(ib_bdy) .gt. 0 .and. nn_ice_lim2_dta(ib_bdy) .eq. 0 ) THEN  
     181               IF( nn_ice_lim2(ib_bdy) .eq. jp_frs ) THEN 
     182                  ilen1(:) = nblen(:) 
     183               ELSE 
     184                  ilen1(:) = nblenrim(:) 
     185               ENDIF 
     186               igrd = 1                       ! Everything is at T-points here 
     187               DO ib = 1, ilen1(igrd) 
     188                  ii = idx_bdy(ib_bdy)%nbi(ib,igrd) 
     189                  ij = idx_bdy(ib_bdy)%nbj(ib,igrd) 
     190                  dta_bdy(ib_bdy)%frld(ib) = frld(ii,ij) * tmask(ii,ij,1)          
     191                  dta_bdy(ib_bdy)%hicif(ib) = hicif(ii,ij) * tmask(ii,ij,1)          
     192                  dta_bdy(ib_bdy)%hsnif(ib) = hsnif(ii,ij) * tmask(ii,ij,1)          
     193               END DO  
     194            ENDIF 
     195#endif 
     196 
     197         ENDDO ! ib_bdy 
     198 
     199      ENDIF ! kt .eq. nit000 
     200 
     201      ! update external data from files 
     202      !-------------------------------- 
     203      
     204      jstart = 1 
     205      DO ib_bdy = 1, nb_bdy    
     206         IF( nn_dta(ib_bdy) .eq. 1 ) THEN ! skip this bit if no external data required 
     207       
     208            IF( PRESENT(jit) ) THEN 
     209               ! Update barotropic boundary conditions only 
     210               ! jit is optional argument for fld_read and tide_update 
     211               IF( nn_dyn2d(ib_bdy) .gt. 0 ) THEN 
     212                  IF( nn_dyn2d_dta(ib_bdy) .eq. 2 ) THEN ! tidal harmonic forcing ONLY: initialise arrays 
     213                     dta_bdy(ib_bdy)%ssh(:) = 0.0 
     214                     dta_bdy(ib_bdy)%u2d(:) = 0.0 
     215                     dta_bdy(ib_bdy)%v2d(:) = 0.0 
     216                  ENDIF 
     217                  IF( nn_dyn2d_dta(ib_bdy) .eq. 1 .or. nn_dyn2d_dta(ib_bdy) .eq. 3 ) THEN ! update external data 
     218                     jend = jstart + 2 
     219                     CALL fld_read( kt=kt, kn_fsbc=1, sd=bf(jstart:jend), map=nbmap_ptr(jstart:jend), jit=jit, time_offset=time_offset ) 
     220                  ENDIF 
     221                  IF( nn_dyn2d_dta(ib_bdy) .ge. 2 ) THEN ! update tidal harmonic forcing 
     222                     CALL tide_update( kt=kt, idx=idx_bdy(ib_bdy), dta=dta_bdy(ib_bdy), td=tides(ib_bdy), jit=jit, time_offset=time_offset ) 
     223                  ENDIF 
     224               ENDIF 
     225            ELSE 
     226               IF( nn_dyn2d(ib_bdy) .gt. 0 .and. nn_dyn2d_dta(ib_bdy) .eq. 2 ) THEN ! tidal harmonic forcing ONLY: initialise arrays 
     227                  dta_bdy(ib_bdy)%ssh(:) = 0.0 
     228                  dta_bdy(ib_bdy)%u2d(:) = 0.0 
     229                  dta_bdy(ib_bdy)%v2d(:) = 0.0 
     230               ENDIF 
     231               IF( nb_bdy_fld(ib_bdy) .gt. 0 ) THEN ! update external data 
     232                  jend = jstart + nb_bdy_fld(ib_bdy) - 1 
     233                  CALL fld_read( kt=kt, kn_fsbc=1, sd=bf(jstart:jend), map=nbmap_ptr(jstart:jend), time_offset=time_offset ) 
     234               ENDIF 
     235               IF( nn_dyn2d(ib_bdy) .gt. 0 .and. nn_dyn2d_dta(ib_bdy) .ge. 2 ) THEN ! update tidal harmonic forcing 
     236                  CALL tide_update( kt=kt, idx=idx_bdy(ib_bdy), dta=dta_bdy(ib_bdy), td=tides(ib_bdy), time_offset=time_offset ) 
     237               ENDIF 
     238            ENDIF 
     239            jstart = jend+1 
     240 
     241            ! If full velocities in boundary data then split into barotropic and baroclinic data 
     242            ! (Note that we have already made sure that you can't use ln_full_vel = .true. at the same 
     243            ! time as the dynspg_ts option).  
     244 
     245            IF( ln_full_vel_array(ib_bdy) .and.                                             &  
     246           &    ( nn_dyn2d_dta(ib_bdy) .eq. 1 .or. nn_dyn2d_dta(ib_bdy) .eq. 3 .or. nn_dyn3d_dta(ib_bdy) .eq. 1 ) ) THEN  
     247 
     248               igrd = 2                      ! zonal velocity 
     249               dta_bdy(ib_bdy)%u2d(:) = 0.0 
     250               DO ib = 1, idx_bdy(ib_bdy)%nblen(igrd) 
     251                  ii   = idx_bdy(ib_bdy)%nbi(ib,igrd) 
     252                  ij   = idx_bdy(ib_bdy)%nbj(ib,igrd) 
     253                  DO ik = 1, jpkm1 
     254                     dta_bdy(ib_bdy)%u2d(ib) = dta_bdy(ib_bdy)%u2d(ib) & 
     255              &                                + fse3u(ii,ij,ik) * umask(ii,ij,ik) * dta_bdy(ib_bdy)%u3d(ib,ik) 
     256                  END DO 
     257                  dta_bdy(ib_bdy)%u2d(ib) =  dta_bdy(ib_bdy)%u2d(ib) * hur(ii,ij) 
     258                  DO ik = 1, jpkm1 
     259                     dta_bdy(ib_bdy)%u3d(ib,ik) = dta_bdy(ib_bdy)%u3d(ib,ik) - dta_bdy(ib_bdy)%u2d(ib)  
    336260                  END DO 
    337261               END DO 
    338             ENDIF 
    339  
    340             IF(ln_dyn_frs) THEN 
    341                igrd = 2            ! U-points data  
    342                DO ib = 1, nblen(igrd) 
    343                   ii = nbi(ib,igrd) 
    344                   ij = nbj(ib,igrd) 
     262 
     263               igrd = 3                      ! meridional velocity 
     264               dta_bdy(ib_bdy)%v2d(:) = 0.0 
     265               DO ib = 1, idx_bdy(ib_bdy)%nblen(igrd) 
     266                  ii   = idx_bdy(ib_bdy)%nbi(ib,igrd) 
     267                  ij   = idx_bdy(ib_bdy)%nbj(ib,igrd) 
    345268                  DO ik = 1, jpkm1 
    346                      ubdy(ib,ik) = un(ii, ij, ik) 
     269                     dta_bdy(ib_bdy)%v2d(ib) = dta_bdy(ib_bdy)%v2d(ib) & 
     270              &                                + fse3v(ii,ij,ik) * vmask(ii,ij,ik) * dta_bdy(ib_bdy)%v3d(ib,ik) 
     271                  END DO 
     272                  dta_bdy(ib_bdy)%v2d(ib) =  dta_bdy(ib_bdy)%v2d(ib) * hvr(ii,ij) 
     273                  DO ik = 1, jpkm1 
     274                     dta_bdy(ib_bdy)%v3d(ib,ik) = dta_bdy(ib_bdy)%v3d(ib,ik) - dta_bdy(ib_bdy)%v2d(ib)  
    347275                  END DO 
    348276               END DO 
    349                ! 
    350                igrd = 3            ! V-points data  
    351                DO ib = 1, nblen(igrd)             
    352                   ii = nbi(ib,igrd) 
    353                   ij = nbj(ib,igrd) 
    354                   DO ik = 1, jpkm1 
    355                      vbdy(ib,ik) = vn(ii, ij, ik) 
    356                   END DO 
    357                END DO 
    358             ENDIF 
    359             ! 
    360 #if defined key_lim2 
    361             IF( ln_ice_frs ) THEN 
    362                igrd = 1            ! T-points data 
    363                DO ib = 1, nblen(igrd) 
    364                   frld_bdy (ib) =  frld(nbi(ib,igrd), nbj(ib,igrd)) 
    365                   hicif_bdy(ib) = hicif(nbi(ib,igrd), nbj(ib,igrd)) 
    366                   hsnif_bdy(ib) = hsnif(nbi(ib,igrd), nbj(ib,igrd)) 
    367                END DO 
    368             ENDIF 
    369 #endif 
    370          ELSEIF( nn_dtactl == 1 ) THEN    ! Set first record in the climatological case:    
    371             ! 
    372             IF( ln_clim .AND. ntimes_bdy == 1 ) THEN 
    373                nbdy_a = 1 
    374             ELSEIF( ln_clim .AND. ntimes_bdy == iman ) THEN 
    375                nbdy_b = 0 
    376                nbdy_a = imois 
     277     
     278            ENDIF 
     279 
     280         END IF ! nn_dta(ib_bdy) = 1 
     281      END DO  ! ib_bdy 
     282 
     283      IF(wrk_not_released(2, 22,23) )    CALL ctl_stop('bdy_dta: ERROR: failed to release workspace arrays.') 
     284 
     285      END SUBROUTINE bdy_dta 
     286 
     287 
     288      SUBROUTINE bdy_dta_init 
     289      !!---------------------------------------------------------------------- 
     290      !!                   ***  SUBROUTINE bdy_dta_init  *** 
     291      !!                     
     292      !! ** Purpose :   Initialise arrays for reading of external data  
     293      !!                for open boundary conditions 
     294      !! 
     295      !! ** Method  :   Use fldread.F90 
     296      !!                 
     297      !!---------------------------------------------------------------------- 
     298      USE dynspg_oce, ONLY: lk_dynspg_ts 
     299      !! 
     300      INTEGER     ::  ib_bdy, jfld, jstart, jend, ierror  ! local indices 
     301      !! 
     302      CHARACTER(len=100)                     ::   cn_dir        ! Root directory for location of data files 
     303      CHARACTER(len=100), DIMENSION(nb_bdy)  ::   cn_dir_array  ! Root directory for location of data files 
     304      LOGICAL                                ::   ln_full_vel   ! =T => full velocities in 3D boundary data 
     305                                                                ! =F => baroclinic velocities in 3D boundary data 
     306      INTEGER                                ::   ilen_global   ! Max length required for global bdy dta arrays 
     307      INTEGER,              DIMENSION(jpbgrd) ::  ilen0         ! size of local arrays 
     308      INTEGER, ALLOCATABLE, DIMENSION(:)     ::   ilen1, ilen3  ! size of 1st and 3rd dimensions of local arrays 
     309      INTEGER, ALLOCATABLE, DIMENSION(:)     ::   ibdy           ! bdy set for a particular jfld 
     310      INTEGER, ALLOCATABLE, DIMENSION(:)     ::   igrid         ! index for grid type (1,2,3 = T,U,V) 
     311      INTEGER, POINTER, DIMENSION(:)         ::   nblen, nblenrim  ! short cuts 
     312      TYPE(FLD_N), ALLOCATABLE, DIMENSION(:) ::   blf_i         !  array of namelist information structures 
     313      TYPE(FLD_N) ::   bn_tem, bn_sal, bn_u3d, bn_v3d   !  
     314      TYPE(FLD_N) ::   bn_ssh, bn_u2d, bn_v2d           ! informations about the fields to be read 
     315#if defined key_lim2 
     316      TYPE(FLD_N) ::   bn_frld, bn_hicif, bn_hsnif      ! 
     317#endif 
     318      NAMELIST/nambdy_dta/ cn_dir, bn_tem, bn_sal, bn_u3d, bn_v3d, bn_ssh, bn_u2d, bn_v2d  
     319#if defined key_lim2 
     320      NAMELIST/nambdy_dta/ bn_frld, bn_hicif, bn_hsnif 
     321#endif 
     322      NAMELIST/nambdy_dta/ ln_full_vel 
     323      !!--------------------------------------------------------------------------- 
     324 
     325      ! Set nn_dta 
     326      DO ib_bdy = 1, nb_bdy 
     327         nn_dta(ib_bdy) = MAX(  nn_dyn2d_dta(ib_bdy)       & 
     328                               ,nn_dyn3d_dta(ib_bdy)       & 
     329                               ,nn_tra_dta(ib_bdy)         & 
     330#if defined key_ice_lim2 
     331                               ,nn_ice_lim2_dta(ib_bdy)    & 
     332#endif 
     333                              ) 
     334         IF(nn_dta(ib_bdy) .gt. 1) nn_dta(ib_bdy) = 1 
     335      END DO 
     336 
     337      ! Work out upper bound of how many fields there are to read in and allocate arrays 
     338      ! --------------------------------------------------------------------------- 
     339      ALLOCATE( nb_bdy_fld(nb_bdy) ) 
     340      nb_bdy_fld(:) = 0 
     341      DO ib_bdy = 1, nb_bdy          
     342         IF( nn_dyn2d(ib_bdy) .gt. 0 .and. ( nn_dyn2d_dta(ib_bdy) .eq. 1 .or. nn_dyn2d_dta(ib_bdy) .eq. 3 ) ) THEN 
     343            nb_bdy_fld(ib_bdy) = nb_bdy_fld(ib_bdy) + 3 
     344         ENDIF 
     345         IF( nn_dyn3d(ib_bdy) .gt. 0 .and. nn_dyn3d_dta(ib_bdy) .eq. 1 ) THEN 
     346            nb_bdy_fld(ib_bdy) = nb_bdy_fld(ib_bdy) + 2 
     347         ENDIF 
     348         IF( nn_tra(ib_bdy) .gt. 0 .and. nn_tra_dta(ib_bdy) .eq. 1  ) THEN 
     349            nb_bdy_fld(ib_bdy) = nb_bdy_fld(ib_bdy) + 2 
     350         ENDIF 
     351#if defined key_lim2 
     352         IF( nn_ice_lim2(ib_bdy) .gt. 0 .and. nn_ice_lim2_dta(ib_bdy) .eq. 1  ) THEN 
     353            nb_bdy_fld(ib_bdy) = nb_bdy_fld(ib_bdy) + 3 
     354         ENDIF 
     355#endif                
     356      ENDDO             
     357 
     358      nb_bdy_fld_sum = SUM( nb_bdy_fld ) 
     359 
     360      ALLOCATE( bf(nb_bdy_fld_sum), STAT=ierror ) 
     361      IF( ierror > 0 ) THEN    
     362         CALL ctl_stop( 'bdy_dta: unable to allocate bf structure' )   ;   RETURN   
     363      ENDIF 
     364      ALLOCATE( blf_i(nb_bdy_fld_sum), STAT=ierror ) 
     365      IF( ierror > 0 ) THEN    
     366         CALL ctl_stop( 'bdy_dta: unable to allocate blf_i structure' )   ;   RETURN   
     367      ENDIF 
     368      ALLOCATE( nbmap_ptr(nb_bdy_fld_sum), STAT=ierror ) 
     369      IF( ierror > 0 ) THEN    
     370         CALL ctl_stop( 'bdy_dta: unable to allocate nbmap_ptr structure' )   ;   RETURN   
     371      ENDIF 
     372      ALLOCATE( ilen1(nb_bdy_fld_sum), ilen3(nb_bdy_fld_sum) )  
     373      ALLOCATE( ibdy(nb_bdy_fld_sum) )  
     374      ALLOCATE( igrid(nb_bdy_fld_sum) )  
     375 
     376      ! Read namelists 
     377      ! -------------- 
     378      REWIND(numnam) 
     379      jfld = 0  
     380      DO ib_bdy = 1, nb_bdy          
     381         IF( nn_dta(ib_bdy) .eq. 1 ) THEN 
     382            ! set file information 
     383            cn_dir = './'        ! directory in which the model is executed 
     384            ln_full_vel = .false. 
     385            ! ... default values (NB: frequency positive => hours, negative => months) 
     386            !                    !  file       ! frequency !  variable        ! time intep !  clim   ! 'yearly' or ! weights  ! rotation  ! 
     387            !                    !  name       !  (hours)  !   name           !   (T/F)    !  (T/F)  !  'monthly'  ! filename ! pairs     ! 
     388            bn_ssh     = FLD_N(  'bdy_ssh'     ,    24     ,  'sossheig'    ,  .false.   , .false. ,   'yearly'  , ''       , ''        ) 
     389            bn_u2d     = FLD_N(  'bdy_vel2d_u' ,    24     ,  'vobtcrtx'    ,  .false.   , .false. ,   'yearly'  , ''       , ''        ) 
     390            bn_v2d     = FLD_N(  'bdy_vel2d_v' ,    24     ,  'vobtcrty'    ,  .false.   , .false. ,   'yearly'  , ''       , ''        ) 
     391            bn_u3d     = FLD_N(  'bdy_vel3d_u' ,    24     ,  'vozocrtx'    ,  .false.   , .false. ,   'yearly'  , ''       , ''        ) 
     392            bn_v3d     = FLD_N(  'bdy_vel3d_v' ,    24     ,  'vomecrty'    ,  .false.   , .false. ,   'yearly'  , ''       , ''        ) 
     393            bn_tem     = FLD_N(  'bdy_tem'     ,    24     ,  'votemper'    ,  .false.   , .false. ,   'yearly'  , ''       , ''        ) 
     394            bn_sal     = FLD_N(  'bdy_sal'     ,    24     ,  'vosaline'    ,  .false.   , .false. ,   'yearly'  , ''       , ''        ) 
     395#if defined key_lim2 
     396            bn_frld    = FLD_N(  'bdy_frld'    ,    24     ,  'ildsconc'    ,  .false.   , .false. ,   'yearly'  , ''       , ''        ) 
     397            bn_hicif   = FLD_N(  'bdy_hicif'   ,    24     ,  'iicethic'    ,  .false.   , .false. ,   'yearly'  , ''       , ''        ) 
     398            bn_hsnif   = FLD_N(  'bdy_hsnif'   ,    24     ,  'isnothic'    ,  .false.   , .false. ,   'yearly'  , ''       , ''        ) 
     399#endif 
     400 
     401            ! Important NOT to rewind here. 
     402            READ( numnam, nambdy_dta ) 
     403 
     404            cn_dir_array(ib_bdy) = cn_dir 
     405            ln_full_vel_array(ib_bdy) = ln_full_vel 
     406 
     407            IF( ln_full_vel_array(ib_bdy) .and. lk_dynspg_ts )  THEN 
     408               CALL ctl_stop( 'bdy_dta_init: ERROR, cannot specify full velocities in boundary data',& 
     409            &                  'with dynspg_ts option' )   ;   RETURN   
     410            ENDIF              
     411 
     412            nblen => idx_bdy(ib_bdy)%nblen 
     413            nblenrim => idx_bdy(ib_bdy)%nblenrim 
     414 
     415            ! Only read in necessary fields for this set. 
     416            ! Important that barotropic variables come first. 
     417            IF( nn_dyn2d(ib_bdy) .gt. 0 .and. ( nn_dyn2d_dta(ib_bdy) .eq. 1 .or. nn_dyn2d_dta(ib_bdy) .eq. 3 ) ) THEN  
     418 
     419               IF( nn_dyn2d(ib_bdy) .ne. jp_frs ) THEN 
     420                  jfld = jfld + 1 
     421                  blf_i(jfld) = bn_ssh 
     422                  ibdy(jfld) = ib_bdy 
     423                  igrid(jfld) = 1 
     424                  ilen1(jfld) = nblenrim(igrid(jfld)) 
     425                  ilen3(jfld) = 1 
     426               ENDIF 
     427 
     428               IF( .not. ln_full_vel_array(ib_bdy) ) THEN 
     429 
     430                  jfld = jfld + 1 
     431                  blf_i(jfld) = bn_u2d 
     432                  ibdy(jfld) = ib_bdy 
     433                  igrid(jfld) = 2 
     434                  IF( nn_dyn2d(ib_bdy) .eq. jp_frs ) THEN 
     435                     ilen1(jfld) = nblen(igrid(jfld)) 
     436                  ELSE 
     437                     ilen1(jfld) = nblenrim(igrid(jfld)) 
     438                  ENDIF 
     439                  ilen3(jfld) = 1 
     440 
     441                  jfld = jfld + 1 
     442                  blf_i(jfld) = bn_v2d 
     443                  ibdy(jfld) = ib_bdy 
     444                  igrid(jfld) = 3 
     445                  IF( nn_dyn2d(ib_bdy) .eq. jp_frs ) THEN 
     446                     ilen1(jfld) = nblen(igrid(jfld)) 
     447                  ELSE 
     448                     ilen1(jfld) = nblenrim(igrid(jfld)) 
     449                  ENDIF 
     450                  ilen3(jfld) = 1 
     451 
     452               ENDIF 
     453 
     454            ENDIF 
     455 
     456            ! baroclinic velocities 
     457            IF( ( nn_dyn3d(ib_bdy) .gt. 0 .and. nn_dyn3d_dta(ib_bdy) .eq. 1 ) .or. & 
     458           &      ( ln_full_vel_array(ib_bdy) .and. nn_dyn2d(ib_bdy) .gt. 0 .and.  & 
     459           &        ( nn_dyn2d_dta(ib_bdy) .eq. 1 .or. nn_dyn2d_dta(ib_bdy) .eq. 3 ) ) ) THEN 
     460 
     461               jfld = jfld + 1 
     462               blf_i(jfld) = bn_u3d 
     463               ibdy(jfld) = ib_bdy 
     464               igrid(jfld) = 2 
     465               IF( nn_dyn3d(ib_bdy) .eq. jp_frs ) THEN 
     466                  ilen1(jfld) = nblen(igrid(jfld)) 
     467               ELSE 
     468                  ilen1(jfld) = nblenrim(igrid(jfld)) 
     469               ENDIF 
     470               ilen3(jfld) = jpk 
     471 
     472               jfld = jfld + 1 
     473               blf_i(jfld) = bn_v3d 
     474               ibdy(jfld) = ib_bdy 
     475               igrid(jfld) = 3 
     476               IF( nn_dyn3d(ib_bdy) .eq. jp_frs ) THEN 
     477                  ilen1(jfld) = nblen(igrid(jfld)) 
     478               ELSE 
     479                  ilen1(jfld) = nblenrim(igrid(jfld)) 
     480               ENDIF 
     481               ilen3(jfld) = jpk 
     482 
     483            ENDIF 
     484 
     485            ! temperature and salinity 
     486            IF( nn_tra(ib_bdy) .gt. 0 .and. nn_tra_dta(ib_bdy) .eq. 1 ) THEN 
     487 
     488               jfld = jfld + 1 
     489               blf_i(jfld) = bn_tem 
     490               ibdy(jfld) = ib_bdy 
     491               igrid(jfld) = 1 
     492               IF( nn_tra(ib_bdy) .eq. jp_frs ) THEN 
     493                  ilen1(jfld) = nblen(igrid(jfld)) 
     494               ELSE 
     495                  ilen1(jfld) = nblenrim(igrid(jfld)) 
     496               ENDIF 
     497               ilen3(jfld) = jpk 
     498 
     499               jfld = jfld + 1 
     500               blf_i(jfld) = bn_sal 
     501               ibdy(jfld) = ib_bdy 
     502               igrid(jfld) = 1 
     503               IF( nn_tra(ib_bdy) .eq. jp_frs ) THEN 
     504                  ilen1(jfld) = nblen(igrid(jfld)) 
     505               ELSE 
     506                  ilen1(jfld) = nblenrim(igrid(jfld)) 
     507               ENDIF 
     508               ilen3(jfld) = jpk 
     509 
     510            ENDIF 
     511 
     512#if defined key_lim2 
     513            ! sea ice 
     514            IF( nn_ice_lim2(ib_bdy) .gt. 0 .and. nn_ice_lim2_dta(ib_bdy) .eq. 1 ) THEN 
     515 
     516               jfld = jfld + 1 
     517               blf_i(jfld) = bn_frld 
     518               ibdy(jfld) = ib_bdy 
     519               igrid(jfld) = 1 
     520               IF( nn_ice_lim2(ib_bdy) .eq. jp_frs ) THEN 
     521                  ilen1(jfld) = nblen(igrid(jfld)) 
     522               ELSE 
     523                  ilen1(jfld) = nblenrim(igrid(jfld)) 
     524               ENDIF 
     525               ilen3(jfld) = 1 
     526 
     527               jfld = jfld + 1 
     528               blf_i(jfld) = bn_hicif 
     529               ibdy(jfld) = ib_bdy 
     530               igrid(jfld) = 1 
     531               IF( nn_ice_lim2(ib_bdy) .eq. jp_frs ) THEN 
     532                  ilen1(jfld) = nblen(igrid(jfld)) 
     533               ELSE 
     534                  ilen1(jfld) = nblenrim(igrid(jfld)) 
     535               ENDIF 
     536               ilen3(jfld) = 1 
     537 
     538               jfld = jfld + 1 
     539               blf_i(jfld) = bn_hsnif 
     540               ibdy(jfld) = ib_bdy 
     541               igrid(jfld) = 1 
     542               IF( nn_ice_lim2(ib_bdy) .eq. jp_frs ) THEN 
     543                  ilen1(jfld) = nblen(igrid(jfld)) 
     544               ELSE 
     545                  ilen1(jfld) = nblenrim(igrid(jfld)) 
     546               ENDIF 
     547               ilen3(jfld) = 1 
     548 
     549            ENDIF 
     550#endif 
     551            ! Recalculate field counts 
     552            !------------------------- 
     553            nb_bdy_fld_sum = 0 
     554            IF( ib_bdy .eq. 1 ) THEN  
     555               nb_bdy_fld(ib_bdy) = jfld 
     556               nb_bdy_fld_sum     = jfld               
    377557            ELSE 
    378                nbdy_a = nbdy_b 
    379             ENDIF 
    380     
    381             ! Read first record: 
    382             ipj  = 1 
    383             ipk  = jpk 
    384             igrd = 1 
    385             ipi  = nblendta(igrd) 
    386  
    387             IF(ln_tra_frs) THEN 
    388                ! 
    389                igrd = 1                                           ! Temperature 
    390                IF( nblendta(igrd) <=  0 ) THEN  
    391                   idvar = iom_varid( numbdyt, 'votemper' ) 
    392                   nblendta(igrd) = iom_file(numbdyt)%dimsz(1,idvar) 
    393                ENDIF 
    394                IF(lwp) WRITE(numout,*) 'Dim size for votemper is ', nblendta(igrd) 
    395                ipi = nblendta(igrd) 
    396                CALL iom_get ( numbdyt, jpdom_unknown, 'votemper', zdta(1:ipi,1:ipj,1:ipk), nbdy_a ) 
    397                ! 
    398                DO ib = 1, nblen(igrd) 
    399                   DO ik = 1, jpkm1 
    400                      tbdydta(ib,ik,2) =  zdta(nbmap(ib,igrd),1,ik) 
    401                   END DO 
    402                END DO 
    403                ! 
    404                igrd = 1                                           ! salinity 
    405                IF( nblendta(igrd) .le. 0 ) THEN  
    406                   idvar = iom_varid( numbdyt, 'vosaline' ) 
    407                   nblendta(igrd) = iom_file(numbdyt)%dimsz(1,idvar) 
    408                ENDIF 
    409                IF(lwp) WRITE(numout,*) 'Dim size for vosaline is ', nblendta(igrd) 
    410                ipi = nblendta(igrd) 
    411                CALL iom_get ( numbdyt, jpdom_unknown, 'vosaline', zdta(1:ipi,1:ipj,1:ipk), nbdy_a ) 
    412                ! 
    413                DO ib = 1, nblen(igrd) 
    414                   DO ik = 1, jpkm1 
    415                      sbdydta(ib,ik,2) =  zdta(nbmap(ib,igrd),1,ik) 
    416                   END DO 
    417                END DO 
    418             ENDIF  ! ln_tra_frs 
    419   
    420             IF( ln_dyn_frs ) THEN 
    421                ! 
    422                igrd = 2                                           ! u-velocity 
    423                IF ( nblendta(igrd) .le. 0 ) THEN  
    424                  idvar = iom_varid( numbdyu,'vozocrtx' ) 
    425                  nblendta(igrd) = iom_file(numbdyu)%dimsz(1,idvar) 
    426                ENDIF 
    427                IF(lwp) WRITE(numout,*) 'Dim size for vozocrtx is ', nblendta(igrd) 
    428                ipi = nblendta(igrd) 
    429                CALL iom_get ( numbdyu, jpdom_unknown,'vozocrtx',zdta(1:ipi,1:ipj,1:ipk),nbdy_a ) 
    430                DO ib = 1, nblen(igrd) 
    431                   DO ik = 1, jpkm1 
    432                      ubdydta(ib,ik,2) =  zdta(nbmap(ib,igrd),1,ik) 
    433                   END DO 
    434                END DO 
    435                ! 
    436                igrd = 3                                           ! v-velocity 
    437                IF ( nblendta(igrd) .le. 0 ) THEN  
    438                  idvar = iom_varid( numbdyv,'vomecrty' ) 
    439                  nblendta(igrd) = iom_file(numbdyv)%dimsz(1,idvar) 
    440                ENDIF 
    441                IF(lwp) WRITE(numout,*) 'Dim size for vomecrty is ', nblendta(igrd) 
    442                ipi = nblendta(igrd) 
    443                CALL iom_get ( numbdyv, jpdom_unknown,'vomecrty',zdta(1:ipi,1:ipj,1:ipk),nbdy_a ) 
    444                DO ib = 1, nblen(igrd) 
    445                   DO ik = 1, jpkm1 
    446                      vbdydta(ib,ik,2) =  zdta(nbmap(ib,igrd),1,ik) 
    447                   END DO 
    448                END DO 
    449             ENDIF ! ln_dyn_frs 
    450  
    451 #if defined key_lim2 
    452             IF( ln_ice_frs ) THEN 
    453               ! 
    454               igrd=1                                              ! leads fraction 
    455               IF(lwp) WRITE(numout,*) 'Dim size for ildsconc is ',nblendta(igrd) 
    456               ipi=nblendta(igrd) 
    457               CALL iom_get ( numbdyt, jpdom_unknown,'ildsconc',zdta(1:ipi,:,1),nbdy_a ) 
    458               DO ib=1, nblen(igrd) 
    459                 frld_bdydta(ib,2) =  zdta(nbmap(ib,igrd),1,1) 
    460               END DO 
    461               ! 
    462               igrd=1                                              ! ice thickness 
    463               IF(lwp) WRITE(numout,*) 'Dim size for iicethic is ',nblendta(igrd) 
    464               ipi=nblendta(igrd) 
    465               CALL iom_get ( numbdyt, jpdom_unknown,'iicethic',zdta(1:ipi,:,1),nbdy_a ) 
    466               DO ib=1, nblen(igrd) 
    467                 hicif_bdydta(ib,2) =  zdta(nbmap(ib,igrd),1,1) 
    468               END DO 
    469               ! 
    470               igrd=1                                              ! snow thickness 
    471               IF(lwp) WRITE(numout,*) 'Dim size for isnowthi is ',nblendta(igrd) 
    472               ipi=nblendta(igrd) 
    473               CALL iom_get ( numbdyt, jpdom_unknown,'isnowthi',zdta(1:ipi,:,1),nbdy_a ) 
    474               DO ib=1, nblen(igrd) 
    475                 hsnif_bdydta(ib,2) =  zdta(nbmap(ib,igrd),1,1) 
    476               END DO 
    477             ENDIF ! just if ln_ice_frs is set 
    478 #endif 
    479  
    480             IF( .NOT.ln_clim .AND. istep(1) > 0 ) THEN     ! First data time is after start of run 
    481                nbdy_b = nbdy_a                                 ! Put first value in both time levels 
    482                IF( ln_tra_frs ) THEN 
    483                  tbdydta(:,:,1) = tbdydta(:,:,2) 
    484                  sbdydta(:,:,1) = sbdydta(:,:,2) 
    485                ENDIF 
    486                IF( ln_dyn_frs ) THEN 
    487                  ubdydta(:,:,1) = ubdydta(:,:,2) 
    488                  vbdydta(:,:,1) = vbdydta(:,:,2) 
    489                ENDIF 
    490 #if defined key_lim2 
    491                IF( ln_ice_frs ) THEN 
    492                   frld_bdydta (:,1) =  frld_bdydta(:,2) 
    493                   hicif_bdydta(:,1) = hicif_bdydta(:,2) 
    494                   hsnif_bdydta(:,1) = hsnif_bdydta(:,2) 
    495                ENDIF 
    496 #endif 
    497             END IF 
    498             ! 
    499          END IF   ! nn_dtactl == 0/1 
    500   
    501          ! In the case of constant boundary forcing fill bdy arrays once for all 
    502          IF( ln_clim .AND. ntimes_bdy == 1 ) THEN 
    503             IF( ln_tra_frs ) THEN 
    504                tbdy  (:,:) = tbdydta  (:,:,2) 
    505                sbdy  (:,:) = sbdydta  (:,:,2) 
    506             ENDIF 
    507             IF( ln_dyn_frs) THEN 
    508                ubdy  (:,:) = ubdydta  (:,:,2) 
    509                vbdy  (:,:) = vbdydta  (:,:,2) 
    510             ENDIF 
    511 #if defined key_lim2 
    512             IF( ln_ice_frs ) THEN 
    513                frld_bdy (:) = frld_bdydta (:,2) 
    514                hicif_bdy(:) = hicif_bdydta(:,2) 
    515                hsnif_bdy(:) = hsnif_bdydta(:,2) 
    516             ENDIF 
    517 #endif 
    518  
    519             IF( ln_tra_frs .OR. ln_ice_frs) CALL iom_close( numbdyt ) 
    520             IF( ln_dyn_frs                    ) CALL iom_close( numbdyu ) 
    521             IF( ln_dyn_frs                    ) CALL iom_close( numbdyv ) 
    522          END IF 
    523          ! 
    524       ENDIF                                            ! End if nit000 
    525  
    526  
    527       !                                                !---------------------! 
    528       IF( nn_dtactl == 1 .AND. ntimes_bdy > 1 ) THEN    !  at each time step  ! 
    529          !                                             !---------------------! 
    530          ! Read one more record if necessary 
    531          !********************************** 
    532  
    533          IF( ln_clim .AND. imois /= nbdy_b ) THEN      ! remember that nbdy_b=0 for kt=nit000 
    534             nbdy_b = imois 
    535             nbdy_a = imois + 1 
    536             nbdy_b = MOD( nbdy_b, iman )   ;   IF( nbdy_b == 0 ) nbdy_b = iman 
    537             nbdy_a = MOD( nbdy_a, iman )   ;   IF( nbdy_a == 0 ) nbdy_a = iman 
    538             lect=.true. 
    539          ELSEIF( .NOT.ln_clim .AND. itimer >= istep(nbdy_a) ) THEN 
    540  
    541             IF( nbdy_a < ntimes_bdy ) THEN 
    542                nbdy_b = nbdy_a 
    543                nbdy_a = nbdy_a + 1 
    544                lect  =.true. 
     558               nb_bdy_fld(ib_bdy) = jfld - nb_bdy_fld_sum 
     559               nb_bdy_fld_sum = nb_bdy_fld_sum + nb_bdy_fld(ib_bdy) 
     560            ENDIF 
     561 
     562         ENDIF ! nn_dta .eq. 1 
     563      ENDDO ! ib_bdy 
     564 
     565 
     566      DO jfld = 1, nb_bdy_fld_sum 
     567         ALLOCATE( bf(jfld)%fnow(ilen1(jfld),1,ilen3(jfld)) ) 
     568         IF( blf_i(jfld)%ln_tint ) ALLOCATE( bf(jfld)%fdta(ilen1(jfld),1,ilen3(jfld),2) ) 
     569         nbmap_ptr(jfld)%ptr => idx_bdy(ibdy(jfld))%nbmap(:,igrid(jfld)) 
     570      ENDDO 
     571 
     572      ! fill bf with blf_i and control print 
     573      !------------------------------------- 
     574      jstart = 1 
     575      DO ib_bdy = 1, nb_bdy 
     576         jend = jstart + nb_bdy_fld(ib_bdy) - 1 
     577         CALL fld_fill( bf(jstart:jend), blf_i(jstart:jend), cn_dir_array(ib_bdy), 'bdy_dta', 'open boundary conditions', 'nambdy_dta' ) 
     578         jstart = jend + 1 
     579      ENDDO 
     580 
     581      ! Initialise local boundary data arrays 
     582      ! nn_xxx_dta=0 : allocate space - will be filled from initial conditions later 
     583      ! nn_xxx_dta=1 : point to "fnow" arrays 
     584      !------------------------------------- 
     585 
     586      jfld = 0 
     587      DO ib_bdy=1, nb_bdy 
     588 
     589         nblen => idx_bdy(ib_bdy)%nblen 
     590         nblenrim => idx_bdy(ib_bdy)%nblenrim 
     591 
     592         IF (nn_dyn2d(ib_bdy) .gt. 0) THEN 
     593            IF( nn_dyn2d_dta(ib_bdy) .eq. 0 .or. nn_dyn2d_dta(ib_bdy) .eq. 2 .or. ln_full_vel_array(ib_bdy) ) THEN 
     594               IF( nn_dyn2d(ib_bdy) .eq. jp_frs ) THEN 
     595                  ilen0(1:3) = nblen(1:3) 
     596               ELSE 
     597                  ilen0(1:3) = nblenrim(1:3) 
     598               ENDIF 
     599               ALLOCATE( dta_bdy(ib_bdy)%ssh(ilen0(1)) ) 
     600               ALLOCATE( dta_bdy(ib_bdy)%u2d(ilen0(2)) ) 
     601               ALLOCATE( dta_bdy(ib_bdy)%v2d(ilen0(3)) ) 
    545602            ELSE 
    546                ! We have reached the end of the file 
    547                ! put the last data time into both time levels 
    548                nbdy_b = nbdy_a 
    549                IF(ln_tra_frs) THEN 
    550                   tbdydta(:,:,1) =  tbdydta(:,:,2) 
    551                   sbdydta(:,:,1) =  sbdydta(:,:,2) 
    552                ENDIF 
    553                IF(ln_dyn_frs) THEN 
    554                   ubdydta(:,:,1) =  ubdydta(:,:,2) 
    555                   vbdydta(:,:,1) =  vbdydta(:,:,2) 
    556                ENDIF 
    557 #if defined key_lim2 
    558                IF(ln_ice_frs) THEN 
    559                   frld_bdydta (:,1) =  frld_bdydta (:,2) 
    560                   hicif_bdydta(:,1) =  hicif_bdydta(:,2) 
    561                   hsnif_bdydta(:,1) =  hsnif_bdydta(:,2) 
    562                ENDIF 
    563 #endif 
    564             END IF ! nbdy_a < ntimes_bdy 
    565             ! 
    566         END IF 
    567           
    568         IF( lect ) THEN           ! Swap arrays 
    569            IF( ln_tra_frs ) THEN 
    570              tbdydta(:,:,1) =  tbdydta(:,:,2) 
    571              sbdydta(:,:,1) =  sbdydta(:,:,2) 
    572            ENDIF 
    573            IF( ln_dyn_frs ) THEN 
    574              ubdydta(:,:,1) =  ubdydta(:,:,2) 
    575              vbdydta(:,:,1) =  vbdydta(:,:,2) 
    576            ENDIF 
    577 #if defined key_lim2 
    578            IF( ln_ice_frs ) THEN 
    579              frld_bdydta (:,1) =  frld_bdydta (:,2) 
    580              hicif_bdydta(:,1) =  hicif_bdydta(:,2) 
    581              hsnif_bdydta(:,1) =  hsnif_bdydta(:,2) 
    582            ENDIF 
    583 #endif  
    584            ! read another set 
    585            ipj  = 1 
    586            ipk  = jpk 
    587  
    588            IF( ln_tra_frs ) THEN 
    589               !  
    590               igrd = 1                                   ! temperature 
    591               ipi  = nblendta(igrd) 
    592               CALL iom_get ( numbdyt, jpdom_unknown, 'votemper', zdta(1:ipi,1:ipj,1:ipk), nbdy_a ) 
    593               DO ib = 1, nblen(igrd) 
    594                  DO ik = 1, jpkm1 
    595                     tbdydta(ib,ik,2) = zdta(nbmap(ib,igrd),1,ik) 
    596                  END DO 
    597               END DO 
    598               ! 
    599               igrd = 1                                   ! salinity 
    600               ipi  = nblendta(igrd) 
    601               CALL iom_get ( numbdyt, jpdom_unknown, 'vosaline', zdta(1:ipi,1:ipj,1:ipk), nbdy_a ) 
    602               DO ib = 1, nblen(igrd) 
    603                  DO ik = 1, jpkm1 
    604                     sbdydta(ib,ik,2) = zdta(nbmap(ib,igrd),1,ik) 
    605                  END DO 
    606               END DO 
    607            ENDIF ! ln_tra_frs 
    608  
    609            IF(ln_dyn_frs) THEN 
    610               ! 
    611               igrd = 2                                   ! u-velocity 
    612               ipi  = nblendta(igrd) 
    613               CALL iom_get ( numbdyu, jpdom_unknown,'vozocrtx',zdta(1:ipi,1:ipj,1:ipk),nbdy_a ) 
    614               DO ib = 1, nblen(igrd) 
    615                 DO ik = 1, jpkm1 
    616                   ubdydta(ib,ik,2) =  zdta(nbmap(ib,igrd),1,ik) 
    617                 END DO 
    618               END DO 
    619               ! 
    620               igrd = 3                                   ! v-velocity 
    621               ipi  = nblendta(igrd) 
    622               CALL iom_get ( numbdyv, jpdom_unknown,'vomecrty',zdta(1:ipi,1:ipj,1:ipk),nbdy_a ) 
    623               DO ib = 1, nblen(igrd) 
    624                  DO ik = 1, jpkm1 
    625                     vbdydta(ib,ik,2) =  zdta(nbmap(ib,igrd),1,ik) 
    626                  END DO 
    627               END DO 
    628            ENDIF ! ln_dyn_frs 
    629            ! 
    630 #if defined key_lim2 
    631            IF(ln_ice_frs) THEN 
    632              ! 
    633              igrd = 1                                    ! ice concentration 
    634              ipi=nblendta(igrd) 
    635              CALL iom_get ( numbdyt, jpdom_unknown,'ildsconc',zdta(1:ipi,:,1),nbdy_a ) 
    636              DO ib=1, nblen(igrd) 
    637                frld_bdydta(ib,2) =  zdta( nbmap(ib,igrd), 1, 1 ) 
    638              END DO 
    639              ! 
    640              igrd=1                                      ! ice thickness 
    641              ipi=nblendta(igrd) 
    642              CALL iom_get ( numbdyt, jpdom_unknown,'iicethic',zdta(1:ipi,:,1),nbdy_a ) 
    643              DO ib=1, nblen(igrd) 
    644                hicif_bdydta(ib,2) =  zdta( nbmap(ib,igrd), 1, 1 ) 
    645              END DO 
    646              ! 
    647              igrd=1                                      ! snow thickness 
    648              ipi=nblendta(igrd) 
    649              CALL iom_get ( numbdyt, jpdom_unknown,'isnowthi',zdta(1:ipi,:,1),nbdy_a ) 
    650              DO ib=1, nblen(igrd) 
    651                hsnif_bdydta(ib,2) =  zdta( nbmap(ib,igrd), 1, 1 ) 
    652              END DO 
    653            ENDIF ! ln_ice_frs 
    654 #endif 
    655            ! 
    656            IF(lwp) WRITE(numout,*) 'bdy_dta_frs : first record file used nbdy_b ',nbdy_b 
    657            IF(lwp) WRITE(numout,*) '~~~~~~~~  last  record file used nbdy_a ',nbdy_a 
    658            IF (.NOT.ln_clim) THEN 
    659               IF(lwp) WRITE(numout,*) 'first  record time (s): ', istep(nbdy_b) 
    660               IF(lwp) WRITE(numout,*) 'model time (s)        : ', itimer 
    661               IF(lwp) WRITE(numout,*) 'second record time (s): ', istep(nbdy_a) 
    662            ENDIF 
    663            ! 
    664        ENDIF ! end lect=.true. 
    665  
    666  
    667        ! Interpolate linearly 
    668        ! ******************** 
    669        !  
    670        IF( ln_clim ) THEN   ;   zxy = REAL( nday                   ) / REAL( nmonth_len(nbdy_b) ) + 0.5 - i15 
    671        ELSEIF( istep(nbdy_b) == istep(nbdy_a) ) THEN  
    672                                     zxy = 0.0_wp 
    673        ELSE                     ;   zxy = REAL( istep(nbdy_b) - itimer ) / REAL( istep(nbdy_b) - istep(nbdy_a) ) 
    674        END IF 
    675  
    676           IF(ln_tra_frs) THEN 
    677              igrd = 1                                   ! temperature & salinity 
    678              DO ib = 1, nblen(igrd) 
    679                DO ik = 1, jpkm1 
    680                  tbdy(ib,ik) = zxy * tbdydta(ib,ik,2) + (1.-zxy) * tbdydta(ib,ik,1) 
    681                  sbdy(ib,ik) = zxy * sbdydta(ib,ik,2) + (1.-zxy) * sbdydta(ib,ik,1) 
    682                END DO 
    683              END DO 
    684           ENDIF 
    685  
    686           IF(ln_dyn_frs) THEN 
    687              igrd = 2                                   ! u-velocity 
    688              DO ib = 1, nblen(igrd) 
    689                DO ik = 1, jpkm1 
    690                  ubdy(ib,ik) = zxy * ubdydta(ib,ik,2) + (1.-zxy) * ubdydta(ib,ik,1)    
    691                END DO 
    692              END DO 
    693              ! 
    694              igrd = 3                                   ! v-velocity 
    695              DO ib = 1, nblen(igrd) 
    696                DO ik = 1, jpkm1 
    697                  vbdy(ib,ik) = zxy * vbdydta(ib,ik,2) + (1.-zxy) * vbdydta(ib,ik,1)    
    698                END DO 
    699              END DO 
    700           ENDIF 
    701  
    702 #if defined key_lim2 
    703           IF(ln_ice_frs) THEN 
    704             igrd=1 
    705             DO ib=1, nblen(igrd) 
    706                frld_bdy(ib) = zxy *  frld_bdydta(ib,2) + (1.-zxy) *  frld_bdydta(ib,1) 
    707               hicif_bdy(ib) = zxy * hicif_bdydta(ib,2) + (1.-zxy) * hicif_bdydta(ib,1) 
    708               hsnif_bdy(ib) = zxy * hsnif_bdydta(ib,2) + (1.-zxy) * hsnif_bdydta(ib,1) 
    709             END DO 
    710           ENDIF ! just if ln_ice_frs is true 
    711 #endif 
    712  
    713       END IF                       !end if ((nn_dtactl==1).AND.(ntimes_bdy>1)) 
    714      
    715  
    716       !                                                !---------------------! 
    717       !                                                !     last call       ! 
    718       !                                                !---------------------! 
    719       IF( kt == nitend ) THEN 
    720           IF(ln_tra_frs .or. ln_ice_frs) CALL iom_close( numbdyt )              ! Closing of the 3 files 
    721           IF(ln_dyn_frs) CALL iom_close( numbdyu ) 
    722           IF(ln_dyn_frs) CALL iom_close( numbdyv ) 
    723       ENDIF 
    724       ! 
    725       ENDIF ! ln_dyn_frs .OR. ln_tra_frs 
    726       ! 
    727    END SUBROUTINE bdy_dta_frs 
    728  
    729  
    730    SUBROUTINE bdy_dta_fla( kt, jit, icycl ) 
    731       !!--------------------------------------------------------------------------- 
    732       !!                      ***  SUBROUTINE bdy_dta_fla  *** 
    733       !!                     
    734       !! ** Purpose :   Read unstructured boundary data for Flather condition 
    735       !! 
    736       !! ** Method  :  At the first timestep, read in boundary data for two 
    737       !!               times from the file and time-interpolate. At other  
    738       !!               timesteps, check to see if we need another time from  
    739       !!               the file. If so read it in. Time interpolate. 
    740       !!--------------------------------------------------------------------------- 
    741 !!gm DOCTOR names :   argument integer :  start with "k" 
    742       INTEGER, INTENT( in ) ::   kt          ! ocean time-step index 
    743       INTEGER, INTENT( in ) ::   jit         ! barotropic time step index 
    744       INTEGER, INTENT( in ) ::   icycl       ! number of cycles need for final file close 
    745       !                                      ! (for timesplitting option, otherwise zero) 
    746       !! 
    747       LOGICAL ::   lect                      ! flag for reading 
    748       INTEGER ::   it, ib, igrd              ! dummy loop indices 
    749       INTEGER ::   idvar                     ! netcdf var ID 
    750       INTEGER ::   iman, i15, imois          ! Time variables for monthly clim forcing 
    751       INTEGER ::   ntimes_bdyt, ntimes_bdyu, ntimes_bdyv 
    752       INTEGER ::   itimer, totime 
    753       INTEGER ::   ipi, ipj, ipk, inum       ! temporary integers (NetCDF read) 
    754       INTEGER ::   iyear0, imonth0, iday0 
    755       INTEGER ::   ihours0, iminutes0, isec0 
    756       INTEGER ::   iyear, imonth, iday, isecs 
    757       INTEGER, DIMENSION(jpbtime) ::   istept, istepu, istepv   ! time arrays from data files 
    758       REAL(wp) ::   dayfrac, zxy, zoffsett 
    759       REAL(wp) ::   zoffsetu, zoffsetv 
    760       REAL(wp) ::   dayjul0, zdayjulini 
    761       REAL(wp) ::   zinterval_s, zinterval_e                    ! First and last interval in time axis 
    762       REAL(wp), DIMENSION(jpbtime)      ::   zstepr             ! REAL time array from data files 
    763       REAL(wp), DIMENSION(jpbdta,1)     ::   zdta               ! temporary array for data fields 
    764       CHARACTER(LEN=80), DIMENSION(6)   ::   clfile 
    765       CHARACTER(LEN=70 )                ::   clunits            ! units attribute of time coordinate 
    766       !!--------------------------------------------------------------------------- 
    767  
    768 !!gm   add here the same style as in bdy_dta_frs 
    769 !!gm      clearly bdy_dta_fla and bdy_dta_frs  can be combined...    
    770 !!gm      too many things duplicated in the read of data...   simplification can be done 
    771  
    772       ! -------------------- ! 
    773       !    Initialization    ! 
    774       ! -------------------- ! 
    775  
    776       lect   = .false.           ! If true, read a time record 
    777  
    778       ! Some time variables for monthly climatological forcing: 
    779       ! ******************************************************* 
    780  !!gm  here  use directely daymod variables 
    781   
    782       iman  = INT( raamo ) ! Number of months in a year 
    783  
    784       i15 = INT( 2*REAL( nday, wp ) / ( REAL( nmonth_len(nmonth), wp ) + 0.5 ) ) 
    785       ! i15=0 if the current day is in the first half of the month, else i15=1 
    786  
    787       imois = nmonth + i15 - 1            ! imois is the first month record 
    788       IF( imois == 0 ) imois = iman 
    789  
    790       ! Time variable for non-climatological forcing: 
    791       ! ********************************************* 
    792  
    793       itimer = ((kt-1)-nit000+1)*rdt                      ! current time in seconds for interpolation  
    794       itimer = itimer + jit*rdt/REAL(nn_baro,wp)      ! in non-climatological case 
    795  
    796       IF ( ln_tides ) THEN 
    797  
    798          ! -------------------------------------! 
    799          ! Update BDY fields with tidal forcing ! 
    800          ! -------------------------------------!   
    801  
    802          CALL tide_update( kt, jit )  
    803    
    804       ENDIF 
    805  
    806       IF ( ln_dyn_fla ) THEN 
    807  
    808          ! -------------------------------------! 
    809          ! Update BDY fields with model data    ! 
    810          ! -------------------------------------!   
    811  
    812       !                                                !-------------------! 
    813       IF( kt == nit000 .and. jit ==2 ) THEN            !  First call only  ! 
    814          !                                             !-------------------! 
    815          istep_bt(:) = 0 
    816          nbdy_b_bt    = 0 
    817          nbdy_a_bt    = 0 
    818  
    819          ! Get time information from bdy data file 
    820          ! *************************************** 
    821  
    822         IF(lwp) WRITE(numout,*) 
    823         IF(lwp) WRITE(numout,*)    'bdy_dta_fla :Initialize unstructured boundary data for barotropic variables.' 
    824         IF(lwp) WRITE(numout,*)    '~~~~~~~'  
    825  
    826         IF( nn_dtactl == 0 ) THEN 
    827           IF(lwp) WRITE(numout,*)  'Bdy data are taken from initial conditions' 
    828  
    829         ELSEIF (nn_dtactl == 1) THEN 
    830           IF(lwp) WRITE(numout,*)  'Bdy data are read in netcdf files' 
    831  
    832           dayfrac = adatrj  - REAL(itimer,wp)/86400. ! day fraction at time step kt-1 
    833           dayfrac = dayfrac - INT (dayfrac)          ! 
    834           totime = (nitend-nit000+1)*rdt             ! Total time of the run to verify that all the 
    835                                                      ! necessary time dumps in file are included 
    836  
    837           clfile(4) = cn_dta_fla_T 
    838           clfile(5) = cn_dta_fla_U 
    839           clfile(6) = cn_dta_fla_V 
    840  
    841           DO igrd = 4,6 
    842  
    843             CALL iom_open( clfile(igrd), inum ) 
    844             CALL iom_gettime( inum, zstepr, kntime=ntimes_bdy_bt, cdunits=clunits )  
    845  
    846             SELECT CASE( igrd ) 
    847                CASE (4)  
    848                   numbdyt_bt = inum 
    849                CASE (5)  
    850                   numbdyu_bt = inum 
    851                CASE (6)  
    852                   numbdyv_bt = inum 
    853             END SELECT 
    854  
    855             ! Calculate time offset  
    856             READ(clunits,7000) iyear0, imonth0, iday0, ihours0, iminutes0, isec0 
    857             ! Convert time origin in file to julian days  
    858             isec0 = isec0 + ihours0*60.*60. + iminutes0*60. 
    859             CALL ymds2ju(iyear0, imonth0, iday0, REAL(isec0, wp), dayjul0) 
    860             ! Compute model initialization time  
    861             iyear  = ndastp / 10000 
    862             imonth = ( ndastp - iyear * 10000 ) / 100 
    863             iday   = ndastp - iyear * 10000 - imonth * 100 
    864             isecs  = dayfrac * 86400 
    865             CALL ymds2ju(iyear, imonth, iday, REAL(isecs, wp) , zdayjulini) 
    866             ! zoffset from initialization date: 
    867             zoffset = (dayjul0-zdayjulini)*86400 
    868             ! 
    869  
    870 7000 FORMAT('seconds since ', I4.4,'-',I2.2,'-',I2.2,' ',I2.2,':',I2.2,':',I2.2) 
    871  
    872             !! TO BE DONE... Check consistency between calendar from file  
    873             !! (available optionally from iom_gettime) and calendar in model  
    874             !! when calendar in model available outside of IOIPSL. 
    875  
    876             ! Check that there are not too many times in the file.  
    877             IF (ntimes_bdy_bt > jpbtime) CALL ctl_stop( & 
    878                  'Number of time dumps in bdy file exceed jpbtime parameter', & 
    879                  'Check file:' // TRIM(clfile(igrd))  ) 
    880  
    881             ! Check that time array increases (or interp will fail): 
    882             DO it = 2, ntimes_bdy_bt 
    883                IF ( zstepr(it-1) >= zstepr(it) ) THEN 
    884                   CALL ctl_stop('Time array in unstructured boundary data file', & 
    885                        'does not continuously increase.',               & 
    886                        'Check file:' // TRIM(clfile(igrd))  ) 
    887                   EXIT 
    888                END IF 
    889             END DO 
    890  
    891             IF ( .NOT. ln_clim ) THEN 
    892                ! Check that times in file span model run time: 
    893  
    894                ! Note: the fields may be time means, so we allow nit000 to be before 
    895                ! first time in the file, provided that it falls inside the meaning 
    896                ! period of the first field.  Until we can get the meaning period 
    897                ! from the file, use the interval between fields as a proxy. 
    898                ! If nit000 is before the first time, use the value at first time 
    899                ! instead of extrapolating.  This is done by putting time 1 into 
    900                ! both time levels. 
    901                ! The same applies to the last time level: see setting of lect below. 
    902  
    903                IF ( ntimes_bdy_bt == 1 ) CALL ctl_stop( & 
    904                     'There is only one time dump in data files', & 
    905                     'Set ln_clim=.true. in namelist for constant bdy forcing.' ) 
    906  
    907                zinterval_s = zstepr(2) - zstepr(1) 
    908                zinterval_e = zstepr(ntimes_bdy_bt) - zstepr(ntimes_bdy_bt-1) 
    909  
    910                IF( zstepr(1) + zoffset > 0 ) THEN 
    911                      WRITE(ctmp1,*) 'Check file: ', clfile(igrd) 
    912                      CALL ctl_stop( 'First time dump in bdy file is after model initial time', ctmp1 ) 
    913                END IF 
    914                IF( zstepr(ntimes_bdy_bt) + zoffset < totime ) THEN 
    915                      WRITE(ctmp1,*) 'Check file: ', clfile(igrd) 
    916                      CALL ctl_stop( 'Last time dump in bdy file is before model final time', ctmp1 ) 
    917                END IF 
    918             END IF ! .NOT. ln_clim 
    919  
    920             IF ( igrd .EQ. 4) THEN 
    921               ntimes_bdyt = ntimes_bdy_bt 
    922               zoffsett = zoffset 
    923               istept(:) = INT( zstepr(:) + zoffset ) 
    924             ELSE IF (igrd .EQ. 5) THEN 
    925               ntimes_bdyu = ntimes_bdy_bt 
    926               zoffsetu = zoffset 
    927               istepu(:) = INT( zstepr(:) + zoffset ) 
    928             ELSE IF (igrd .EQ. 6) THEN 
    929               ntimes_bdyv = ntimes_bdy_bt 
    930               zoffsetv = zoffset 
    931               istepv(:) = INT( zstepr(:) + zoffset ) 
    932             ENDIF 
    933  
    934           ENDDO 
    935  
    936       ! Verify time consistency between files   
    937  
    938           IF ( ntimes_bdyu /= ntimes_bdyt .OR. ntimes_bdyv /= ntimes_bdyt ) THEN 
    939              CALL ctl_stop( & 
    940              'Time axis lengths differ between bdy data files', & 
    941              'Multiple time frequencies not implemented yet' ) 
    942           ELSE 
    943             ntimes_bdy_bt = ntimes_bdyt 
    944           ENDIF 
    945  
    946           IF (zoffsetu.NE.zoffsett .OR. zoffsetv.NE.zoffsett) THEN 
    947             CALL ctl_stop( &  
    948             'Bdy data files must have the same time origin', & 
    949             'Multiple time frequencies not implemented yet'  ) 
    950           ENDIF 
    951           zoffset = zoffsett 
    952  
    953       !! Check that times are the same in the three files... HERE. 
    954           istep_bt(:) = istept(:) 
    955  
    956       ! Check number of time dumps:               
    957           IF (ln_clim) THEN 
    958             SELECT CASE ( ntimes_bdy_bt ) 
    959             CASE( 1 ) 
    960               IF(lwp) WRITE(numout,*) 
    961               IF(lwp) WRITE(numout,*) 'We assume constant boundary forcing from bdy data files' 
    962               IF(lwp) WRITE(numout,*)              
    963             CASE( 12 ) 
    964               IF(lwp) WRITE(numout,*) 
    965               IF(lwp) WRITE(numout,*) 'We assume monthly (and cyclic) boundary forcing from bdy data files' 
    966               IF(lwp) WRITE(numout,*)  
    967             CASE DEFAULT 
    968               CALL ctl_stop( & 
    969                 'For climatological boundary forcing (ln_clim=.true.),',& 
    970                 'bdy data files must contain 1 or 12 time dumps.' ) 
    971             END SELECT 
    972           ENDIF 
    973  
    974       ! Find index of first record to read (before first model time).  
    975  
    976           it=1 
    977           DO WHILE ( ((istep_bt(it+1)) <= 0 ).AND.(it.LE.(ntimes_bdy_bt-1))) 
    978             it=it+1 
    979           END DO 
    980           nbdy_b_bt = it 
    981  
    982           IF(lwp) WRITE(numout,*) 'Time offset is ',zoffset 
    983           IF(lwp) WRITE(numout,*) 'First record to read is ',nbdy_b_bt 
    984  
    985         ENDIF ! endif (nn_dtactl == 1) 
    986  
    987       ! 1.2  Read first record in file if necessary (ie if nn_dtactl == 1) 
    988       ! ***************************************************************** 
    989  
    990         IF ( nn_dtactl == 0) THEN 
    991           ! boundary data arrays are filled with initial conditions 
    992           igrd = 5            ! U-points data  
    993           DO ib = 1, nblen(igrd)               
    994             ubtbdy(ib) = un(nbi(ib,igrd), nbj(ib,igrd), 1) 
    995           END DO 
    996  
    997           igrd = 6            ! V-points data  
    998           DO ib = 1, nblen(igrd)               
    999             vbtbdy(ib) = vn(nbi(ib,igrd), nbj(ib,igrd), 1) 
    1000           END DO 
    1001  
    1002           igrd = 4            ! T-points data  
    1003           DO ib = 1, nblen(igrd)               
    1004             sshbdy(ib) = sshn(nbi(ib,igrd), nbj(ib,igrd)) 
    1005           END DO 
    1006  
    1007         ELSEIF (nn_dtactl == 1) THEN 
    1008   
    1009         ! Set first record in the climatological case:    
    1010           IF ((ln_clim).AND.(ntimes_bdy_bt==1)) THEN 
    1011             nbdy_a_bt = 1 
    1012           ELSEIF ((ln_clim).AND.(ntimes_bdy_bt==iman)) THEN 
    1013             nbdy_b_bt = 0 
    1014             nbdy_a_bt = imois 
    1015           ELSE 
    1016             nbdy_a_bt = nbdy_b_bt 
    1017           END IF 
    1018   
    1019          ! Open Netcdf files: 
    1020  
    1021           CALL iom_open ( cn_dta_fla_T, numbdyt_bt ) 
    1022           CALL iom_open ( cn_dta_fla_U, numbdyu_bt ) 
    1023           CALL iom_open ( cn_dta_fla_V, numbdyv_bt ) 
    1024  
    1025          ! Read first record: 
    1026           ipj=1 
    1027           igrd=4 
    1028           ipi=nblendta(igrd) 
    1029  
    1030           ! ssh 
    1031           igrd=4 
    1032           IF ( nblendta(igrd) .le. 0 ) THEN  
    1033             idvar = iom_varid( numbdyt_bt,'sossheig' ) 
    1034             nblendta(igrd) = iom_file(numbdyt_bt)%dimsz(1,idvar) 
    1035           ENDIF 
    1036           WRITE(numout,*) 'Dim size for sossheig is ',nblendta(igrd) 
    1037           ipi=nblendta(igrd) 
    1038  
    1039           CALL iom_get ( numbdyt_bt, jpdom_unknown,'sossheig',zdta(1:ipi,1:ipj),nbdy_a_bt ) 
    1040  
    1041           DO ib=1, nblen(igrd) 
    1042             sshbdydta(ib,2) =  zdta(nbmap(ib,igrd),1) 
    1043           END DO 
    1044   
    1045           ! u-velocity 
    1046           igrd=5 
    1047           IF ( nblendta(igrd) .le. 0 ) THEN  
    1048             idvar = iom_varid( numbdyu_bt,'vobtcrtx' ) 
    1049             nblendta(igrd) = iom_file(numbdyu_bt)%dimsz(1,idvar) 
    1050           ENDIF 
    1051           WRITE(numout,*) 'Dim size for vobtcrtx is ',nblendta(igrd) 
    1052           ipi=nblendta(igrd) 
    1053  
    1054           CALL iom_get ( numbdyu_bt, jpdom_unknown,'vobtcrtx',zdta(1:ipi,1:ipj),nbdy_a_bt ) 
    1055  
    1056           DO ib=1, nblen(igrd) 
    1057             ubtbdydta(ib,2) =  zdta(nbmap(ib,igrd),1) 
    1058           END DO 
    1059  
    1060           ! v-velocity 
    1061           igrd=6 
    1062           IF ( nblendta(igrd) .le. 0 ) THEN  
    1063             idvar = iom_varid( numbdyv_bt,'vobtcrty' ) 
    1064             nblendta(igrd) = iom_file(numbdyv_bt)%dimsz(1,idvar) 
    1065           ENDIF 
    1066           WRITE(numout,*) 'Dim size for vobtcrty is ',nblendta(igrd) 
    1067           ipi=nblendta(igrd) 
    1068  
    1069           CALL iom_get ( numbdyv_bt, jpdom_unknown,'vobtcrty',zdta(1:ipi,1:ipj),nbdy_a_bt ) 
    1070  
    1071           DO ib=1, nblen(igrd) 
    1072             vbtbdydta(ib,2) =  zdta(nbmap(ib,igrd),1) 
    1073           END DO 
    1074  
    1075         END IF 
    1076   
    1077         ! In the case of constant boundary forcing fill bdy arrays once for all 
    1078         IF ((ln_clim).AND.(ntimes_bdy_bt==1)) THEN 
    1079  
    1080           ubtbdy  (:) = ubtbdydta  (:,2) 
    1081           vbtbdy  (:) = vbtbdydta  (:,2) 
    1082           sshbdy  (:) = sshbdydta  (:,2) 
    1083  
    1084           CALL iom_close( numbdyt_bt ) 
    1085           CALL iom_close( numbdyu_bt ) 
    1086           CALL iom_close( numbdyv_bt ) 
    1087  
    1088         END IF 
    1089  
    1090       ENDIF ! End if nit000 
    1091  
    1092       ! -------------------- ! 
    1093       ! 2. At each time step ! 
    1094       ! -------------------- ! 
    1095  
    1096       IF ((nn_dtactl==1).AND.(ntimes_bdy_bt>1)) THEN  
    1097  
    1098       ! 2.1 Read one more record if necessary 
    1099       !************************************** 
    1100  
    1101         IF ( (ln_clim).AND.(imois/=nbdy_b_bt) ) THEN ! remember that nbdy_b_bt=0 for kt=nit000 
    1102          nbdy_b_bt = imois 
    1103          nbdy_a_bt = imois+1 
    1104          nbdy_b_bt = MOD( nbdy_b_bt, iman ) 
    1105          IF( nbdy_b_bt == 0 ) nbdy_b_bt = iman 
    1106          nbdy_a_bt = MOD( nbdy_a_bt, iman ) 
    1107          IF( nbdy_a_bt == 0 ) nbdy_a_bt = iman 
    1108          lect=.true. 
    1109  
    1110         ELSEIF ((.NOT.ln_clim).AND.(itimer >= istep_bt(nbdy_a_bt))) THEN 
    1111           nbdy_b_bt=nbdy_a_bt 
    1112           nbdy_a_bt=nbdy_a_bt+1 
    1113           lect=.true. 
    1114         END IF 
    1115           
    1116         IF (lect) THEN 
    1117  
    1118         ! Swap arrays 
    1119           sshbdydta(:,1) =  sshbdydta(:,2) 
    1120           ubtbdydta(:,1) =  ubtbdydta(:,2) 
    1121           vbtbdydta(:,1) =  vbtbdydta(:,2) 
    1122   
    1123         ! read another set 
    1124  
    1125           ipj=1 
    1126           ipk=jpk 
    1127           igrd=4 
    1128           ipi=nblendta(igrd) 
    1129  
    1130            
    1131           ! ssh 
    1132           igrd=4 
    1133           ipi=nblendta(igrd) 
    1134  
    1135           CALL iom_get ( numbdyt_bt, jpdom_unknown,'sossheig',zdta(1:ipi,1:ipj),nbdy_a_bt ) 
    1136  
    1137           DO ib=1, nblen(igrd) 
    1138             sshbdydta(ib,2) =  zdta(nbmap(ib,igrd),1) 
    1139           END DO 
    1140  
    1141           ! u-velocity 
    1142           igrd=5 
    1143           ipi=nblendta(igrd) 
    1144  
    1145           CALL iom_get ( numbdyu_bt, jpdom_unknown,'vobtcrtx',zdta(1:ipi,1:ipj),nbdy_a_bt ) 
    1146  
    1147           DO ib=1, nblen(igrd) 
    1148             ubtbdydta(ib,2) =  zdta(nbmap(ib,igrd),1) 
    1149           END DO 
    1150  
    1151           ! v-velocity 
    1152           igrd=6 
    1153           ipi=nblendta(igrd) 
    1154  
    1155           CALL iom_get ( numbdyv_bt, jpdom_unknown,'vobtcrty',zdta(1:ipi,1:ipj),nbdy_a_bt ) 
    1156  
    1157           DO ib=1, nblen(igrd) 
    1158             vbtbdydta(ib,2) =  zdta(nbmap(ib,igrd),1) 
    1159           END DO 
    1160  
    1161  
    1162          IF(lwp) WRITE(numout,*) 'bdy_dta_fla : first record file used nbdy_b_bt ',nbdy_b_bt 
    1163          IF(lwp) WRITE(numout,*) '~~~~~~~~  last  record file used nbdy_a_bt ',nbdy_a_bt 
    1164          IF (.NOT.ln_clim) THEN 
    1165            IF(lwp) WRITE(numout,*) 'first  record time (s): ', istep_bt(nbdy_b_bt) 
    1166            IF(lwp) WRITE(numout,*) 'model time (s)        : ', itimer 
    1167            IF(lwp) WRITE(numout,*) 'second record time (s): ', istep_bt(nbdy_a_bt) 
    1168          ENDIF 
    1169         END IF ! end lect=.true. 
    1170  
    1171  
    1172       ! 2.2   Interpolate linearly: 
    1173       ! *************************** 
    1174      
    1175         IF (ln_clim) THEN 
    1176           zxy = REAL( nday, wp ) / REAL( nmonth_len(nbdy_b_bt), wp ) + 0.5 - i15 
    1177         ELSE           
    1178           zxy = REAL(istep_bt(nbdy_b_bt)-itimer, wp) / REAL(istep_bt(nbdy_b_bt)-istep_bt(nbdy_a_bt), wp) 
    1179         END IF 
    1180  
    1181           igrd=4 
    1182           DO ib=1, nblen(igrd) 
    1183             sshbdy(ib) = zxy      * sshbdydta(ib,2) + & 
    1184                        (1.-zxy) * sshbdydta(ib,1)    
    1185           END DO 
    1186  
    1187           igrd=5 
    1188           DO ib=1, nblen(igrd) 
    1189             ubtbdy(ib) = zxy      * ubtbdydta(ib,2) + & 
    1190                          (1.-zxy) * ubtbdydta(ib,1)    
    1191           END DO 
    1192  
    1193           igrd=6 
    1194           DO ib=1, nblen(igrd) 
    1195             vbtbdy(ib) = zxy      * vbtbdydta(ib,2) + & 
    1196                          (1.-zxy) * vbtbdydta(ib,1)    
    1197           END DO 
    1198  
    1199  
    1200       END IF !end if ((nn_dtactl==1).AND.(ntimes_bdy_bt>1)) 
    1201      
    1202       ! ------------------- ! 
    1203       ! Last call kt=nitend ! 
    1204       ! ------------------- ! 
    1205  
    1206       ! Closing of the 3 files 
    1207       IF( kt == nitend   .and. jit == icycl ) THEN 
    1208           CALL iom_close( numbdyt_bt ) 
    1209           CALL iom_close( numbdyu_bt ) 
    1210           CALL iom_close( numbdyv_bt ) 
    1211       ENDIF 
    1212  
    1213       ENDIF ! ln_dyn_frs 
    1214  
    1215       END SUBROUTINE bdy_dta_fla 
    1216  
     603               IF( nn_dyn2d(ib_bdy) .ne. jp_frs ) THEN 
     604                  jfld = jfld + 1 
     605                  dta_bdy(ib_bdy)%ssh => bf(jfld)%fnow(:,1,1) 
     606               ENDIF 
     607               jfld = jfld + 1 
     608               dta_bdy(ib_bdy)%u2d => bf(jfld)%fnow(:,1,1) 
     609               jfld = jfld + 1 
     610               dta_bdy(ib_bdy)%v2d => bf(jfld)%fnow(:,1,1) 
     611            ENDIF 
     612         ENDIF 
     613 
     614         IF ( nn_dyn3d(ib_bdy) .gt. 0 .and. nn_dyn3d_dta(ib_bdy) .eq. 0 ) THEN 
     615            IF( nn_dyn3d(ib_bdy) .eq. jp_frs ) THEN 
     616               ilen0(1:3) = nblen(1:3) 
     617            ELSE 
     618               ilen0(1:3) = nblenrim(1:3) 
     619            ENDIF 
     620            ALLOCATE( dta_bdy(ib_bdy)%u3d(ilen0(2),jpk) ) 
     621            ALLOCATE( dta_bdy(ib_bdy)%v3d(ilen0(3),jpk) ) 
     622         ENDIF 
     623         IF ( ( nn_dyn3d(ib_bdy) .gt. 0 .and. nn_dyn3d_dta(ib_bdy) .eq. 1 ).or. & 
     624           &  ( ln_full_vel_array(ib_bdy) .and. nn_dyn2d(ib_bdy) .gt. 0 .and.   & 
     625           &    ( nn_dyn2d_dta(ib_bdy) .eq. 1 .or. nn_dyn2d_dta(ib_bdy) .eq. 3 ) ) ) THEN 
     626            jfld = jfld + 1 
     627            dta_bdy(ib_bdy)%u3d => bf(jfld)%fnow(:,1,:) 
     628            jfld = jfld + 1 
     629            dta_bdy(ib_bdy)%v3d => bf(jfld)%fnow(:,1,:) 
     630         ENDIF 
     631 
     632         IF (nn_tra(ib_bdy) .gt. 0) THEN 
     633            IF( nn_tra_dta(ib_bdy) .eq. 0 ) THEN 
     634               IF( nn_tra(ib_bdy) .eq. jp_frs ) THEN 
     635                  ilen0(1:3) = nblen(1:3) 
     636               ELSE 
     637                  ilen0(1:3) = nblenrim(1:3) 
     638               ENDIF 
     639               ALLOCATE( dta_bdy(ib_bdy)%tem(ilen0(1),jpk) ) 
     640               ALLOCATE( dta_bdy(ib_bdy)%sal(ilen0(1),jpk) ) 
     641            ELSE 
     642               jfld = jfld + 1 
     643               dta_bdy(ib_bdy)%tem => bf(jfld)%fnow(:,1,:) 
     644               jfld = jfld + 1 
     645               dta_bdy(ib_bdy)%sal => bf(jfld)%fnow(:,1,:) 
     646            ENDIF 
     647         ENDIF 
     648 
     649#if defined key_lim2 
     650         IF (nn_ice_lim2(ib_bdy) .gt. 0) THEN 
     651            IF( nn_ice_lim2_dta(ib_bdy) .eq. 0 ) THEN 
     652               IF( nn_ice_lim2(ib_bdy) .eq. jp_frs ) THEN 
     653                  ilen0(1:3) = nblen(1:3) 
     654               ELSE