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

Changeset 4245


Ignore:
Timestamp:
2013-11-19T12:19:21+01:00 (10 years ago)
Author:
cetlod
Message:

dev_locean_cmcc_ingv_ukmo_merc : merge in the MERC_UKMO dev branch with trunk rev 4119

Location:
branches/2013/dev_LOCEAN_CMCC_INGV_MERC_UKMO_2013
Files:
1 added
3 deleted
39 edited
11 copied

Legend:

Unmodified
Added
Removed
  • branches/2013/dev_LOCEAN_CMCC_INGV_MERC_UKMO_2013/DOC/TexFiles/Chapters/Chap_OBS.tex

    r4147 r4245  
    55\label{OBS} 
    66 
    7 Authors: D. Lea, M. Martin, K. Mogensen, A. Vidard, A. Weaver...   % do we keep that ? 
     7Authors: D. Lea, M. Martin, K. Mogensen, A. Vidard, A. Weaver, A. Ryan, ...   % do we keep that ? 
    88 
    99\minitoc 
     
    4242where to obtain data and how to setup the namelist. Section~\ref{OBS_details} introduces some 
    4343more technical details of the different observation types used and also shows a more complete 
    44 namelist. Section~\ref{OBS_theory} introduces some of the theoretical aspects of the 
    45 observation operator including interpolation methods and running on multiple processors. 
    46 Section~\ref{OBS_obsutils} introduces some utilities to help working with the files produced 
    47 by the OBS code. 
     44namelist. Section~\ref{OBS_theory} introduces some of the theoretical aspects of the observation 
     45operator including interpolation methods and running on multiple processors. 
     46Section~\ref{OBS_ooo} describes the offline observation operator code. 
     47Section~\ref{OBS_obsutils} introduces some utilities to help working with the files 
     48produced by the OBS code. 
    4849 
    4950% ================================================================ 
     
    787788\newpage 
    788789 
     790% ================================================================ 
     791% Offline observation operator documentation 
     792% ================================================================ 
     793 
     794%\usepackage{framed} 
     795 
     796\section{Offline observation operator} 
     797\label{OBS_ooo} 
     798 
     799\subsection{Concept} 
     800 
     801The obs oper maps model variables to observation space. It is possible to apply this mapping 
     802without running the model. The software which performs this functionality is known as the 
     803\textbf{offline obs oper}. The obs oper is divided into three stages. An initialisation phase, 
     804an interpolation phase and an output phase. The implementation of which is outlined in the 
     805previous sections. During the interpolation phase the offline obs oper populates the model 
     806arrays by reading saved model fields from disk. 
     807 
     808There are two ways of exploiting this offline capacity. The first is to mimic the behaviour of 
     809the online system by supplying model fields at regular intervals between the start and the end 
     810of the run. This approach results in a single model counterpart per observation. This kind of 
     811usage produces feedback files the same file format as the online obs oper.  
     812The second is to take advantage of the offline setting in which multiple model counterparts can 
     813be calculated per observation. In this case it is possible to consider all forecasts verifying 
     814at the same time. By forecast, I mean any method which produces an estimate of physical reality 
     815which is not an observed value. In the case of class 4 files this means forecasts, analyses, persisted 
     816analyses and climatological values verifying at the same time. Although the class 4 file format 
     817doesn't account for multiple ensemble members or multiple experiments per observation, it is possible 
     818to include these components in the same or multiple files. 
     819 
     820%-------------------------------------------------------------------------------------------------------- 
     821% offline_oper.exe  
     822%-------------------------------------------------------------------------------------------------------- 
     823 
     824\subsection{Using the offline observation operator} 
     825 
     826\subsubsection{Building} 
     827 
     828In addition to \emph{OPA\_SRC} the offline obs oper requires the inclusion 
     829of the \emph{OOO\_SRC} directory. \emph{OOO\_SRC} contains a replacement \textbf{nemo.f90} and 
     830\textbf{nemogcm.F90} which overwrites the resultant \textbf{nemo.exe}. This is the approach taken 
     831by \emph{SAS\_SRC} and \emph{OFF\_SRC}. 
     832 
     833%-------------------------------------------------------------------------------------------------------- 
     834% Running  
     835%-------------------------------------------------------------------------------------------------------- 
     836\subsubsection{Running} 
     837 
     838The simplest way to use the executable is to edit and append the \textbf{ooo.nml} namelist to 
     839a full NEMO namelist and then to run the executable as if it were nemo.exe.  
     840 
     841\subsubsection{Quick script} 
     842 
     843A useful Python utility to control the namelist options can be found in \textbf{OBSTOOLS/OOO}. The 
     844functions which locate model fields and observation files can be manually specified. The package 
     845can be installed by appropriate use of the included setup.py script. 
     846 
     847Documentation can be auto-generated by Sphinx by running \emph{make html} in the \textbf{doc} directory. 
     848 
     849%-------------------------------------------------------------------------------------------------------- 
     850% Configuration section 
     851%-------------------------------------------------------------------------------------------------------- 
     852\subsection{Configuring the offline observation operator} 
     853The observation files and settings understood by \textbf{namobs} have been outlined in the online 
     854obs oper section. In addition there are two further namelists wich control the operation of the offline 
     855obs oper. \textbf{namooo} which controls the input model fields and \textbf{namcl4} which controls the 
     856production of class 4 files.  
     857 
     858\subsubsection{Single field} 
     859 
     860In offline mode model arrays are populated at appropriate time steps via input files. 
     861At present, \textbf{tsn} and \textbf{sshn} are populated by the default read routines.  
     862These routines will be expanded upon in future versions to allow the specification of any 
     863model variable. As such, input files must be global versions of the model domain with 
     864\textbf{votemper}, \textbf{vosaline} and optionally \textbf{sshn} present. 
     865 
     866For each field read there must be an entry in the \textbf{namooo} namelist specifying the 
     867name of the file to read and the index along the \emph{time\_counter}. For example, to 
     868read the second time counter from a single file the namelist would be. 
     869 
     870\begin{alltt} 
     871\tiny 
     872\begin{verbatim}  
     873!---------------------------------------------------------------------- 
     874!       namooo Offline obs_oper namelist 
     875!---------------------------------------------------------------------- 
     876!   ooo_files    specifies the files containing the model counterpart 
     877!   nn_ooo_idx   specifies the time_counter index within the model file 
     878&namooo 
     879   ooo_files = "foo.nc" 
     880   nn_ooo_idx = 2 
     881/ 
     882\end{verbatim}  
     883\end{alltt} 
     884 
     885\subsubsection{Multiple fields per run} 
     886 
     887Model field iteration is controlled via \textbf{nn\_ooo\_freq} which specifies 
     888the number of model steps at which the next field gets read. For example, if 
     88912 hourly fields are to be interpolated in a setup where 288 steps equals 24 hours. 
     890 
     891\begin{alltt} 
     892\tiny 
     893\begin{verbatim}  
     894!---------------------------------------------------------------------- 
     895!       namooo Offline obs_oper namelist 
     896!---------------------------------------------------------------------- 
     897!   ooo_files    specifies the files containing the model counterpart 
     898!   nn_ooo_idx   specifies the time_counter index within the model file 
     899!   nn_ooo_freq  specifies number of time steps between read operations 
     900&namooo 
     901   ooo_files = "foo.nc" "foo.nc" 
     902   nn_ooo_idx = 1 2 
     903   nn_ooo_freq = 144 
     904/ 
     905\end{verbatim}  
     906\end{alltt} 
     907 
     908The above namelist will result in feedback files whose first 12 hours contain 
     909the first field of foo.nc and the second 12 hours contain the second field. 
     910 
     911%\begin{framed} 
     912\textbf{Note} Missing files can be denoted as "nofile". 
     913%\end{framed} 
     914 
     915It is easy to see how a collection of fields taken fron a number of files  
     916at different indices can be combined at a particular frequency in time to  
     917generate a pseudo model evolution. As long as all that is needed is a single 
     918model counterpart at a regular interval then namooo is all that needs to 
     919be edited. However, a far more interesting approach can be taken in which 
     920multiple forecasts, analyses, persisted analyses and climatologies are 
     921considered against the same set of observations. For this a slightly more 
     922complicated approach is needed. It is referred to as \emph{Class 4} since 
     923it is the fourth metric defined by the GODAE intercomparison project. 
     924 
     925%-------------------------------------------------------------------------------------------------------- 
     926% Class 4 file section 
     927%-------------------------------------------------------------------------------------------------------- 
     928\subsubsection{Multiple model counterparts per observation a.k.a Class 4} 
     929 
     930A generalisation of feedback files to allow multiple model components per observation. For a single 
     931observation, as well as previous forecasts verifying at the same time there are also analyses, persisted 
     932analyses and climatologies.  
     933 
     934 
     935The above namelist performs two basic functions. It organises the fields 
     936given in \textbf{namooo} into groups so that observations can be matched 
     937up multiple times. It also controls the metadata and the output variable 
     938of the class 4 file when a write routine is called. 
     939 
     940%\begin{framed} 
     941\textbf{Note: ln\_cl4} must be set to \emph{.TRUE.} in \textbf{namobs}  
     942to use class 4 outputs. 
     943%\end{framed} 
     944 
     945\subsubsection{Class 4 naming convention} 
     946 
     947The standard class 4 file naming convention is as follows. 
     948 
     949\noindent 
     950\linebreak 
     951\textbf{\$\{prefix\}\_\$\{yyyymmdd\}\_\$\{sys\}\_\$\{cfg\}\_\$\{vn\}\_\$\{kind\}\_\$\{nproc\}.nc} 
     952 
     953\noindent 
     954\linebreak 
     955Much of the namelist is devoted to specifying this convention. The 
     956following namelist settings control the elements of the output 
     957file names. Each should be specified as a single string of character data. 
     958 
     959\begin{description} 
     960\item[cl4\_prefix] 
     961Prefix for class 4 files e.g. class4 
     962\item[cl4\_date] 
     963YYYYMMDD validity date 
     964\item[cl4\_sys] 
     965The name of the class 4 model system e.g. FOAM 
     966\item[cl4\_cfg] 
     967The name of the class 4 model configuration e.g. orca025 
     968\item[cl4\_vn] 
     969The name of the class 4 model version e.g. 12.0 
     970\end{description} 
     971 
     972\noindent 
     973The kind is specified by the observation type internally to the obs oper. The processor 
     974number is specified internally in NEMO.  
     975 
     976\subsubsection{Class 4 file global attributes} 
     977 
     978Global attributes necessary to fulfill the class 4 file definition. These 
     979are also useful pieces of information when collaborating with external 
     980partners. 
     981 
     982\begin{description} 
     983\item[cl4\_contact] 
     984Contact email for class 4 files. 
     985\item[cl4\_inst] 
     986The name of the producers institution. 
     987\item[cl4\_cfg] 
     988The name of the class 4 model configuration e.g. orca025 
     989\item[cl4\_vn] 
     990The name of the class 4 model version e.g. 12.0 
     991\end{description} 
     992 
     993\noindent 
     994The obs\_type, 
     995creation date and validity time are specified internally to the obs oper. 
     996 
     997\subsubsection{Class 4 model counterpart configuration} 
     998 
     999As seen previously it is possible to perform a single sweep of the 
     1000obs oper and specify a collection of model fields equally spaced  
     1001along that sweep. In the class 4 case the single sweep is replaced 
     1002with multiple sweeps and a certain ammount of book keeping is 
     1003needed to ensure each model counterpart makes its way to the  
     1004correct piece of memory in the output files. 
     1005 
     1006\noindent 
     1007\linebreak 
     1008In terms of book keeping, the offline obs oper needs to know how many 
     1009full sweeps need to be performed. This is specified via the  
     1010\textbf{cl4\_match\_len} variable and is the total number of model 
     1011counterparts per observation. For example, a 3 forecasts plus 3 persistence 
     1012fields plus an analysis field would be 7 counterparts per observation. 
     1013 
     1014\begin{alltt} 
     1015\tiny 
     1016\begin{verbatim} 
     1017   cl4_match_len = 7 
     1018\end{verbatim} 
     1019\end{alltt} 
     1020 
     1021Then to correctly allocate a class 4 file the forecast axis must be defined. This 
     1022is controlled via \textbf{cl4\_fcst\_len}, which in out above example would be 3. 
     1023 
     1024\begin{alltt} 
     1025\tiny 
     1026\begin{verbatim} 
     1027   cl4_fcst_len = 3 
     1028\end{verbatim} 
     1029\end{alltt} 
     1030 
     1031Then for each model field it is necessary to designate what class 4 variable and 
     1032index along the forecast dimension the model counterpart should be stored in the 
     1033output file. As well as a value for that lead time in hours, this will be useful 
     1034when interpreting the data afterwards.  
     1035 
     1036\begin{alltt} 
     1037\tiny 
     1038\begin{verbatim} 
     1039   cl4_vars = "forecast" "forecast" "forecast" "persistence" "persistence" 
     1040              "persistence" "best_estimate" 
     1041   cl4_fcst_idx = 1 2 3 1 2 3 1 
     1042   cl4_leadtime = 12 36 60  
     1043\end{verbatim} 
     1044\end{alltt} 
     1045 
     1046In terms of files and indices of fields inside each file the class 4 approach 
     1047makes use of the \textbf{namooo} namelist. If our fields are in separate files 
     1048with a single field per file our example inputs will be specified. 
     1049 
     1050\begin{alltt} 
     1051\tiny 
     1052\begin{verbatim} 
     1053   ooo_files = "F.1.nc" "F.2.nc" "F.3.nc" "P.1.nc" "P.2.nc" "P.3.nc" "A.1.nc" 
     1054   nn_ooo_idx = 1 1 1 1 1 1 1 
     1055\end{verbatim} 
     1056\end{alltt} 
     1057 
     1058When we combine all of the naming conventions, global attributes and i/o instructions 
     1059the class 4 namelist becomes. 
     1060 
     1061\begin{alltt} 
     1062\tiny 
     1063\begin{verbatim} 
     1064!---------------------------------------------------------------------- 
     1065!       namooo Offline obs_oper namelist 
     1066!---------------------------------------------------------------------- 
     1067!   ooo_files    specifies the files containing the model counterpart 
     1068!   nn_ooo_idx   specifies the time_counter index within the model file 
     1069!   nn_ooo_freq  specifies number of time steps between read operations 
     1070&namooo 
     1071   ooo_files = "F.1.nc" "F.2.nc" "F.3.nc" "P.1.nc" "P.2.nc" "P.3.nc" "A.1.nc" 
     1072   nn_ooo_idx = 1 1 1 1 1 1 1 
     1073/ 
     1074!---------------------------------------------------------------------- 
     1075!       namcl4 Offline obs_oper class 4 namelist 
     1076!---------------------------------------------------------------------- 
     1077! 
     1078!  Naming convention 
     1079!  ----------------- 
     1080!  cl4_prefix    specifies the output file prefix 
     1081!  cl4_date      specifies the output file validity date 
     1082!  cl4_sys       specifies the model counterpart system 
     1083!  cl4_cfg       specifies the model counterpart configuration 
     1084!  cl4_vn        specifies the model counterpart version 
     1085!  cl4_inst      specifies the model counterpart institute 
     1086!  cl4_contact   specifies the file producers contact details 
     1087! 
     1088!  I/O specification 
     1089!  ----------------- 
     1090!  cl4_vars      specifies the names of the output file netcdf variable 
     1091!  cl4_fcst_idx  specifies output file forecast index 
     1092!  cl4_fcst_len  specifies forecast axis length 
     1093!  cl4_match_len specifies number of unique matches per observation 
     1094!  cl4_leadtime  specifies the forecast axis lead time  
     1095! 
     1096&namcl4 
     1097   cl4_match_len = 7 
     1098   cl4_fcst_len = 3 
     1099   cl4_fcst_idx = 1 2 3 1 2 3 1 
     1100   cl4_vars = "forecast" "forecast" "forecast" "persistence" "persistence" 
     1101              "persistence" "best_estimate" 
     1102   cl4_leadtime = 12 36 60 
     1103   cl4_prefix = "class4" 
     1104   cl4_date = "20130101" 
     1105   cl4_vn = "12.0" 
     1106   cl4_sys = "FOAM" 
     1107   cl4_cfg = "AMM7" 
     1108   cl4_contact = "example@example.com" 
     1109   cl4_inst = "UK Met Office" 
     1110/ 
     1111\end{verbatim} 
     1112\end{alltt} 
     1113 
     1114\subsubsection{Climatology interpolation} 
     1115 
     1116The climatological counterpart is generated at the start of the run by restarting  
     1117the model from climatology through appropriate use of \textbf{namtsd}. To override 
     1118the offline observation operator read routine and to take advantage of the restart 
     1119settings, specify the first entry in \textbf{cl4\_vars} as "climatology". This will then 
     1120pipe the restart from climatology into the output class 4 file. As in every other 
     1121class 4 matchup the input file, input index and output index must be specified. 
     1122These can be replaced with dummy data since they are not used but they must be 
     1123present to cycle through the matchups correctly.  
     1124 
     1125\subsection{Advanced usage} 
     1126 
     1127In certain cases it may be desirable to include both multiple model fields per 
     1128observation window with multiple match ups per observation. This can be achieved 
     1129by specifying \textbf{nn\_ooo\_freq} as well as the class 4 settings. Care must 
     1130be taken in generating the ooo\_files list such that the files are arranged into 
     1131consecutive blocks of single match ups. For example, 2 forecast fields  
     1132of 12 hourly data would result in 4 separate read operations but only 2 write 
     1133operations, 1 per forecast. 
     1134 
     1135\begin{alltt} 
     1136\tiny 
     1137\begin{verbatim} 
     1138   ooo_files = "F1.nc" "F1.nc" "F2.nc" "F2.nc" 
     1139... 
     1140   cl4_fcst_idx = 1 2 
     1141\end{verbatim} 
     1142\end{alltt} 
     1143 
     1144The above notation reveals the internal split between match up iterators and file 
     1145iterators. This technique has not been used before so experimentation is needed 
     1146before results can be trusted. 
     1147 
     1148 
     1149 
     1150 
     1151\newpage 
     1152 
    7891153\section{Observation Utilities} 
    7901154\label{OBS_obsutils} 
     
    8021166handling observation files and the feedback file output from the NEMO observation operator. 
    8031167The utilities are as follows 
     1168 
     1169\subsubsection{c4comb} 
     1170 
     1171The program c4comb combines multiple class 4 files produced by individual processors in an 
     1172MPI run of NEMO offline obs\_oper into a single class 4 file. The program is called in the following way: 
     1173 
     1174\begin{alltt} 
     1175\footnotesize 
     1176\begin{verbatim} 
     1177c4comb.exe outputfile inputfile1 inputfile2 ... 
     1178\end{verbatim} 
     1179\end{alltt} 
    8041180 
    8051181\subsubsection{corio2fb} 
  • branches/2013/dev_LOCEAN_CMCC_INGV_MERC_UKMO_2013/NEMOGCM/ARCH/arch-ALTIX_NAUTILUS_MPT.fcm

    r4230 r4245  
    4747%LD                  ifort 
    4848%FPPFLAGS            -P -C -traditional 
    49 %LDFLAGS             -lmpi -lstdc++ 
     49%LDFLAGS             -lmpi -lstdc++ -lcurl 
    5050%AR                  ar  
    5151%ARFLAGS             -r 
  • branches/2013/dev_LOCEAN_CMCC_INGV_MERC_UKMO_2013/NEMOGCM/ARCH/arch-PW7_METO.fcm

    r4162 r4245  
    1 # IBM POWER6  UKMO 
     1# IBM POWER7  UKMO 
    22# NCDF_INC    netcdf include file 
    33# NCDF_LIB    netcdf library 
     4# XIOS_INC    XIOS include files 
     5# XIOS_LIB    XIOS library 
    46# FC          Fortran compiler command 
    57# FCFLAGS     Fortran compiler flags 
     
    1517 
    1618 
    17 %NCDF_INC            -I/home/nwp/nm/frrj/lib/MTOOLS/include 
    18 %NCDF_LIB            -L/home/nwp/nm/frrj/lib/MTOOLS/lib -lnetcdf -lhdf5 -lhdf5_hl -lhdf5_fortran -lz 
    19 %XIOS_ROOT           /home/cr/ocean/hadcv/xios_r445 
     19%NCDF_INC            -I/home/cr/ocean/hadcv/netcdf/4.1.3_seq/include 
     20%NCDF_LIB            -L/home/cr/ocean/hadcv/netcdf/4.1.3_seq/lib -lnetcdf -lnetcdff -lhdf5 -lhdf5_hl -lhdf5_fortran -lz 
     21%XIOS_INC            -I/data/nwp/ofrd/share/NEMO/xios_lib/seq/xios_r451/inc 
     22%XIOS_LIB            -L/data/nwp/ofrd/share/NEMO/xios_lib/seq/xios_r451/lib -lxios 
    2023%FC                  mpxlf90_r 
    21 %FCFLAGS             -qrealsize=8 -qextname -qsuffix=f=f90 -qarch=pwr7 -qtune=pwr7 -NS32768 -I/home/nwp/nm/frrj/lib/MTOOLS/include -g -O3 -qnostrict 
    22 %FFLAGS              -qrealsize=8 -qextname -qsuffix=f=f90 -qarch=pwr7 -qtune=pwr7 -NS32768 -I/home/nwp/nm/frrj/lib/MTOOLS/include -g -O3 -qnostrict 
     24%FCFLAGS             -qrealsize=8 -qextname -qsuffix=f=f90 -qarch=pwr7 -qtune=pwr7 -NS32768 -g -O3 -qstrict 
     25%FFLAGS              -qrealsize=8 -qextname -qsuffix=f=f90 -qarch=pwr7 -qtune=pwr7 -NS32768 -g -O3 -qstrict 
    2326%LD                  mpCC_r 
    24 %LDFLAGS             -lxlf90 -L/home/nwp/nm/frrj/lib/MTOOLS/lib -lnetcdf -L/projects/um1/lib -lsig -O3 -L MASS 
     27%LDFLAGS             -lxlf90 -L/projects/um1/lib -lsig -O3 -L MASS 
    2528%FPPFLAGS            -E -P -traditional -I/opt/ibmhpc/pecurrent/ppe.poe/include -I/usr/lpp/ppe.poe/include/thread64 
    2629%AR                  ar 
    2730%ARFLAGS             rs 
    2831%MK                  gmake 
    29 %USER_INC            %NCDF_INC -I%XIOS_ROOT/inc 
    30 %USER_LIB            %NCDF_LIB -L%XIOS_ROOT/lib -lxios 
     32%USER_INC            %NCDF_INC %XIOS_INC 
     33%USER_LIB            %NCDF_LIB %XIOS_LIB 
  • branches/2013/dev_LOCEAN_CMCC_INGV_MERC_UKMO_2013/NEMOGCM/CONFIG/AMM12/EXP00/namelist_cfg

    r4230 r4245  
    88   nn_it000    =       1   !  first time step 
    99   nn_itend    =    2880   !  last  time step (std 1 day = 288) 
    10    nn_date0    =  20070101 !  date at nit_0000 (format yyyymmdd) used if ln_rstart=F or (ln_rstart=T and nn_rstctl=0 or 1) 
     10   nn_date0    =  20120101 !  date at nit_0000 (format yyyymmdd) used if ln_rstart=F or (ln_rstart=T and nn_rstctl=0 or 1) 
    1111   nn_leapy    =       1   !  Leap year calendar (1) or not (0) 
    1212   ln_rstart   =  .true.  !  start from rest (F) or from a restart file (T) 
  • branches/2013/dev_LOCEAN_CMCC_INGV_MERC_UKMO_2013/NEMOGCM/CONFIG/AMM12/cpp_AMM12.fcm

    r4147 r4245  
    1  bld::tool::fppkeys  key_bdy key_tide key_vectopt_loop key_dynspg_ts key_ldfslp  key_zdfgls  key_vvl key_diainstant key_mpp_mpi key_iomput key_nosignedzero 
     1 bld::tool::fppkeys  key_bdy key_tide key_dynspg_ts key_ldfslp  key_zdfgls  key_vvl key_diainstant key_mpp_mpi key_iomput 
  • branches/2013/dev_LOCEAN_CMCC_INGV_MERC_UKMO_2013/NEMOGCM/CONFIG/C1D_PAPA/cpp_C1D_PAPA.fcm

    r4158 r4245  
    1  bld::tool::fppkeys key_c1d key_c1d_papa key_dynspg_flt key_diahth key_zdfgls key_iomput 
     1 bld::tool::fppkeys key_c1d key_dynspg_flt key_diahth key_zdfgls key_iomput 
  • branches/2013/dev_LOCEAN_CMCC_INGV_MERC_UKMO_2013/NEMOGCM/CONFIG/GYRE/EXP00/iodef.xml

    r4153 r4245  
    4646     <field field_ref="mldr10_1"     name="somxl010"  /> 
    4747     <field field_ref="mldkz5"       name="somixhgt"  /> 
    48         </file> 
     48           <!-- variables available with MLE 
     49          <field field_ref="Lf_NHpf"    name="Lf_NHpf"  long_name="MLE:_Lf=NH/f"     /> 
     50      --> 
     51       </file> 
    4952    
    5053   <file id="file2" name_suffix="_grid_U" description="ocean U grid variables" > 
    5154          <field field_ref="uoce"         name="vozocrtx"  /> 
    5255          <field field_ref="utau"         name="sozotaux"  /> 
     56          <!-- variables available with MLE 
     57          <field field_ref="psiu_mle"     name="psiu_mle"  long_name="MLE_streamfunction_along_i-axis" /> 
     58     --> 
    5359        </file> 
    5460    
     
    5662          <field field_ref="voce"         name="vomecrty"  />  
    5763          <field field_ref="vtau"         name="sometauy"  />  
     64          <!-- variables available with MLE 
     65          <field field_ref="psiv_mle"     name="psiv_mle"  long_name="MLE_streamfunction_along_j-axis" /> 
     66     --> 
    5867        </file> 
    5968    
  • branches/2013/dev_LOCEAN_CMCC_INGV_MERC_UKMO_2013/NEMOGCM/CONFIG/GYRE_PISCES/EXP00/iodef.xml

    r4153 r4245  
    4747     <field field_ref="mldr10_1"     name="somxl010"  /> 
    4848     <field field_ref="mldkz5"       name="somixhgt"  /> 
     49           <!-- variables available with MLE 
     50          <field field_ref="Lf_NHpf"    name="Lf_NHpf"  long_name="MLE:_Lf=NH/f"     /> 
     51      --> 
    4952        </file> 
    5053    
     
    5255          <field field_ref="uoce"         name="vozocrtx"  /> 
    5356          <field field_ref="utau"         name="sozotaux"  /> 
     57          <!-- variables available with MLE 
     58          <field field_ref="psiu_mle"     name="psiu_mle"  long_name="MLE_streamfunction_along_i-axis" /> 
     59     --> 
    5460        </file> 
    5561    
     
    5763          <field field_ref="voce"         name="vomecrty"  />  
    5864          <field field_ref="vtau"         name="sometauy"  />  
     65          <!-- variables available with MLE 
     66          <field field_ref="psiv_mle"     name="psiv_mle"  long_name="MLE_streamfunction_along_j-axis" /> 
     67     --> 
    5968        </file> 
    6069    
  • branches/2013/dev_LOCEAN_CMCC_INGV_MERC_UKMO_2013/NEMOGCM/CONFIG/ORCA2_LIM/EXP00/iodef_default.xml

    r4161 r4245  
    6464          <field field_ref="vtau_ice"         name="iicestrv" /> 
    6565 
     66           <!-- variables available with MLE 
     67          <field field_ref="Lf_NHpf"    name="Lf_NHpf"  long_name="MLE:_Lf=NH/f"     /> 
     68      --> 
    6669   </file> 
    6770 
     
    7376     <field field_ref="u_masstr"     name="vozomatr"  /> 
    7477     <field field_ref="u_heattr"     name="sozohetr"  /> 
     78          <!-- variables available with MLE 
     79          <field field_ref="psiu_mle"     name="psiu_mle"  long_name="MLE_streamfunction_along_i-axis" /> 
     80     --> 
    7581   </file> 
    7682    
     
    8288     <field field_ref="v_masstr"     name="vomematr"  /> 
    8389     <field field_ref="v_heattr"     name="somehetr"  /> 
     90          <!-- variables available with MLE 
     91          <field field_ref="psiv_mle"     name="psiv_mle"  long_name="MLE_streamfunction_along_j-axis" /> 
     92     --> 
    8493   </file> 
    8594    
  • branches/2013/dev_LOCEAN_CMCC_INGV_MERC_UKMO_2013/NEMOGCM/CONFIG/ORCA2_LIM_PISCES/EXP00/iodef.xml

    r4153 r4245  
    6767     <field field_ref="mldkz5"       /> 
    6868     <field field_ref="mldr10_1"     /> 
     69           <!-- variables available with MLE 
     70          <field field_ref="Lf_NHpf"    name="Lf_NHpf"  long_name="MLE:_Lf=NH/f"     /> 
     71      --> 
    6972   </file> 
    7073    
     
    7376     <field field_ref="suoce"        name="uos"     long_name="sea_surface_x_velocity"    /> 
    7477     <field field_ref="utau"         name="tauuo"   long_name="surface_downward_x_stress" /> 
     78          <!-- variables available with MLE 
     79          <field field_ref="psiu_mle"     name="psiu_mle"  long_name="MLE_streamfunction_along_i-axis" /> 
     80     --> 
    7581   </file> 
    7682    
     
    7985     <field field_ref="svoce"        name="vos"     long_name="sea_surface_y_velocity"    /> 
    8086     <field field_ref="vtau"         name="tauvo"   long_name="surface_downward_y_stress" /> 
     87          <!-- variables available with MLE 
     88          <field field_ref="psiv_mle"     name="psiv_mle"  long_name="MLE_streamfunction_along_j-axis" /> 
     89     --> 
    8190   </file> 
    8291    
  • branches/2013/dev_LOCEAN_CMCC_INGV_MERC_UKMO_2013/NEMOGCM/CONFIG/SHARED/field_def.xml

    r4161 r4245  
    3131    <field id="eken"         long_name="kinetic energy"                            unit="m2/s2" grid_ref="grid_T_3D"/> 
    3232    <field id="hdiv"         long_name="horizontal divergence"                     unit="s-1"   grid_ref="grid_T_3D"/> 
     33         <!-- variables available with MLE --> 
     34         <field id="Lf_NHpf"      long_name="MLE: Lf = N H / f"                         unit="m"                        /> 
    3335         <!-- next variables available with key_diahth --> 
    3436         <field id="mlddzt"       long_name="Thermocline Depth (max dT/dz)"             unit="m"                        /> 
     
    268270         <field id="uocet"        long_name="ocean transport along i-axis times temperature" unit="degC.m/s" grid_ref="grid_U_3D" /> 
    269271         <field id="uoces"        long_name="ocean transport along i-axis times salinity"    unit="psu.m/s"  grid_ref="grid_U_3D" /> 
     272         <!-- variables available with MLE --> 
     273         <field id="psiu_mle"     long_name="MLE streamfunction along i-axis"             unit="m3/s"  grid_ref="grid_U_3D"  /> 
    270274         <!-- uoce_eiv: available with key_traldf_eiv and key_diaeiv --> 
    271275         <field id="uoce_eiv"     long_name="EIV ocean current along i-axis"              unit="m/s"  grid_ref="grid_U_3D" /> 
     
    289293         <field id="vocet"        long_name="ocean transport along j-axis times temperature" unit="degC.m/s" grid_ref="grid_V_3D" /> 
    290294         <field id="voces"        long_name="ocean transport along j-axis times salinity"    unit="psu.m/s"  grid_ref="grid_V_3D" /> 
     295         <!-- variables available with MLE --> 
     296         <field id="psiv_mle"     long_name="MLE streamfunction along j-axis"             unit="m3/s"  grid_ref="grid_V_3D"  /> 
    291297         <!-- voce_eiv: available with key_traldf_eiv and key_diaeiv --> 
    292298         <field id="voce_eiv"     long_name="EIV ocean current along j-axis"              unit="m/s"  grid_ref="grid_V_3D" /> 
  • branches/2013/dev_LOCEAN_CMCC_INGV_MERC_UKMO_2013/NEMOGCM/CONFIG/SHARED/namelist_ref

    r4238 r4245  
    112112!----------------------------------------------------------------------- 
    113113   nn_bathy    =    1      !  compute (=0) or read (=1) the bathymetry file 
    114    nn_closea    =   0      !  remove (=0) or keep (=1) closed seas and lakes (ORCA) 
     114   rn_bathy    =    0.     !  value of the bathymetry. if (=0) bottom flat at jpkm1 
     115   nn_closea   =    0      !  remove (=0) or keep (=1) closed seas and lakes (ORCA) 
    115116   nn_msh      =    0      !  create (=1) a mesh file or not (=0) 
    116117   rn_hmin     =   -3.     !  min depth of the ocean (>0) or min number of ocean level (<0) 
     
    284285   ln_2m       = .false.   !  air temperature and humidity referenced at 2m (T) instead 10m (F) 
    285286   ln_taudif   = .false.   !  HF tau contribution: use "mean of stress module - module of the mean stress" data 
     287   ln_bulk2z   = .false.   !  Air temperature/humidity and wind vectors are referenced at heights rn_zqt and rn_zu 
     288   rn_zqt      = 3.        !  Air temperature and humidity reference height (m) (ln_bulk2z) 
     289   rn_zu       = 4.        !  Wind vector reference height (m)                  (ln_bulk2z) 
    286290   rn_pfac     = 1.        !  multiplicative factor for precipitation (total & snow) 
    287291   rn_efac     = 1.        !  multiplicative factor for evaporation (0. or 1.) 
     
    556560   bn_tem  =    'amm12_bdyT_tra' ,         24        , 'votemper' ,     .true.     , .false. ,  'daily'  ,    ''    ,   ''    , '' 
    557561   bn_sal  =    'amm12_bdyT_tra' ,         24        , 'vosaline' ,     .true.     , .false. ,  'daily'  ,    ''    ,   ''    , '' 
    558 !   bn_a_i  =    'amm12_bdyT_ice' ,         24        , 'ileadfra' ,     .true.     , .false. ,  'daily'  ,    ''    ,   ''    , '' 
    559 !   bn_ht_i =    'amm12_bdyT_ice' ,         24        , 'iicethic' ,     .true.     , .false. ,  'daily'  ,    ''    ,   ''    , '' 
    560 !   bn_ht_s =    'amm12_bdyT_ice' ,         24        , 'isnowthi' ,     .true.     , .false. ,  'daily'  ,    ''    ,   ''    , '' 
    561562   cn_dir  =    'bdydta/' 
    562563   ln_full_vel = .false. 
     
    637638   ln_traadv_qck    =  .false.  !  QUICKEST scheme 
    638639   ln_traadv_msc_ups=  .false.  !  use upstream scheme within muscl 
     640/ 
     641!----------------------------------------------------------------------- 
     642&namtra_adv_mle !   mixed layer eddy parametrisation (Fox-Kemper param) 
     643!----------------------------------------------------------------------- 
     644   ln_mle    = .true.      ! (T) use the Mixed Layer Eddy (MLE) parameterisation 
     645   rn_ce     = 0.06        ! magnitude of the MLE (typical value: 0.06 to 0.08) 
     646   nn_mle    = 1           ! MLE type: =0 standard Fox-Kemper ; =1 new formulation 
     647   rn_lf     = 5.e+3       ! typical scale of mixed layer front (meters)                      (case rn_mle=0) 
     648   rn_time   = 172800.     ! time scale for mixing momentum across the mixed layer (seconds)  (case rn_mle=0) 
     649   rn_lat    = 20.         ! reference latitude (degrees) of MLE coef.                        (case rn_mle=1) 
     650   nn_mld_uv = 0           ! space interpolation of MLD at u- & v-pts (0=min,1=averaged,2=max) 
     651   nn_conv   = 0           ! =1 no MLE in case of convection ; =0 always MLE 
     652   rn_rho_c_mle  = 0.01    ! delta rho criterion used to calculate MLD for FK 
    639653/ 
    640654!---------------------------------------------------------------------------------- 
     
    909923   nn_timing   =    0      !  timing by routine activated (=1) creates timing.output file, or not (=0) 
    910924/ 
    911  
     925!----------------------------------------------------------------------- 
     926&namc1d        !   1D configuration options                             ("key_c1d") 
     927!----------------------------------------------------------------------- 
     928   rn_lat      =    50     !  Column latitude 
     929   rn_lon      =    -145   !  Column longitude 
     930/ 
     931!----------------------------------------------------------------------- 
     932&namc1d_uvd    !   data: U & V currents                                 ("key_c1d") 
     933!----------------------------------------------------------------------- 
     934!              ! file name ! frequency (hours)    ! variable ! time interp. ! clim  !'yearly' or ! weights  ! rotation ! 
     935!              !           !  (if <0  months)     !   name   !  (logical)   ! (T/F) ! 'monthly'  ! filename ! pairing  ! 
     936   sn_ucur     = 'ucurrent',         -1           ,'u_current',   .false.   ,.true. , 'monthly'  ,  '   '   ,  'Ume' 
     937   sn_vcur     = 'vcurrent',         -1           ,'v_current',   .false.   ,.true. , 'monthly'  ,  '   '   ,  'Vme' 
     938! 
     939   cn_dir        = './'    !  root directory for the location of the files 
     940   ln_uvd_init   = .false. !  Initialisation of ocean U & V with U & V input data (T) or not (F) 
     941   ln_uvd_dyndmp = .false. !  damping of ocean U & V toward U & V input data (T) or not (F) 
     942/ 
     943!----------------------------------------------------------------------- 
     944&namc1d_dyndmp !   U & V newtonian damping                              ("key_c1d") 
     945!----------------------------------------------------------------------- 
     946   ln_dyndmp   =  .false.  !  add a damping term (T) or not (F) 
     947/ 
    912948!!====================================================================== 
    913949!!                  ***  Diagnostics namelists  *** 
  • branches/2013/dev_LOCEAN_CMCC_INGV_MERC_UKMO_2013/NEMOGCM/CONFIG/cfg.txt

    r4230 r4245  
    55ORCA2_LIM OPA_SRC LIM_SRC_2 NST_SRC 
    66ORCA2_LIM3 OPA_SRC LIM_SRC_3 NST_SRC 
    7 ORCA2_LIM_PISCES OPA_SRC LIM_SRC_2 NST_SRC TOP_SRC 
    8 ORCA2_LIM_CFC_C14b OPA_SRC LIM_SRC_2 NST_SRC TOP_SRC 
    97ORCA2_SAS_LIM OPA_SRC SAS_SRC LIM_SRC_2 NST_SRC 
    108ORCA2_LIM_CFC_C14b OPA_SRC LIM_SRC_2 NST_SRC TOP_SRC 
    119ORCA2_OFF_PISCES OPA_SRC OFF_SRC TOP_SRC 
     10ORCA2_LIM_PISCES OPA_SRC LIM_SRC_2 NST_SRC TOP_SRC 
     11C1D_PAPA OPA_SRC 
  • branches/2013/dev_LOCEAN_CMCC_INGV_MERC_UKMO_2013/NEMOGCM/NEMO/OPA_SRC/ASM/asminc.F90

    r4162 r4245  
    10091009#endif 
    10101010 
    1011 #if defined key_cice 
     1011#if defined key_cice && defined key_asminc 
    10121012            ! Sea-ice : CICE case. Pass ice increment tendency into CICE 
    10131013            ndaice_da(:,:) = seaice_bkginc(:,:) * zincwgt / rdt 
     
    10201020         ELSE 
    10211021 
    1022 #if defined key_cice 
     1022#if defined key_cice && defined key_asminc 
    10231023            ! Sea-ice : CICE case. Zero ice increment tendency into CICE 
    10241024            ndaice_da(:,:) = 0.0_wp 
     
    10641064#endif 
    10651065  
    1066 #if defined key_cice 
    1067             ! Sea-ice : CICE case. Pass ice increment tendency into CICE - is this correct? 
     1066#if defined key_cice && defined key_asminc 
     1067            ! Sea-ice : CICE case. Pass ice increment tendency into CICE 
    10681068           ndaice_da(:,:) = seaice_bkginc(:,:) / rdt 
    10691069#endif 
     
    10741074         ELSE 
    10751075 
    1076 #if defined key_cice 
     1076#if defined key_cice && defined key_asminc 
    10771077            ! Sea-ice : CICE case. Zero ice increment tendency into CICE  
    10781078            ndaice_da(:,:) = 0.0_wp 
  • branches/2013/dev_LOCEAN_CMCC_INGV_MERC_UKMO_2013/NEMOGCM/NEMO/OPA_SRC/C1D/c1d.F90

    r2409 r4245  
    44   !! Ocean domain  :  1D configuration 
    55   !!===================================================================== 
    6    !! History :   2.0  !  2004-09  (C. Ethe)  Original code 
    7    !!             3.0  !  2008-04 (G. Madec)  adaptation to SBC 
     6   !! History :   2.0  !  2004-09 (C. Ethe)     Original code 
     7   !!             3.0  !  2008-04 (G. Madec)    adaptation to SBC 
     8   !!             3.5  !  2013-10 (D. Calvert)  add namelist 
    89   !!---------------------------------------------------------------------- 
     10#if defined key_c1d 
     11   !!---------------------------------------------------------------------- 
     12   !!   'key_c1d'                                   1D column configuration 
     13   !!---------------------------------------------------------------------- 
     14   !!   c1d_init       : read in the C1D namelist 
     15   !!---------------------------------------------------------------------- 
     16   USE in_out_manager   ! I/O manager 
     17   USE par_kind         ! kind parameters 
    918 
    1019   IMPLICIT NONE 
    1120   PRIVATE 
    1221 
    13 #if defined key_c1d 
    14    LOGICAL, PUBLIC, PARAMETER ::   lk_c1d = .TRUE.    !: 1D config. flag activated 
    15 #else 
    16    LOGICAL, PUBLIC, PARAMETER ::   lk_c1d = .FALSE.   !: 1D config. flag de-activated 
    17 #endif 
     22   PUBLIC   c1d_init                                 ! called by nemogcm.F90 
     23 
     24   LOGICAL , PUBLIC, PARAMETER ::  lk_c1d = .TRUE.   ! 1D config. flag 
     25 
     26   REAL(wp), PUBLIC            ::  rn_lat1d     ! Column latitude 
     27   REAL(wp), PUBLIC            ::  rn_lon1d     ! Column longitude 
    1828 
    1929   !!---------------------------------------------------------------------- 
     
    2232   !! Software governed by the CeCILL licence     (NEMOGCM/NEMO_CeCILL.txt) 
    2333   !!====================================================================== 
     34CONTAINS 
     35 
     36   SUBROUTINE c1d_init 
     37      !!---------------------------------------------------------------------- 
     38      !!                  ***  ROUTINE c1d_init  *** 
     39      !!  
     40      !! ** Purpose :   Initialization of C1D options 
     41      !! 
     42      !! ** Method  :   Read namelist namc1d  
     43      !!---------------------------------------------------------------------- 
     44      INTEGER ::   ios                 ! Local integer output status for namelist read 
     45      NAMELIST/namc1d/ rn_lat1d, rn_lon1d 
     46      !!---------------------------------------------------------------------- 
     47      ! 
     48 
     49      REWIND( numnam_ref )              ! Namelist namc1d in reference namelist : Tracer advection scheme 
     50      READ  ( numnam_ref, namc1d, IOSTAT = ios, ERR = 901) 
     51901   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namc1d in reference namelist', lwp ) 
     52 
     53      REWIND( numnam_cfg )              ! Namelist namtra_adv in configuration namelist : Tracer advection scheme 
     54      READ  ( numnam_cfg, namc1d, IOSTAT = ios, ERR = 902 ) 
     55902   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namc1d in configuration namelist', lwp ) 
     56      WRITE ( numond, namc1d ) 
     57 
     58      ! 
     59      IF(lwp) THEN                    ! Control print 
     60         WRITE(numout,*) 
     61         WRITE(numout,*) 'c1d_init : Initialize 1D model configuration options' 
     62         WRITE(numout,*) '~~~~~~~~' 
     63         WRITE(numout,*) '   Namelist namc1d : set options for the C1D model' 
     64         WRITE(numout,*) '      column latitude                 rn_lat1d = ', rn_lat1d 
     65         WRITE(numout,*) '      column longitude                rn_lon1d = ', rn_lon1d 
     66      ENDIF 
     67      ! 
     68      ! 
     69   END SUBROUTINE c1d_init 
     70 
     71#else 
     72   !!---------------------------------------------------------------------- 
     73   !!   Dummy module :                           No use of 1D configuration 
     74   !!---------------------------------------------------------------------- 
     75   USE par_kind         ! kind parameters 
     76 
     77   LOGICAL, PUBLIC, PARAMETER ::   lk_c1d = .FALSE.   !: 1D config. flag de-activated 
     78   REAL(wp)                   ::   rn_lat1d, rn_lon1d 
     79CONTAINS 
     80 
     81   SUBROUTINE c1d_init               ! Dummy routine 
     82   END SUBROUTINE c1d_init 
     83 
     84#endif 
     85 
     86   !!====================================================================== 
    2487END MODULE c1d 
  • branches/2013/dev_LOCEAN_CMCC_INGV_MERC_UKMO_2013/NEMOGCM/NEMO/OPA_SRC/C1D/dtauvd.F90

    r4244 r4245  
    2626   PUBLIC   dta_uvd        ! called by istate.F90 and dyndmp.90 
    2727 
    28    LOGICAL , PUBLIC ::   ln_uvd_init   = .FALSE.      ! Flag to initialise with U & V current data 
    29    LOGICAL , PUBLIC ::   ln_uvd_dyndmp = .FALSE.      ! Flag for Newtonian damping toward U & V current data 
     28   LOGICAL , PUBLIC ::   ln_uvd_init         ! Flag to initialise with U & V current data 
     29   LOGICAL , PUBLIC ::   ln_uvd_dyndmp       ! Flag for Newtonian damping toward U & V current data 
    3030 
    3131   TYPE(FLD), ALLOCATABLE, DIMENSION(:) ::   sf_uvd   ! structure for input U & V current (file information and data) 
     
    5959      !! 
    6060      NAMELIST/namc1d_uvd/ ln_uvd_init, ln_uvd_dyndmp, cn_dir, sn_ucur, sn_vcur 
     61      INTEGER  ::   ios 
    6162      !!---------------------------------------------------------------------- 
    6263      ! 
     
    6465      ! 
    6566      ierr0 = 0  ;  ierr1 = 0  ;  ierr2 = 0  ;  ierr3 = 0 
    66       ! 
    67       cn_dir = './'                 ! default: directory in which the model is executed 
    68       ! 
    69       !                             !==   read namelist namc1d_uvd: flags and field info   ==! 
    70  
    71       !                             ! default values (NB: frequency positive => hours, negative => months) 
    72       !              !   file   ! frequency ! variable  ! time intep !  clim   ! 'yearly' or ! weights  ! rotation ! 
    73       !              !   name   !  (hours)  !  name     !   (T/F)    !  (T/F)  !  'monthly'  ! filename ! pairs    ! 
    74       sn_ucur = FLD_N( 'ucurrent',   -1     , 'u_current',  .false.  , .true.  ,  'monthly'  , ''       , 'Ume'    ) 
    75       sn_vcur = FLD_N( 'vcurrent',   -1     , 'v_current',  .false.  , .true.  ,  'monthly'  , ''       , 'Vme'    ) 
    76  
    77       REWIND( numnam )              ! Read in namelist namc1d_uvd 
    78       READ  ( numnam, namc1d_uvd ) 
     67 
     68      REWIND( numnam_ref )              ! Namelist namc1d_uvd in reference namelist :  
     69      READ  ( numnam_ref, namc1d_uvd, IOSTAT = ios, ERR = 901) 
     70901   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namc1d_uvd in reference namelist', lwp ) 
     71 
     72      REWIND( numnam_cfg )              ! Namelist namc1d_uvd in configuration namelist : Parameters of the run 
     73      READ  ( numnam_cfg, namc1d_uvd, IOSTAT = ios, ERR = 902 ) 
     74902   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namc1d_uvd in configuration namelist', lwp ) 
     75      WRITE ( numond, namc1d_uvd ) 
    7976 
    8077      !                             ! force the initialization when dyndmp is used 
  • branches/2013/dev_LOCEAN_CMCC_INGV_MERC_UKMO_2013/NEMOGCM/NEMO/OPA_SRC/C1D/dyndmp.F90

    r4244 r4245  
    3333   PUBLIC   dyn_dmp      ! routine called by step_c1d.F90 
    3434 
    35    LOGICAL, PUBLIC ::   ln_dyndmp = .TRUE.                             ! Flag for Newtonian damping 
     35   LOGICAL, PUBLIC ::   ln_dyndmp           ! Flag for Newtonian damping 
    3636 
    3737   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) ::  utrdmp    ! damping U current trend (m/s2) 
     
    7373      !!---------------------------------------------------------------------- 
    7474      NAMELIST/namc1d_dyndmp/ ln_dyndmp 
    75       !!---------------------------------------------------------------------- 
    76  
    77       REWIND ( numnam )                      !==   read namelist namc1d_dyndmp : momentum damping flag     ==! 
    78       READ   ( numnam, namc1d_dyndmp )       !==   (namelist of namtra_dmp is used for other parameters)   ==! 
     75      INTEGER :: ios 
     76      !!---------------------------------------------------------------------- 
     77 
     78      REWIND( numnam_ref )              ! Namelist namc1d_dyndmp in reference namelist :  
     79      READ  ( numnam_ref, namc1d_dyndmp, IOSTAT = ios, ERR = 901) 
     80901   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namc1d_dyndmp in reference namelist', lwp ) 
     81 
     82      REWIND( numnam_cfg )              ! Namelist namc1d_dyndmp in configuration namelist : Parameters of the run 
     83      READ  ( numnam_cfg, namc1d_dyndmp, IOSTAT = ios, ERR = 902 ) 
     84902   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namc1d_dyndmp in configuration namelist', lwp ) 
     85      WRITE ( numond, namc1d_dyndmp ) 
    7986 
    8087      IF(lwp) THEN                           ! control print 
  • branches/2013/dev_LOCEAN_CMCC_INGV_MERC_UKMO_2013/NEMOGCM/NEMO/OPA_SRC/C1D/step_c1d.F90

    r4153 r4245  
    1313   !!   stp_c1d        : NEMO system time-stepping in c1d case 
    1414   !!---------------------------------------------------------------------- 
    15    USE step_oce         ! time stepping definition modules  
     15   USE step_oce        ! time stepping definition modules  
    1616#if defined key_top 
    17    USE trcstp           ! passive tracer time-stepping      (trc_stp routine) 
     17   USE trcstp          ! passive tracer time-stepping      (trc_stp routine) 
    1818#endif 
    1919   USE dyncor_c1d      ! Coriolis term (c1d case)         (dyn_cor_1d     ) 
    2020   USE dynnxt_c1d      ! time-stepping                    (dyn_nxt routine) 
     21   USE dyndmp          ! U & V momentum damping           (dyn_dmp routine) 
    2122   USE restart         ! restart  
    2223 
     
    124125                             CALL tra_sbc    ( kstp )        ! surface boundary condition 
    125126      IF( ln_traqsr      )   CALL tra_qsr    ( kstp )        ! penetrative solar radiation qsr 
     127      IF( ln_tradmp      )   CALL tra_dmp    ( kstp )        ! internal damping trends- tracers 
    126128      IF( lk_zdfkpp      )   CALL tra_kpp    ( kstp )        ! KPP non-local tracer fluxes 
    127129                             CALL tra_zdf    ( kstp )        ! vertical mixing 
     
    136138                               va(:,:,:) = 0.e0 
    137139 
     140      IF( ln_dyndmp      )     CALL dyn_dmp    ( kstp )       ! internal damping trends- momentum 
    138141                               CALL dyn_cor_c1d( kstp )       ! vorticity term including Coriolis 
    139142                               CALL dyn_zdf    ( kstp )       ! vertical diffusion 
  • branches/2013/dev_LOCEAN_CMCC_INGV_MERC_UKMO_2013/NEMOGCM/NEMO/OPA_SRC/DOM/domain.F90

    r4152 r4245  
    125125         &             nn_it000, nn_itend  , nn_date0    , nn_leapy     , nn_istate , nn_stock ,   & 
    126126         &             nn_write, ln_dimgnnn, ln_mskland  , ln_clobber   , nn_chunksz 
    127       NAMELIST/namdom/ nn_bathy , rn_e3zps_min, rn_e3zps_rat, nn_msh    , rn_hmin,   & 
    128          &             nn_acc   , rn_atfp     , rn_rdt      , rn_rdtmin ,            & 
     127      NAMELIST/namdom/ nn_bathy, rn_bathy , rn_e3zps_min, rn_e3zps_rat, nn_msh, rn_hmin,   & 
     128         &             nn_acc   , rn_atfp     , rn_rdt      , rn_rdtmin ,                  & 
    129129         &             rn_rdtmax, rn_rdth     , nn_baro     , nn_closea , ln_crs,    & 
    130130         &             jphgr_msh, & 
     
    228228         WRITE(numout,*) '   Namelist namdom : space & time domain' 
    229229         WRITE(numout,*) '      flag read/compute bathymetry      nn_bathy     = ', nn_bathy 
     230         WRITE(numout,*) '      Depth (if =0 bathy=jpkm1)         rn_bathy     = ', rn_bathy 
    230231         WRITE(numout,*) '      min depth of the ocean    (>0) or    rn_hmin   = ', rn_hmin 
    231232         WRITE(numout,*) '      min number of ocean level (<0)       ' 
  • branches/2013/dev_LOCEAN_CMCC_INGV_MERC_UKMO_2013/NEMOGCM/NEMO/OPA_SRC/DOM/domcfg.F90

    r4147 r4245  
    1616   USE lib_mpp         ! distributed memory computing library 
    1717   USE timing          ! Timing 
     18   USE c1d             ! 1D configuration 
     19   USE domc1d          ! 1D configuration: column location 
    1820 
    1921   IMPLICIT NONE 
     
    7981      INTEGER ::   ji, jj   ! dummy loop argument 
    8082      !!---------------------------------------------------------------------- 
     83      !                              ! recalculate jpizoom/jpjzoom given lat/lon 
     84      IF( lk_c1d )  CALL dom_c1d( rn_lat1d, rn_lon1d ) 
     85      ! 
    8186      !                        ! ============== ! 
    8287      !                        !  Local domain  !  
  • branches/2013/dev_LOCEAN_CMCC_INGV_MERC_UKMO_2013/NEMOGCM/NEMO/OPA_SRC/DOM/domzgr.F90

    r4153 r4245  
    374374            IF(lwp) WRITE(numout,*) 
    375375            IF(lwp) WRITE(numout,*) '         bathymetry field: flat basin' 
    376             idta(:,:) = jpkm1                            ! before last level 
    377             zdta(:,:) = gdepw_0(jpk)                     ! last w-point depth 
    378             h_oce     = gdepw_0(jpk) 
     376            IF( rn_bathy > 0.01 ) THEN  
     377               IF(lwp) WRITE(numout,*) '         Depth = rn_bathy read in namelist' 
     378               zdta(:,:) = rn_bathy 
     379               IF( ln_sco ) THEN                                   ! s-coordinate (zsc       ): idta()=jpk 
     380                  idta(:,:) = jpkm1 
     381               ELSE                                                ! z-coordinate (zco or zps): step-like topography 
     382                  idta(:,:) = jpkm1 
     383                  DO jk = 1, jpkm1 
     384                     WHERE( gdept_0(jk) < zdta(:,:) .AND. zdta(:,:) <= gdept_0(jk+1) )   idta(:,:) = jk 
     385                  END DO 
     386               ENDIF 
     387            ELSE 
     388               IF(lwp) WRITE(numout,*) '         Depth = depthw(jpkm1)' 
     389               idta(:,:) = jpkm1                            ! before last level 
     390               zdta(:,:) = gdepw_0(jpk)                     ! last w-point depth 
     391               h_oce     = gdepw_0(jpk) 
     392            ENDIF 
    379393         ELSE                                         ! bump centered in the basin 
    380394            IF(lwp) WRITE(numout,*) 
     
    11061120      INTEGER  ::   ios                      ! Local integer output status for namelist read 
    11071121      REAL(wp) ::   zrmax, ztaper   ! temporary scalars 
    1108       ! 
     1122      REAL(wp) ::   zrfact 
     1123      ! 
     1124      REAL(wp), POINTER, DIMENSION(:,:  ) :: ztmpi1, ztmpi2, ztmpj1, ztmpj2 
    11091125      REAL(wp), POINTER, DIMENSION(:,:  ) :: zenv, ztmp, zmsk, zri, zrj, zhbat 
    11101126 
     
    11151131      IF( nn_timing == 1 )  CALL timing_start('zgr_sco') 
    11161132      ! 
    1117       CALL wrk_alloc( jpi, jpj,      zenv, ztmp, zmsk, zri, zrj, zhbat                          ) 
     1133      CALL wrk_alloc( jpi, jpj, zenv, ztmp, zmsk, zri, zrj, zhbat , ztmpi1, ztmpi2, ztmpj1, ztmpj2 ) 
    11181134      ! 
    11191135      REWIND( numnam_ref )              ! Namelist namzgr_sco in reference namelist : Sigma-stretching parameters 
     
    11691185      !                                        ! ============================= 
    11701186      ! use r-value to create hybrid coordinates 
     1187      zenv(:,:) = bathy(:,:) 
     1188      ! 
     1189      ! set first land point adjacent to a wet cell to sbot_min as this needs to be included in smoothing 
    11711190      DO jj = 1, jpj 
    11721191         DO ji = 1, jpi 
    1173             zenv(ji,jj) = MAX( bathy(ji,jj), rn_sbot_min ) 
    1174          END DO 
    1175       END DO 
     1192           IF( bathy(ji,jj) == 0._wp ) THEN 
     1193             iip1 = MIN( ji+1, jpi ) 
     1194             ijp1 = MIN( jj+1, jpj ) 
     1195             iim1 = MAX( ji-1, 1 ) 
     1196             ijm1 = MAX( jj-1, 1 ) 
     1197             IF( (bathy(iip1,jj) + bathy(iim1,jj) + bathy(ji,ijp1) + bathy(ji,ijm1) +              & 
     1198        &         bathy(iip1,ijp1) + bathy(iim1,ijm1) + bathy(iip1,ijp1) + bathy(iim1,ijm1)) > 0._wp ) THEN 
     1199               zenv(ji,jj) = rn_sbot_min 
     1200             ENDIF 
     1201           ENDIF 
     1202         END DO 
     1203      END DO 
     1204      ! apply lateral boundary condition   CAUTION: keep the value when the lbc field is zero 
     1205      CALL lbc_lnk( zenv, 'T', 1._wp, 'no0' ) 
    11761206      !  
    1177       ! Smooth the bathymetry (if required) 
     1207      ! smooth the bathymetry (if required) 
    11781208      scosrf(:,:) = 0._wp             ! ocean surface depth (here zero: no under ice-shelf sea) 
    11791209      scobot(:,:) = bathy(:,:)        ! ocean bottom  depth 
     
    11811211      jl = 0 
    11821212      zrmax = 1._wp 
    1183       !                                                     ! ================ ! 
    1184       DO WHILE( jl <= 10000 .AND. zrmax > rn_rmax )         !  Iterative loop  ! 
    1185          !                                                  ! ================ ! 
     1213      !    
     1214      !      
     1215      ! set scaling factor used in reducing vertical gradients 
     1216      zrfact = ( 1._wp - rn_rmax ) / ( 1._wp + rn_rmax ) 
     1217      ! 
     1218      ! initialise temporary evelope depth arrays 
     1219      ztmpi1(:,:) = zenv(:,:) 
     1220      ztmpi2(:,:) = zenv(:,:) 
     1221      ztmpj1(:,:) = zenv(:,:) 
     1222      ztmpj2(:,:) = zenv(:,:) 
     1223      ! 
     1224      ! initialise temporary r-value arrays 
     1225      zri(:,:) = 1._wp 
     1226      zrj(:,:) = 1._wp 
     1227      !                                                            ! ================ ! 
     1228      DO WHILE( jl <= 10000 .AND. ( zrmax - rn_rmax ) > 1.e-8_wp ) !  Iterative loop  ! 
     1229         !                                                         ! ================ ! 
    11861230         jl = jl + 1 
    11871231         zrmax = 0._wp 
    1188          zmsk(:,:) = 0._wp 
     1232         ! we set zrmax from previous r-values (zri and zrj) first 
     1233         ! if set after current r-value calculation (as previously) 
     1234         ! we could exit DO WHILE prematurely before checking r-value 
     1235         ! of current zenv 
     1236         DO jj = 1, nlcj 
     1237            DO ji = 1, nlci 
     1238               zrmax = MAX( zrmax, ABS(zri(ji,jj)), ABS(zrj(ji,jj)) ) 
     1239            END DO 
     1240         END DO 
     1241         zri(:,:) = 0._wp 
     1242         zrj(:,:) = 0._wp 
    11891243         DO jj = 1, nlcj 
    11901244            DO ji = 1, nlci 
    11911245               iip1 = MIN( ji+1, nlci )      ! force zri = 0 on last line (ji=ncli+1 to jpi) 
    11921246               ijp1 = MIN( jj+1, nlcj )      ! force zrj = 0 on last raw  (jj=nclj+1 to jpj) 
    1193                zri(ji,jj) = ABS( zenv(iip1,jj  ) - zenv(ji,jj) ) / ( zenv(iip1,jj  ) + zenv(ji,jj) ) 
    1194                zrj(ji,jj) = ABS( zenv(ji  ,ijp1) - zenv(ji,jj) ) / ( zenv(ji  ,ijp1) + zenv(ji,jj) ) 
    1195                zrmax = MAX( zrmax, zri(ji,jj), zrj(ji,jj) ) 
    1196                IF( zri(ji,jj) > rn_rmax )   zmsk(ji  ,jj  ) = 1._wp 
    1197                IF( zri(ji,jj) > rn_rmax )   zmsk(iip1,jj  ) = 1._wp 
    1198                IF( zrj(ji,jj) > rn_rmax )   zmsk(ji  ,jj  ) = 1._wp 
    1199                IF( zrj(ji,jj) > rn_rmax )   zmsk(ji  ,ijp1) = 1._wp 
     1247               IF( (zenv(ji,jj) > 0._wp) .AND. (zenv(iip1,jj) > 0._wp)) THEN 
     1248                  zri(ji,jj) = ( zenv(iip1,jj  ) - zenv(ji,jj) ) / ( zenv(iip1,jj  ) + zenv(ji,jj) ) 
     1249               END IF 
     1250               IF( (zenv(ji,jj) > 0._wp) .AND. (zenv(ji,ijp1) > 0._wp)) THEN 
     1251                  zrj(ji,jj) = ( zenv(ji  ,ijp1) - zenv(ji,jj) ) / ( zenv(ji  ,ijp1) + zenv(ji,jj) ) 
     1252               END IF 
     1253               IF( zri(ji,jj) >  rn_rmax )   ztmpi1(ji  ,jj  ) = zenv(iip1,jj  ) * zrfact 
     1254               IF( zri(ji,jj) < -rn_rmax )   ztmpi2(iip1,jj  ) = zenv(ji  ,jj  ) * zrfact 
     1255               IF( zrj(ji,jj) >  rn_rmax )   ztmpj1(ji  ,jj  ) = zenv(ji  ,ijp1) * zrfact 
     1256               IF( zrj(ji,jj) < -rn_rmax )   ztmpj2(ji  ,ijp1) = zenv(ji  ,jj  ) * zrfact 
    12001257            END DO 
    12011258         END DO 
    12021259         IF( lk_mpp )   CALL mpp_max( zrmax )   ! max over the global domain 
    1203          ! lateral boundary condition on zmsk: keep 1 along closed boundary (use of MAX) 
    1204          ztmp(:,:) = zmsk(:,:)   ;   CALL lbc_lnk( zmsk, 'T', 1._wp ) 
    1205          DO jj = 1, nlcj 
    1206             DO ji = 1, nlci 
    1207                 zmsk(ji,jj) = MAX( zmsk(ji,jj), ztmp(ji,jj) ) 
    1208             END DO 
    1209          END DO 
    12101260         ! 
    1211          IF(lwp)WRITE(numout,*) 'zgr_sco :   iter= ',jl, ' rmax= ', zrmax, ' nb of pt= ', INT( SUM(zmsk(:,:) ) ) 
     1261         IF(lwp)WRITE(numout,*) 'zgr_sco :   iter= ',jl, ' rmax= ', zrmax 
    12121262         ! 
    12131263         DO jj = 1, nlcj 
    12141264            DO ji = 1, nlci 
    1215                iip1 = MIN( ji+1, nlci )     ! last  line (ji=nlci) 
    1216                ijp1 = MIN( jj+1, nlcj )     ! last  raw  (jj=nlcj) 
    1217                iim1 = MAX( ji-1,  1  )      ! first line (ji=nlci) 
    1218                ijm1 = MAX( jj-1,  1  )      ! first raw  (jj=nlcj) 
    1219                IF( zmsk(ji,jj) == 1._wp ) THEN 
    1220                   ztmp(ji,jj) =   (                                                                                   & 
    1221              &      zenv(iim1,ijp1)*zmsk(iim1,ijp1) + zenv(ji,ijp1)*zmsk(ji,ijp1) + zenv(iip1,ijp1)*zmsk(iip1,ijp1)   & 
    1222              &    + zenv(iim1,jj  )*zmsk(iim1,jj  ) + zenv(ji,jj  )*    2._wp     + zenv(iip1,jj  )*zmsk(iip1,jj  )   & 
    1223              &    + zenv(iim1,ijm1)*zmsk(iim1,ijm1) + zenv(ji,ijm1)*zmsk(ji,ijm1) + zenv(iip1,ijm1)*zmsk(iip1,ijm1)   & 
    1224              &                    ) / (                                                                               & 
    1225              &                      zmsk(iim1,ijp1) +               zmsk(ji,ijp1) +                 zmsk(iip1,ijp1)   & 
    1226              &    +                 zmsk(iim1,jj  ) +                   2._wp     +                 zmsk(iip1,jj  )   & 
    1227              &    +                 zmsk(iim1,ijm1) +               zmsk(ji,ijm1) +                 zmsk(iip1,ijm1)   & 
    1228              &                        ) 
    1229                ENDIF 
    1230             END DO 
    1231          END DO 
    1232          ! 
    1233          DO jj = 1, nlcj 
    1234             DO ji = 1, nlci 
    1235                IF( zmsk(ji,jj) == 1._wp )   zenv(ji,jj) = MAX( ztmp(ji,jj), bathy(ji,jj) ) 
    1236             END DO 
    1237          END DO 
    1238          ! 
    1239          ! Apply lateral boundary condition   CAUTION: keep the value when the lbc field is zero 
    1240          ztmp(:,:) = zenv(:,:)   ;   CALL lbc_lnk( zenv, 'T', 1._wp ) 
    1241          DO jj = 1, nlcj 
    1242             DO ji = 1, nlci 
    1243                IF( zenv(ji,jj) == 0._wp )   zenv(ji,jj) = ztmp(ji,jj) 
    1244             END DO 
    1245          END DO 
     1265               zenv(ji,jj) = MAX(zenv(ji,jj), ztmpi1(ji,jj), ztmpi2(ji,jj), ztmpj1(ji,jj), ztmpj2(ji,jj) ) 
     1266            END DO 
     1267         END DO 
     1268         ! apply lateral boundary condition   CAUTION: keep the value when the lbc field is zero 
     1269         CALL lbc_lnk( zenv, 'T', 1._wp, 'no0' ) 
    12461270         !                                                  ! ================ ! 
    12471271      END DO                                                !     End loop     ! 
    12481272      !                                                     ! ================ ! 
    1249       ! 
    1250       ! Fill ghost rows with appropriate values to avoid undefined e3 values with some mpp decompositions 
    1251       DO ji = nlci+1, jpi  
    1252          zenv(ji,1:nlcj) = zenv(nlci,1:nlcj) 
    1253       END DO 
    1254       ! 
    1255       DO jj = nlcj+1, jpj 
    1256          zenv(:,jj) = zenv(:,nlcj) 
     1273      DO jj = 1, jpj 
     1274         DO ji = 1, jpi 
     1275            zenv(ji,jj) = MAX( zenv(ji,jj), rn_sbot_min ) ! set all points to avoid undefined scale value warnings 
     1276         END DO 
    12571277      END DO 
    12581278      ! 
     
    15321552      END DO 
    15331553      ! 
    1534       CALL wrk_dealloc( jpi, jpj,      zenv, ztmp, zmsk, zri, zrj, zhbat                          ) 
     1554      CALL wrk_dealloc( jpi, jpj, zenv, ztmp, zmsk, zri, zrj, zhbat , ztmpi1, ztmpi2, ztmpj1, ztmpj2 ) 
    15351555      ! 
    15361556      IF( nn_timing == 1 )  CALL timing_stop('zgr_sco') 
  • branches/2013/dev_LOCEAN_CMCC_INGV_MERC_UKMO_2013/NEMOGCM/NEMO/OPA_SRC/DOM/dtatsd.F90

    r4230 r4245  
    7070      ierr0 = 0  ;  ierr1 = 0  ;  ierr2 = 0  ;  ierr3 = 0 
    7171      ! 
    72       !                             ! set default namelist values  
    73       cn_dir = './'                       ! directory in which the model is executed 
    74       !                                   ! sn_... default values (NB: frequency positive => hours, negative => months) 
    75       !            !   file    ! frequency ! variable  ! time intep !  clim   ! 'yearly' or ! weights  ! rotation ! land/sea mask ! 
    76       !            !   name    !  (hours)  !  name     !   (T/F)    !  (T/F)  !  'monthly'  ! filename ! pairs    ! filename      ! 
    77       sn_tem = FLD_N( 'temperature',  -1.  , 'votemper',  .false.   , .true.  ,  'monthly'  , ''       , & 
    78            & ''       , ''            ) 
    79       sn_sal = FLD_N( 'salinity'   ,  -1.  , 'vosaline',  .false.   , .true.  ,  'monthly'  , ''       , & 
    80            & ''       , ''            ) 
    81   
    8272      REWIND( numnam_ref )              ! Namelist namtsd in reference namelist :  
    8373      READ  ( numnam_ref, namtsd, IOSTAT = ios, ERR = 901) 
  • branches/2013/dev_LOCEAN_CMCC_INGV_MERC_UKMO_2013/NEMOGCM/NEMO/OPA_SRC/DOM/istate.F90

    r3764 r4245  
    2626   USE oce             ! ocean dynamics and active tracers  
    2727   USE dom_oce         ! ocean space and time domain  
     28   USE c1d             ! 1D vertical configuration 
    2829   USE daymod          ! calendar 
    2930   USE eosbn2          ! eq. of state, Brunt Vaisala frequency (eos     routine) 
     
    3233   USE phycst          ! physical constants 
    3334   USE dtatsd          ! data temperature and salinity   (dta_tsd routine) 
     35   USE dtauvd          ! data: U & V current             (dta_uvd routine) 
    3436   USE in_out_manager  ! I/O manager 
    3537   USE iom             ! I/O library 
     
    7072      ! - ML - needed for initialization of e3t_b 
    7173      INTEGER  ::  jk     ! dummy loop indice 
     74      REAL(wp), POINTER, DIMENSION(:,:,:,:)  ::  zuvd    ! U & V data workspace 
    7275      !!---------------------------------------------------------------------- 
    7376      ! 
     
    8083 
    8184      CALL dta_tsd_init                       ! Initialisation of T & S input data 
     85      IF( lk_c1d ) CALL dta_uvd_init          ! Initialization of U & V input data 
    8286 
    8387      rhd  (:,:,:  ) = 0.e0 
     
    111115         ELSEIF( cp_cfg == 'gyre' ) THEN          
    112116            CALL istate_gyre                     ! GYRE  configuration : start from pre-defined T-S fields 
    113          ELSEIF( ln_tsd_init      ) THEN         ! Initial T-S fields read in files 
    114             CALL dta_tsd( nit000, tsb )                  ! read 3D T and S data at nit000 
    115             tsn(:,:,:,:) = tsb(:,:,:,:) 
    116             ! 
    117          ELSE                                    ! Initial T-S fields defined analytically 
    118             CALL istate_t_s 
     117         ELSE                                    ! Initial T-S, U-V fields read in files 
     118            IF ( ln_tsd_init ) THEN              ! read 3D T and S data at nit000 
     119               CALL dta_tsd( nit000, tsb )   
     120               tsn(:,:,:,:) = tsb(:,:,:,:) 
     121               ! 
     122            ELSE                                 ! Initial T-S fields defined analytically 
     123               CALL istate_t_s 
     124            ENDIF 
     125            IF ( ln_uvd_init .AND. lk_c1d ) THEN ! read 3D U and V data at nit000 
     126               CALL wrk_alloc( jpi, jpj, jpk, 2, zuvd ) 
     127               CALL dta_uvd( nit000, zuvd ) 
     128               ub(:,:,:) = zuvd(:,:,:,1) ;  un(:,:,:) = ub(:,:,:) 
     129               vb(:,:,:) = zuvd(:,:,:,2) ;  vn(:,:,:) = vb(:,:,:) 
     130               CALL wrk_dealloc( jpi, jpj, jpk, 2, zuvd ) 
     131            ENDIF 
    119132         ENDIF 
    120133         ! 
     
    180193   END SUBROUTINE istate_t_s 
    181194 
    182  
    183195   SUBROUTINE istate_eel 
    184196      !!---------------------------------------------------------------------- 
     
    404416 
    405417   END SUBROUTINE istate_gyre 
    406  
    407418 
    408419   SUBROUTINE istate_uvg 
  • branches/2013/dev_LOCEAN_CMCC_INGV_MERC_UKMO_2013/NEMOGCM/NEMO/OPA_SRC/DYN/dynspg.F90

    r3625 r4245  
    1414   USE oce            ! ocean dynamics and tracers variables 
    1515   USE dom_oce        ! ocean space and time domain variables 
     16   USE c1d            ! 1D vertical configuration 
    1617   USE phycst         ! physical constants 
    1718   USE sbc_oce        ! surface boundary condition: ocean 
     
    220221      IF(lk_dynspg_flt)   ioptio = ioptio + 1 
    221222      ! 
    222       IF( ( ioptio > 1 .AND. .NOT. lk_esopa ) .OR. ioptio == 0 )   & 
     223      IF( ( ioptio > 1 .AND. .NOT. lk_esopa ) .OR. ( ioptio == 0 .AND. .NOT. lk_c1d ) )   & 
    223224           &   CALL ctl_stop( ' Choose only one surface pressure gradient scheme with a key cpp' ) 
    224225      ! 
  • branches/2013/dev_LOCEAN_CMCC_INGV_MERC_UKMO_2013/NEMOGCM/NEMO/OPA_SRC/IOM/iom.F90

    r4205 r4245  
    479479   !!                   INTERFACE iom_get 
    480480   !!---------------------------------------------------------------------- 
    481    SUBROUTINE iom_g0d( kiomid, cdvar, pvar ) 
     481   SUBROUTINE iom_g0d( kiomid, cdvar, pvar, ktime ) 
    482482      INTEGER         , INTENT(in   )                 ::   kiomid    ! Identifier of the file 
    483483      CHARACTER(len=*), INTENT(in   )                 ::   cdvar     ! Name of the variable 
    484484      REAL(wp)        , INTENT(  out)                 ::   pvar      ! read field 
    485       ! 
    486       INTEGER               :: idvar   ! variable id 
     485      INTEGER         , INTENT(in   ),     OPTIONAL   ::   ktime     ! record number 
     486      ! 
     487      INTEGER                                         ::   idvar     ! variable id 
     488      INTEGER                                         ::   idmspc    ! number of spatial dimensions 
     489      INTEGER         , DIMENSION(1)                  ::   itime     ! record number 
     490      CHARACTER(LEN=100)                              ::   clinfo    ! info character 
     491      CHARACTER(LEN=100)                              ::   clname    ! file name 
     492      CHARACTER(LEN=1)                                ::   cldmspc   ! 
     493      ! 
     494      itime = 1 
     495      IF( PRESENT(ktime) ) itime = ktime 
     496      ! 
     497      clname = iom_file(kiomid)%name 
     498      clinfo = '          iom_g0d, file: '//trim(clname)//', var: '//trim(cdvar) 
    487499      ! 
    488500      IF( kiomid > 0 ) THEN 
    489501         idvar = iom_varid( kiomid, cdvar ) 
    490502         IF( iom_file(kiomid)%nfid > 0 .AND. idvar > 0 ) THEN 
     503            idmspc = iom_file ( kiomid )%ndims( idvar ) 
     504            IF( iom_file(kiomid)%luld(idvar) )  idmspc = idmspc - 1 
     505            WRITE(cldmspc , fmt='(i1)') idmspc 
     506            IF( idmspc > 0 )  CALL ctl_stop( TRIM(clinfo), 'When reading to a 0D array, we do not accept data', & 
     507                                 &                         'with 1 or more spatial dimensions: '//cldmspc//' were found.' , & 
     508                                 &                         'Use ncwa -a to suppress the unnecessary dimensions' ) 
    491509            SELECT CASE (iom_file(kiomid)%iolib) 
    492             CASE (jpioipsl )   ;   CALL iom_ioipsl_get(  kiomid, idvar, pvar ) 
    493             CASE (jpnf90   )   ;   CALL iom_nf90_get(    kiomid, idvar, pvar ) 
     510            CASE (jpioipsl )   ;   CALL iom_ioipsl_get(  kiomid, idvar, pvar, itime ) 
     511            CASE (jpnf90   )   ;   CALL iom_nf90_get(    kiomid, idvar, pvar, itime ) 
    494512            CASE (jprstdimg)   ;   CALL iom_rstdimg_get( kiomid, idvar, pvar ) 
    495513            CASE DEFAULT     
     
    656674               ELSE 
    657675                  CALL ctl_stop( TRIM(clinfo), 'To keep iom lisibility, when reading a '//clrankpv//'D array,'         ,   & 
    658                      &                         'we do not accept data with more than '//cldmspc//' spatial dimension',   & 
     676                     &                         'we do not accept data with '//cldmspc//' spatial dimensions',   & 
    659677                     &                         'Use ncwa -a to suppress the unnecessary dimensions' ) 
    660678               ENDIF 
     
    768786 
    769787         IF( istop == nstop ) THEN   ! no additional errors until this point... 
    770             IF(lwp) WRITE(numout,"(10x,' read ',a,' (rec: ',i4,') in ',a,' ok')") TRIM(cdvar), itime, TRIM(iom_file(kiomid)%name) 
     788            IF(lwp) WRITE(numout,"(10x,' read ',a,' (rec: ',i6,') in ',a,' ok')") TRIM(cdvar), itime, TRIM(iom_file(kiomid)%name) 
    771789           
    772790            !--- overlap areas and extra hallows (mpp) 
  • branches/2013/dev_LOCEAN_CMCC_INGV_MERC_UKMO_2013/NEMOGCM/NEMO/OPA_SRC/IOM/iom_ioipsl.F90

    r2715 r4245  
    170170            iom_file(kiomid)%cn_var(kiv) = TRIM(cdvar) 
    171171            iom_file(kiomid)%ndims(kiv)  = i_nvd 
     172            iom_file(kiomid)%dimsz(:,kiv) = 0   ! reset dimsz in case previously used 
    172173            CALL flioinqv( ioipslid, cdvar, ll_fnd,   & 
    173174                  &           len_dims = iom_file(kiomid)%dimsz(1:i_nvd,kiv), &   ! dimensions size 
     
    210211 
    211212 
    212    SUBROUTINE iom_ioipsl_g0d( kiomid, kvid, pvar ) 
     213   SUBROUTINE iom_ioipsl_g0d( kiomid, kvid, pvar, kstart ) 
    213214      !!----------------------------------------------------------------------- 
    214215      !!                  ***  ROUTINE  iom_ioipsl_g0d  *** 
     
    216217      !! ** Purpose : read a scalar with IOIPSL (only fliocom module) 
    217218      !!----------------------------------------------------------------------- 
    218       INTEGER , INTENT(in   ) ::   kiomid    ! Identifier of the file 
    219       INTEGER , INTENT(in   ) ::   kvid      ! variable id 
    220       REAL(wp), INTENT(  out) ::   pvar      ! read field 
    221       ! 
    222       CALL fliogetv( iom_file(kiomid)%nfid, TRIM(iom_file(kiomid)%cn_var(kvid)), pvar ) 
     219      INTEGER ,               INTENT(in   )            ::   kiomid    ! Identifier of the file 
     220      INTEGER ,               INTENT(in   )            ::   kvid      ! variable id 
     221      REAL(wp),               INTENT(  out)            ::   pvar      ! read field 
     222      INTEGER , DIMENSION(1), INTENT(in   ), OPTIONAL  ::   kstart    ! start position of the reading in each axis 
     223      ! 
     224      CALL fliogetv( iom_file(kiomid)%nfid, TRIM(iom_file(kiomid)%cn_var(kvid)), pvar, kstart ) 
    223225      !  
    224226   END SUBROUTINE iom_ioipsl_g0d 
  • branches/2013/dev_LOCEAN_CMCC_INGV_MERC_UKMO_2013/NEMOGCM/NEMO/OPA_SRC/IOM/iom_nf90.F90

    r4161 r4245  
    217217         CALL iom_nf90_check(NF90_Inquire_Variable(if90id, ivarid, dimids = idimid(1:i_nvd)), clinfo)   ! dimensions ids 
    218218         iom_file(kiomid)%luld(kiv) = .FALSE.   ! default value 
     219         iom_file(kiomid)%dimsz(:,kiv) = 0   ! reset dimsz in case previously used 
    219220         DO ji = 1, i_nvd                       ! dimensions size 
    220221            CALL iom_nf90_check(NF90_Inquire_Dimension(if90id, idimid(ji), len = iom_file(kiomid)%dimsz(ji,kiv)), clinfo)    
     
    251252 
    252253 
    253    SUBROUTINE iom_nf90_g0d( kiomid, kvid, pvar ) 
     254   SUBROUTINE iom_nf90_g0d( kiomid, kvid, pvar, kstart ) 
    254255      !!----------------------------------------------------------------------- 
    255256      !!                  ***  ROUTINE  iom_nf90_g0d  *** 
     
    257258      !! ** Purpose : read a scalar with NF90 
    258259      !!----------------------------------------------------------------------- 
    259       INTEGER , INTENT(in   ) ::   kiomid   ! Identifier of the file 
    260       INTEGER , INTENT(in   ) ::   kvid     ! variable id 
    261       REAL(wp), INTENT(  out) ::   pvar     ! read field 
     260      INTEGER ,               INTENT(in   )            ::   kiomid   ! Identifier of the file 
     261      INTEGER ,               INTENT(in   )            ::   kvid     ! variable id 
     262      REAL(wp),               INTENT(  out)            ::   pvar     ! read field 
     263      INTEGER , DIMENSION(1), INTENT(in   ), OPTIONAL  ::   kstart   ! start position of the reading in each axis 
    262264      ! 
    263265      CHARACTER(LEN=100)      ::   clinfo   ! info character 
    264266      !--------------------------------------------------------------------- 
    265267      clinfo = 'iom_nf90_g0d , file: '//TRIM(iom_file(kiomid)%name)//', var: '//TRIM(iom_file(kiomid)%cn_var(kvid)) 
    266       CALL iom_nf90_check(NF90_GET_VAR(iom_file(kiomid)%nfid, iom_file(kiomid)%nvid(kvid), pvar), clinfo ) 
     268      CALL iom_nf90_check(NF90_GET_VAR(iom_file(kiomid)%nfid, iom_file(kiomid)%nvid(kvid), pvar, start = kstart), clinfo ) 
    267269      !  
    268270   END SUBROUTINE iom_nf90_g0d 
  • branches/2013/dev_LOCEAN_CMCC_INGV_MERC_UKMO_2013/NEMOGCM/NEMO/OPA_SRC/OBS/diaobs.F90

    r4147 r4245  
    2121   USE par_oce 
    2222   USE dom_oce                  ! Ocean space and time domain variables 
     23   USE obs_fbm, ONLY: ln_cl4    ! Class 4 diagnostic switch 
    2324   USE obs_read_prof            ! Reading and allocation of observations (Coriolis) 
    2425   USE obs_read_sla             ! Reading and allocation of SLA observations   
     
    4849   PUBLIC dia_obs_init, &  ! Initialize and read observations 
    4950      &   dia_obs,      &  ! Compute model equivalent to observations 
    50       &   dia_obs_wri      ! Write model equivalent to observations 
     51      &   dia_obs_wri,  &  ! Write model equivalent to observations 
     52      &   dia_obs_dealloc  ! Deallocate dia_obs data 
    5153 
    5254   !! * Shared Module variables 
     
    8082   LOGICAL, PUBLIC :: ln_ssh         !: Logical switch for sea surface height 
    8183   LOGICAL, PUBLIC :: ln_sss         !: Logical switch for sea surface salinity 
     84   LOGICAL, PUBLIC :: ln_sstnight    !: Logical switch for night mean SST observations 
    8285   LOGICAL, PUBLIC :: ln_nea         !: Remove observations near land 
    8386   LOGICAL, PUBLIC :: ln_altbias     !: Logical switch for altimeter bias   
     
    167170         &            nmsshc, mdtcorr, mdtcutoff,                     & 
    168171         &            ln_reysst, ln_ghrsst, reysstname, reysstfmt,    & 
     172         &            ln_sstnight,                                    & 
    169173         &            ln_grid_search_lookup,                          & 
    170174         &            grid_search_file, grid_search_res,              & 
     
    176180         &            ln_velhradcp, velhradcpfiles,                   & 
    177181         &            ln_velfb, velfbfiles, ln_velfb_av,              & 
    178          &            ln_profb_enatim, ln_ignmis 
     182         &            ln_profb_enatim, ln_ignmis, ln_cl4 
    179183 
    180184      INTEGER :: jprofset 
     
    311315         WRITE(numout,*) '             Logical switch for GHRSST observations          ln_ghrsst = ', ln_ghrsst 
    312316         WRITE(numout,*) '             Logical switch for feedback SST data             ln_sstfb = ', ln_sstfb 
     317         WRITE(numout,*) '             Logical switch for night-time SST obs         ln_sstnight = ', ln_sstnight 
    313318         WRITE(numout,*) '             Logical switch for SSS observations                ln_sss = ', ln_sss 
    314319         WRITE(numout,*) '             Logical switch for Sea Ice observations         ln_seaice = ', ln_seaice 
     
    704709            nsstsets = nsstsets + 1 
    705710 
    706             ld_sstnight(nsstsets) = .TRUE. 
     711            ld_sstnight(nsstsets) = ln_sstnight 
    707712 
    708713            CALL obs_rea_sst_rey( reysstname, reysstfmt, sstdata(nsstsets), & 
     
    718723            nsstsets = nsstsets + 1 
    719724 
    720             ld_sstnight(nsstsets) = .TRUE. 
     725            ld_sstnight(nsstsets) = ln_sstnight 
    721726           
    722727            CALL obs_rea_sst( 1, sstdata(nsstsets), jnumsst, & 
     
    737742               nsstsets = nsstsets + 1 
    738743 
    739                ld_sstnight(nsstsets) = .TRUE. 
     744               ld_sstnight(nsstsets) = ln_sstnight 
    740745             
    741746               CALL obs_rea_sst( 0, sstdata(nsstsets), 1, & 
     
    13681373   END SUBROUTINE dia_obs_wri 
    13691374 
     1375   SUBROUTINE dia_obs_dealloc 
     1376      IMPLICIT NONE 
     1377      !!---------------------------------------------------------------------- 
     1378      !!                    *** ROUTINE dia_obs_dealloc *** 
     1379      !! 
     1380      !!  ** Purpose : To deallocate data to enable the obs_oper online loop. 
     1381      !!               Specifically: dia_obs_init --> dia_obs --> dia_obs_wri 
     1382      !! 
     1383      !!  ** Method : Clean up various arrays left behind by the obs_oper. 
     1384      !! 
     1385      !!  ** Action : 
     1386      !! 
     1387      !!---------------------------------------------------------------------- 
     1388      !! obs_grid deallocation 
     1389      CALL obs_grid_deallocate 
     1390 
     1391      !! diaobs deallocation 
     1392      IF ( nprofsets > 0 ) THEN 
     1393          DEALLOCATE(ld_enact, & 
     1394                  &  profdata, & 
     1395                  &  prodatqc) 
     1396      END IF 
     1397      IF ( ln_sla ) THEN 
     1398          DEALLOCATE(sladata, & 
     1399                  &  sladatqc) 
     1400      END IF 
     1401      IF ( ln_seaice ) THEN 
     1402          DEALLOCATE(sladata, & 
     1403                  &  sladatqc) 
     1404      END IF 
     1405      IF ( ln_sst ) THEN 
     1406          DEALLOCATE(sstdata, & 
     1407                  &  sstdatqc) 
     1408      END IF 
     1409      IF ( ln_vel3d ) THEN 
     1410          DEALLOCATE(ld_velav, & 
     1411                  &  velodata, & 
     1412                  &  veldatqc) 
     1413      END IF 
     1414   END SUBROUTINE dia_obs_dealloc 
     1415 
    13701416   SUBROUTINE ini_date( ddobsini ) 
    13711417      !!---------------------------------------------------------------------- 
  • branches/2013/dev_LOCEAN_CMCC_INGV_MERC_UKMO_2013/NEMOGCM/NEMO/OPA_SRC/OBS/mpp_map.F90

    r2363 r4245  
    5252      !!---------------------------------------------------------------------- 
    5353 
    54       ALLOCATE( & 
    55          & mppmap(jpiglo,jpjglo) & 
    56          & ) 
    57  
     54      IF (.NOT. ALLOCATED(mppmap)) THEN 
     55         ALLOCATE( & 
     56            & mppmap(jpiglo,jpjglo) & 
     57            & ) 
     58      ENDIF 
    5859      ! Initialize local imppmap 
    5960 
  • branches/2013/dev_LOCEAN_CMCC_INGV_MERC_UKMO_2013/NEMOGCM/NEMO/OPA_SRC/OBS/obs_fbm.F90

    r2287 r4245  
    4545   INTEGER, PARAMETER    :: fbimdi = -99999   !: Integers 
    4646   REAL(fbsp), PARAMETER :: fbrmdi =  99999   !: Reals 
    47     
     47 
     48   ! Output stream choice 
     49   LOGICAL               :: ln_cl4 = .FALSE.  !: Logical switch for 
     50                                              !: class 4 file outputs 
     51  
    4852   ! Main data structure for observation feedback data. 
    4953 
     
    10261030 
    10271031   SUBROUTINE write_obfbdata( cdfilename, fbdata ) 
     1032      !!---------------------------------------------------------------------- 
     1033      !!                    ***  ROUTINE write_obfbdata  *** 
     1034      !! 
     1035      !! ** Purpose :   Write an obfbdata structure into a netCDF file. 
     1036      !! 
     1037      !! ** Method  :   Decides which output wrapper to use.  
     1038      !! 
     1039      !! ** Action  :  
     1040      !! 
     1041      !!---------------------------------------------------------------------- 
     1042      !! * Arguments 
     1043      CHARACTER(len=*) :: cdfilename ! Output filename 
     1044      TYPE(obfbdata)   :: fbdata     ! obsfbdata structure 
     1045#if defined key_offobsoper 
     1046      IF (ln_cl4) THEN 
     1047          ! Class 4 file output stream 
     1048          CALL write_obfbdata_cl( cdfilename, fbdata ) 
     1049      ELSE 
     1050#endif 
     1051          ! Standard feedback file output stream 
     1052          CALL write_obfbdata_fb( cdfilename, fbdata ) 
     1053#if defined key_offobsoper 
     1054      ENDIF 
     1055#endif 
     1056   END SUBROUTINE write_obfbdata 
     1057 
     1058   SUBROUTINE write_obfbdata_fb( cdfilename, fbdata ) 
    10281059      !!---------------------------------------------------------------------- 
    10291060      !!                    ***  ROUTINE write_obfbdata  *** 
     
    15241555 
    15251556       
    1526    END SUBROUTINE write_obfbdata 
     1557   END SUBROUTINE write_obfbdata_fb 
     1558 
     1559#if defined key_offobsoper 
     1560   SUBROUTINE write_obfbdata_cl(cdfilename, fbdata) 
     1561      !!---------------------------------------------------------------------- 
     1562      !!                    ***  ROUTINE write_obfbdata_cl  *** 
     1563      !! 
     1564      !! ** Purpose : Write an obfbdata structure into a class 4 file. 
     1565      !! 
     1566      !! ** Method  : 1. Allocate memory needed by ooo_write 
     1567      !!              2. Map obfbdata into allocated memory 
     1568      !!              3. Pass mapped data to ooo_write 
     1569      !!              4. Deallocate memory 
     1570      !!---------------------------------------------------------------------- 
     1571      USE dom_oce, ONLY: narea 
     1572      USE ooo_write 
     1573      USE ooo_data 
     1574      !! * Arguments 
     1575      CHARACTER(len=*) :: cdfilename ! Feedback filename 
     1576      TYPE(obfbdata)   :: fbdata     ! obsfbdata structure 
     1577      !! * Local variables 
     1578      CHARACTER(len=17), PARAMETER :: cpname = 'write_obfbdata_cl' 
     1579      CHARACTER(len=64) :: & 
     1580              & cdate, &   !: class 4 file validity date  
     1581              & cconf, &   !: model configuration 
     1582              & csys, &    !: model system 
     1583              & ccont, &   !: contact email 
     1584              & cinst, &   !: institution 
     1585              & cversion   !: model version 
     1586      CHARACTER(len=8) :: & 
     1587              & ckind      !: observation kind 
     1588      CHARACTER(len=3) :: cfield 
     1589      INTEGER :: kobs, &   !: number of observations 
     1590              &  kvars, &  !: number of physical variables 
     1591              &  kdeps, &  !: number of observed depths 
     1592              &  kfcst, &  !: number of forecasts 
     1593              &  kifcst, & !: current forecast number 
     1594              &  kproc     !: processor number 
     1595      INTEGER, DIMENSION(:, :, :), ALLOCATABLE :: & 
     1596              &  kqc       !: quality control counterpart 
     1597      INTEGER(KIND=2), DIMENSION(:, :, :), ALLOCATABLE :: & 
     1598              &  k2qc       !: quality control counterpart 
     1599      REAL(kind=fbdp) :: & 
     1600              &  pmodjuld  !: model Julian day 
     1601      REAL(kind=fbdp), DIMENSION(:), ALLOCATABLE :: & 
     1602              &  plead, &  !: forecast lead time 
     1603              &  plam, &   !: longitude of observation 
     1604              &  pphi, &   !: latitude of observation 
     1605              &  ptim      !: time of observation 
     1606      REAL(kind=fbdp), DIMENSION(:, :), ALLOCATABLE :: & 
     1607              &  pdep      !: depths of observations 
     1608      REAL(kind=fbdp), DIMENSION(:, :, :), ALLOCATABLE :: & 
     1609              &  pob, &    !: observation counterpart 
     1610              &  pextra    !: extra field counterpart 
     1611      REAL(kind=fbdp), DIMENSION(:, :, :), ALLOCATABLE :: & 
     1612              &  pmod      !: model counterpart 
     1613      CHARACTER(len=128) :: & 
     1614              &  clfilename  !: class 4 file name 
     1615      CHARACTER(len=128), DIMENSION(:), ALLOCATABLE :: & 
     1616              &  ctype       !: Instrument type 
     1617      CHARACTER(len=nf90_max_name) :: & 
     1618              & cdtmp        !: NetCDF variable name 
     1619      CHARACTER(len=8), DIMENSION(:), ALLOCATABLE :: & 
     1620              &  cwmo, &     !: Instrument WMO ID 
     1621              &  cunit, &    !: Instrument WMO ID 
     1622              &  cvarname    !: Instrument WMO ID 
     1623      INTEGER :: & 
     1624              &  idep, &     !: Loop variable 
     1625              &  ivar, &     !: Loop variable 
     1626              &  iobs, &     !: Loop variable 
     1627              &  ii, &       !: Loop variable 
     1628              &  ij, &       !: Loop variable 
     1629              &  ik, &       !: Loop variable 
     1630              &  il          !: Loop variable 
     1631      cconf = TRIM(cl4_cfg) 
     1632      csys = TRIM(cl4_sys) 
     1633      cversion = TRIM(cl4_vn) 
     1634      ccont = TRIM(cl4_contact) 
     1635      cinst = TRIM(cl4_inst) 
     1636      cdate = TRIM(cl4_date) 
     1637      CALL locate_kind(cdfilename, ckind) 
     1638      kproc = narea 
     1639      kfcst = cl4_fcst_len 
     1640      kobs = fbdata%nobs 
     1641      kdeps = fbdata%nlev 
     1642      kvars = fbdata%nvar 
     1643      IF (kobs .GT. 0) THEN 
     1644         ALLOCATE(plam(kobs), & 
     1645               &  pphi(kobs), & 
     1646               &  ptim(kobs), & 
     1647               &  plead(kfcst), & 
     1648               &  pdep(kdeps, kobs), & 
     1649               &  kqc(kdeps, kvars, kobs), & 
     1650               &  k2qc(kdeps, kvars, kobs), & 
     1651               &  pob(kdeps, kvars, kobs), & 
     1652               &  pmod(kdeps, kvars, kobs), & 
     1653               &  pextra(kdeps, kvars, kobs), & 
     1654               &  ctype(kobs), & 
     1655               &  cwmo(kobs), & 
     1656               &  cunit(kvars), & 
     1657               &  cvarname(kvars)) 
     1658         plam(:) = fbdata%plam(:) 
     1659         pphi(:) = fbdata%pphi(:) 
     1660         ptim(:) = fbdata%ptim(:) 
     1661         pdep(:, :) = fbdata%pdep(:, :) 
     1662         kqc(:,:,:) = 1. 
     1663         DO ii = 1, kvars 
     1664            cvarname(ii)  = fbdata%cname(ii) 
     1665            cunit(ii)     = fbdata%cobunit(ii) 
     1666         END DO 
     1667 
     1668         ! Quality control algorithm 
     1669         k2qc(:,:,:) = NF90_FILL_SHORT 
     1670         DO idep = 1,kdeps 
     1671            DO ivar = 1, kvars 
     1672               DO iobs = 1, kobs 
     1673                  ! 1 symbolises good for fbdata 
     1674                  ! fbimdi symbolises that qc has not been set 
     1675                  ! Essentially, if any fbdata flag is not an element of {1, fbimdi} 
     1676                  ! then set the class 4 flag to bad. 
     1677                  ! Note: fbdata%ioqc is marked good if zero. 
     1678                  IF (((fbdata%ioqc(iobs) /= 0) .AND. & 
     1679                            & (fbdata%ioqc(iobs) /= fbimdi)) .OR. & 
     1680                    & ((fbdata%ipqc(iobs) /= 1) .AND. & 
     1681                            & (fbdata%ipqc(iobs) /= fbimdi)) .OR. & 
     1682                    & ((fbdata%idqc(idep,iobs) /= 1) .AND. & 
     1683                            & (fbdata%idqc(idep,iobs) /= fbimdi)) .OR. & 
     1684                    & ((fbdata%ivqc(iobs,ivar) /= 1) .AND. & 
     1685                            & (fbdata%ivqc(iobs,ivar) /= fbimdi)) .OR. & 
     1686                    & ((fbdata%ivlqc(idep,iobs,ivar) /= 1) .AND. & 
     1687                            & (fbdata%ivlqc(idep,iobs,ivar) /= fbimdi)) .OR. & 
     1688                    & ((fbdata%itqc(iobs) /= 1) .AND. & 
     1689                            & (fbdata%itqc(iobs) /= fbimdi))) THEN 
     1690                     ! 1 symbolises bad for class 4 file 
     1691                     k2qc(idep, ivar, iobs) = 1 
     1692                  ELSE 
     1693                     ! 0 symbolises good for class 4 file 
     1694                     k2qc(idep, ivar, iobs) = 0 
     1695                  END IF  
     1696               END DO 
     1697            END DO 
     1698         END DO 
     1699 
     1700         ! Permute observation dimensions 
     1701         pob(:,:,:) = RESHAPE(fbdata%pob, (/kdeps, kvars, kobs/), & 
     1702                            & ORDER=(/1, 3, 2/)) 
     1703 
     1704         ! Explicit model counterpart dimension permutation 
     1705         ! 1,2,3,4 --> 1,4,2,3 
     1706         pmod(:,:,:) = fbrmdi 
     1707         ij = cl4_fcst_idx(jimatch) 
     1708         DO ii = 1,kdeps 
     1709            DO ik = 1, kvars 
     1710               DO il = 1, kobs 
     1711                  pmod(ii,ik,il) = fbdata%padd(ii,il,1,ik) 
     1712               END DO 
     1713            END DO 
     1714         END DO 
     1715 
     1716         ! Extra fields set to missing for now 
     1717         pextra(:,:,:) = fbrmdi 
     1718 
     1719         ! Lead time of class 4 file is a global parameter 
     1720         plead = cl4_leadtime(1:cl4_fcst_len) 
     1721 
     1722         ! Model Julian day 
     1723         pmodjuld = cl4_modjuld 
     1724 
     1725         ! Observation types 
     1726         ctype(:) = 'X' 
     1727         DO ii = 1,kobs 
     1728            ctype(ii) = fbdata%cdtyp(ii) 
     1729         END DO 
     1730 
     1731         ! World Meteorology Organisation codes 
     1732         cwmo(:) = fbdata%cdwmo(:) 
     1733 
     1734         ! Initialise class 4 file 
     1735         CALL ooo_wri_init(cconf, csys, ckind, cversion, ccont, cinst, cdate, & 
     1736                         & kproc, kobs, kvars, kdeps, kfcst, & 
     1737                         & clfilename) 
     1738 
     1739         ! Write standard variables 
     1740         CALL ooo_wri_default(clfilename, kobs, kvars, kfcst, kdeps, & 
     1741                            & ctype, cwmo, cunit, cvarname, & 
     1742                            & plam, pphi, pdep, ptim, pob, plead, & 
     1743                            & k2qc, pmodjuld) 
     1744         !! Write to optional variables 
     1745         cdtmp = cl4_vars(jimatch) 
     1746         IF ( (TRIM(cdtmp) == "forecast") .OR. & 
     1747              (TRIM(cdtmp) == "persistence") ) THEN 
     1748            !! 4D variables 
     1749            CALL ooo_wri_extra(clfilename, TRIM(cdtmp), kdeps, kfcst, & 
     1750                            &  kvars, kobs, (/ 1,ij,1,1 /), (/ kdeps,1,kvars,kobs /), pmod) 
     1751         ELSE 
     1752            !! 3D variables 
     1753            CALL ooo_wri_extra(clfilename, TRIM(cdtmp), kdeps, & 
     1754                            &  kvars, kobs, (/ 1,1,1 /), (/ kdeps,kvars,kobs /), pmod) 
     1755         ENDIF 
     1756 
     1757         DEALLOCATE(plam, pphi, ptim, pdep, plead, kqc, k2qc, & 
     1758                  & pob, pmod, pextra, ctype, cwmo, & 
     1759                  & cunit, cvarname) 
     1760      END IF 
     1761   END SUBROUTINE write_obfbdata_cl 
     1762#endif 
     1763 
     1764#if defined key_offobsoper 
     1765   SUBROUTINE locate_kind(cdfilename, ckind) 
     1766      !!---------------------------------------------------------------------- 
     1767      !!                    ***  ROUTINE locate_kind  *** 
     1768      !! 
     1769      !! ** Purpose : Detect which kind of class 4 file is being produced. 
     1770      !! 
     1771      !! ** Method  : 1. Inspect cdfilename for observation kind. 
     1772      !!---------------------------------------------------------------------- 
     1773      CHARACTER(len=*) :: cdfilename ! Feedback filename 
     1774      CHARACTER(len=8) :: ckind 
     1775      IF (cdfilename(1:3) == 'sst') THEN 
     1776         ckind = 'SST' 
     1777      ELSE IF (cdfilename(1:3) == 'sla') THEN 
     1778         ckind = 'SLA' 
     1779      ELSE IF (cdfilename(1:3) == 'pro') THEN 
     1780         ckind = 'profile' 
     1781      ELSE IF (cdfilename(1:3) == 'ena') THEN 
     1782         ckind = 'profile' 
     1783      ELSE IF (cdfilename(1:3) == 'sea') THEN 
     1784         ckind = 'seaice' 
     1785      ELSE 
     1786         ckind = 'unknown' 
     1787      END IF 
     1788   END SUBROUTINE locate_kind 
     1789#endif 
    15271790 
    15281791   SUBROUTINE putvaratt_obfbdata( idfile, idvar, cdlongname, cdunits, & 
  • branches/2013/dev_LOCEAN_CMCC_INGV_MERC_UKMO_2013/NEMOGCM/NEMO/OPA_SRC/OBS/obs_oper.F90

    r3651 r4245  
    861861 
    862862         ENDIF 
    863           
    864863         sstdatqc%rmod(jobs,1) = zext(1) 
    865864          
  • branches/2013/dev_LOCEAN_CMCC_INGV_MERC_UKMO_2013/NEMOGCM/NEMO/OPA_SRC/SBC/fldread.F90

    r4230 r4245  
    2323   USE lib_mpp         ! MPP library 
    2424   USE wrk_nemo        ! work arrays 
     25   USE lbclnk          ! ocean lateral boundary conditions (C1D case) 
    2526   USE ioipsl, ONLY :   ymds2ju, ju2ymds   ! for calendar 
    2627   USE sbc_oce 
     
    3435   TYPE, PUBLIC ::   FLD_N      !: Namelist field informations 
    3536      CHARACTER(len = 256) ::   clname      ! generic name of the NetCDF flux file 
    36       INTEGER              ::   nfreqh      ! frequency of each flux file 
     37      REAL(wp)             ::   nfreqh      ! frequency of each flux file 
    3738      CHARACTER(len = 34)  ::   clvar       ! generic name of the variable in the NetCDF flux file 
    3839      LOGICAL              ::   ln_tint     ! time interpolation or not (T/F) 
     
    5051      CHARACTER(len = 256)            ::   clrootname   ! generic name of the NetCDF file 
    5152      CHARACTER(len = 256)            ::   clname       ! current name of the NetCDF file 
    52       INTEGER                         ::   nfreqh       ! frequency of each flux file 
     53      REAL(wp)                        ::   nfreqh       ! frequency of each flux file 
    5354      CHARACTER(len = 34)             ::   clvar        ! generic name of the variable in the NetCDF flux file 
    5455      LOGICAL                         ::   ln_tint      ! time interpolation or not (T/F) 
     
    200201                  sd(jf)%fdta(:,:,:,1) = sd(jf)%fdta(:,:,:,2)   ! re-swap before record field 
    201202                  sd(jf)%nrec_b(1) = sd(jf)%nrec_a(1)           ! update before record informations 
    202                   sd(jf)%nrec_b(2) = sd(jf)%nrec_a(2) - sd(jf)%nfreqh * 3600  ! assume freq to be in hours in this case 
     203                  sd(jf)%nrec_b(2) = sd(jf)%nrec_a(2) - NINT( sd(jf)%nfreqh * 3600 )  ! assume freq to be in hours in this case 
    203204                  sd(jf)%rotn(1)   = sd(jf)%rotn(2)             ! update before rotate informations 
    204205                  sd(jf)%nrec_a(1) = itmp                       ! move back to after record  
     
    218219                     sd(jf)%fdta(:,:,:,1) = sd(jf)%fdta(:,:,:,2)   ! re-swap before record field 
    219220                     sd(jf)%nrec_b(1) = sd(jf)%nrec_a(1)           ! update before record informations 
    220                      sd(jf)%nrec_b(2) = sd(jf)%nrec_a(2) - sd(jf)%nfreqh * 3600  ! assume freq to be in hours in this case 
     221                     sd(jf)%nrec_b(2) = sd(jf)%nrec_a(2) - NINT( sd(jf)%nfreqh * 3600 )  ! assume freq to be in hours in this case 
    221222                     sd(jf)%rotn(1)   = sd(jf)%rotn(2)             ! update before rotate informations 
    222223                     sd(jf)%nrec_a(1) = sd(jf)%nrec_a(1) + 1       ! move back to after record 
     
    271272            IF( sd(jf)%ln_tint ) THEN              ! temporal interpolation 
    272273               IF(lwp .AND. kt - nit000 <= 100 ) THEN  
    273                   clfmt = "('fld_read: var ', a, ' kt = ', i8, ' (', f7.2,' days), Y/M/D = ', i4.4,'/', i2.2,'/', i2.2," //   & 
    274                      &    "', records b/a: ', i4.4, '/', i4.4, ' (days ', f7.2,'/', f7.2, ')')" 
     274                  clfmt = "('fld_read: var ', a, ' kt = ', i8, ' (', f9.4,' days), Y/M/D = ', i4.4,'/', i2.2,'/', i2.2," //   & 
     275                     &    "', records b/a: ', i6.4, '/', i6.4, ' (days ', f9.4,'/', f9.4, ')')" 
    275276                  WRITE(numout, clfmt)  TRIM( sd(jf)%clvar ), kt, REAL(isecsbc,wp)/rday, nyear, nmonth, nday,   &             
    276277                     & sd(jf)%nrec_b(1), sd(jf)%nrec_a(1), REAL(sd(jf)%nrec_b(2),wp)/rday, REAL(sd(jf)%nrec_a(2),wp)/rday 
     
    284285            ELSE   ! nothing to do... 
    285286               IF(lwp .AND. kt - nit000 <= 100 ) THEN 
    286                   clfmt = "('fld_read: var ', a, ' kt = ', i8,' (', f7.2,' days), Y/M/D = ', i4.4,'/', i2.2,'/', i2.2," //   & 
    287                      &    "', record: ', i4.4, ' (days ', f7.2, ' <-> ', f7.2, ')')" 
     287                  clfmt = "('fld_read: var ', a, ' kt = ', i8,' (', f9.4,' days), Y/M/D = ', i4.4,'/', i2.2,'/', i2.2," //   & 
     288                     &    "', record: ', i6.4, ' (days ', f9.4, ' <-> ', f9.4, ')')" 
    288289                  WRITE(numout, clfmt) TRIM(sd(jf)%clvar), kt, REAL(isecsbc,wp)/rday, nyear, nmonth, nday,    & 
    289290                     &                 sd(jf)%nrec_a(1), REAL(sd(jf)%nrec_b(2),wp)/rday, REAL(sd(jf)%nrec_a(2),wp)/rday 
     
    356357            ELSE                                ! higher frequency mean (in hours)  
    357358               IF    ( sdjf%cltype      == 'monthly' ) THEN   ! monthly file 
    358                   sdjf%nrec_a(1) = 24 * nmonth_len(nmonth-1) / sdjf%nfreqh                 ! last record of previous month 
     359                  sdjf%nrec_a(1) = NINT( 24 * nmonth_len(nmonth-1) / sdjf%nfreqh )         ! last record of previous month 
    359360                  llprevmth = .TRUE.                                                       ! use previous month file? 
    360361                  llprevyr  = llprevmth .AND. nmonth == 1                                  ! use previous year  file? 
    361362               ELSEIF( sdjf%cltype(1:4) == 'week'    ) THEN   ! weekly file 
    362363                  llprevweek = .TRUE.                                                      ! use previous week  file? 
    363                   sdjf%nrec_a(1) = 24 * 7 / sdjf%nfreqh                                    ! last record of previous week 
     364                  sdjf%nrec_a(1) = NINT( 24 * 7 / sdjf%nfreqh )                            ! last record of previous week 
    364365                  isec_week = NINT(rday) * 7                                               ! add a shift toward previous week 
    365366               ELSEIF( sdjf%cltype      == 'daily'   ) THEN   ! daily file 
    366                   sdjf%nrec_a(1) = 24 / sdjf%nfreqh                                        ! last record of previous day 
     367                  sdjf%nrec_a(1) = NINT( 24 / sdjf%nfreqh )                                ! last record of previous day 
    367368                  llprevday = .TRUE.                                                       ! use previous day   file? 
    368369                  llprevmth = llprevday .AND. nday   == 1                                  ! use previous month file? 
    369370                  llprevyr  = llprevmth .AND. nmonth == 1                                  ! use previous year  file? 
    370371               ELSE                                           ! yearly file 
    371                   sdjf%nrec_a(1) = 24 * nyear_len(0) / sdjf%nfreqh                         ! last record of previous year  
     372                  sdjf%nrec_a(1) = NINT( 24 * nyear_len(0) / sdjf%nfreqh )                 ! last record of previous year  
    372373                  llprevyr = .NOT. sdjf%ln_clim                                            ! use previous year  file? 
    373374               ENDIF 
     
    408409         CALL fld_get( sdjf, map ) 
    409410 
    410          clfmt = "('fld_init : time-interpolation for ', a, ' read previous record = ', i4, ' at time = ', f7.2, ' days')" 
     411         clfmt = "('fld_init : time-interpolation for ', a, ' read previous record = ', i6, ' at time = ', f7.2, ' days')" 
    411412         IF(lwp) WRITE(numout, clfmt) TRIM(sdjf%clvar), sdjf%nrec_a(1), REAL(sdjf%nrec_a(2),wp)/rday 
    412413 
     
    518519         !                                   ! ================================ ! 
    519520         ! 
    520          ifreq_sec = sdjf%nfreqh * 3600                                                 ! frequency mean (in seconds) 
     521         ifreq_sec = NINT( sdjf%nfreqh * 3600 )                                         ! frequency mean (in seconds) 
    521522         IF( sdjf%cltype(1:4) == 'week' )   isec_week = ksec_week( sdjf%cltype(6:8) )   ! since the first day of the current week 
    522523         ! number of second since the beginning of the file 
     
    588589      INTEGER                  ::   iw     ! index into wgts array 
    589590      INTEGER                  ::   ipdom  ! index of the domain 
     591      INTEGER                  ::   idvar  ! variable ID 
     592      INTEGER                  ::   idmspc ! number of spatial dimensions 
     593      LOGICAL                  ::   lmoor  ! C1D case: point data 
    590594      !!--------------------------------------------------------------------- 
    591595      ! 
     
    607611         ELSE                                  ;  ipdom = jpdom_unknown 
    608612         ENDIF 
     613         ! C1D case: If product of spatial dimensions == ipk, then x,y are of 
     614         ! size 1 (point/mooring data): this must be read onto the central grid point 
     615         idvar  = iom_varid( sdjf%num, sdjf%clvar ) 
     616         idmspc = iom_file( sdjf%num )%ndims( idvar ) 
     617         IF( iom_file( sdjf%num )%luld( idvar ) )   idmspc = idmspc - 1 
     618         lmoor  = (idmspc == 0 .OR. PRODUCT( iom_file( sdjf%num )%dimsz( 1:MAX(idmspc,1) ,idvar ) ) == ipk) 
     619         ! 
    609620         SELECT CASE( ipk ) 
    610621         CASE(1) 
    611             IF( sdjf%ln_tint ) THEN   ;   CALL iom_get( sdjf%num, ipdom, sdjf%clvar, sdjf%fdta(:,:,1,2), sdjf%nrec_a(1) ) 
    612             ELSE                      ;   CALL iom_get( sdjf%num, ipdom, sdjf%clvar, sdjf%fnow(:,:,1  ), sdjf%nrec_a(1) ) 
     622            IF( lk_c1d .AND. lmoor ) THEN 
     623               IF( sdjf%ln_tint ) THEN 
     624                  CALL iom_get( sdjf%num, sdjf%clvar, sdjf%fdta(2,2,1,2), sdjf%nrec_a(1) ) 
     625                  CALL lbc_lnk( sdjf%fdta(:,:,1,2),'Z',1. ) 
     626               ELSE 
     627                  CALL iom_get( sdjf%num, sdjf%clvar, sdjf%fnow(2,2,1  ), sdjf%nrec_a(1) ) 
     628                  CALL lbc_lnk( sdjf%fnow(:,:,1  ),'Z',1. ) 
     629               ENDIF 
     630            ELSE 
     631               IF( sdjf%ln_tint ) THEN   ;   CALL iom_get( sdjf%num, ipdom, sdjf%clvar, sdjf%fdta(:,:,1,2), sdjf%nrec_a(1) ) 
     632               ELSE                      ;   CALL iom_get( sdjf%num, ipdom, sdjf%clvar, sdjf%fnow(:,:,1  ), sdjf%nrec_a(1) ) 
     633               ENDIF 
    613634            ENDIF 
    614635         CASE DEFAULT 
    615             IF( sdjf%ln_tint ) THEN   ;   CALL iom_get( sdjf%num, ipdom, sdjf%clvar, sdjf%fdta(:,:,:,2), sdjf%nrec_a(1) ) 
    616             ELSE                      ;   CALL iom_get( sdjf%num, ipdom, sdjf%clvar, sdjf%fnow(:,:,:  ), sdjf%nrec_a(1) ) 
     636            IF (lk_c1d .AND. lmoor ) THEN 
     637               IF( sdjf%ln_tint ) THEN 
     638                  CALL iom_get( sdjf%num, jpdom_unknown, sdjf%clvar, sdjf%fdta(2,2,:,2), sdjf%nrec_a(1) ) 
     639                  CALL lbc_lnk( sdjf%fdta(:,:,:,2),'Z',1. ) 
     640               ELSE 
     641                  CALL iom_get( sdjf%num, jpdom_unknown, sdjf%clvar, sdjf%fnow(2,2,:  ), sdjf%nrec_a(1) ) 
     642                  CALL lbc_lnk( sdjf%fnow(:,:,:  ),'Z',1. ) 
     643               ENDIF 
     644            ELSE 
     645               IF( sdjf%ln_tint ) THEN   ;   CALL iom_get( sdjf%num, ipdom, sdjf%clvar, sdjf%fdta(:,:,:,2), sdjf%nrec_a(1) ) 
     646               ELSE                      ;   CALL iom_get( sdjf%num, ipdom, sdjf%clvar, sdjf%fnow(:,:,:  ), sdjf%nrec_a(1) ) 
     647               ENDIF 
    617648            ENDIF 
    618649         END SELECT 
     
    826857            ENDIF 
    827858         ELSE                                                                       ! higher frequency mean (in hours) 
    828             IF(     sdjf%cltype      == 'monthly' ) THEN   ;   sdjf%nreclast = 24 * imonth_len / sdjf%nfreqh  
    829             ELSEIF( sdjf%cltype(1:4) == 'week'    ) THEN   ;   sdjf%nreclast = 24 * 7          / sdjf%nfreqh 
    830             ELSEIF( sdjf%cltype      == 'daily'   ) THEN   ;   sdjf%nreclast = 24              / sdjf%nfreqh 
    831             ELSE                                           ;   sdjf%nreclast = 24 * iyear_len  / sdjf%nfreqh  
     859            IF(     sdjf%cltype      == 'monthly' ) THEN   ;   sdjf%nreclast = NINT( 24 * imonth_len / sdjf%nfreqh ) 
     860            ELSEIF( sdjf%cltype(1:4) == 'week'    ) THEN   ;   sdjf%nreclast = NINT( 24 * 7          / sdjf%nfreqh ) 
     861            ELSEIF( sdjf%cltype      == 'daily'   ) THEN   ;   sdjf%nreclast = NINT( 24              / sdjf%nfreqh ) 
     862            ELSE                                           ;   sdjf%nreclast = NINT( 24 * iyear_len  / sdjf%nfreqh ) 
    832863            ENDIF 
    833864         ENDIF 
  • branches/2013/dev_LOCEAN_CMCC_INGV_MERC_UKMO_2013/NEMOGCM/NEMO/OPA_SRC/SBC/sbcblk_core.F90

    r4230 r4245  
    7979   REAL(wp) ::   rn_efac     ! multiplication factor for evaporation (clem) 
    8080   REAL(wp) ::   rn_vfac     ! multiplication factor for ice/ocean velocity in the calculation of wind stress (clem) 
     81   LOGICAL  ::   ln_bulk2z   ! logical flag for case where z(q,t) and z(u) are specified in the namelist 
     82   REAL(wp) ::   rn_zqt      ! z(q,t) : height of humidity and temperature measurements 
     83   REAL(wp) ::   rn_zu       ! z(u)   : height of wind measurements 
    8184 
    8285   !! * Substitutions 
     
    134137      NAMELIST/namsbc_core/ cn_dir , ln_2m  , ln_taudif, rn_pfac, rn_efac, rn_vfac,  & 
    135138         &                  sn_wndi, sn_wndj, sn_humi  , sn_qsr ,           & 
    136          &                  sn_qlw , sn_tair, sn_prec  , sn_snow, sn_tdif 
     139         &                  sn_qlw , sn_tair, sn_prec  , sn_snow,           & 
     140         &                  sn_tdif, rn_zqt , ln_bulk2z, rn_zu 
    137141      !!--------------------------------------------------------------------- 
    138142 
     
    316320            &                      Cd    , Ch              , Ce  ,   & 
    317321            &                      zt_zu , zq_zu                   ) 
     322      ELSE IF( ln_bulk2z ) THEN 
     323         !! If the height of the air temp./spec. hum. and wind are to be specified by hand : 
     324         IF( rn_zqt == rn_zu ) THEN 
     325            !! If air temp. and spec. hum. are at the same height as wind : 
     326            CALL TURB_CORE_1Z( rn_zu, zst   , sf(jp_tair)%fnow(:,:,1),       & 
     327               &                      zqsatw, sf(jp_humi)%fnow(:,:,1), wndm, & 
     328               &                      Cd    , Ch                     , Ce  ) 
     329         ELSE 
     330            !! If air temp. and spec. hum. are at a different height to wind : 
     331            CALL TURB_CORE_2Z(rn_zqt, rn_zu , zst   , sf(jp_tair)%fnow,         & 
     332               &                              zqsatw, sf(jp_humi)%fnow, wndm,   & 
     333               &                              Cd    , Ch              , Ce  ,   & 
     334               &                              zt_zu , zq_zu                 ) 
     335         ENDIF 
    318336      ELSE 
    319337         !! If air temp. and spec. hum. are given at same height than wind (10m) : 
     
    360378      !  Turbulent fluxes over ocean 
    361379      ! ----------------------------- 
    362       IF( ln_2m ) THEN 
    363          ! Values of temp. and hum. adjusted to 10m must be used instead of 2m values 
     380      IF( ln_2m .OR. ( ln_bulk2z .AND. rn_zqt /= rn_zu ) ) THEN 
     381         ! Values of temp. and hum. adjusted to height of wind must be used 
    364382         zevap(:,:) = rn_efac * MAX( 0.e0, rhoa    *Ce(:,:)*( zqsatw(:,:) - zq_zu(:,:) ) * wndm(:,:) )   ! Evaporation 
    365383         zqsb (:,:) =                      rhoa*cpa*Ch(:,:)*( zst   (:,:) - zt_zu(:,:) ) * wndm(:,:)     ! Sensible Heat 
     
    789807      !!      Momentum, Latent and sensible heat exchange coefficients 
    790808      !!      Caution: this procedure should only be used in cases when air 
    791       !!      temperature (T_air) and air specific humidity (q_air) are at 2m 
    792       !!      whereas wind (dU) is at 10m. 
     809      !!      temperature (T_air) and air specific humidity (q_air) are at a 
     810      !!      different height to wind (dU). 
    793811      !! 
    794812      !! References :   Large & Yeager, 2004 : ??? 
     
    808826 
    809827      INTEGER :: j_itt 
    810       INTEGER , PARAMETER :: nb_itt = 3              ! number of itterations 
     828      INTEGER , PARAMETER :: nb_itt = 5              ! number of itterations 
    811829      REAL(wp), PARAMETER ::   grav   = 9.8          ! gravity                        
    812830      REAL(wp), PARAMETER ::   kappa  = 0.4          ! von Karman's constant 
     
    905923           !! 
    906924           !! Shifting the neutral 10m transfer coefficients to (zu,zeta_u) : 
    907            xct = 1. + sqrt_Cd_n10/kappa*(log(zu/10.) - zpsi_m) 
     925           xct = 1. + sqrt_Cd_n10/kappa*(log(zu/10.) - zpsi_m)   ! L & Y eq. (10a) 
    908926           Cd = Cd_n10/(xct*xct) ; sqrt_Cd = sqrt(Cd) 
    909927         ENDIF 
     
    911929         xlogt = log(zu/10.) - zpsi_hu 
    912930         !! 
    913          xct = 1. + Ch_n10*xlogt/kappa/sqrt_Cd_n10 
     931         xct = 1. + Ch_n10*xlogt/kappa/sqrt_Cd_n10               ! L & Y eq. (10b) 
    914932         Ch  = Ch_n10*sqrt_Cd/sqrt_Cd_n10/xct 
    915933         !! 
    916          xct = 1. + Ce_n10*xlogt/kappa/sqrt_Cd_n10 
     934         xct = 1. + Ce_n10*xlogt/kappa/sqrt_Cd_n10               ! L & Y eq. (10c) 
    917935         Ce  = Ce_n10*sqrt_Cd/sqrt_Cd_n10/xct 
    918936         !! 
  • branches/2013/dev_LOCEAN_CMCC_INGV_MERC_UKMO_2013/NEMOGCM/NEMO/OPA_SRC/TRA/traadv.F90

    r4147 r4245  
    66   !! History :  2.0  !  2005-11  (G. Madec)  Original code 
    77   !!            3.3  !  2010-09  (C. Ethe, G. Madec)  merge TRC-TRA + switch from velocity to transport 
     8   !!            4.0  !  2011-06  (G. Madec)  Addition of Mixed Layer Eddy parameterisation 
    89   !!---------------------------------------------------------------------- 
    910 
     
    2122   USE traadv_qck      ! QUICKEST scheme           (tra_adv_qck    routine) 
    2223   USE traadv_eiv      ! eddy induced velocity     (tra_adv_eiv    routine) 
     24   USE traadv_mle      ! ML eddy induced velocity  (tra_adv_mle    routine) 
    2325   USE cla             ! cross land advection      (cla_traadv     routine) 
    2426   USE ldftra_oce      ! lateral diffusion coefficient on tracers 
     
    99101         &              CALL tra_adv_eiv( kt, nit000, zun, zvn, zwn, 'TRA' )    ! add the eiv transport (if necessary) 
    100102      ! 
     103      IF( ln_mle    )   CALL tra_adv_mle( kt, nit000, zun, zvn, zwn, 'TRA' )    ! add the mle transport (if necessary) 
    101104      CALL iom_put( "uocetr_eff", zun )                                         ! output effective transport       
    102105      CALL iom_put( "vocetr_eff", zvn ) 
     
    136139         &                       tab3d_2=tsa(:,:,:,jp_sal), clinfo2=       ' Sa: ', mask2=tmask, clinfo3='tra' ) 
    137140      ! 
    138       IF( nn_timing == 1 )  CALL timing_stop('tra_adv') 
     141      IF( nn_timing == 1 )  CALL timing_stop( 'tra_adv' ) 
    139142      ! 
    140143      CALL wrk_dealloc( jpi, jpj, jpk, zun, zvn, zwn ) 
     
    213216      ENDIF 
    214217      ! 
     218      CALL tra_adv_mle_init          ! initialisation of the Mixed Layer Eddy parametrisation (MLE) 
     219      ! 
    215220   END SUBROUTINE tra_adv_init 
    216221 
  • branches/2013/dev_LOCEAN_CMCC_INGV_MERC_UKMO_2013/NEMOGCM/NEMO/OPA_SRC/TRA/traadv_mle.F90

    r4244 r4245  
    2929 
    3030   !                                               !!* namelist namtra_adv_mle * 
    31    LOGICAL, PUBLIC ::   ln_mle    = .TRUE.          ! flag to activate the Mixed Layer Eddy (MLE) parameterisation 
    32    INTEGER         ::   nn_mle    = 0               ! MLE type: =0 standard Fox-Kemper ; =1 new formulation 
    33    INTEGER         ::   nn_mld_uv = 0               ! space interpolation of MLD at u- & v-pts (0=min,1=averaged,2=max) 
    34    INTEGER         ::   nn_conv   = 0               ! =1 no MLE in case of convection ; =0 always MLE 
    35    REAL(wp)        ::   rn_ce   = 0.06_wp           ! MLE coefficient 
    36    !                                                ! parameters used in nn_mle = 0 case 
    37    REAL(wp)        ::   rn_lf   = 5.e+3_wp               ! typical scale of mixed layer front 
    38    REAL(wp)        ::   rn_time = 2._wp * 86400._wp      ! time scale for mixing momentum across the mixed layer 
    39    !                                                ! parameters used in nn_mle = 1 case 
    40    REAL(wp)        ::   rn_lat  = 20._wp                 ! reference latitude for a 5 km scale of ML front 
    41    REAL(wp)        ::   rn_rho_c_mle  = 0.01        ! Density criterion for definition of MLD used by FK 
     31   LOGICAL, PUBLIC ::   ln_mle              ! flag to activate the Mixed Layer Eddy (MLE) parameterisation 
     32   INTEGER         ::   nn_mle              ! MLE type: =0 standard Fox-Kemper ; =1 new formulation 
     33   INTEGER         ::   nn_mld_uv           ! space interpolation of MLD at u- & v-pts (0=min,1=averaged,2=max) 
     34   INTEGER         ::   nn_conv             ! =1 no MLE in case of convection ; =0 always MLE 
     35   REAL(wp)        ::   rn_ce               ! MLE coefficient 
     36   !                                           ! parameters used in nn_mle = 0 case 
     37   REAL(wp)        ::   rn_lf                  ! typical scale of mixed layer front 
     38   REAL(wp)        ::   rn_time             ! time scale for mixing momentum across the mixed layer 
     39   !                                             ! parameters used in nn_mle = 1 case 
     40   REAL(wp)        ::   rn_lat                   ! reference latitude for a 5 km scale of ML front 
     41   REAL(wp)        ::   rn_rho_c_mle         ! Density criterion for definition of MLD used by FK 
    4242 
    4343   REAL(wp) ::   r5_21 = 5.e0 / 21.e0   ! factor used in mle streamfunction computation 
     
    271271      INTEGER  ::   ji, jj, jk   ! dummy loop indices 
    272272      INTEGER  ::   ierr 
     273      INTEGER ::    ios                 ! Local integer output status for namelist read 
    273274      REAL(wp) ::   z1_t2, zfu, zfv                                !    -         - 
    274275      ! 
     
    276277      !!---------------------------------------------------------------------- 
    277278 
    278       REWIND ( numnam )                ! Read Namelist namtra_adv_mle : mixed layer eddy advection acting on tracers 
    279       READ   ( numnam, namtra_adv_mle ) 
     279 
     280      REWIND( numnam_ref )              ! Namelist namtra_adv_mle in reference namelist : Tracer advection scheme 
     281      READ  ( numnam_ref, namtra_adv_mle, IOSTAT = ios, ERR = 901) 
     282901   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namtra_adv_mle in reference namelist', lwp ) 
     283 
     284      REWIND( numnam_cfg )              ! Namelist namtra_adv_mle in configuration namelist : Tracer advection scheme 
     285      READ  ( numnam_cfg, namtra_adv_mle, IOSTAT = ios, ERR = 902 ) 
     286902   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namtra_adv_mle in configuration namelist', lwp ) 
     287      WRITE ( numond, namtra_adv_mle ) 
    280288 
    281289      IF(lwp) THEN                     ! Namelist print 
  • branches/2013/dev_LOCEAN_CMCC_INGV_MERC_UKMO_2013/NEMOGCM/NEMO/OPA_SRC/TRA/tradmp.F90

    r4147 r4245  
    2727   USE oce            ! ocean: variables 
    2828   USE dom_oce        ! ocean: domain variables 
     29   USE c1d            ! 1D vertical configuration 
    2930   USE trdmod_oce     ! ocean: trend variables 
    3031   USE trdtra         ! active tracers: trends 
     
    4445   PUBLIC   tra_dmp      ! routine called by step.F90 
    4546   PUBLIC   tra_dmp_init ! routine called by opa.F90 
    46    PUBLIC   dtacof       ! routine called by in both tradmp.F90 and trcdmp.F90 
    47    PUBLIC   dtacof_zoom  ! routine called by in both tradmp.F90 and trcdmp.F90 
     47   PUBLIC   dtacof       ! routine called by tradmp.F90, trcdmp.F90 and dyndmp.F90 
     48   PUBLIC   dtacof_zoom  ! routine called by tradmp.F90, trcdmp.F90 and dyndmp.F90 
    4849 
    4950   !                               !!* Namelist namtra_dmp : T & S newtonian damping * 
    50    LOGICAL, PUBLIC ::   ln_tradmp  = .TRUE.  !: internal damping flag 
     51   LOGICAL, PUBLIC ::   ln_tradmp  !: internal damping flag 
    5152   INTEGER         ::   nn_hdmp     ! = 0/-1/'latitude' for damping over T and S 
    5253   INTEGER         ::   nn_zdmp     ! = 0/1/2 flag for damping in the mixed layer 
     
    191192      !! ** Purpose :   Initialization for the newtonian damping  
    192193      !! 
    193       !! ** Method  :   read the nammbf namelist and check the parameters 
     194      !! ** Method  :   read the namtra_dmp namelist and check the parameters 
    194195      !!---------------------------------------------------------------------- 
    195196      NAMELIST/namtra_dmp/ ln_tradmp, nn_hdmp, nn_zdmp, rn_surf, rn_bot, rn_dep, nn_file 
     
    206207      WRITE ( numond, namtra_dmp ) 
    207208       
    208       IF( lzoom )   nn_zdmp = 0          ! restoring to climatology at closed north or south boundaries 
     209      IF( lzoom .AND. .NOT. lk_c1d )   nn_zdmp = 0          ! restoring to climatology at closed north or south boundaries 
    209210 
    210211      IF(lwp) THEN                       ! Namelist print 
     
    213214         WRITE(numout,*) '~~~~~~~' 
    214215         WRITE(numout,*) '   Namelist namtra_dmp : set damping parameter' 
    215          WRITE(numout,*) '      add a damping termn or not      ln_tradmp = ', ln_tradmp 
     216         WRITE(numout,*) '      add a damping term or not       ln_tradmp = ', ln_tradmp 
    216217         WRITE(numout,*) '      T and S damping option          nn_hdmp   = ', nn_hdmp 
    217          WRITE(numout,*) '      mixed layer damping option      nn_zdmp   = ', nn_zdmp, '(zoom: forced to 0)' 
     218         WRITE(numout,*) '      mixed layer damping option      nn_zdmp   = ', nn_zdmp, '(non-C1D zoom: forced to 0)' 
    218219         WRITE(numout,*) '      surface time scale (days)       rn_surf   = ', rn_surf 
    219220         WRITE(numout,*) '      bottom time scale (days)        rn_bot    = ', rn_bot 
     
    227228         IF( tra_dmp_alloc() /= 0 )   CALL ctl_stop( 'STOP', 'tra_dmp_init: unable to allocate arrays' ) 
    228229         ! 
     230#if ! defined key_c1d 
    229231         SELECT CASE ( nn_hdmp ) 
    230232         CASE (  -1  )   ;   IF(lwp) WRITE(numout,*) '   tracer damping in the Med & Red seas only' 
     
    235237         END SELECT 
    236238         ! 
     239#endif 
    237240         SELECT CASE ( nn_zdmp ) 
    238241         CASE ( 0 )   ;   IF(lwp) WRITE(numout,*) '   tracer damping throughout the water column' 
     
    252255         ttrdmp(:,:,:) = 0._wp 
    253256         !                          ! Damping coefficients initialization 
    254          IF( lzoom ) THEN   ;   CALL dtacof_zoom( resto ) 
     257         IF( lzoom .AND. .NOT. lk_c1d ) THEN   ;   CALL dtacof_zoom( resto ) 
    255258         ELSE               ;   CALL dtacof( nn_hdmp, rn_surf, rn_bot, rn_dep, nn_file, 'TRA', resto ) 
    256259         ENDIF 
     
    360363      REAL(wp)                        , INTENT(in   )  ::  pn_dep     ! depth of transition (meters) 
    361364      INTEGER                         , INTENT(in   )  ::  kn_file    ! save the damping coef on a file or not 
    362       CHARACTER(len=3)                , INTENT(in   )  ::  cdtype     ! =TRA or TRC (tracer indicator) 
     365      CHARACTER(len=3)                , INTENT(in   )  ::  cdtype     ! =TRA, TRC or DYN (tracer/dynamics indicator) 
    363366      REAL(wp), DIMENSION(jpi,jpj,jpk), INTENT(inout)  ::  presto     ! restoring coeff. (s-1) 
    364367      ! 
     
    380383      CALL wrk_alloc( jpi, jpj, zmrs      ) 
    381384      CALL wrk_alloc( jpi, jpj, jpk, zdct ) 
     385#if defined key_c1d 
     386      !                                   ! ==================== 
     387      !                                   !  C1D configuration : local domain 
     388      !                                   ! ==================== 
     389      ! 
     390      IF(lwp) WRITE(numout,*) 
     391      IF(lwp) WRITE(numout,*) '              dtacof : C1D 3x3 local domain' 
     392      IF(lwp) WRITE(numout,*) '              -----------------------------' 
     393      ! 
     394      presto(:,:,:) = 0._wp 
     395      ! 
     396      zsdmp = 1._wp / ( pn_surf * rday ) 
     397      zbdmp = 1._wp / ( pn_bot  * rday ) 
     398      DO jk = 2, jpkm1 
     399         DO jj = 1, jpj 
     400            DO ji = 1, jpi 
     401               !   ONLY vertical variation from zsdmp (sea surface) to zbdmp (bottom) 
     402               presto(ji,jj,jk) = zbdmp + (zsdmp-zbdmp) * EXP(-fsdept(ji,jj,jk)/pn_dep) 
     403            END DO 
     404         END DO 
     405      END DO 
     406      ! 
     407      presto(:,:, : ) = presto(:,:,:) * tmask(:,:,:) 
     408#else 
    382409      !                                   ! ==================== 
    383410      !                                   !  ORCA configuration : global domain 
     
    559586         CALL ctl_stop( 'Choose a correct value of nn_hdmp or put ln_tradmp to FALSE' ) 
    560587      ENDIF 
     588#endif 
    561589 
    562590      !                            !--------------------------------! 
     
    566594         IF( cdtype == 'TRA' ) cfile = 'damping.coeff' 
    567595         IF( cdtype == 'TRC' ) cfile = 'damping.coeff.trc' 
     596         IF( cdtype == 'DYN' ) cfile = 'damping.coeff.dyn' 
    568597         cfile = TRIM( cfile ) 
    569598         CALL iom_open  ( cfile, inum0, ldwrt = .TRUE., kiolib = jprstlib ) 
  • branches/2013/dev_LOCEAN_CMCC_INGV_MERC_UKMO_2013/NEMOGCM/NEMO/OPA_SRC/ZDF/zdfmxl.F90

    r3294 r4245  
    2424 
    2525   PUBLIC   zdf_mxl       ! called by step.F90 
     26 
     27   REAL(wp), PUBLIC ::   rho_c = 0.01_wp    ! density criterion for mixed layer depth 
     28   REAL(wp), PUBLIC ::   avt_c = 5.e-4_wp   ! Kz criterion for the turbocline depth 
    2629 
    2730   INTEGER , PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   nmln    !: number of level in the mixed layer (used by TOP) 
     
    6366      !! ** Method  :   The mixed layer depth is the shallowest W depth with  
    6467      !!      the density of the corresponding T point (just bellow) bellow a 
    65       !!      given value defined locally as rho(10m) + zrho_c 
     68      !!      given value defined locally as rho(10m) + rho_c 
    6669      !!               The turbocline depth is the depth at which the vertical 
    6770      !!      eddy diffusivity coefficient (resulting from the vertical physics 
     
    7679      INTEGER  ::   iikn, iiki          ! temporary integer within a do loop 
    7780      INTEGER, POINTER, DIMENSION(:,:) ::   imld                ! temporary workspace 
    78       REAL(wp) ::   zrho_c = 0.01_wp    ! density criterion for mixed layer depth 
    79       REAL(wp) ::   zavt_c = 5.e-4_wp   ! Kz criterion for the turbocline depth 
    8081      !!---------------------------------------------------------------------- 
    8182      ! 
     
    9899         DO jj = 1, jpj 
    99100            DO ji = 1, jpi 
    100                IF( rhop(ji,jj,jk) > rhop(ji,jj,nla10) + zrho_c )   nmln(ji,jj) = jk      ! Mixed layer 
    101                IF( avt (ji,jj,jk) < zavt_c                     )   imld(ji,jj) = jk      ! Turbocline  
     101               IF( rhop(ji,jj,jk) > rhop(ji,jj,nla10) + rho_c )   nmln(ji,jj) = jk      ! Mixed layer 
     102               IF( avt (ji,jj,jk) < avt_c                     )   imld(ji,jj) = jk      ! Turbocline  
    102103            END DO 
    103104         END DO 
  • branches/2013/dev_LOCEAN_CMCC_INGV_MERC_UKMO_2013/NEMOGCM/NEMO/OPA_SRC/nemogcm.F90

    r4230 r4245  
    7777   USE c1d             ! 1D configuration 
    7878   USE step_c1d        ! Time stepping loop for the 1D configuration 
     79   USE dyndmp          ! Momentum damping 
    7980#if defined key_top 
    8081   USE trcini          ! passive tracer initialisation 
     
    372373                            CALL     phy_cst    ! Physical constants 
    373374                            CALL     eos_init   ! Equation of state 
     375      IF( lk_c1d        )   CALL     c1d_init   ! 1D column configuration 
    374376                            CALL     dom_cfg    ! Domain configuration 
    375377                            CALL     dom_init   ! Domain 
     
    418420                            CALL tra_bbc_init   ! bottom heat flux 
    419421      IF( lk_trabbl     )   CALL tra_bbl_init   ! advective (and/or diffusive) bottom boundary layer scheme 
    420       IF( ln_tradmp     )   CALL tra_dmp_init   ! internal damping trends 
     422                            CALL tra_dmp_init   ! internal damping trends- tracers 
    421423                            CALL tra_adv_init   ! horizontal & vertical advection 
    422424                            CALL tra_ldf_init   ! lateral mixing 
     
    424426 
    425427      !                                     ! Dynamics 
     428      IF( lk_c1d        )   CALL dyn_dmp_init   ! internal damping trends- momentum 
    426429                            CALL dyn_adv_init   ! advection (vector or flux form) 
    427430                            CALL dyn_vor_init   ! vorticity term including Coriolis 
  • branches/2013/dev_LOCEAN_CMCC_INGV_MERC_UKMO_2013/NEMOGCM/SETTE/all_functions.sh

    r4147 r4245  
    9696   if [ ${#} -lt ${minargcount} ] 
    9797   then 
    98       echo "not enought arguments for set_namelist" 
     98      echo "not enough arguments for set_namelist" 
    9999      echo "${usage}" 
    100100      exit 1 
     
    153153} 
    154154 
     155 
    155156# function to tidy up after each test and populate the NEMO_VALIDATION store 
    156157post_test_tidyup () { 
     
    249250    fi 
    250251} 
     252 
     253############################################################# 
     254# extra functions to manipulate settings in the iodef.xml file 
     255# 
     256# Examples: 
     257#   set_xio_file_type    iodef.xml one_file 
     258#   set_xio_using_server iodef.xml true 
     259#   set_xio_buffer_size  iodef.xml 50000000 
     260# 
     261############################################################# 
     262 
     263usage2=" Usage : set_xio_file_type input_iodef.xml one_file||multiple_file" 
     264usage3=" Usage : set_xio_using_server input_iodef.xml true||false" 
     265usage4=" Usage : set_xio_buffer_size input_iodef.xml int_buffer_size" 
     266 
     267set_xio_file_type () { 
     268        minargcount=2 
     269        if [ ${#} -lt ${minargcount} ] 
     270        then 
     271                echo "not enough arguments for set_xio_file_type" 
     272                echo "${usage2}" 
     273                exit 1 
     274        fi 
     275        if [ $2 != "one_file" ] && [ $2 != "multiple_file" ] 
     276        then 
     277                echo "unrecognised argument for set_xio_file_type" 
     278                echo "${usage2}" 
     279                echo $2 
     280                exit 1 
     281        fi 
     282        unset minargcount 
     283        if [  ! -f ${SETTE_DIR}/output.sette ] ; then 
     284                touch ${SETTE_DIR}/output.sette 
     285        fi 
     286 
     287        echo "executing script : set_xio_file_type $@" >> ${SETTE_DIR}/output.sette 
     288        echo "################" >> ${SETTE_DIR}/output.sette 
     289 
     290        VAR_NAME=$( grep "^.*<.*file_definition.*type.*=" ${EXE_DIR}/$1 | sed -e "s% *\!.*%%" ) 
     291        if [ ${#VAR_NAME} -eq 0 ] 
     292        then 
     293                echo "doing \"set_xio_file_type $@\". " 
     294                echo "xml_tag: file_definition with variable: type is empty" 
     295                echo "confirm that an appropriate file_definition is in \"${EXE_DIR}/$1\" " 
     296                echo "exit" 
     297                echo "error in executing script : set_xio_file_type $@" >> ${SETTE_DIR}/output.sette 
     298                echo "....." >> ${SETTE_DIR}/output.sette 
     299                exit 1 
     300        fi 
     301        if [ $2 == "one_file" ]  
     302        then 
     303           sed -e "s:multiple_file:one_file:" ${EXE_DIR}/$1 > ${EXE_DIR}/$1.tmp 
     304        else 
     305           sed -e "s:one_file:multiple_file:" ${EXE_DIR}/$1 > ${EXE_DIR}/$1.tmp 
     306        fi 
     307        mv ${EXE_DIR}/$1.tmp ${EXE_DIR}/$1 
     308 
     309        echo "finished script : set_xio_file_type $@" >> ${SETTE_DIR}/output.sette 
     310        echo "++++++++++++++++" >> ${SETTE_DIR}/output.sette 
     311        echo "                " >> ${SETTE_DIR}/output.sette 
     312} 
     313 
     314set_xio_using_server () { 
     315        minargcount=2 
     316        if [ ${#} -lt ${minargcount} ] 
     317        then 
     318                echo "not enough arguments for set_xio_using_server" 
     319                echo "${usage2}" 
     320                exit 1 
     321        fi 
     322        if [ $2 != "true" ] && [ $2 != "false" ] 
     323        then 
     324                echo "unrecognised argument for set_xio_using_server" 
     325                echo "${usage2}" 
     326                echo $2 
     327                exit 1 
     328        fi 
     329        unset minargcount 
     330        if [  ! -f ${SETTE_DIR}/output.sette ] ; then 
     331                touch ${SETTE_DIR}/output.sette 
     332        fi 
     333 
     334        echo "executing script : set_xio_using_server $@" >> ${SETTE_DIR}/output.sette 
     335        echo "################" >> ${SETTE_DIR}/output.sette 
     336 
     337        VAR_NAME=$( grep "^.*<.*variable id.*=.*using_server.*=.*boolean" ${EXE_DIR}/$1 | sed -e "s% *\!.*%%" ) 
     338        if [ ${#VAR_NAME} -eq 0 ] 
     339        then 
     340                echo "doing \"set_xio_using_server $@\". " 
     341                echo "xml_tag: "variable id=using_server" with variable: boolean is empty" 
     342                echo "confirm that an appropriate variable id is in \"${EXE_DIR}/$1\" " 
     343                echo "exit" 
     344                echo "error in executing script : set_xio_using_server $@" >> ${SETTE_DIR}/output.sette 
     345                echo "....." >> ${SETTE_DIR}/output.sette 
     346                exit 1 
     347        fi 
     348        if [ $2 == "false" ] 
     349        then 
     350           sed -e "/using_server/s:true:false:" ${EXE_DIR}/$1 > ${EXE_DIR}/$1.tmp 
     351           export USING_MPMD=no 
     352        else 
     353           sed -e "/using_server/s:false:true:" ${EXE_DIR}/$1 > ${EXE_DIR}/$1.tmp 
     354           export USING_MPMD=yes 
     355        fi 
     356        mv ${EXE_DIR}/$1.tmp ${EXE_DIR}/$1 
     357 
     358        echo "finished script : set_xio_using_server $@" >> ${SETTE_DIR}/output.sette 
     359        echo "++++++++++++++++" >> ${SETTE_DIR}/output.sette 
     360        echo "                " >> ${SETTE_DIR}/output.sette 
     361} 
     362 
     363set_xio_buffer_size () { 
     364        minargcount=2 
     365        if [ ${#} -lt ${minargcount} ] 
     366        then 
     367                echo "not enough arguments for set_xio_buffer_size" 
     368                echo "${usage4}" 
     369                exit 1 
     370        fi 
     371        unset minargcount 
     372        if [  ! -f ${SETTE_DIR}/output.sette ] ; then 
     373                touch ${SETTE_DIR}/output.sette 
     374        fi 
     375 
     376        echo "executing script : set_xio_buffer_size $@" >> ${SETTE_DIR}/output.sette 
     377        echo "################" >> ${SETTE_DIR}/output.sette 
     378 
     379        VAR_NAME=$( grep "^.*<.*variable id.*=.*buffer_size.*=.*integer" ${EXE_DIR}/$1 | sed -e "s% *\!.*%%" ) 
     380        if [ ${#VAR_NAME} -eq 0 ] 
     381        then 
     382                echo "doing \"set_xio_buffer_size $@\". " 
     383                echo "xml_tag: "variable id=buffer_size" with variable: integer is empty" 
     384                echo "confirm that an appropriate variable id is in \"${EXE_DIR}/$1\" " 
     385                echo "exit" 
     386                echo "error in executing script : set_xio_buffer_size $@" >> ${SETTE_DIR}/output.sette 
     387                echo "....." >> ${SETTE_DIR}/output.sette 
     388                exit 1 
     389        fi 
     390        sed -e "/buffer_size/s:>.*<:>$2<:" ${EXE_DIR}/$1 > ${EXE_DIR}/$1.tmp 
     391        mv ${EXE_DIR}/$1.tmp ${EXE_DIR}/$1 
     392 
     393        echo "finished script : set_xio_buffer_size $@" >> ${SETTE_DIR}/output.sette 
     394        echo "++++++++++++++++" >> ${SETTE_DIR}/output.sette 
     395        echo "                " >> ${SETTE_DIR}/output.sette 
     396} 
     397 
  • branches/2013/dev_LOCEAN_CMCC_INGV_MERC_UKMO_2013/NEMOGCM/SETTE/input_AMM12.cfg

    r4147 r4245  
    1 AMM12_v3.5.tar AMM12.v3_5 
     1AMM12_v3.6.tar AMM12.v3_6 
  • branches/2013/dev_LOCEAN_CMCC_INGV_MERC_UKMO_2013/NEMOGCM/SETTE/prepare_job.sh

    r4147 r4245  
    6868# 
    6969 
    70 usage=" Usage : ./prepare_job.sh INPUT_FILE_CONFIG_NAME NUMBER_PROC TEST_NAME MPI_FLAG JOB_FILE" 
    71 usage=" example : ./prepare_job.sh input_ORCA2_LIM_PISCES.cfg 8 SHORT no/yes $JOB_FILE" 
    72  
    73  
    74 minargcount=5 
     70usage=" Usage : ./prepare_job.sh INPUT_FILE_CONFIG_NAME NUMBER_PROC TEST_NAME MPI_FLAG JOB_FILE NUM_XIO_SERVERS" 
     71usage=" example : ./prepare_job.sh input_ORCA2_LIM_PISCES.cfg 8 SHORT no/yes $JOB_FILE 0" 
     72 
     73 
     74minargcount=6 
    7575        if [ ${#} -lt ${minargcount} ] 
    7676        then 
     
    9393MPI_FLAG=$4 
    9494JOB_FILE=$5 
     95NXIO_PROC=$6 
    9596 
    9697# export EXE_DIR. This directory is used to execute model  
     
    186187      case ${COMPILER} in  
    187188         ALTIX_NAUTILUS_MPT) 
    188                                 NB_REM=$( echo $NB_PROC | awk '{print $1 % 4}') 
     189                                NB_REM=$( echo $NB_PROC $NXIO_PROC | awk '{print ( $1 + $2 ) % 4}') 
    189190               if [ ${NB_REM} == 0 ] ; then 
    190191               # number of processes required is an integer multiple of 4 
    191192               # 
    192                NB_NODES=$( echo $NB_PROC | awk '{print $1 / 4}') 
     193               NB_NODES=$( echo $NB_PROC $NXIO_PROC | awk '{print ($1 + $2 ) / 4}') 
    193194            else 
    194195               # 
     
    196197               # round up the number of nodes required. 
    197198               # 
    198                NB_NODES=$( echo $NB_PROC | awk '{printf("%d",$1 / 4 + 1 )}') 
     199               NB_NODES=$( echo $NB_PROC $NXIO_PROC | awk '{printf("%d",($1 + $2 ) / 4 + 1 )}') 
    199200                  fi 
    200201            ;; 
     
    230231# Pass settings into job file by using sed to edit predefined strings 
    231232# 
    232         cat ${SETTE_DIR}/job_batch_template | sed -e"s/NODES/${NB_NODES}/" -e"s/NPROCS/${NB_PROC}/" \ 
     233        cat ${SETTE_DIR}/job_batch_template | sed -e"s/NODES/${NB_NODES}/" \ 
     234             -e"s/NPROCS/${NB_PROC}/" \ 
     235             -e"s/NXIOPROCS/${NXIO_PROC}/" \ 
    233236             -e"s:DEF_SETTE_DIR:${SETTE_DIR}:" -e"s:DEF_INPUT_DIR:${INPUT_DIR}:" \ 
    234237             -e"s:DEF_EXE_DIR:${EXE_DIR}:" \ 
  • branches/2013/dev_LOCEAN_CMCC_INGV_MERC_UKMO_2013/NEMOGCM/SETTE/sette.sh

    r4242 r4245  
    22############################################################ 
    33# Author : Simona Flavoni for NEMO 
    4 # Contact : sflod@locean-ipsl.upmc.fr 
     4# Contact: sflod@locean-ipsl.upmc.fr 
     5# 2013   : A.C. Coward added options for testing with XIOS in dettached mode 
    56# 
    67# sette.sh   : principal script of SET TEsts for NEMO (SETTE) 
     
    1516#set -u 
    1617#set -e 
    17 #+ 
    18 # 
    19 # ================ 
    20 # sette.sh 
    21 # ================ 
    22 # 
    23 # ---------------------------------------------- 
    24 # Set of tests for NEMO 
    25 # ---------------------------------------------- 
    26 # 
    27 # SYNOPSIS 
    28 # ======== 
    29 # 
    30 # :: 
    31 # 
    32 #  $ ./sette.sh 
    33 # 
     18# =========== 
    3419# DESCRIPTION 
    3520# =========== 
     
    3722# Variables to be checked by user: 
    3823# 
    39 # COMPILER : name of compiler as defined in NEMOGCM/ARCH directory  
    40 # 
    41 # BATCH_COMMAND :  name of the command for batch submission 
    42 # 
    43 # INTERACT_FLAG :  flag to run in interactive mode "yes" 
    44 #                       to run in batch mode "no" 
    45 # 
    46 # MPIRUN_FLAG   :  flag to run in parallel (MPI) "yes" 
    47 #                       to run in sequential mode (NB_PROC = 1) "no" 
     24# COMPILER          : name of compiler as defined in NEMOGCM/ARCH directory  
     25# BATCH_COMMAND_PAR :  name of the command for submitting parallel batch jobs 
     26# BATCH_COMMAND_SEQ :  name of the command for submitting sequential batch jobs   
     27# INTERACT_FLAG     : flag to run in interactive mode "yes" 
     28#                           to run in batch mode "no" 
     29# MPIRUN_FLAG       : flag to run in parallel (MPI) "yes" 
     30#                           to run in sequential mode (NB_PROC = 1) "no" 
     31# USING_XIOS        : flag to control the activation of key_iomput 
     32#                      "yes" to compile using key_iomput and link to the external XIOS library 
     33#                      "no"  to compile without key_iomput and link to the old IOIPSL library 
     34# USING_MPMD        : flag to control the use of stand-alone IO servers 
     35#                     requires USING_XIOS="yes" 
     36#                      "yes" to run in MPMD (detached) mode with stand-alone IO servers 
     37#                      "no"  to run in SPMD (attached) mode without separate IO servers  
     38# NUM_XIOSERVERS    : number of stand-alone IO servers to employ 
     39#                     set to zero if USING_MPMD="no" 
    4840# 
    4941# Principal script is sette.sh, that calls  
    5042# 
    51 #  makenemo  
    52 # 
    53 #   creates the exectuable in ${CONFIG_NAME}/BLD/bin/nemo.exe  (and its link opa in ${CONFIG_NAME}/EXP00) 
     43#  makenemo  : to create successive exectuables in ${CONFIG_NAME}/BLD/bin/nemo.exe  
     44#              and links to opa in ${CONFIG_NAME}/EXP00) 
    5445# 
    5546#  param.cfg : sets and loads following directories: 
    5647# 
    57 #   FORCING_DIR : is the directory for forcing files (tarfile) 
    58 # 
    59 #   INPUT_DIR : is the directory for input files storing  
    60 # 
    61 #   TMPDIR : is the temporary directory (if needed) 
     48#   FORCING_DIR         : is the directory for forcing files (tarfile) 
     49#   INPUT_DIR           : is the directory for input files storing  
     50#   TMPDIR              : is the temporary directory (if needed) 
     51#   NEMO_VALIDATION_DIR : is the validation directory 
     52# 
     53#   (NOTE: this file is the same for all configrations to be tested with sette) 
     54# 
     55#   all_functions.sh : loads functions used by sette (note: new functions can be added here) 
     56#   set_namelist     : function declared in all_functions that sets namelist parameters  
     57#   post_test_tidyup : creates validation storage directory and copies required output files  
     58#                      (solver.stat and ocean.output) in it after execution of test. 
     59# 
     60#  VALIDATION tree is: 
     61# 
     62#   NEMO_VALIDATION_DIR/WCONFIG_NAME/WCOMPILER_NAME/TEST_NAME/REVISION_NUMBER(or DATE) 
     63# 
     64#  prepare_exe_dir.sh : defines and creates directory where the test is executed 
     65#                       execution directory takes name of TEST_NAME defined for every test  
     66#                       in sette.sh. (each test in executed in its own directory) 
     67# 
     68#  prepare_job.sh     : to generate the script run_job.sh 
     69# 
     70#  fcm_job.sh         : run in batch (INTERACT_FLAG="no") or interactive (INTERACT_FLAG="yes") 
     71#                        see sette.sh and BATCH_TEMPLATE directory 
     72# 
     73#  NOTE: jobs requiring initial or forcing data need to have an input_CONFIG.cfg in which  
     74#        can be found paths to the input tar file) 
     75#  NOTE: if job is not launched for any reason you have the executable ready in ${EXE_DIR}  
     76#        directory 
     77#  NOTE: the changed namelists are left in ${EXE_DIR} directory whereas original namelists  
     78#        remain in ${NEW_CONF}/EXP00 
    6279#  
    63 #   NEMO_VALIDATION_DIR : is the validation directory 
    64 # 
    65 #   (NOTE: this file is the same for all configrations to be tested with sette) 
    66 # 
    67 # 
    68 #  all_functions.sh : loads functions used by sette (note: new functions can be added here) 
    69 # 
    70 #   set_namelist : function declared in all_functions that set namelist parameters for tests 
    71 # 
    72 #   post_test_tidyup : creates validation storage directory and copy needed output files (solver.stat and ocean.output) in it after execution of test. 
    73 # 
    74 #   Tree of VALIDATION is: 
    75 # 
    76 #   NEMO_VALIDATION_DIR/WCONFIG_NAME/WCOMPILER_NAME/TEST_NAME/REVISION_NUMBER(or DATE) 
    77 # 
    78 # 
    79 #  prepare_exe_dir.sh : defines and creates directory where the test is executed 
    80 # 
    81 #       execution directory takes name of TEST_NAME defined in every test in sette.sh 
    82 # 
    83 #       ( each test in executed in its own directory ) 
    84 # 
    85 # 
    86 #  prepare_job.sh 
    87 # 
    88 #  to generate the script run_job.sh 
    89 # 
    90 #  fcm_job.sh  
    91 # 
    92 #   run in batch (INTERACT_FLAG="no") or interactive (INTERACT_FLAG="yes") see sette.sh and BATCH_TEMPLATE directory 
    93 # 
    94 #   (note this job needs to have an input_CONFIG.cfg in which can be found input tar file) 
    95 #  
    96 #  NOTE: if job is not launched for some problems you have executable ready in ${EXE_DIR} directory 
    97 # 
    98 #  NOTE: the changed namelists are leaved in ${EXE_DIR} directory whereas original namelist remains in ${NEW_CONF}/EXP00 
    99 #  
    100 #  in ${SETTE_DIR} is created output.sette with the echo of executed commands 
    101 # 
    102 #  if sette.sh is stopped in output.sette there is written the last command executed by sette.sh 
    103 # 
    104 #  if you run: ./sette.sh 2>&1 | tee out.sette 
    105 # 
    106 #  in ${SETTE_DIR} out.sette is redirected standard error & standard output 
    107 # 
    108 # 
    109 # EXAMPLES 
    110 # ======== 
    111 # 
    112 # :: 
    113 # 
    114 #  $ ./sette.sh  
    115 # 
    116 # 
    117 # TODO 
    118 # ==== 
    119 # 
    120 # option debug 
    121 # 
    122 # EVOLUTIONS 
    123 # ========== 
    124 # 
    125 # $Id$ 
    126 # 
    127 #   * creation 
    128 # 
    129 #- 
    130 # 
    131 #- 
     80#  NOTE: a log file, output.sette, is created in ${SETTE_DIR} with the echoes of  
     81#        executed commands 
     82# 
     83#  NOTE: if sette.sh is stopped in output.sette there is written the last command  
     84#        executed by sette.sh 
     85# 
     86# example use: ./sette.sh  
     87######################################################################################### 
     88# 
    13289# Compiler among those in NEMOGCM/ARCH 
    13390COMPILER=x3750_ADA 
     
    13693export INTERACT_FLAG="no" 
    13794export MPIRUN_FLAG="yes" 
    138 # IF YOU DON'T WANT TO USE XIOS : (this is a list of keys to be delete) 
    139 #export KEY_XIOS="key_iomput" 
    140 # IF YOU WANT TO USE XIOS : 
    141 export KEY_XIOS="" 
    142  
     95export USING_XIOS="yes" 
     96# 
     97export DEL_KEYS="key_iomput" 
     98if [ ${USING_XIOS} == "yes" ]  
     99 then  
     100   export DEL_KEYS="" 
     101fi 
     102# 
     103# Settings which control the use of stand alone servers (only relevant if using xios) 
     104# 
     105export USING_MPMD="no" 
     106export NUM_XIOSERVERS=4 
     107export JOB_PREFIX=batch-mpmd 
     108# 
     109if [ ${USING_MPMD} == "no" ]  
     110 then 
     111   export NUM_XIOSERVERS=0 
     112   export JOB_PREFIX=batch 
     113fi 
     114# 
     115# 
     116if [ ${USING_MPMD} == "yes" ] && [ ${USING_XIOS} == "no"] 
     117 then 
     118   echo "Incompatible choices. MPMD mode requires the XIOS server" 
     119   exit 
     120fi 
     121# 
    143122 
    144123# Directory to run the tests 
     
    152131# Copy job_batch_COMPILER file for specific compiler into job_batch_template 
    153132cd ${SETTE_DIR} 
    154 cp BATCH_TEMPLATE/batch-${COMPILER} job_batch_template || exit 
     133cp BATCH_TEMPLATE/${JOB_PREFIX}-${COMPILER} job_batch_template || exit 
    155134 
    156135for config in 1 2 3 4 5 6 7 8 9 10 11 
     
    163142    export TEST_NAME="LONG" 
    164143    cd ${CONFIG_DIR} 
    165     . ./makenemo -m ${CMP_NAM} -n GYRE_LONG -r GYRE -j 8 add_key "key_mpp_mpi" del_key ${KEY_XIOS} 
     144    . ./makenemo -m ${CMP_NAM} -n GYRE_LONG -r GYRE -j 8 del_key ${DEL_KEYS} 
    166145    cd ${SETTE_DIR} 
    167146    . param.cfg 
     
    170149    JOB_FILE=${EXE_DIR}/run_job.sh 
    171150    NPROC=4 
    172     \rm ${JOB_FILE} 
     151    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi 
    173152    cd ${EXE_DIR}   
    174153    set_namelist namelist_cfg cn_exp \"GYRE_LONG\" 
     
    181160    set_namelist namelist_cfg jpnj 2 
    182161    set_namelist namelist_cfg jpnij 4 
    183     cd ${SETTE_DIR}  
    184     . ./prepare_job.sh input_GYRE.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} 
     162    if [ ${USING_MPMD} == "yes" ] ; then 
     163       set_xio_using_server iodef.xml true 
     164    else 
     165       set_xio_using_server iodef.xml false 
     166    fi 
     167    cd ${SETTE_DIR} 
     168    . ./prepare_job.sh input_GYRE.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} 
    185169 
    186170    cd ${SETTE_DIR} 
     
    200184    set_namelist namelist_cfg jpnij 4 
    201185    set_namelist namelist_cfg cn_ocerst_in \"GYRE_LONG_00000060_restart\" 
     186    if [ ${USING_MPMD} == "yes" ] ; then 
     187       set_xio_using_server iodef.xml true 
     188    else 
     189       set_xio_using_server iodef.xml false 
     190    fi 
    202191    for (( i=1; i<=$NPROC; i++)) ; do 
    203192        L_NPROC=$(( $i - 1 )) 
     
    205194        ln -sf ../LONG/GYRE_LONG_00000060_restart_${L_NPROC}.nc . 
    206195    done 
    207     cd ${SETTE_DIR} 
    208     . ./prepare_job.sh input_GYRE.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} 
     196    if [ ${USING_MPMD} == "yes" ] ; then 
     197       set_xio_using_server iodef.xml true 
     198    else 
     199       set_xio_using_server iodef.xml false 
     200    fi 
     201    cd ${SETTE_DIR} 
     202    . ./prepare_job.sh input_GYRE.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} 
    209203    cd ${SETTE_DIR} 
    210204    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG} 
     
    215209    export TEST_NAME="REPRO_1_4" 
    216210    cd ${CONFIG_DIR} 
    217     . ./makenemo -m ${CMP_NAM} -n GYRE_4 -r GYRE -j 8 add_key "key_mpp_mpi key_mpp_rep" del_key ${KEY_XIOS} 
     211    . ./makenemo -m ${CMP_NAM} -n GYRE_4 -r GYRE -j 8 add_key "key_mpp_rep" del_key ${DEL_KEYS} 
    218212    cd ${SETTE_DIR} 
    219213    . param.cfg 
     
    222216    JOB_FILE=${EXE_DIR}/run_job.sh 
    223217    NPROC=4 
    224     \rm ${JOB_FILE} 
     218    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi 
    225219    cd ${EXE_DIR} 
    226220    set_namelist namelist_cfg cn_exp \"GYRE_14\" 
     
    235229    set_namelist namelist_cfg jpnj 4 
    236230    set_namelist namelist_cfg jpnij 4 
    237     cd ${SETTE_DIR} 
    238     . ./prepare_job.sh input_GYRE.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} 
     231    if [ ${USING_MPMD} == "yes" ] ; then 
     232       set_xio_using_server iodef.xml true 
     233    else 
     234       set_xio_using_server iodef.xml false 
     235    fi 
     236    cd ${SETTE_DIR} 
     237    . ./prepare_job.sh input_GYRE.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} 
    239238    cd ${SETTE_DIR} 
    240239    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG} 
     
    245244    JOB_FILE=${EXE_DIR}/run_job.sh 
    246245    NPROC=4 
    247     \rm $JOB_FILE 
     246    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi 
    248247    cd ${EXE_DIR} 
    249248    set_namelist namelist_cfg cn_exp \"GYRE_22\" 
     
    257256    set_namelist namelist_cfg jpnj 2 
    258257    set_namelist namelist_cfg jpnij 4 
    259     cd ${SETTE_DIR} 
    260     . ./prepare_job.sh input_GYRE.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} 
     258    if [ ${USING_MPMD} == "yes" ] ; then 
     259       set_xio_using_server iodef.xml true 
     260    else 
     261       set_xio_using_server iodef.xml false 
     262    fi 
     263    cd ${SETTE_DIR} 
     264    . ./prepare_job.sh input_GYRE.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} 
    261265    cd ${SETTE_DIR} 
    262266    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG} 
     
    269273    export TEST_NAME="LONG" 
    270274    cd ${CONFIG_DIR} 
    271     . ./makenemo -m ${CMP_NAM} -n ORCA2LIMPIS_LONG -r ORCA2_LIM_PISCES -j 8 add_key "key_mpp_mpi" del_key ${KEY_XIOS} 
     275    . ./makenemo -m ${CMP_NAM} -n ORCA2LIMPIS_LONG -r ORCA2_LIM_PISCES -j 8 del_key ${DEL_KEYS} 
    272276    cd ${SETTE_DIR} 
    273277    . param.cfg 
     
    276280    JOB_FILE=${EXE_DIR}/run_job.sh 
    277281    NPROC=4 
    278     \rm ${JOB_FILE} 
     282    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi 
    279283    cd ${EXE_DIR} 
    280284    set_namelist namelist_cfg cn_exp \"O2LP_LONG\" 
     
    299303    set_namelist namelist_pisces_cfg ln_ironsed .false. 
    300304    set_namelist namelist_pisces_cfg ln_hydrofe .false. 
    301     cd ${SETTE_DIR} 
    302     . ./prepare_job.sh input_ORCA2_LIM_PISCES.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} 
     305    if [ ${USING_MPMD} == "yes" ] ; then 
     306       set_xio_using_server iodef.xml true 
     307    else 
     308       set_xio_using_server iodef.xml false 
     309    fi 
     310    cd ${SETTE_DIR} 
     311    . ./prepare_job.sh input_ORCA2_LIM_PISCES.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} 
    303312     
    304313    cd ${SETTE_DIR} 
     
    342351        ln -sf ../LONG/O2LP_LONG_00000075_restart_ice_${L_NPROC}.nc . 
    343352    done 
    344     cd ${SETTE_DIR} 
    345     . ./prepare_job.sh input_ORCA2_LIM_PISCES.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} 
     353    if [ ${USING_MPMD} == "yes" ] ; then 
     354       set_xio_using_server iodef.xml true 
     355    else 
     356       set_xio_using_server iodef.xml false 
     357    fi 
     358    cd ${SETTE_DIR} 
     359    . ./prepare_job.sh input_ORCA2_LIM_PISCES.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} 
    346360    cd ${SETTE_DIR} 
    347361    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG} 
     
    352366    export TEST_NAME="REPRO_4_4" 
    353367    cd ${CONFIG_DIR} 
    354     . ./makenemo -m ${CMP_NAM} -n ORCA2LIMPIS_16 -r ORCA2_LIM_PISCES -j 8 add_key "key_mpp_mpi key_mpp_rep" del_key ${KEY_XIOS} 
     368    . ./makenemo -m ${CMP_NAM} -n ORCA2LIMPIS_16 -r ORCA2_LIM_PISCES -j 8 add_key "key_mpp_rep" del_key ${DEL_KEYS} 
    355369    cd ${SETTE_DIR} 
    356370    . param.cfg 
     
    359373    JOB_FILE=${EXE_DIR}/run_job.sh 
    360374    NPROC=16 
    361     \rm $JOB_FILE 
     375    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi 
    362376    cd ${EXE_DIR} 
    363377    set_namelist namelist_cfg nn_it000 1 
     
    384398    # put ln_pisdmp to false : no restoring to global mean value 
    385399    set_namelist namelist_pisces_cfg ln_pisdmp .false. 
    386     cd ${SETTE_DIR} 
    387     . ./prepare_job.sh input_ORCA2_LIM_PISCES.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} 
     400    if [ ${USING_MPMD} == "yes" ] ; then 
     401       set_xio_using_server iodef.xml true 
     402    else 
     403       set_xio_using_server iodef.xml false 
     404    fi 
     405    cd ${SETTE_DIR} 
     406    . ./prepare_job.sh input_ORCA2_LIM_PISCES.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} 
    388407    cd ${SETTE_DIR} 
    389408    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG} 
     
    394413    JOB_FILE=${EXE_DIR}/run_job.sh 
    395414    NPROC=16 
    396     \rm $JOB_FILE 
     415    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi 
    397416    cd ${EXE_DIR} 
    398417    set_namelist namelist_cfg nn_it000 1 
     
    418437    # put ln_pisdmp to false : no restoring to global mean value 
    419438    set_namelist namelist_pisces_cfg ln_pisdmp .false. 
    420     cd ${SETTE_DIR} 
    421     . ./prepare_job.sh input_ORCA2_LIM_PISCES.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} 
     439    if [ ${USING_MPMD} == "yes" ] ; then 
     440       set_xio_using_server iodef.xml true 
     441    else 
     442       set_xio_using_server iodef.xml false 
     443    fi 
     444    cd ${SETTE_DIR} 
     445    . ./prepare_job.sh input_ORCA2_LIM_PISCES.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} 
    422446    cd ${SETTE_DIR} 
    423447    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG} 
     
    429453    export TEST_NAME="LONG" 
    430454    cd ${CONFIG_DIR} 
    431     . ./makenemo -m ${CMP_NAM} -n ORCA2OFFPIS_LONG -r ORCA2_OFF_PISCES -j 8 add_key "key_mpp_mpi key_mpp_rep" del_key ${KEY_XIOS} 
     455    . ./makenemo -m ${CMP_NAM} -n ORCA2OFFPIS_LONG -r ORCA2_OFF_PISCES -j 8 add_key "key_mpp_rep" del_key ${DEL_KEYS} 
    432456    cd ${SETTE_DIR} 
    433457    . param.cfg 
     
    436460    JOB_FILE=${EXE_DIR}/run_job.sh 
    437461    NPROC=4 
    438     \rm $JOB_FILE 
     462    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi 
    439463    cd ${EXE_DIR} 
    440464    set_namelist namelist_cfg cn_exp \"OFFP_LONG\" 
     
    460484    # put ln_pisdmp to false : no restoring to global mean value 
    461485    set_namelist namelist_pisces_cfg ln_pisdmp .false. 
    462     cd ${SETTE_DIR} 
    463     . ./prepare_job.sh input_ORCA2_OFF_PISCES.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} 
     486    if [ ${USING_MPMD} == "yes" ] ; then 
     487       set_xio_using_server iodef.xml true 
     488    else 
     489       set_xio_using_server iodef.xml false 
     490    fi 
     491    cd ${SETTE_DIR} 
     492    . ./prepare_job.sh input_ORCA2_OFF_PISCES.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} 
    464493     
    465494    cd ${SETTE_DIR} 
     
    496525    # put ln_pisdmp to false : no restoring to global mean value 
    497526    set_namelist namelist_pisces_cfg ln_pisdmp .false. 
    498     cd ${SETTE_DIR} 
    499     . ./prepare_job.sh input_ORCA2_OFF_PISCES.cfg $NPROC ${TEST_NAME}  ${MPIRUN_FLAG} ${JOB_FILE} 
     527    if [ ${USING_MPMD} == "yes" ] ; then 
     528       set_xio_using_server iodef.xml true 
     529    else 
     530       set_xio_using_server iodef.xml false 
     531    fi 
     532    cd ${SETTE_DIR} 
     533    . ./prepare_job.sh input_ORCA2_OFF_PISCES.cfg $NPROC ${TEST_NAME}  ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} 
    500534    cd ${SETTE_DIR} 
    501535    . ./fcm_job.sh $NPROC  ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG} 
     
    506540    export TEST_NAME="REPRO_4_4" 
    507541    cd ${CONFIG_DIR} 
    508     . ./makenemo -m ${CMP_NAM} -n ORCA2OFFPIS_16 -r ORCA2_OFF_PISCES -j 8 add_key "key_mpp_mpi key_mpp_rep" del_key ${KEY_XIOS} 
     542    . ./makenemo -m ${CMP_NAM} -n ORCA2OFFPIS_16 -r ORCA2_OFF_PISCES -j 8 add_key "key_mpp_rep" del_key ${DEL_KEYS} 
    509543    cd ${SETTE_DIR} 
    510544    . param.cfg 
     
    513547    JOB_FILE=${EXE_DIR}/run_job.sh 
    514548    NPROC=16 
    515     \rm $JOB_FILE 
     549    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi 
    516550    cd ${EXE_DIR} 
    517551    set_namelist namelist_cfg nn_it000 1 
     
    536570    # put ln_pisdmp to false : no restoring to global mean value 
    537571    set_namelist namelist_pisces_cfg ln_pisdmp .false. 
    538     cd ${SETTE_DIR} 
    539     . ./prepare_job.sh input_ORCA2_OFF_PISCES.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} 
     572    if [ ${USING_MPMD} == "yes" ] ; then 
     573       set_xio_using_server iodef.xml true 
     574    else 
     575       set_xio_using_server iodef.xml false 
     576    fi 
     577    cd ${SETTE_DIR} 
     578    . ./prepare_job.sh input_ORCA2_OFF_PISCES.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} 
    540579    cd ${SETTE_DIR} 
    541580    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG} 
     
    546585    JOB_FILE=${EXE_DIR}/run_job.sh 
    547586    NPROC=16 
    548     \rm $JOB_FILE 
     587    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi 
    549588    cd ${EXE_DIR} 
    550589    set_namelist namelist_cfg nn_it000 1 
     
    569608    # put ln_pisdmp to false : no restoring to global mean value 
    570609    set_namelist namelist_pisces_cfg ln_pisdmp .false.  
    571     cd ${SETTE_DIR} 
    572     . ./prepare_job.sh input_ORCA2_OFF_PISCES.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} 
     610    if [ ${USING_MPMD} == "yes" ] ; then 
     611       set_xio_using_server iodef.xml true 
     612    else 
     613       set_xio_using_server iodef.xml false 
     614    fi 
     615    cd ${SETTE_DIR} 
     616    . ./prepare_job.sh input_ORCA2_OFF_PISCES.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} 
    573617    cd ${SETTE_DIR} 
    574618    . ./fcm_job.sh $NPROC  ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG} 
     
    580624    export TEST_NAME="LONG" 
    581625    cd ${CONFIG_DIR} 
    582     . ./makenemo -m ${CMP_NAM} -n AMM12_LONG -r AMM12 -j 8 add_key "key_tide" del_key ${KEY_XIOS} 
     626    . ./makenemo -m ${CMP_NAM} -n AMM12_LONG -r AMM12 -j 8 add_key "key_tide" del_key ${DEL_KEYS} 
    583627    cd ${SETTE_DIR} 
    584628    . param.cfg 
     
    587631    JOB_FILE=${EXE_DIR}/run_job.sh 
    588632    NPROC=32 
    589     \rm $JOB_FILE 
     633    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi 
    590634    cd ${EXE_DIR} 
    591635    set_namelist namelist_cfg nn_it000 1 
     
    602646    set_namelist namelist_cfg jpnj 4 
    603647    set_namelist namelist_cfg jpnij 32 
    604     cd ${SETTE_DIR} 
    605     . ./prepare_job.sh input_AMM12.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} 
     648    if [ ${USING_MPMD} == "yes" ] ; then 
     649       set_xio_using_server iodef.xml true 
     650    else 
     651       set_xio_using_server iodef.xml false 
     652    fi 
     653    cd ${SETTE_DIR} 
     654    . ./prepare_job.sh input_AMM12.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} 
    606655 
    607656    cd ${SETTE_DIR} 
     
    627676        ln -sf ../LONG/AMM12_00000006_restart_oce_out_${L_NPROC}.nc . 
    628677    done 
    629     cd ${SETTE_DIR} 
    630     . ./prepare_job.sh input_AMM12.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} 
     678    if [ ${USING_MPMD} == "yes" ] ; then 
     679       set_xio_using_server iodef.xml true 
     680    else 
     681       set_xio_using_server iodef.xml false 
     682    fi 
     683    cd ${SETTE_DIR} 
     684    . ./prepare_job.sh input_AMM12.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} 
    631685    cd ${SETTE_DIR} 
    632686    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG} 
     
    637691    export TEST_NAME="REPRO_8_4" 
    638692    cd ${CONFIG_DIR} 
    639     . ./makenemo -m ${CMP_NAM} -n AMM12_32 -r AMM12 -j 8 add_key "key_mpp_rep key_tide" del_key ${KEY_XIOS}   
     693    . ./makenemo -m ${CMP_NAM} -n AMM12_32 -r AMM12 -j 8 add_key "key_mpp_rep key_tide" del_key ${DEL_KEYS} 
    640694    cd ${SETTE_DIR} 
    641695    . param.cfg 
     
    644698    JOB_FILE=${EXE_DIR}/run_job.sh 
    645699    NPROC=32 
    646     \rm ${JOB_FILE} 
     700    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi 
    647701    cd ${EXE_DIR} 
    648702    set_namelist namelist_cfg nn_it000 1 
     
    657711    set_namelist namelist_cfg jpnj 4 
    658712    set_namelist namelist_cfg jpnij 32 
    659     cd ${SETTE_DIR} 
    660     . ./prepare_job.sh input_AMM12.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} 
     713    if [ ${USING_MPMD} == "yes" ] ; then 
     714       set_xio_using_server iodef.xml true 
     715    else 
     716       set_xio_using_server iodef.xml false 
     717    fi 
     718    cd ${SETTE_DIR} 
     719    . ./prepare_job.sh input_AMM12.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} 
    661720    cd ${SETTE_DIR} 
    662721    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG} 
     
    677736    set_namelist namelist_cfg jpnj 8 
    678737    set_namelist namelist_cfg jpnij 32 
    679     cd ${SETTE_DIR} 
    680     . ./prepare_job.sh input_AMM12.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} 
    681     cd ${SETTE_DIR} 
    682     . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG} 
    683 fi 
    684  
    685 # TEST FOR ORCA2_LIM_AGRIF : simple test of running AGRIF (no restartability neither reproducibility tests) 
     738    if [ ${USING_MPMD} == "yes" ] ; then 
     739       set_xio_using_server iodef.xml true 
     740    else 
     741       set_xio_using_server iodef.xml false 
     742    fi 
     743    cd ${SETTE_DIR} 
     744    . ./prepare_job.sh input_AMM12.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} 
     745    cd ${SETTE_DIR} 
     746    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG} 
     747fi 
     748 
     749 
     750# TESTS FOR ORCA2_SAS_LIM CONFIGURATION 
    686751if [ ${config} -eq 9 ] ;  then 
    687     ## ORCA2_LIM with Agulhas AGRIF zoom in MPI 
    688     export TEST_NAME="SHORT" 
    689     cd ${CONFIG_DIR} 
    690     . ./makenemo -m ${CMP_NAM} -n ORCA2AGUL_1_2 -r ORCA2_LIM -j 8 add_key "key_mpp_mpi key_mpp_rep key_agrif" del_key "key_zdftmx" del_key ${KEY_XIOS} 
    691     cd ${SETTE_DIR} 
    692     . param.cfg 
    693     . all_functions.sh 
    694     . prepare_exe_dir.sh 
    695     JOB_FILE=${EXE_DIR}/run_job.sh 
    696     NPROC=2 
    697     \rm ${JOB_FILE} 
    698     cd ${EXE_DIR} 
    699     set_namelist namelist_cfg nn_it000 1 
    700     set_namelist namelist_cfg nn_itend 75 
    701     set_namelist namelist_cfg ln_ctl .false. 
    702     set_namelist namelist_cfg ln_clobber .true. 
    703     set_namelist namelist_cfg jpni 1 
    704     set_namelist namelist_cfg jpnj 2 
    705     set_namelist namelist_cfg jpnij 2 
    706     set_namelist 1_namelist_cfg nn_it000 1 
    707     set_namelist 1_namelist_cfg nn_itend 150 
    708     set_namelist 1_namelist_cfg ln_ctl .false. 
    709     set_namelist 1_namelist_cfg ln_clobber .true. 
    710     cd ${SETTE_DIR} 
    711     . ./prepare_job.sh input_ORCA2_LIM_AGRIF.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} 
    712     cd ${SETTE_DIR} 
    713     . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG} 
    714 fi 
    715  
    716 # TESTS FOR ORCA2_SAS_LIM CONFIGURATION 
    717 if [ ${config} -eq 10 ] ;  then 
    718752    ## Restartability tests for SAS 
    719753    export TEST_NAME="LONG" 
    720754    cd ${CONFIG_DIR} 
    721     . ./makenemo -m ${CMP_NAM} -n SAS_LONG -r ORCA2_SAS_LIM -j 8 add_key " " del_key ${KEY_XIOS} 
     755    . ./makenemo -m ${CMP_NAM} -n SAS_LONG -r ORCA2_SAS_LIM -j 8 "key_mpp_rep" del_key ${DEL_KEYS} 
    722756    cd ${SETTE_DIR} 
    723757    . param.cfg 
     
    737771    set_namelist namelist_cfg jpnj 4 
    738772    set_namelist namelist_cfg jpnij 32 
    739     cd ${SETTE_DIR} 
    740     . ./prepare_job.sh input_SAS.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} 
     773    if [ ${USING_MPMD} == "yes" ] ; then 
     774       set_xio_using_server iodef.xml true 
     775    else 
     776       set_xio_using_server iodef.xml false 
     777    fi 
     778    cd ${SETTE_DIR} 
     779    . ./prepare_job.sh input_SAS.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} 
    741780 
    742781    cd ${SETTE_DIR} 
     
    759798        ln -sf ../LONG/SAS_00000050_restart_${L_NPROC}.nc . 
    760799    done 
    761     cd ${SETTE_DIR} 
    762     . ./prepare_job.sh input_SAS.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} 
    763     cd ${SETTE_DIR} 
    764     . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG} 
    765 fi 
    766  
    767 if [ ${config} -eq 11 ] ;  then 
     800    if [ ${USING_MPMD} == "yes" ] ; then 
     801       set_xio_using_server iodef.xml true 
     802    else 
     803       set_xio_using_server iodef.xml false 
     804    fi 
     805    cd ${SETTE_DIR} 
     806    . ./prepare_job.sh input_SAS.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} 
     807    cd ${SETTE_DIR} 
     808    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG} 
     809fi 
     810 
     811if [ ${config} -eq 10 ] ;  then 
    768812## Reproducibility tests for ORCA2_SAS_LIM 
    769813    export TEST_NAME="REPRO_8_4" 
    770814    cd ${CONFIG_DIR} 
    771     . ./makenemo -m ${CMP_NAM} -n SAS_32 -r ORCA2_SAS_LIM -j 8 add_key " " del_key ${KEY_XIOS} 
     815    . ./makenemo -m ${CMP_NAM} -n SAS_32 -r ORCA2_SAS_LIM -j 8 add_key "key_mpp_rep" del_key ${DEL_KEYS} 
    772816    cd ${SETTE_DIR} 
    773817    . param.cfg 
     
    786830    set_namelist namelist_cfg jpnj 4 
    787831    set_namelist namelist_cfg jpnij 32 
    788     cd ${SETTE_DIR} 
    789     . ./prepare_job.sh input_SAS.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} 
    790     cd ${SETTE_DIR} 
    791     . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG} 
    792  
     832    if [ ${USING_MPMD} == "yes" ] ; then 
     833       set_xio_using_server iodef.xml true 
     834    else 
     835       set_xio_using_server iodef.xml false 
     836    fi 
     837    cd ${SETTE_DIR} 
     838    . ./prepare_job.sh input_SAS.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE}  ${NUM_XIOSERVERS} 
     839    cd ${SETTE_DIR} 
     840    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG} 
    793841    cd ${SETTE_DIR} 
    794842    export TEST_NAME="REPRO_4_8" 
     
    803851    set_namelist namelist_cfg jpnj 8 
    804852    set_namelist namelist_cfg jpnij 32 
    805     cd ${SETTE_DIR} 
    806     . ./prepare_job.sh input_SAS.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} 
    807     cd ${SETTE_DIR} 
    808     . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG} 
    809 fi 
     853    if [ ${USING_MPMD} == "yes" ] ; then 
     854       set_xio_using_server iodef.xml true 
     855    else 
     856       set_xio_using_server iodef.xml false 
     857    fi 
     858    cd ${SETTE_DIR} 
     859    . ./prepare_job.sh input_SAS.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} 
     860    cd ${SETTE_DIR} 
     861    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG} 
     862fi 
     863 
     864# TEST FOR ORCA2_LIM_AGRIF : simple test of running AGRIF (no restartability neither reproducibility tests) 
     865if [ ${config} -eq 11 ] ;  then 
     866    ## ORCA2_LIM with Agulhas AGRIF zoom in MPI 
     867    export TEST_NAME="SHORT" 
     868    cd ${CONFIG_DIR} 
     869    . ./makenemo -m ${CMP_NAM} -n ORCA2AGUL_1_2 -r ORCA2_LIM -j 8 add_key "key_mpp_rep key_agrif" del_key "key_zdftmx" del_key ${DEL_KEYS} 
     870    cd ${SETTE_DIR} 
     871    . param.cfg 
     872    . all_functions.sh 
     873    . prepare_exe_dir.sh 
     874    JOB_FILE=${EXE_DIR}/run_job.sh 
     875    NPROC=2 
     876    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi 
     877    cd ${EXE_DIR} 
     878    set_namelist namelist_cfg nn_it000 1 
     879    set_namelist namelist_cfg nn_itend 75 
     880    set_namelist namelist_cfg ln_ctl .false. 
     881    set_namelist namelist_cfg ln_clobber .true. 
     882    set_namelist namelist_cfg jpni 1 
     883    set_namelist namelist_cfg jpnj 2 
     884    set_namelist namelist_cfg jpnij 2 
     885    set_namelist 1_namelist_cfg nn_it000 1 
     886    set_namelist 1_namelist_cfg nn_itend 150 
     887    set_namelist 1_namelist_cfg ln_ctl .false. 
     888    set_namelist 1_namelist_cfg ln_clobber .true. 
     889    if [ ${USING_MPMD} == "yes" ] ; then 
     890       set_xio_using_server iodef.xml true 
     891    else 
     892       set_xio_using_server iodef.xml false 
     893    fi 
     894    cd ${SETTE_DIR} 
     895    . ./prepare_job.sh input_ORCA2_LIM_AGRIF.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS} 
     896    cd ${SETTE_DIR} 
     897    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG} 
     898fi 
     899 
    810900 
    811901done 
Note: See TracChangeset for help on using the changeset viewer.