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.
sette.sh in branches/2017/dev_merge_2017/NEMOGCM/SETTE – NEMO

source: branches/2017/dev_merge_2017/NEMOGCM/SETTE/sette.sh @ 9483

Last change on this file since 9483 was 9483, checked in by clem, 6 years ago

add agrif nordic configuration to sette tests. I just noticed that one zoom config is restartable but not the double zoom config...ongoing

  • Property svn:executable set to *
File size: 62.3 KB
Line 
1#!/bin/bash
2############################################################
3# Author : Simona Flavoni for NEMO
4# Contact: sflod@locean-ipsl.upmc.fr
5# 2013   : A.C. Coward added options for testing with XIOS in dettached mode
6#
7# sette.sh   : principal script of SET TEsts for NEMO (SETTE)
8# ----------------------------------------------------------------------
9# NEMO/SETTE , NEMO Consortium (2010)
10# Software governed by the CeCILL licence     (NEMOGCM/NEMO_CeCILL.txt)
11# ----------------------------------------------------------------------
12#
13#############################################################
14#set -vx
15set -o posix
16#set -u
17#set -e
18# ===========
19# DESCRIPTION
20# ===========
21#
22# Variables to be checked by user:
23#
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"
40#
41# Principal script is sette.sh, that calls
42#
43#  makenemo  : to create successive exectuables in ${CONFIG_NAME}/BLD/bin/nemo.exe
44#              and links to opa in ${CONFIG_NAME}/EXP00)
45#
46#  param.cfg : sets and loads following directories:
47#
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#                      (run.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
79#
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#
89# Compiler among those in NEMOGCM/ARCH
90COMPILER=X64_ADA
91
92export BATCH_COMMAND_PAR="llsubmit"
93export BATCH_COMMAND_SEQ=$BATCH_COMMAND_PAR
94export INTERACT_FLAG="no"
95export MPIRUN_FLAG="yes"
96export USING_XIOS="yes"
97#
98export DEL_KEYS="key_iomput"
99if [ ${USING_XIOS} == "yes" ] 
100 then
101   export DEL_KEYS=""
102fi
103#
104# Settings which control the use of stand alone servers (only relevant if using xios)
105#
106export USING_MPMD="no"
107export NUM_XIOSERVERS=4
108export JOB_PREFIX=batch-mpmd
109#
110if [ ${USING_MPMD} == "no" ] 
111 then
112   export NUM_XIOSERVERS=0
113   export JOB_PREFIX=batch
114fi
115#
116#
117if [ ${USING_MPMD} == "yes" ] && [ ${USING_XIOS} == "no"]
118 then
119   echo "Incompatible choices. MPMD mode requires the XIOS server"
120   exit
121fi
122
123# Directory to run the tests
124SETTE_DIR=$(cd $(dirname "$0"); pwd)
125MAIN_DIR=$(dirname $SETTE_DIR)
126CONFIG_DIR0=${MAIN_DIR}/CONFIG
127TOOLS_DIR=${MAIN_DIR}/TOOLS
128COMPIL_DIR=${TOOLS_DIR}/COMPILE
129
130CMP_NAM=${1:-$COMPILER}
131# Copy job_batch_COMPILER file for specific compiler into job_batch_template
132cd ${SETTE_DIR}
133cp BATCH_TEMPLATE/${JOB_PREFIX}-${COMPILER} job_batch_template || exit
134# Description of configuration tested:
135# GYRE_PISCES       :  1
136# ORCA2_LIM3_PISCES :  2
137# ORCA2_OFF_PISCES  :  3
138# AMM12             :  4
139# SAS               :  5     fos SAS there is no run.stat so is useless to test REPRO
140# ISOMIP            :  6
141# ORCA2_LIM3_OBS    :  7
142# ORCA2_AGRIF_LIM3  :  8
143# ORCA2AGR          :  9 & 10  AGRIF active with no zoom, compared to no AGRIF cpp key
144
145for config in 1 2 3 4 5 6 7 8 9 10
146do
147
148# TESTS FOR GYRE_PISCES CONFIGURATION
149if [ ${config} -eq 1 ] ;  then
150    ## Restartability tests for GYRE_PISCES
151    export TEST_NAME="LONG"
152    cd ${CONFIG_DIR0}
153    . ./makenemo -m ${CMP_NAM} -n GYREPIS_ST -r GYRE_PISCES -j 8 del_key ${DEL_KEYS}
154    cd ${SETTE_DIR}
155    . ./param.cfg
156    . ./all_functions.sh
157    . ./prepare_exe_dir.sh
158    JOB_FILE=${EXE_DIR}/run_job.sh
159    NPROC=32
160    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
161    cd ${EXE_DIR} 
162    set_namelist namelist_cfg cn_exp \"GYREPIS_LONG\"
163    set_namelist namelist_cfg nn_it000 1
164    set_namelist namelist_cfg nn_itend 120
165    set_namelist namelist_cfg nn_stock 60
166    set_namelist namelist_cfg ln_clobber .true.
167    set_namelist namelist_cfg ln_linssh .true.
168    set_namelist namelist_cfg ln_read_cfg .false.
169    set_namelist namelist_cfg nn_fwb 0
170    set_namelist namelist_cfg jpni 4
171    set_namelist namelist_cfg jpnj 8
172    set_namelist namelist_cfg jpnij 32
173    if [ ${USING_MPMD} == "yes" ] ; then
174       set_xio_using_server iodef.xml true
175    else
176       set_xio_using_server iodef.xml false
177    fi
178    cd ${SETTE_DIR}
179    . ./prepare_job.sh input_GYRE.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS}
180
181    cd ${SETTE_DIR}
182    export TEST_NAME="SHORT"
183    . ./prepare_exe_dir.sh
184    cd ${EXE_DIR}
185    set_namelist namelist_cfg cn_exp \"GYREPIS_SHORT\"
186    set_namelist namelist_cfg nn_it000 61
187    set_namelist namelist_cfg nn_itend 120
188    set_namelist namelist_cfg nn_stock 60
189    set_namelist namelist_cfg ln_rstart .true.
190    set_namelist namelist_cfg nn_rstctl 2
191    set_namelist namelist_cfg ln_clobber .true.
192    set_namelist namelist_cfg ln_linssh .true.
193    set_namelist namelist_cfg ln_read_cfg .false.
194    set_namelist namelist_cfg nn_fwb 0
195    set_namelist namelist_cfg jpni 4
196    set_namelist namelist_cfg jpnj 8
197    set_namelist namelist_cfg jpnij 32
198    set_namelist namelist_top_cfg ln_rsttr .true.
199    set_namelist namelist_top_cfg nn_rsttr 2
200    set_namelist namelist_cfg cn_ocerst_in \"GYREPIS_LONG_00000060_restart\"
201    set_namelist namelist_top_cfg cn_trcrst_in \"GYREPIS_LONG_00000060_restart_trc\"
202    if [ ${USING_MPMD} == "yes" ] ; then
203       set_xio_using_server iodef.xml true
204    else
205       set_xio_using_server iodef.xml false
206    fi
207    for (( i=1; i<=$NPROC; i++)) ; do
208        L_NPROC=$(( $i - 1 ))
209        L_NPROC=`printf "%04d\n" ${L_NPROC}`
210        ln -sf ../LONG/GYREPIS_LONG_00000060_restart_${L_NPROC}.nc .
211        ln -sf ../LONG/GYREPIS_LONG_00000060_restart_trc_${L_NPROC}.nc .
212    done
213    if [ ${USING_MPMD} == "yes" ] ; then
214       set_xio_using_server iodef.xml true
215    else
216       set_xio_using_server iodef.xml false
217    fi
218    cd ${SETTE_DIR}
219    . ./prepare_job.sh input_GYRE.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS}
220    cd ${SETTE_DIR}
221    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
222
223    ## Reproducibility tests for GYRE_PISCES
224    export TEST_NAME="REPRO_4_8"
225    cd ${CONFIG_DIR0}
226    cd ${SETTE_DIR}
227    . ./param.cfg
228    . ./all_functions.sh
229    . ./prepare_exe_dir.sh
230    JOB_FILE=${EXE_DIR}/run_job.sh
231    NPROC=32
232    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
233    cd ${EXE_DIR}
234    set_namelist namelist_cfg cn_exp \"GYREPIS_48\"
235    set_namelist namelist_cfg nn_it000 1
236    set_namelist namelist_cfg nn_itend 60
237    set_namelist namelist_cfg nn_fwb 0
238    set_namelist namelist_cfg ln_ctl .false.
239    set_namelist namelist_cfg ln_clobber .true.
240    set_namelist namelist_cfg ln_linssh .true.
241    set_namelist namelist_cfg ln_read_cfg .false.
242    set_namelist namelist_cfg jpni 4
243    set_namelist namelist_cfg jpnj 8
244    set_namelist namelist_cfg jpnij 32
245    if [ ${USING_MPMD} == "yes" ] ; then
246       set_xio_using_server iodef.xml true
247    else
248       set_xio_using_server iodef.xml false
249    fi
250    cd ${SETTE_DIR}
251    . ./prepare_job.sh input_GYRE.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS}
252    cd ${SETTE_DIR}
253    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
254
255    cd ${SETTE_DIR}
256    export TEST_NAME="REPRO_8_4"
257    . ./prepare_exe_dir.sh
258    JOB_FILE=${EXE_DIR}/run_job.sh
259    NPROC=32
260    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
261    cd ${EXE_DIR}
262    set_namelist namelist_cfg cn_exp \"GYREPIS_84\"
263    set_namelist namelist_cfg nn_it000 1
264    set_namelist namelist_cfg nn_itend 60
265    set_namelist namelist_cfg nn_fwb 0
266    set_namelist namelist_cfg ln_ctl .false.
267    set_namelist namelist_cfg ln_clobber .true.
268    set_namelist namelist_cfg ln_linssh .true.
269    set_namelist namelist_cfg ln_read_cfg .false.
270    set_namelist namelist_cfg jpni 8
271    set_namelist namelist_cfg jpnj 4
272    set_namelist namelist_cfg jpnij 32
273    if [ ${USING_MPMD} == "yes" ] ; then
274       set_xio_using_server iodef.xml true
275    else
276       set_xio_using_server iodef.xml false
277    fi
278    cd ${SETTE_DIR}
279    . ./prepare_job.sh input_GYRE.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS}
280    cd ${SETTE_DIR}
281    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
282
283fi
284
285# TESTS FOR ORCA2_LIM3_PISCES CONFIGURATION
286if [ ${config} -eq 2 ] ;  then
287    ## Restartability tests for ORCA2_LIM3_PISCES
288    export TEST_NAME="LONG"
289    cd ${CONFIG_DIR0}
290    . ./makenemo -m ${CMP_NAM} -n ORCA2LIM3PIS_ST -r ORCA2_LIM3_PISCES -j 8 del_key ${DEL_KEYS}
291    cd ${SETTE_DIR}
292    . ./param.cfg
293    . ./all_functions.sh
294    . ./prepare_exe_dir.sh
295    JOB_FILE=${EXE_DIR}/run_job.sh
296    NPROC=32
297    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
298    cd ${EXE_DIR}
299    set_namelist namelist_cfg cn_exp \"O2L3P_LONG\"
300    set_namelist namelist_cfg nn_it000 1
301    set_namelist namelist_cfg nn_itend 150
302    set_namelist namelist_cfg nn_stock 75
303    set_namelist namelist_cfg ln_clobber .true.
304    set_namelist namelist_cfg ln_read_cfg .true.
305    set_namelist namelist_cfg ln_linssh .false.
306    set_namelist namelist_cfg ln_icebergs .true.
307    set_namelist namelist_cfg nn_fwb 0
308    set_namelist namelist_cfg jpni 4
309    set_namelist namelist_cfg jpnj 8
310    set_namelist namelist_cfg jpnij 32
311    set_namelist namelist_ice_cfg ln_icediachk .true.
312##    set_namelist namelist_ice_cfg ln_icediahsb .true.
313    set_namelist namelist_top_cfg ln_trcdta .false.
314    # put ln_ironsed, ln_river, ln_ndepo, ln_dust to false
315    # if not you need input files, and for tests is not necessary
316    set_namelist namelist_pisces_cfg ln_presatm .false.
317    set_namelist namelist_pisces_cfg ln_varpar .false.
318    set_namelist namelist_pisces_cfg ln_dust .false.
319    set_namelist namelist_pisces_cfg ln_solub .false.
320    set_namelist namelist_pisces_cfg ln_river .false.
321    set_namelist namelist_pisces_cfg ln_ndepo .false.
322    set_namelist namelist_pisces_cfg ln_ironsed .false.
323    set_namelist namelist_pisces_cfg ln_ironice .false.
324    set_namelist namelist_pisces_cfg ln_hydrofe .false.
325    # put ln_pisdmp to false : no restoring to global mean value
326    set_namelist namelist_pisces_cfg ln_pisdmp .false.
327    if [ ${USING_MPMD} == "yes" ] ; then
328       set_xio_using_server iodef.xml true
329    else
330       set_xio_using_server iodef.xml false
331    fi
332    cd ${SETTE_DIR}
333    . ./prepare_job.sh input_ORCA2_LIM3_PISCES.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS}
334   
335    cd ${SETTE_DIR}
336    export TEST_NAME="SHORT"
337    . ./prepare_exe_dir.sh
338    cd ${EXE_DIR}
339    set_namelist namelist_cfg cn_exp \"O2L3P_SHORT\"
340    set_namelist namelist_cfg nn_it000 76
341    set_namelist namelist_cfg nn_itend 150
342    set_namelist namelist_cfg nn_stock 75
343    set_namelist namelist_cfg ln_rstart .true.
344    set_namelist namelist_cfg nn_rstctl 2
345    set_namelist namelist_cfg ln_clobber .true.
346    set_namelist namelist_cfg ln_read_cfg .true.
347    set_namelist namelist_cfg ln_linssh .false.
348    set_namelist namelist_cfg ln_icebergs .true.
349    set_namelist namelist_cfg nn_fwb 0
350    set_namelist namelist_cfg jpni 4
351    set_namelist namelist_cfg jpnj 8
352    set_namelist namelist_cfg jpnij 32
353    set_namelist namelist_ice_cfg ln_icediachk .true.
354##    set_namelist namelist_ice_cfg ln_icediahsb .true.
355    set_namelist namelist_top_cfg ln_rsttr .true.
356    set_namelist namelist_top_cfg nn_rsttr 2
357    set_namelist namelist_cfg cn_ocerst_in \"O2L3P_LONG_00000075_restart\"
358    set_namelist namelist_top_cfg cn_trcrst_in \"O2L3P_LONG_00000075_restart_trc\"
359    set_namelist namelist_ice_cfg cn_icerst_in \"O2L3P_LONG_00000075_restart_ice\"
360    # put ln_ironsed, ln_river, ln_ndepo, ln_dust
361    # if not you need input files, and for tests is not necessary
362    set_namelist namelist_pisces_cfg ln_presatm .false.
363    set_namelist namelist_pisces_cfg ln_varpar .false.
364    set_namelist namelist_pisces_cfg ln_dust .false.
365    set_namelist namelist_pisces_cfg ln_solub .false.
366    set_namelist namelist_pisces_cfg ln_river .false.
367    set_namelist namelist_pisces_cfg ln_ndepo .false.
368    set_namelist namelist_pisces_cfg ln_ironsed .false.
369    set_namelist namelist_pisces_cfg ln_ironice .false.
370    set_namelist namelist_pisces_cfg ln_hydrofe .false.
371    # put ln_pisdmp to false : no restoring to global mean value
372    set_namelist namelist_pisces_cfg ln_pisdmp .false.
373    for (( i=1; i<=$NPROC; i++)) ; do
374        L_NPROC=$(( $i - 1 ))
375        L_NPROC=`printf "%04d\n" ${L_NPROC}`
376        ln -sf ../LONG/O2L3P_LONG_00000075_restart_${L_NPROC}.nc .
377        ln -sf ../LONG/O2L3P_LONG_00000075_restart_trc_${L_NPROC}.nc .
378        ln -sf ../LONG/O2L3P_LONG_00000075_restart_ice_${L_NPROC}.nc .
379        ln -sf ../LONG/O2L3P_LONG_icebergs_00000075_restart_${L_NPROC}.nc O2L3P_LONG_00000075_restart_icebergs_${L_NPROC}.nc
380    done
381    if [ ${USING_MPMD} == "yes" ] ; then
382       set_xio_using_server iodef.xml true
383    else
384       set_xio_using_server iodef.xml false
385    fi
386    cd ${SETTE_DIR}
387    . ./prepare_job.sh input_ORCA2_LIM3_PISCES.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS}
388    cd ${SETTE_DIR}
389    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
390
391    ## Reproducibility tests for ORCA2_LIM3_PISCES
392    export TEST_NAME="REPRO_4_8"
393    cd ${CONFIG_DIR0}
394    cd ${SETTE_DIR}
395    . ./param.cfg
396    . ./all_functions.sh
397    . ./prepare_exe_dir.sh
398    JOB_FILE=${EXE_DIR}/run_job.sh
399    NPROC=32
400    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
401    cd ${EXE_DIR}
402    set_namelist namelist_cfg cn_exp \"O2L3P_48\"
403    set_namelist namelist_cfg nn_it000 1
404    set_namelist namelist_cfg nn_itend 75
405    set_namelist namelist_cfg ln_ctl .false.
406    set_namelist namelist_cfg ln_clobber .true.
407    set_namelist namelist_cfg ln_read_cfg .true.
408    set_namelist namelist_cfg ln_linssh .false.
409    set_namelist namelist_cfg ln_icebergs .true.
410    set_namelist namelist_cfg nn_fwb 0
411    set_namelist namelist_cfg jpni 4
412    set_namelist namelist_cfg jpnj 8
413    set_namelist namelist_cfg jpnij 32
414    set_namelist namelist_ice_cfg ln_icediachk .true.
415##    set_namelist namelist_ice_cfg ln_icediahsb .true.
416    set_namelist namelist_top_cfg ln_trcdta .false.
417    # put ln_ironsed, ln_river, ln_ndepo, ln_dust to false
418    # if not you need input files, and for tests is not necessary
419    set_namelist namelist_pisces_cfg ln_presatm .false.
420    set_namelist namelist_pisces_cfg ln_varpar .false.
421    set_namelist namelist_pisces_cfg ln_dust .false.
422    set_namelist namelist_pisces_cfg ln_solub .false.
423    set_namelist namelist_pisces_cfg ln_river .false.
424    set_namelist namelist_pisces_cfg ln_ndepo .false.
425    set_namelist namelist_pisces_cfg ln_ironsed .false.
426    set_namelist namelist_pisces_cfg ln_ironice .false.
427    set_namelist namelist_pisces_cfg ln_hydrofe .false.
428    # put ln_pisdmp to false : no restoring to global mean value
429    set_namelist namelist_pisces_cfg ln_pisdmp .false.
430    if [ ${USING_MPMD} == "yes" ] ; then
431       set_xio_using_server iodef.xml true
432    else
433       set_xio_using_server iodef.xml false
434    fi
435    cd ${SETTE_DIR}
436    . ./prepare_job.sh input_ORCA2_LIM3_PISCES.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS}
437    cd ${SETTE_DIR}
438    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
439
440    cd ${SETTE_DIR}
441    export TEST_NAME="REPRO_8_4"
442    . ./prepare_exe_dir.sh
443    JOB_FILE=${EXE_DIR}/run_job.sh
444    NPROC=32
445    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
446    cd ${EXE_DIR}
447    set_namelist namelist_cfg cn_exp \"O2L3P_84\"
448    set_namelist namelist_cfg nn_it000 1
449    set_namelist namelist_cfg nn_itend 75
450    set_namelist namelist_cfg ln_clobber .true.
451    set_namelist namelist_cfg ln_read_cfg .true.
452    set_namelist namelist_cfg ln_linssh .false.
453    set_namelist namelist_cfg ln_icebergs .true.
454    set_namelist namelist_cfg nn_fwb 0
455    set_namelist namelist_cfg jpni 8
456    set_namelist namelist_cfg jpnj 4
457    set_namelist namelist_cfg jpnij 32
458    set_namelist namelist_ice_cfg ln_icediachk .true.
459##    set_namelist namelist_ice_cfg ln_icediahsb .true.
460    set_namelist namelist_top_cfg ln_trcdta .false.
461    # put ln_ironsed, ln_river, ln_ndepo, ln_dust to false
462    # if not you need input files, and for tests is not necessary
463    set_namelist namelist_pisces_cfg ln_presatm .false.
464    set_namelist namelist_pisces_cfg ln_varpar .false.
465    set_namelist namelist_pisces_cfg ln_dust .false.
466    set_namelist namelist_pisces_cfg ln_solub .false.
467    set_namelist namelist_pisces_cfg ln_river .false.
468    set_namelist namelist_pisces_cfg ln_ndepo .false.
469    set_namelist namelist_pisces_cfg ln_ironsed .false.
470    set_namelist namelist_pisces_cfg ln_ironice .false.
471    set_namelist namelist_pisces_cfg ln_hydrofe .false.
472    # put ln_pisdmp to false : no restoring to global mean value
473    set_namelist namelist_pisces_cfg ln_pisdmp .false.
474    if [ ${USING_MPMD} == "yes" ] ; then
475       set_xio_using_server iodef.xml true
476    else
477       set_xio_using_server iodef.xml false
478    fi
479    cd ${SETTE_DIR}
480    . ./prepare_job.sh input_ORCA2_LIM3_PISCES.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS}
481    cd ${SETTE_DIR}
482    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
483fi
484
485# TESTS FOR ORCA2_OFF_PISCES CONFIGURATION
486if [ ${config} -eq 3 ] ;  then
487    ## Restartability tests for ORCA2_OFF_PISCES
488    export TEST_NAME="LONG"
489    cd ${CONFIG_DIR0}
490    . ./makenemo -m ${CMP_NAM} -n ORCA2OFFPIS_ST -r ORCA2_OFF_PISCES -j 8 del_key ${DEL_KEYS}
491    cd ${SETTE_DIR}
492    . ./param.cfg
493    . ./all_functions.sh
494    . ./prepare_exe_dir.sh
495    JOB_FILE=${EXE_DIR}/run_job.sh
496    NPROC=32
497    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
498    cd ${EXE_DIR}
499    set_namelist namelist_cfg cn_exp \"OFFP_LONG\"
500    set_namelist namelist_cfg nn_it000 1
501    set_namelist namelist_cfg nn_itend 40
502    set_namelist namelist_cfg nn_stock 20
503    set_namelist namelist_cfg ln_clobber .true.
504    set_namelist namelist_cfg ln_read_cfg .true.
505    set_namelist namelist_cfg ln_linssh .true.
506    set_namelist namelist_cfg jpni 4
507    set_namelist namelist_cfg jpnj 8
508    set_namelist namelist_cfg jpnij 32
509    set_namelist namelist_top_cfg ln_trcdta .false.
510    # put ln_ironsed, ln_river, ln_ndepo, ln_dust to false
511    # if not you need input files, and for tests is not necessary
512    set_namelist namelist_pisces_cfg ln_presatm .false.
513    set_namelist namelist_pisces_cfg ln_varpar .false.
514    set_namelist namelist_pisces_cfg ln_dust .false.
515    set_namelist namelist_pisces_cfg ln_solub .false.
516    set_namelist namelist_pisces_cfg ln_river .false.
517    set_namelist namelist_pisces_cfg ln_ndepo .false.
518    set_namelist namelist_pisces_cfg ln_ironsed .false.
519    set_namelist namelist_pisces_cfg ln_ironice .false.
520    set_namelist namelist_pisces_cfg ln_hydrofe .false.
521    # put ln_pisdmp to false : no restoring to global mean value
522    set_namelist namelist_pisces_cfg ln_pisdmp .false.
523    if [ ${USING_MPMD} == "yes" ] ; then
524       set_xio_using_server iodef.xml true
525    else
526       set_xio_using_server iodef.xml false
527    fi
528    cd ${SETTE_DIR}
529    . ./prepare_job.sh input_ORCA2_OFF_PISCES.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS}
530   
531    cd ${SETTE_DIR}
532    export TEST_NAME="SHORT"
533    . ./prepare_exe_dir.sh
534    cd ${EXE_DIR}
535    set_namelist namelist_cfg cn_exp \"OFFP_SHORT\"
536    set_namelist namelist_cfg nn_it000 21
537    set_namelist namelist_cfg nn_itend 40
538    set_namelist namelist_cfg nn_stock 20
539    set_namelist namelist_cfg ln_clobber .true.
540    set_namelist namelist_cfg ln_read_cfg .true.
541    set_namelist namelist_cfg ln_linssh .true.
542    set_namelist namelist_cfg jpni 4
543    set_namelist namelist_cfg jpnj 8
544    set_namelist namelist_cfg jpnij 32
545    set_namelist namelist_top_cfg ln_rsttr .true.
546    set_namelist namelist_top_cfg nn_rsttr 2
547    set_namelist namelist_top_cfg cn_trcrst_in \"OFFP_LONG_00000020_restart_trc\"
548    for (( i=1; i<=$NPROC; i++)) ; do
549        L_NPROC=$(( $i - 1 ))
550        L_NPROC=`printf "%04d\n" ${L_NPROC}`
551        ln -sf ../LONG/OFFP_LONG_00000020_restart_trc_${L_NPROC}.nc .
552    done
553    # put ln_ironsed, ln_river, ln_ndepo, ln_dust
554    # if not you need input files, and for tests is not necessary
555    set_namelist namelist_pisces_cfg ln_presatm .false.
556    set_namelist namelist_pisces_cfg ln_varpar .false.
557    set_namelist namelist_pisces_cfg ln_dust .false.
558    set_namelist namelist_pisces_cfg ln_solub .false.
559    set_namelist namelist_pisces_cfg ln_river .false.
560    set_namelist namelist_pisces_cfg ln_ndepo .false.
561    set_namelist namelist_pisces_cfg ln_ironsed .false.
562    set_namelist namelist_pisces_cfg ln_ironice .false.
563    set_namelist namelist_pisces_cfg ln_hydrofe .false.
564    # put ln_pisdmp to false : no restoring to global mean value
565    set_namelist namelist_pisces_cfg ln_pisdmp .false.
566    if [ ${USING_MPMD} == "yes" ] ; then
567       set_xio_using_server iodef.xml true
568    else
569       set_xio_using_server iodef.xml false
570    fi
571    cd ${SETTE_DIR}
572    . ./prepare_job.sh input_ORCA2_OFF_PISCES.cfg $NPROC ${TEST_NAME}  ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS}
573    cd ${SETTE_DIR}
574    . ./fcm_job.sh $NPROC  ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
575
576    ## Reproducibility tests for ORCA2_OFF_PISCES
577    export TEST_NAME="REPRO_4_8"
578    cd ${CONFIG_DIR0}
579    cd ${SETTE_DIR}
580    . ./param.cfg
581    . ./all_functions.sh
582    . ./prepare_exe_dir.sh
583    JOB_FILE=${EXE_DIR}/run_job.sh
584    NPROC=32
585    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
586    cd ${EXE_DIR}
587    set_namelist namelist_cfg cn_exp \"OFFP_48\"
588    set_namelist namelist_cfg nn_it000 1
589    set_namelist namelist_cfg nn_itend 40
590    set_namelist namelist_cfg ln_ctl .false.
591    set_namelist namelist_cfg ln_clobber .true.
592    set_namelist namelist_cfg ln_read_cfg .true.
593    set_namelist namelist_cfg ln_linssh .true.
594    set_namelist namelist_cfg jpni 4
595    set_namelist namelist_cfg jpnj 8
596    set_namelist namelist_cfg jpnij 32
597    set_namelist namelist_top_cfg ln_trcdta .false.
598    # put ln_ironsed, ln_river, ln_ndepo, ln_dust to false
599    # if not you need input files, and for tests is not necessary
600    set_namelist namelist_pisces_cfg ln_presatm .false.
601    set_namelist namelist_pisces_cfg ln_varpar .false.
602    set_namelist namelist_pisces_cfg ln_dust .false.
603    set_namelist namelist_pisces_cfg ln_solub .false.
604    set_namelist namelist_pisces_cfg ln_river .false.
605    set_namelist namelist_pisces_cfg ln_ndepo .false.
606    set_namelist namelist_pisces_cfg ln_ironsed .false.
607    set_namelist namelist_pisces_cfg ln_ironice .false.
608    set_namelist namelist_pisces_cfg ln_hydrofe .false.
609    # put ln_pisdmp to false : no restoring to global mean value
610    set_namelist namelist_pisces_cfg ln_pisdmp .false.
611    if [ ${USING_MPMD} == "yes" ] ; then
612       set_xio_using_server iodef.xml true
613    else
614       set_xio_using_server iodef.xml false
615    fi
616    cd ${SETTE_DIR}
617    . ./prepare_job.sh input_ORCA2_OFF_PISCES.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS}
618    cd ${SETTE_DIR}
619    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
620
621    cd ${SETTE_DIR}
622    export TEST_NAME="REPRO_8_4"
623    . ./prepare_exe_dir.sh
624    JOB_FILE=${EXE_DIR}/run_job.sh
625    NPROC=32
626    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
627    cd ${EXE_DIR}
628    set_namelist namelist_cfg cn_exp \"OFFP_84\"
629    set_namelist namelist_cfg nn_it000 1
630    set_namelist namelist_cfg nn_itend 40
631    set_namelist namelist_cfg ln_ctl .false.
632    set_namelist namelist_cfg ln_clobber .true.
633    set_namelist namelist_cfg ln_read_cfg .true.
634    set_namelist namelist_cfg ln_linssh .true.
635    set_namelist namelist_cfg jpni 8
636    set_namelist namelist_cfg jpnj 4
637    set_namelist namelist_cfg jpnij 32
638    set_namelist namelist_top_cfg ln_trcdta .false.
639    # put ln_ironsed, ln_river, ln_ndepo, ln_dust to false
640    # if not you need input files, and for tests is not necessary
641    set_namelist namelist_pisces_cfg ln_presatm .false.
642    set_namelist namelist_pisces_cfg ln_varpar .false.
643    set_namelist namelist_pisces_cfg ln_dust .false.
644    set_namelist namelist_pisces_cfg ln_solub .false.
645    set_namelist namelist_pisces_cfg ln_river .false.
646    set_namelist namelist_pisces_cfg ln_ndepo .false.
647    set_namelist namelist_pisces_cfg ln_ironsed .false.
648    set_namelist namelist_pisces_cfg ln_ironice .false.
649    set_namelist namelist_pisces_cfg ln_hydrofe .false.
650    # put ln_pisdmp to false : no restoring to global mean value
651    set_namelist namelist_pisces_cfg ln_pisdmp .false.
652    if [ ${USING_MPMD} == "yes" ] ; then
653       set_xio_using_server iodef.xml true
654    else
655       set_xio_using_server iodef.xml false
656    fi
657    cd ${SETTE_DIR}
658    . ./prepare_job.sh input_ORCA2_OFF_PISCES.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS}
659    cd ${SETTE_DIR}
660    . ./fcm_job.sh $NPROC  ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
661fi
662
663# TESTS FOR AMM12 CONFIGURATION
664if [ ${config} -eq 4 ] ;  then
665    ## Restartability tests for AMM12
666    export TEST_NAME="LONG"
667    cd ${CONFIG_DIR0}
668    . ./makenemo -m ${CMP_NAM} -n AMM12_ST -r AMM12 -j 8 del_key ${DEL_KEYS}
669    cd ${SETTE_DIR}
670    . ./param.cfg
671    . ./all_functions.sh
672    . ./prepare_exe_dir.sh
673    JOB_FILE=${EXE_DIR}/run_job.sh
674    NPROC=32
675    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
676    cd ${EXE_DIR}
677    set_namelist namelist_cfg cn_exp \"AMM12_LONG\"
678    set_namelist namelist_cfg nn_it000 1
679    set_namelist namelist_cfg nn_itend 576
680    set_namelist namelist_cfg nn_stock 288
681    set_namelist namelist_cfg nn_fwb 0
682    set_namelist namelist_cfg ln_ctl .false.
683    set_namelist namelist_cfg ln_clobber .true.
684    set_namelist namelist_cfg ln_read_cfg .true.
685    set_namelist namelist_cfg ln_linssh .false.
686##SF
687    set_namelist namelist_cfg ln_lin .true.
688    set_namelist namelist_cfg ln_loglayer .false.
689##SF
690    set_namelist namelist_cfg jpni 4
691    set_namelist namelist_cfg jpnj 8
692    set_namelist namelist_cfg jpnij 32
693    if [ ${USING_MPMD} == "yes" ] ; then
694       set_xio_using_server iodef.xml true
695    else
696       set_xio_using_server iodef.xml false
697    fi
698    cd ${SETTE_DIR}
699    . ./prepare_job.sh input_AMM12.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS}
700
701    cd ${SETTE_DIR}
702    export TEST_NAME="SHORT"
703    . ./prepare_exe_dir.sh
704    cd ${EXE_DIR}
705    set_namelist namelist_cfg cn_exp \"AMM12_SHORT\"
706    set_namelist namelist_cfg nn_it000 289
707    set_namelist namelist_cfg nn_itend 576
708    set_namelist namelist_cfg nn_fwb 0
709    set_namelist namelist_cfg ln_ctl .false.
710    set_namelist namelist_cfg ln_clobber .true.
711    set_namelist namelist_cfg ln_read_cfg .true.
712    set_namelist namelist_cfg ln_linssh .false.
713##SF
714    set_namelist namelist_cfg ln_lin .true.
715    set_namelist namelist_cfg ln_loglayer .false.
716##SF
717    set_namelist namelist_cfg jpni 4
718    set_namelist namelist_cfg jpnj 8
719    set_namelist namelist_cfg jpnij 32
720    set_namelist namelist_cfg ln_rstart .true.
721    set_namelist namelist_cfg nn_rstctl 2
722    set_namelist namelist_cfg cn_ocerst_in \"AMM12_LONG_00000288_restart\"
723    set_namelist namelist_cfg nn_date0 20120102
724    for (( i=1; i<=$NPROC; i++)) ; do
725        L_NPROC=$(( $i - 1 ))
726        L_NPROC=`printf "%04d\n" ${L_NPROC}`
727        ln -sf ../LONG/AMM12_LONG_00000288_restart_${L_NPROC}.nc .
728    done
729    if [ ${USING_MPMD} == "yes" ] ; then
730       set_xio_using_server iodef.xml true
731    else
732       set_xio_using_server iodef.xml false
733    fi
734    cd ${SETTE_DIR}
735    . ./prepare_job.sh input_AMM12.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS}
736    cd ${SETTE_DIR}
737    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
738
739## Reproducibility tests for AMM12
740    export TEST_NAME="REPRO_8_4"
741    cd ${CONFIG_DIR0}
742    cd ${SETTE_DIR}
743    . ./param.cfg
744    . ./all_functions.sh
745    . ./prepare_exe_dir.sh
746    JOB_FILE=${EXE_DIR}/run_job.sh
747    NPROC=32
748    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
749    cd ${EXE_DIR}
750    set_namelist namelist_cfg cn_exp \"AMM12_84\"
751    set_namelist namelist_cfg nn_it000 1
752    set_namelist namelist_cfg nn_itend 576
753    set_namelist namelist_cfg nn_fwb 0
754    set_namelist namelist_cfg ln_ctl .false.
755    set_namelist namelist_cfg ln_clobber .true.
756    set_namelist namelist_cfg ln_read_cfg .true.
757    set_namelist namelist_cfg ln_linssh .false.
758##SF
759    set_namelist namelist_cfg ln_lin .true.
760    set_namelist namelist_cfg ln_loglayer .false.
761##SF
762    set_namelist namelist_cfg jpni 8
763    set_namelist namelist_cfg jpnj 4
764    set_namelist namelist_cfg jpnij 32
765    if [ ${USING_MPMD} == "yes" ] ; then
766       set_xio_using_server iodef.xml true
767    else
768       set_xio_using_server iodef.xml false
769    fi
770    cd ${SETTE_DIR}
771    . ./prepare_job.sh input_AMM12.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS}
772    cd ${SETTE_DIR}
773    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
774
775    cd ${SETTE_DIR}
776    export TEST_NAME="REPRO_4_8"
777    . ./prepare_exe_dir.sh
778    JOB_FILE=${EXE_DIR}/run_job.sh
779    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
780    cd ${EXE_DIR}
781    set_namelist namelist_cfg cn_exp \"AMM12_48\"
782    set_namelist namelist_cfg nn_it000 1
783    set_namelist namelist_cfg nn_itend 576
784    set_namelist namelist_cfg nn_fwb 0
785    set_namelist namelist_cfg ln_ctl .false.
786    set_namelist namelist_cfg ln_clobber .true.
787    set_namelist namelist_cfg ln_read_cfg .true.
788    set_namelist namelist_cfg ln_linssh .false.
789##SF
790    set_namelist namelist_cfg ln_lin .true.
791    set_namelist namelist_cfg ln_loglayer .false.
792##SF
793    set_namelist namelist_cfg jpni 4
794    set_namelist namelist_cfg jpnj 8
795    set_namelist namelist_cfg jpnij 32
796    if [ ${USING_MPMD} == "yes" ] ; then
797       set_xio_using_server iodef.xml true
798    else
799       set_xio_using_server iodef.xml false
800    fi
801    cd ${SETTE_DIR}
802    . ./prepare_job.sh input_AMM12.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS}
803    cd ${SETTE_DIR}
804    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
805fi
806
807
808# TESTS FOR ORCA2_SAS_LIM3 CONFIGURATION
809if [ ${config} -eq 5 ] ;  then
810    ## Restartability tests for SAS
811    export TEST_NAME="LONG"
812    cd ${CONFIG_DIR0}
813    . ./makenemo -m ${CMP_NAM} -n SAS_ST -r ORCA2_SAS_LIM3 -j 8 del_key ${DEL_KEYS}
814    cd ${SETTE_DIR}
815    . ./param.cfg
816    . ./all_functions.sh
817    . ./prepare_exe_dir.sh
818    JOB_FILE=${EXE_DIR}/run_job.sh
819    NPROC=32
820    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
821    cd ${EXE_DIR}
822    set_namelist namelist_cfg cn_exp \"SAS\"
823    set_namelist namelist_cfg nn_it000 1
824    set_namelist namelist_cfg nn_itend 240
825    set_namelist namelist_cfg nn_stock 120
826    set_namelist namelist_cfg ln_ctl .false.
827    set_namelist namelist_cfg ln_clobber .true.
828    set_namelist namelist_cfg ln_read_cfg .true.
829    set_namelist namelist_cfg ln_linssh .true.
830    set_namelist namelist_cfg nn_fwb 0
831    set_namelist namelist_cfg jpni 4
832    set_namelist namelist_cfg jpnj 8
833    set_namelist namelist_cfg jpnij 32
834    set_namelist namelist_ice_cfg ln_icediachk .true.
835    if [ ${USING_MPMD} == "yes" ] ; then
836       set_xio_using_server iodef.xml true
837    else
838       set_xio_using_server iodef.xml false
839    fi
840    cd ${SETTE_DIR}
841    . ./prepare_job.sh input_SAS.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS}
842
843    cd ${SETTE_DIR}
844    export TEST_NAME="SHORT"
845    . ./prepare_exe_dir.sh
846    cd ${EXE_DIR}
847    set_namelist namelist_cfg cn_exp \"SAS\"
848    set_namelist namelist_cfg nn_it000 121
849    set_namelist namelist_cfg nn_itend 240
850    set_namelist namelist_cfg ln_ctl .false.
851    set_namelist namelist_cfg ln_clobber .true.
852    set_namelist namelist_cfg ln_read_cfg .true.
853    set_namelist namelist_cfg ln_linssh .true.
854    set_namelist namelist_cfg nn_fwb 0
855    set_namelist namelist_cfg jpni 4
856    set_namelist namelist_cfg jpnj 8
857    set_namelist namelist_cfg jpnij 32
858    set_namelist namelist_cfg ln_rstart .true.
859    set_namelist namelist_cfg nn_rstctl 2
860    set_namelist namelist_cfg nn_date0 010109
861    set_namelist namelist_cfg cn_ocerst_in \"SAS_00000120_restart\"
862    set_namelist namelist_ice_cfg cn_icerst_in \"SAS_00000120_restart_ice\"
863    if [ ${USING_MPMD} == "yes" ] ; then
864       set_xio_using_server iodef.xml true
865    else
866       set_xio_using_server iodef.xml false
867    fi
868    for (( i=1; i<=$NPROC; i++)) ; do
869        L_NPROC=$(( $i - 1 ))
870        L_NPROC=`printf "%04d\n" ${L_NPROC}`
871        ln -sf ../LONG/SAS_00000120_restart_${L_NPROC}.nc .
872        ln -sf ../LONG/SAS_00000120_restart_ice_${L_NPROC}.nc .
873    done
874    cd ${SETTE_DIR}
875    . ./prepare_job.sh input_SAS.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS}
876    cd ${SETTE_DIR}
877    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
878fi
879
880# TESTS FOR ISOMIP CONFIGURATION
881if [ ${config} -eq 6 ] ;  then
882    ## Restartability tests for ISOMIP
883    export TEST_NAME="LONG"
884    cd ${CONFIG_DIR0}
885    . ./makenemo -m ${CMP_NAM} -n ISOMIP_ST -r ISOMIP -a TEST_CASES -j 8 del_key ${DEL_KEYS}
886    cd ${SETTE_DIR}
887    . ./param.cfg
888    . ./all_functions.sh
889    . ./prepare_exe_dir.sh
890    JOB_FILE=${EXE_DIR}/run_job.sh
891    NPROC=15
892    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
893    cd ${EXE_DIR}
894    set_namelist namelist_cfg cn_exp \"ISOMIP_LONG\"
895    set_namelist namelist_cfg nn_it000 1
896    set_namelist namelist_cfg nn_itend 96
897    set_namelist namelist_cfg nn_stock 48
898    set_namelist namelist_cfg ln_clobber .true.
899    set_namelist namelist_cfg ln_read_cfg .false.
900    set_namelist namelist_cfg ln_icebergs .false.
901    set_namelist namelist_cfg ln_bergdia .false.
902    set_namelist namelist_cfg jpni 5
903    set_namelist namelist_cfg jpnj 3
904    set_namelist namelist_cfg jpnij 15
905    if [ ${USING_MPMD} == "yes" ] ; then
906       set_xio_using_server iodef.xml true
907    else
908       set_xio_using_server iodef.xml false
909    fi
910    cd ${SETTE_DIR}
911    . ./prepare_job.sh input_ISOMIP.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS}
912
913    cd ${SETTE_DIR}
914    export TEST_NAME="SHORT"
915    . ./prepare_exe_dir.sh
916    cd ${EXE_DIR}
917    set_namelist namelist_cfg cn_exp \"ISOMIP_SHORT\"
918    set_namelist namelist_cfg nn_it000 49
919    set_namelist namelist_cfg nn_itend 96
920    set_namelist namelist_cfg nn_stock 48
921    set_namelist namelist_cfg ln_rstart .true.
922    set_namelist namelist_cfg nn_rstctl 2
923    set_namelist namelist_cfg ln_clobber .true.
924    set_namelist namelist_cfg ln_read_cfg .false.
925    set_namelist namelist_cfg ln_bergdia .false.
926    set_namelist namelist_cfg jpni 5
927    set_namelist namelist_cfg jpnj 3
928    set_namelist namelist_cfg jpnij 15
929    set_namelist namelist_cfg cn_ocerst_in \"ISOMIP_LONG_00000048_restart\"
930    if [ ${USING_MPMD} == "yes" ] ; then
931       set_xio_using_server iodef.xml true
932    else
933       set_xio_using_server iodef.xml false
934    fi
935    for (( i=1; i<=$NPROC; i++)) ; do
936        L_NPROC=$(( $i - 1 ))
937        L_NPROC=`printf "%04d\n" ${L_NPROC}`
938        ln -sf ../LONG/ISOMIP_LONG_00000048_restart_${L_NPROC}.nc .
939    done
940    if [ ${USING_MPMD} == "yes" ] ; then
941       set_xio_using_server iodef.xml true
942    else
943       set_xio_using_server iodef.xml false
944    fi
945    cd ${SETTE_DIR}
946    . ./prepare_job.sh input_ISOMIP.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS}
947    cd ${SETTE_DIR}
948    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
949
950    ## Reproducibility tests for ISOMIP
951    export TEST_NAME="REPRO_7_3"
952    cd ${CONFIG_DIR0}
953    cd ${SETTE_DIR}
954    . ./param.cfg
955    . ./all_functions.sh
956    . ./prepare_exe_dir.sh
957    JOB_FILE=${EXE_DIR}/run_job.sh
958    NPROC=21
959    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
960    cd ${EXE_DIR}
961    set_namelist namelist_cfg cn_exp \"ISOMIP_73\"
962    set_namelist namelist_cfg nn_it000 1
963    set_namelist namelist_cfg nn_itend 48
964    set_namelist namelist_cfg ln_ctl .false.
965    set_namelist namelist_cfg ln_clobber .true.
966    set_namelist namelist_cfg ln_read_cfg .false.
967    set_namelist namelist_cfg ln_bergdia .false.
968    set_namelist namelist_cfg jpni 7
969    set_namelist namelist_cfg jpnj 3
970    set_namelist namelist_cfg jpnij 21
971    if [ ${USING_MPMD} == "yes" ] ; then
972       set_xio_using_server iodef.xml true
973    else
974       set_xio_using_server iodef.xml false
975    fi
976    cd ${SETTE_DIR}
977    . ./prepare_job.sh input_ISOMIP.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS}
978    cd ${SETTE_DIR}
979    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
980
981    cd ${SETTE_DIR}
982    export TEST_NAME="REPRO_8_4"
983    . ./prepare_exe_dir.sh
984    JOB_FILE=${EXE_DIR}/run_job.sh
985    NPROC=32
986    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
987    cd ${EXE_DIR}
988    set_namelist namelist_cfg cn_exp \"ISOMIP_84\"
989    set_namelist namelist_cfg nn_it000 1
990    set_namelist namelist_cfg nn_itend 48
991    set_namelist namelist_cfg ln_ctl .false.
992    set_namelist namelist_cfg ln_clobber .true.
993    set_namelist namelist_cfg ln_read_cfg .false.
994    set_namelist namelist_cfg ln_bergdia .false.
995    set_namelist namelist_cfg jpni 8
996    set_namelist namelist_cfg jpnj 4
997    set_namelist namelist_cfg jpnij 32
998    if [ ${USING_MPMD} == "yes" ] ; then
999       set_xio_using_server iodef.xml true
1000    else
1001       set_xio_using_server iodef.xml false
1002    fi
1003    cd ${SETTE_DIR}
1004    . ./prepare_job.sh input_ISOMIP.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS}
1005    cd ${SETTE_DIR}
1006    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
1007
1008fi
1009
1010## Test assimilation interface code, OBS and ASM for reproducibility
1011## Restartability not tested (ASM code not restartable while increments are being applied)
1012if [ ${config} -eq 7 ] ; then
1013   ## Reproducibility tests for ORCA2_LIM3_OBS
1014    export TEST_NAME="REPRO_4_8"
1015    cd ${CONFIG_DIR0}
1016    . ./makenemo -m ${CMP_NAM} -n ORCA2_LIM3_OBS_ST -r ORCA2_LIM3_PISCES -d "OPA_SRC LIM_SRC_3"  -j 8 add_key "key_asminc" del_key "key_top"
1017    cd ${SETTE_DIR}
1018    . ./param.cfg
1019    . ./all_functions.sh
1020    . ./prepare_exe_dir.sh
1021    JOB_FILE=${EXE_DIR}/run_job.sh
1022    NPROC=32
1023    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
1024    cd ${EXE_DIR}
1025    set_namelist namelist_cfg cn_exp \"O2L3OBS_48\"
1026    set_namelist namelist_cfg nn_it000 1
1027    set_namelist namelist_cfg nn_itend 75
1028    set_namelist namelist_cfg nn_fwb 0
1029    set_namelist namelist_cfg ln_ctl .false.
1030    set_namelist namelist_cfg ln_clobber .true.
1031    set_namelist namelist_cfg ln_read_cfg .true.
1032    set_namelist namelist_cfg ln_linssh .false.
1033    set_namelist namelist_cfg ln_icebergs .false.
1034    set_namelist namelist_cfg jpni 4
1035    set_namelist namelist_cfg jpnj 8
1036    set_namelist namelist_cfg jpnij 32
1037    set_namelist namelist_cfg ln_diaobs .true.
1038    set_namelist namelist_cfg ln_t3d .true.
1039    set_namelist namelist_cfg ln_s3d .true.
1040    set_namelist namelist_cfg ln_sst .true.
1041    set_namelist namelist_cfg ln_sla .true.
1042    set_namelist namelist_cfg ln_sic .true.
1043    set_namelist namelist_cfg ln_vel3d .true.
1044    set_namelist namelist_cfg ln_bkgwri .true.
1045    set_namelist namelist_cfg ln_trainc .true.
1046    set_namelist namelist_cfg ln_dyninc .true.
1047    set_namelist namelist_cfg ln_sshinc .true.
1048    set_namelist namelist_cfg ln_asmiau .true.
1049    #remove all useless options for pisces (due to ORCA2_LIM3_PISCES reference configuration)
1050    set_namelist namelist_top_cfg ln_trcdta .false.
1051    # put ln_ironsed, ln_river, ln_ndepo, ln_dust to false
1052    # if not you need input files, and for tests is not necessary
1053    set_namelist namelist_pisces_cfg ln_presatm .false.
1054    set_namelist namelist_pisces_cfg ln_varpar .false.
1055    set_namelist namelist_pisces_cfg ln_dust .false.
1056    set_namelist namelist_pisces_cfg ln_solub .false.
1057    set_namelist namelist_pisces_cfg ln_river .false.
1058    set_namelist namelist_pisces_cfg ln_ndepo .false.
1059    set_namelist namelist_pisces_cfg ln_ironsed .false.
1060    set_namelist namelist_pisces_cfg ln_ironice .false.
1061    set_namelist namelist_pisces_cfg ln_hydrofe .false.
1062    if [ ${USING_MPMD} == "yes" ] ; then
1063       set_xio_using_server iodef.xml true
1064    else
1065       set_xio_using_server iodef.xml false
1066    fi
1067    cd ${SETTE_DIR}
1068    . ./prepare_job.sh input_ORCA2_LIM3_OBS.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS}
1069    cd ${SETTE_DIR}
1070    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
1071
1072   cd ${SETTE_DIR}
1073    export TEST_NAME="REPRO_8_4"
1074    . ./prepare_exe_dir.sh
1075    JOB_FILE=${EXE_DIR}/run_job.sh
1076    NPROC=32
1077    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
1078    cd ${EXE_DIR}
1079    set_namelist namelist_cfg cn_exp \"O2L3OBS_84\"
1080    set_namelist namelist_cfg nn_it000 1
1081    set_namelist namelist_cfg nn_itend 75
1082    set_namelist namelist_cfg nn_fwb 0
1083    set_namelist namelist_cfg ln_ctl .false.
1084    set_namelist namelist_cfg ln_clobber .true.
1085    set_namelist namelist_cfg ln_read_cfg .true.
1086    set_namelist namelist_cfg ln_linssh .false.
1087    set_namelist namelist_cfg ln_icebergs .false.
1088    set_namelist namelist_cfg jpni 8
1089    set_namelist namelist_cfg jpnj 4
1090    set_namelist namelist_cfg jpnij 32
1091    set_namelist namelist_cfg ln_diaobs .true.
1092    set_namelist namelist_cfg ln_t3d .true.
1093    set_namelist namelist_cfg ln_s3d .true.
1094    set_namelist namelist_cfg ln_sst .true.
1095    set_namelist namelist_cfg ln_sla .true.
1096    set_namelist namelist_cfg ln_sic .true.
1097    set_namelist namelist_cfg ln_vel3d .true.
1098    set_namelist namelist_cfg ln_bkgwri .true.
1099    set_namelist namelist_cfg ln_trainc .true.
1100    set_namelist namelist_cfg ln_dyninc .true.
1101    set_namelist namelist_cfg ln_sshinc .true.
1102    set_namelist namelist_cfg ln_asmiau .true.
1103    #remove all useless options for pisces (due to ORCA2_LIM3_PISCES reference configuration)
1104    set_namelist namelist_top_cfg ln_trcdta .false.
1105    # put ln_ironsed, ln_river, ln_ndepo, ln_dust to false
1106    # if not you need input files, and for tests is not necessary
1107    set_namelist namelist_pisces_cfg ln_presatm .false.
1108    set_namelist namelist_pisces_cfg ln_varpar .false.
1109    set_namelist namelist_pisces_cfg ln_dust .false.
1110    set_namelist namelist_pisces_cfg ln_solub .false.
1111    set_namelist namelist_pisces_cfg ln_river .false.
1112    set_namelist namelist_pisces_cfg ln_ndepo .false.
1113    set_namelist namelist_pisces_cfg ln_ironsed .false.
1114    set_namelist namelist_pisces_cfg ln_ironice .false.
1115    set_namelist namelist_pisces_cfg ln_hydrofe .false.
1116    if [ ${USING_MPMD} == "yes" ] ; then
1117       set_xio_using_server iodef.xml true
1118    else
1119       set_xio_using_server iodef.xml false
1120    fi
1121    cd ${SETTE_DIR}
1122    . ./prepare_job.sh input_ORCA2_LIM3_OBS.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS}
1123    cd ${SETTE_DIR}
1124    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
1125fi
1126# TEST FOR ORCA2_LIM3_AGRIF : AGULHAS AGRIF
1127if [ ${config} -eq 8 ] ;  then
1128## Restartability tests
1129    export TEST_NAME="LONG"
1130    cd ${CONFIG_DIR0}
1131    . ./makenemo -m ${CMP_NAM} -n ORCA2AGR_ST -r ORCA2_LIM3_PISCES -d "OPA_SRC LIM_SRC_3 NST_SRC" -j 8 add_key "key_agrif" del_key "key_top"
1132    cd ${SETTE_DIR}
1133    . ./param.cfg
1134    . ./all_functions.sh
1135    . ./prepare_exe_dir.sh
1136    JOB_FILE=${EXE_DIR}/run_job.sh
1137    NPROC=4
1138    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
1139    cd ${EXE_DIR}
1140    set_namelist namelist_cfg cn_exp \"O2AGRIF_LONG\"
1141    set_namelist namelist_cfg nn_it000 1
1142    set_namelist namelist_cfg nn_itend 150
1143    set_namelist namelist_cfg nn_stock 75
1144    set_namelist namelist_cfg ln_clobber .true.
1145    set_namelist namelist_cfg ln_read_cfg .true.
1146    set_namelist namelist_cfg nn_fwb 0
1147    set_namelist namelist_cfg jpni 2
1148    set_namelist namelist_cfg jpnj 2
1149    set_namelist namelist_cfg jpnij 4
1150    set_namelist 1_namelist_cfg cn_exp \"O2AGRIF_LONG\"
1151    set_namelist 1_namelist_cfg nn_it000 1
1152    set_namelist 1_namelist_cfg nn_itend 300
1153    set_namelist 1_namelist_cfg nn_stock 150
1154    set_namelist 1_namelist_cfg nn_fsbc 1
1155    set_namelist 1_namelist_cfg ln_ctl .false.
1156    set_namelist 1_namelist_cfg ln_clobber .true.
1157    set_namelist 1_namelist_cfg ln_read_cfg .true.
1158    set_namelist 1_namelist_cfg ln_linssh .false.
1159    set_namelist 1_namelist_cfg ln_zdfiwm .false.
1160    set_namelist 1_namelist_cfg ln_hpg_sco .true.
1161    set_namelist 1_namelist_cfg ln_hpg_zps .false.
1162#
1163    if [ ${USING_MPMD} == "yes" ] ; then
1164       set_xio_using_server iodef.xml true
1165    else
1166       set_xio_using_server iodef.xml false
1167    fi
1168    cd ${SETTE_DIR}
1169    . ./prepare_job.sh input_ORCA2_LIM3_AGRIF.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS}
1170   
1171    cd ${SETTE_DIR}
1172    export TEST_NAME="SHORT"
1173    . ./prepare_exe_dir.sh
1174    cd ${EXE_DIR}
1175    set_namelist namelist_cfg cn_exp \"O2AGRIF_SHORT\"
1176    set_namelist namelist_cfg nn_it000 76
1177    set_namelist namelist_cfg nn_itend 150
1178    set_namelist namelist_cfg nn_stock 75
1179    set_namelist namelist_cfg ln_rstart .true.
1180    set_namelist namelist_cfg nn_rstctl 2
1181    set_namelist namelist_cfg ln_clobber .true.
1182    set_namelist namelist_cfg ln_read_cfg .true.
1183    set_namelist namelist_cfg ln_linssh .false.
1184    set_namelist namelist_cfg nn_fwb 0
1185    set_namelist namelist_cfg jpni 2
1186    set_namelist namelist_cfg jpnj 2
1187    set_namelist namelist_cfg jpnij 4
1188    set_namelist 1_namelist_cfg cn_exp \"O2AGRIF_SHORT\"
1189    set_namelist 1_namelist_cfg nn_it000 151
1190    set_namelist 1_namelist_cfg nn_itend 300
1191    set_namelist 1_namelist_cfg nn_stock 150
1192    set_namelist 1_namelist_cfg nn_fsbc 1
1193    set_namelist 1_namelist_cfg ln_rstart .true.
1194    set_namelist 1_namelist_cfg nn_rstctl 2
1195    set_namelist 1_namelist_cfg ln_clobber .true.
1196    set_namelist 1_namelist_cfg ln_read_cfg .true.
1197    set_namelist 1_namelist_cfg ln_zdfiwm .false.
1198    set_namelist 1_namelist_cfg ln_hpg_sco .true.
1199    set_namelist 1_namelist_cfg ln_hpg_zps .false.
1200    set_namelist namelist_cfg cn_ocerst_in \"O2AGRIF_LONG_00000075_restart\"
1201    set_namelist namelist_ice_cfg cn_icerst_in \"O2AGRIF_LONG_00000075_restart_ice\"
1202    set_namelist 1_namelist_cfg cn_ocerst_in \"O2AGRIF_LONG_00000150_restart\"
1203    set_namelist 1_namelist_ice_cfg cn_icerst_in \"O2AGRIF_LONG_00000150_restart_ice\"
1204
1205    for (( i=1; i<=$NPROC; i++)) ; do
1206        L_NPROC=$(( $i - 1 ))
1207        L_NPROC=`printf "%04d\n" ${L_NPROC}`
1208        ln -sf ../LONG/O2AGRIF_LONG_00000075_restart_${L_NPROC}.nc .
1209        ln -sf ../LONG/O2AGRIF_LONG_00000075_restart_ice_${L_NPROC}.nc .
1210        ln -sf ../LONG/1_O2AGRIF_LONG_00000150_restart_${L_NPROC}.nc .
1211        ln -sf ../LONG/1_O2AGRIF_LONG_00000150_restart_ice_${L_NPROC}.nc .
1212    done
1213    if [ ${USING_MPMD} == "yes" ] ; then
1214       set_xio_using_server iodef.xml true
1215    else
1216       set_xio_using_server iodef.xml false
1217    fi
1218    cd ${SETTE_DIR}
1219    . ./prepare_job.sh input_ORCA2_LIM3_AGRIF.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS}
1220    cd ${SETTE_DIR}
1221    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
1222
1223
1224## Reproducibility tests for ORCA2_LIM3_AGRIF
1225    export TEST_NAME="REPRO_4_4"
1226    cd ${CONFIG_DIR0}
1227    cd ${SETTE_DIR}
1228    . ./param.cfg
1229    . ./all_functions.sh
1230    . ./prepare_exe_dir.sh
1231    JOB_FILE=${EXE_DIR}/run_job.sh
1232    NPROC=16
1233    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
1234    cd ${EXE_DIR}
1235    set_namelist namelist_cfg cn_exp \"O2AGRIF_44\"
1236    set_namelist namelist_cfg nn_it000 1
1237    set_namelist namelist_cfg nn_itend 75
1238    set_namelist namelist_cfg ln_ctl .false.
1239    set_namelist namelist_cfg ln_clobber .true.
1240    set_namelist namelist_cfg ln_read_cfg .true.
1241    set_namelist namelist_cfg ln_linssh .false.
1242    set_namelist namelist_cfg nn_fwb 0
1243    set_namelist namelist_cfg jpni 4
1244    set_namelist namelist_cfg jpnj 4
1245    set_namelist namelist_cfg jpnij 16
1246    set_namelist 1_namelist_cfg nn_it000 1
1247    set_namelist 1_namelist_cfg nn_itend 150
1248    set_namelist 1_namelist_cfg nn_fsbc 1
1249    set_namelist 1_namelist_cfg ln_ctl .false.
1250    set_namelist 1_namelist_cfg ln_clobber .true.
1251    set_namelist 1_namelist_cfg ln_read_cfg .true.
1252    set_namelist 1_namelist_cfg ln_zdfiwm .false.
1253    set_namelist 1_namelist_cfg ln_hpg_sco .true.
1254    set_namelist 1_namelist_cfg ln_hpg_zps .false.
1255
1256    if [ ${USING_MPMD} == "yes" ] ; then
1257       set_xio_using_server iodef.xml true
1258    else
1259       set_xio_using_server iodef.xml false
1260    fi
1261    cd ${SETTE_DIR}
1262    . ./prepare_job.sh input_ORCA2_LIM3_AGRIF.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS}
1263    cd ${SETTE_DIR}
1264    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
1265
1266    cd ${SETTE_DIR}
1267    export TEST_NAME="REPRO_2_8"
1268    . ./prepare_exe_dir.sh
1269    JOB_FILE=${EXE_DIR}/run_job.sh
1270    NPROC=16
1271    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
1272    cd ${EXE_DIR}
1273    set_namelist namelist_cfg cn_exp \"O2AGRIF_28\"
1274    set_namelist namelist_cfg nn_it000 1
1275    set_namelist namelist_cfg nn_itend 75
1276    set_namelist namelist_cfg ln_ctl .false.
1277    set_namelist namelist_cfg ln_clobber .true.
1278    set_namelist namelist_cfg ln_read_cfg .true.
1279    set_namelist namelist_cfg ln_linssh .false.
1280    set_namelist namelist_cfg nn_fwb 0
1281    set_namelist namelist_cfg jpni 2
1282    set_namelist namelist_cfg jpnj 8
1283    set_namelist namelist_cfg jpnij 16
1284    set_namelist 1_namelist_cfg nn_it000 1
1285    set_namelist 1_namelist_cfg nn_itend 150
1286    set_namelist 1_namelist_cfg nn_fsbc 1
1287    set_namelist 1_namelist_cfg ln_ctl .false.
1288    set_namelist 1_namelist_cfg nn_fsbc 1
1289    set_namelist 1_namelist_cfg ln_clobber .true.
1290    set_namelist 1_namelist_cfg ln_read_cfg .true.
1291    set_namelist 1_namelist_cfg ln_zdfiwm .false.
1292    set_namelist 1_namelist_cfg ln_hpg_sco .true.
1293    set_namelist 1_namelist_cfg ln_hpg_zps .false.
1294
1295    if [ ${USING_MPMD} == "yes" ] ; then
1296       set_xio_using_server iodef.xml true
1297    else
1298       set_xio_using_server iodef.xml false
1299    fi
1300    cd ${SETTE_DIR}
1301    . ./prepare_job.sh input_ORCA2_LIM3_AGRIF.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS}
1302    cd ${SETTE_DIR}
1303    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
1304fi
1305
1306# test code corruption with AGRIF
1307if [ ${config} -eq 9 ] ;  then
1308
1309# Compile with AGRIF but run with no zoom
1310    export TEST_NAME="AGRIFNOZ"
1311    cd ${CONFIG_DIR0}
1312    . ./makenemo -m ${CMP_NAM} -n ORCA2AGUL_NOZOOM_ST -r ORCA2_LIM3_PISCES -d "OPA_SRC LIM_SRC_3 NST_SRC" -j 8 add_key "key_agrif" del_key "key_top"
1313    cd ${SETTE_DIR}
1314    . ./param.cfg
1315    . ./all_functions.sh
1316    . ./prepare_exe_dir.sh
1317    JOB_FILE=${EXE_DIR}/run_job.sh
1318    NPROC=4
1319    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
1320    cd ${EXE_DIR}
1321    set_namelist namelist_cfg cn_exp \"AGRIFNOZ_SHORT\"
1322    set_namelist namelist_cfg nn_it000 1
1323    set_namelist namelist_cfg nn_itend 75
1324    set_namelist namelist_cfg ln_ctl .false.
1325    set_namelist namelist_cfg ln_clobber .true.
1326    set_namelist namelist_cfg ln_read_cfg .true.
1327    set_namelist namelist_cfg ln_linssh .false.
1328    set_namelist namelist_cfg ln_hpg_sco .true.
1329    set_namelist namelist_cfg ln_hpg_zps .false.
1330    set_namelist namelist_cfg nn_fwb 0
1331    set_namelist namelist_cfg jpni 2
1332    set_namelist namelist_cfg jpnj 2
1333    set_namelist namelist_cfg jpnij 4
1334    set_namelist namelist_cfg ln_icebergs .false.   
1335#
1336#   Set the number of fine grids to zero:   
1337    sed -i "1s/.*/0/" ${EXE_DIR}/AGRIF_FixedGrids.in
1338
1339    if [ ${USING_MPMD} == "yes" ] ; then
1340       set_xio_using_server iodef.xml true
1341    else
1342       set_xio_using_server iodef.xml false
1343    fi
1344    cd ${SETTE_DIR}
1345    . ./prepare_job.sh input_ORCA2_LIM3_AGRIF.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS}
1346    cd ${SETTE_DIR}
1347    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
1348
1349fi
1350
1351if [ ${config} -eq 10 ] ;  then
1352# Compile with same option as 9 = ORCA2AGUL_NOZOOM, except ne key_agrif to check AGRIF does not hurt...
1353    export TEST_NAME="AGRIFNO"
1354    cd ${CONFIG_DIR0}
1355    . ./makenemo -m ${CMP_NAM} -n ORCA2AGUL_NOAGR_ST -r ORCA2_LIM3_PISCES -d "OPA_SRC LIM_SRC_3 NST_SRC" -j 8 del_key "key_top"
1356    cd ${SETTE_DIR}
1357    . ./param.cfg
1358    . ./all_functions.sh
1359    . ./prepare_exe_dir.sh
1360    JOB_FILE=${EXE_DIR}/run_job.sh
1361    NPROC=4
1362    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
1363    cd ${EXE_DIR}
1364    set_namelist namelist_cfg cn_exp \"AGRIFNO_SHORT\"
1365    set_namelist namelist_cfg nn_it000 1
1366    set_namelist namelist_cfg nn_itend 75
1367    set_namelist namelist_cfg ln_ctl .false.
1368    set_namelist namelist_cfg ln_clobber .true.
1369    set_namelist namelist_cfg ln_read_cfg .true.
1370    set_namelist namelist_cfg ln_linssh .false.
1371    set_namelist namelist_cfg ln_hpg_sco .true.
1372    set_namelist namelist_cfg ln_hpg_zps .false.
1373    set_namelist namelist_cfg nn_fwb 0
1374    set_namelist namelist_cfg jpni 2
1375    set_namelist namelist_cfg jpnj 2
1376    set_namelist namelist_cfg jpnij 4
1377    set_namelist namelist_cfg ln_icebergs .false.       
1378#
1379    if [ ${USING_MPMD} == "yes" ] ; then
1380       set_xio_using_server iodef.xml true
1381    else
1382       set_xio_using_server iodef.xml false
1383    fi
1384    cd ${SETTE_DIR}
1385    . ./prepare_job.sh input_ORCA2_LIM3_AGRIF.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS}
1386    cd ${SETTE_DIR}
1387    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
1388
1389fi
1390
1391### clem: TO BE TESTED !!!!
1392# ------------
1393# AGRIF NORDIC
1394# -----------
1395if [ ${config} -eq 11 ] ;  then
1396## Restartability tests
1397    export TEST_NAME="LONG"
1398    cd ${CONFIG_DIR0}
1399    . ./makenemo -m ${CMP_NAM} -n AGRIF_ST -r AGRIF_NORDIC -j 8 del_key "key_top"
1400    cd ${SETTE_DIR}
1401    . ./param.cfg
1402    . ./all_functions.sh
1403    . ./prepare_exe_dir.sh
1404    JOB_FILE=${EXE_DIR}/run_job.sh
1405    NPROC=32
1406    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
1407    cd ${EXE_DIR}
1408    set_namelist namelist_cfg cn_exp \"AGRIF_LONG\"
1409    set_namelist namelist_cfg nn_it000 1
1410    set_namelist namelist_cfg nn_itend 20
1411    set_namelist namelist_cfg nn_stock 10
1412    set_namelist 1_namelist_cfg cn_exp \"AGRIF_LONG\"
1413    set_namelist 1_namelist_cfg nn_it000 1
1414    set_namelist 1_namelist_cfg nn_itend 80
1415    set_namelist 1_namelist_cfg nn_stock 40
1416    set_namelist 2_namelist_cfg cn_exp \"AGRIF_LONG\"
1417    set_namelist 2_namelist_cfg nn_it000 1
1418    set_namelist 2_namelist_cfg nn_itend 240
1419    set_namelist 2_namelist_cfg nn_stock 120
1420#
1421    if [ ${USING_MPMD} == "yes" ] ; then
1422       set_xio_using_server iodef.xml true
1423    else
1424       set_xio_using_server iodef.xml false
1425    fi
1426    cd ${SETTE_DIR}
1427    . ./prepare_job.sh input_AGRIF.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS}
1428   
1429    cd ${SETTE_DIR}
1430    export TEST_NAME="SHORT"
1431    . ./prepare_exe_dir.sh
1432    cd ${EXE_DIR}
1433    set_namelist namelist_cfg cn_exp \"AGRIF_SHORT\"
1434    set_namelist namelist_cfg nn_it000 11
1435    set_namelist namelist_cfg nn_itend 20
1436    set_namelist namelist_cfg nn_stock 10
1437    set_namelist namelist_cfg ln_rstart .true.
1438    set_namelist namelist_cfg nn_rstctl 2
1439    set_namelist 1_namelist_cfg cn_exp \"AGRIF_SHORT\"
1440    set_namelist 1_namelist_cfg nn_it000 41
1441    set_namelist 1_namelist_cfg nn_itend 80
1442    set_namelist 1_namelist_cfg nn_stock 40
1443    set_namelist 1_namelist_cfg ln_rstart .true.
1444    set_namelist 1_namelist_cfg nn_rstctl 2
1445    set_namelist 2_namelist_cfg cn_exp \"AGRIF_SHORT\"
1446    set_namelist 2_namelist_cfg nn_it000 121
1447    set_namelist 2_namelist_cfg nn_itend 240
1448    set_namelist 2_namelist_cfg nn_stock 120
1449    set_namelist 2_namelist_cfg ln_rstart .true.
1450    set_namelist 2_namelist_cfg nn_rstctl 2
1451    set_namelist namelist_cfg cn_ocerst_in \"AGRIF_LONG_00000010_restart\"
1452    set_namelist namelist_ice_cfg cn_icerst_in \"AGRIF_LONG_00000010_restart_ice\"
1453    set_namelist 1_namelist_cfg cn_ocerst_in \"AGRIF_LONG_00000040_restart\"
1454    set_namelist 1_namelist_ice_cfg cn_icerst_in \"AGRIF_LONG_00000040_restart_ice\"
1455    set_namelist 2_namelist_cfg cn_ocerst_in \"AGRIF_LONG_00000120_restart\"
1456    set_namelist 2_namelist_ice_cfg cn_icerst_in \"AGRIF_LONG_00000120_restart_ice\"
1457
1458    for (( i=1; i<=$NPROC; i++)) ; do
1459        L_NPROC=$(( $i - 1 ))
1460        L_NPROC=`printf "%04d\n" ${L_NPROC}`
1461        ln -sf ../LONG/AGRIF_LONG_00000010_restart_${L_NPROC}.nc .
1462        ln -sf ../LONG/AGRIF_LONG_00000010_restart_ice_${L_NPROC}.nc .
1463        ln -sf ../LONG/1_AGRIF_LONG_00000040_restart_${L_NPROC}.nc .
1464        ln -sf ../LONG/1_AGRIF_LONG_00000040_restart_ice_${L_NPROC}.nc .
1465        ln -sf ../LONG/2_AGRIF_LONG_00000120_restart_${L_NPROC}.nc .
1466        ln -sf ../LONG/2_AGRIF_LONG_00000120_restart_ice_${L_NPROC}.nc .
1467    done
1468    if [ ${USING_MPMD} == "yes" ] ; then
1469       set_xio_using_server iodef.xml true
1470    else
1471       set_xio_using_server iodef.xml false
1472    fi
1473    cd ${SETTE_DIR}
1474    . ./prepare_job.sh input_AGRIF.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS}
1475    cd ${SETTE_DIR}
1476    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
1477
1478
1479## Reproducibility tests
1480    export TEST_NAME="REPRO_4_8"
1481    cd ${CONFIG_DIR0}
1482    cd ${SETTE_DIR}
1483    . ./param.cfg
1484    . ./all_functions.sh
1485    . ./prepare_exe_dir.sh
1486    JOB_FILE=${EXE_DIR}/run_job.sh
1487    NPROC=32
1488    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
1489    cd ${EXE_DIR}
1490    set_namelist namelist_cfg cn_exp \"AGRIF_48\"
1491    set_namelist namelist_cfg nn_it000 1
1492    set_namelist namelist_cfg nn_itend 20
1493    set_namelist namelist_cfg jpni 4
1494    set_namelist namelist_cfg jpnj 8
1495    set_namelist namelist_cfg jpnij 32
1496    set_namelist 1_namelist_cfg nn_it000 1
1497    set_namelist 1_namelist_cfg nn_itend 80
1498    set_namelist 1_namelist_cfg jpni 4
1499    set_namelist 1_namelist_cfg jpnj 8
1500    set_namelist 1_namelist_cfg jpnij 32
1501    set_namelist 2_namelist_cfg nn_it000 1
1502    set_namelist 2_namelist_cfg nn_itend 240
1503    set_namelist 2_namelist_cfg jpni 4
1504    set_namelist 2_namelist_cfg jpnj 8
1505    set_namelist 2_namelist_cfg jpnij 32
1506
1507    if [ ${USING_MPMD} == "yes" ] ; then
1508       set_xio_using_server iodef.xml true
1509    else
1510       set_xio_using_server iodef.xml false
1511    fi
1512    cd ${SETTE_DIR}
1513    . ./prepare_job.sh input_AGRIF.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS}
1514    cd ${SETTE_DIR}
1515    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
1516
1517    cd ${SETTE_DIR}
1518    export TEST_NAME="REPRO_8_4"
1519    . ./prepare_exe_dir.sh
1520    JOB_FILE=${EXE_DIR}/run_job.sh
1521    NPROC=32
1522    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
1523    cd ${EXE_DIR}
1524    set_namelist namelist_cfg cn_exp \"AGRIF_84\"
1525    set_namelist namelist_cfg nn_it000 1
1526    set_namelist namelist_cfg nn_itend 20
1527    set_namelist namelist_cfg jpni 8
1528    set_namelist namelist_cfg jpnj 4
1529    set_namelist namelist_cfg jpnij 32
1530    set_namelist 1_namelist_cfg nn_it000 1
1531    set_namelist 1_namelist_cfg nn_itend 80
1532    set_namelist 1_namelist_cfg jpni 8
1533    set_namelist 1_namelist_cfg jpnj 4
1534    set_namelist 1_namelist_cfg jpnij 32
1535    set_namelist 2_namelist_cfg nn_it000 1
1536    set_namelist 2_namelist_cfg nn_itend 240
1537    set_namelist 2_namelist_cfg jpni 8
1538    set_namelist 2_namelist_cfg jpnj 4
1539    set_namelist 2_namelist_cfg jpnij 32
1540
1541    if [ ${USING_MPMD} == "yes" ] ; then
1542       set_xio_using_server iodef.xml true
1543    else
1544       set_xio_using_server iodef.xml false
1545    fi
1546    cd ${SETTE_DIR}
1547    . ./prepare_job.sh input_AGRIF.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS}
1548    cd ${SETTE_DIR}
1549    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
1550
1551# test code corruption with AGRIF
1552# Compile with AGRIF but run with no zoom
1553    export TEST_NAME="AGRIF_NOZOOM"
1554    cd ${CONFIG_DIR0}
1555    cd ${SETTE_DIR}
1556    . ./param.cfg
1557    . ./all_functions.sh
1558    . ./prepare_exe_dir.sh
1559    JOB_FILE=${EXE_DIR}/run_job.sh
1560    NPROC=32
1561    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
1562    cd ${EXE_DIR}
1563    set_namelist namelist_cfg cn_exp \"AGRIF_NOZOOM\"
1564    set_namelist namelist_cfg nn_it000 1
1565    set_namelist namelist_cfg nn_itend 150
1566#
1567#   Set the number of fine grids to zero:   
1568    sed -i "1s/.*/0/" ${EXE_DIR}/AGRIF_FixedGrids.in
1569
1570    if [ ${USING_MPMD} == "yes" ] ; then
1571       set_xio_using_server iodef.xml true
1572    else
1573       set_xio_using_server iodef.xml false
1574    fi
1575    cd ${SETTE_DIR}
1576    . ./prepare_job.sh input_AGRIF.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS}
1577    cd ${SETTE_DIR}
1578    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
1579
1580fi
1581
1582if [ ${config} -eq 12 ] ;  then
1583# Compile with same option as AGRIF_NOZOOM, except no key_agrif to check AGRIF does not hurt...
1584    export TEST_NAME="AGRIF_NOAGRIF"
1585    cd ${CONFIG_DIR0}
1586    . ./makenemo -m ${CMP_NAM} -n AGRIF_NOAGRIF -r AGRIF_NORDIC -j 8 del_key "key_top key_agrif"
1587    cd ${SETTE_DIR}
1588    . ./param.cfg
1589    . ./all_functions.sh
1590    . ./prepare_exe_dir.sh
1591    JOB_FILE=${EXE_DIR}/run_job.sh
1592    NPROC=32
1593    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
1594    cd ${EXE_DIR}
1595    set_namelist namelist_cfg cn_exp \"AGRIF_NOAGRIF\"
1596    set_namelist namelist_cfg nn_it000 1
1597    set_namelist namelist_cfg nn_itend 150
1598#
1599    if [ ${USING_MPMD} == "yes" ] ; then
1600       set_xio_using_server iodef.xml true
1601    else
1602       set_xio_using_server iodef.xml false
1603    fi
1604    cd ${SETTE_DIR}
1605    . ./prepare_job.sh input_AGRIF.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS}
1606    cd ${SETTE_DIR}
1607    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
1608
1609fi
1610
1611done
Note: See TracBrowser for help on using the repository browser.