source: branches/2017/dev_r7881_ENHANCE09_RK3/NEMOGCM/SETTE/sette.sh @ 8735

Last change on this file since 8735 was 8735, checked in by flavoni, 3 years ago

remove internal wave-induced mixing parametrisation, in agrif tests, … because files 1_power…. needed

  • Property svn:executable set to *
File size: 55.8 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 &  2
136# ORCA2_LIM3_PISCES :  3 &  4
137# ORCA2_OFF_PISCES  :  5 &  6
138# AMM12             :  7 &  8
139# SAS               :  9     fos SAS there is no run.stat so is useless to test REPRO
140# ISOMIP            : 10 & 11
141# ORCA2_LIM3_OBS    : 12
142# ORCA2_AGRIF_LIM3  : 13 & 14
143#                     15 & 16
144
145###for config in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
146for config in 13 15 16
147
148do
149
150# TESTS FOR GYRE_PISCES CONFIGURATION
151if [ ${config} -eq 1 ] ;  then
152    ## Restartability tests for GYRE_PISCES
153    export TEST_NAME="LONG"
154    cd ${CONFIG_DIR0}
155    . ./makenemo -m ${CMP_NAM} -n GYREPIS_LONG -r GYRE_PISCES -j 8 del_key ${DEL_KEYS}
156    cd ${SETTE_DIR}
157    . ./param.cfg
158    . ./all_functions.sh
159    . ./prepare_exe_dir.sh
160    JOB_FILE=${EXE_DIR}/run_job.sh
161    NPROC=32
162    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
163    cd ${EXE_DIR} 
164    set_namelist namelist_cfg cn_exp \"GYREPIS_LONG\"
165    set_namelist namelist_cfg nn_it000 1
166    set_namelist namelist_cfg nn_itend 120
167    set_namelist namelist_cfg nn_stock 60
168    set_namelist namelist_cfg ln_clobber .true.
169    set_namelist namelist_cfg ln_linssh .true.
170    set_namelist namelist_cfg ln_read_cfg .false.
171    set_namelist namelist_cfg nn_fwb 0
172    set_namelist namelist_cfg jpni 4
173    set_namelist namelist_cfg jpnj 8
174    set_namelist namelist_cfg jpnij 32
175    if [ ${USING_MPMD} == "yes" ] ; then
176       set_xio_using_server iodef.xml true
177    else
178       set_xio_using_server iodef.xml false
179    fi
180    cd ${SETTE_DIR}
181    . ./prepare_job.sh input_GYRE.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS}
182
183    cd ${SETTE_DIR}
184    export TEST_NAME="SHORT"
185    . ./prepare_exe_dir.sh
186    cd ${EXE_DIR}
187    set_namelist namelist_cfg cn_exp \"GYREPIS_SHORT\"
188    set_namelist namelist_cfg nn_it000 61
189    set_namelist namelist_cfg nn_itend 120
190    set_namelist namelist_cfg nn_stock 60
191    set_namelist namelist_cfg ln_rstart .true.
192    set_namelist namelist_cfg nn_rstctl 2
193    set_namelist namelist_cfg ln_clobber .true.
194    set_namelist namelist_cfg ln_linssh .true.
195    set_namelist namelist_cfg ln_read_cfg .false.
196    set_namelist namelist_cfg nn_fwb 0
197    set_namelist namelist_cfg jpni 4
198    set_namelist namelist_cfg jpnj 8
199    set_namelist namelist_cfg jpnij 32
200    set_namelist namelist_top_cfg ln_rsttr .true.
201    set_namelist namelist_top_cfg nn_rsttr 2
202    set_namelist namelist_cfg cn_ocerst_in \"GYREPIS_LONG_00000060_restart\"
203    set_namelist namelist_top_cfg cn_trcrst_in \"GYREPIS_LONG_00000060_restart_trc\"
204    if [ ${USING_MPMD} == "yes" ] ; then
205       set_xio_using_server iodef.xml true
206    else
207       set_xio_using_server iodef.xml false
208    fi
209    for (( i=1; i<=$NPROC; i++)) ; do
210        L_NPROC=$(( $i - 1 ))
211        L_NPROC=`printf "%04d\n" ${L_NPROC}`
212        ln -sf ../LONG/GYREPIS_LONG_00000060_restart_${L_NPROC}.nc .
213        ln -sf ../LONG/GYREPIS_LONG_00000060_restart_trc_${L_NPROC}.nc .
214    done
215    if [ ${USING_MPMD} == "yes" ] ; then
216       set_xio_using_server iodef.xml true
217    else
218       set_xio_using_server iodef.xml false
219    fi
220    cd ${SETTE_DIR}
221    . ./prepare_job.sh input_GYRE.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS}
222    cd ${SETTE_DIR}
223    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
224fi
225
226if [ ${config} -eq 2 ] ;  then
227    ## Reproducibility tests for GYRE_PISCES
228    export TEST_NAME="REPRO_4_8"
229    cd ${CONFIG_DIR0}
230    . ./makenemo -m ${CMP_NAM} -n GYREPIS_32 -r GYRE_PISCES -j 8 del_key ${DEL_KEYS}
231    cd ${SETTE_DIR}
232    . ./param.cfg
233    . ./all_functions.sh
234    . ./prepare_exe_dir.sh
235    JOB_FILE=${EXE_DIR}/run_job.sh
236    NPROC=32
237    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
238    cd ${EXE_DIR}
239    set_namelist namelist_cfg cn_exp \"GYREPIS_48\"
240    set_namelist namelist_cfg nn_it000 1
241    set_namelist namelist_cfg nn_itend 60
242    set_namelist namelist_cfg nn_fwb 0
243    set_namelist namelist_cfg ln_ctl .false.
244    set_namelist namelist_cfg ln_clobber .true.
245    set_namelist namelist_cfg ln_linssh .true.
246    set_namelist namelist_cfg ln_read_cfg .false.
247    set_namelist namelist_cfg jpni 4
248    set_namelist namelist_cfg jpnj 8
249    set_namelist namelist_cfg jpnij 32
250    if [ ${USING_MPMD} == "yes" ] ; then
251       set_xio_using_server iodef.xml true
252    else
253       set_xio_using_server iodef.xml false
254    fi
255    cd ${SETTE_DIR}
256    . ./prepare_job.sh input_GYRE.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS}
257    cd ${SETTE_DIR}
258    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
259
260    cd ${SETTE_DIR}
261    export TEST_NAME="REPRO_8_4"
262    . ./prepare_exe_dir.sh
263    JOB_FILE=${EXE_DIR}/run_job.sh
264    NPROC=32
265    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
266    cd ${EXE_DIR}
267    set_namelist namelist_cfg cn_exp \"GYREPIS_84\"
268    set_namelist namelist_cfg nn_it000 1
269    set_namelist namelist_cfg nn_itend 60
270    set_namelist namelist_cfg nn_fwb 0
271    set_namelist namelist_cfg ln_ctl .false.
272    set_namelist namelist_cfg ln_clobber .true.
273    set_namelist namelist_cfg ln_linssh .true.
274    set_namelist namelist_cfg ln_read_cfg .false.
275    set_namelist namelist_cfg jpni 8
276    set_namelist namelist_cfg jpnj 4
277    set_namelist namelist_cfg jpnij 32
278    if [ ${USING_MPMD} == "yes" ] ; then
279       set_xio_using_server iodef.xml true
280    else
281       set_xio_using_server iodef.xml false
282    fi
283    cd ${SETTE_DIR}
284    . ./prepare_job.sh input_GYRE.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS}
285    cd ${SETTE_DIR}
286    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
287
288fi
289
290# TESTS FOR ORCA2_LIM3_PISCES CONFIGURATION
291if [ ${config} -eq 3 ] ;  then
292    ## Restartability tests for ORCA2_LIM3_PISCES
293    export TEST_NAME="LONG"
294    cd ${CONFIG_DIR0}
295    . ./makenemo -m ${CMP_NAM} -n ORCA2LIM3PIS_LONG -r ORCA2_LIM3_PISCES -j 8 del_key ${DEL_KEYS}
296    cd ${SETTE_DIR}
297    . ./param.cfg
298    . ./all_functions.sh
299    . ./prepare_exe_dir.sh
300    JOB_FILE=${EXE_DIR}/run_job.sh
301    NPROC=32
302    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
303    cd ${EXE_DIR}
304    set_namelist namelist_cfg cn_exp \"O2L3P_LONG\"
305    set_namelist namelist_cfg nn_it000 1
306    set_namelist namelist_cfg nn_itend 150
307    set_namelist namelist_cfg nn_stock 75
308    set_namelist namelist_cfg ln_clobber .true.
309    set_namelist namelist_cfg ln_read_cfg .true.
310    set_namelist namelist_cfg ln_linssh .false.
311    set_namelist namelist_cfg nn_fwb 0
312    set_namelist namelist_cfg jpni 4
313    set_namelist namelist_cfg jpnj 8
314    set_namelist namelist_cfg jpnij 32
315    set_namelist namelist_ice_cfg ln_icediachk .true.
316##    set_namelist namelist_ice_cfg ln_icediahsb .true.
317    set_namelist namelist_top_cfg ln_trcdta .false.
318    # put ln_ironsed, ln_river, ln_ndepo, ln_dust to false
319    # if not you need input files, and for tests is not necessary
320    set_namelist namelist_pisces_cfg ln_presatm .false.
321    set_namelist namelist_pisces_cfg ln_varpar .false.
322    set_namelist namelist_pisces_cfg ln_dust .false.
323    set_namelist namelist_pisces_cfg ln_solub .false.
324    set_namelist namelist_pisces_cfg ln_river .false.
325    set_namelist namelist_pisces_cfg ln_ndepo .false.
326    set_namelist namelist_pisces_cfg ln_ironsed .false.
327    set_namelist namelist_pisces_cfg ln_ironice .false.
328    set_namelist namelist_pisces_cfg ln_hydrofe .false.
329    if [ ${USING_MPMD} == "yes" ] ; then
330       set_xio_using_server iodef.xml true
331    else
332       set_xio_using_server iodef.xml false
333    fi
334    cd ${SETTE_DIR}
335    . ./prepare_job.sh input_ORCA2_LIM3_PISCES.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS}
336   
337    cd ${SETTE_DIR}
338    export TEST_NAME="SHORT"
339    . ./prepare_exe_dir.sh
340    cd ${EXE_DIR}
341    set_namelist namelist_cfg cn_exp \"O2L3P_SHORT\"
342    set_namelist namelist_cfg nn_it000 76
343    set_namelist namelist_cfg nn_itend 150
344    set_namelist namelist_cfg nn_stock 75
345    set_namelist namelist_cfg ln_rstart .true.
346    set_namelist namelist_cfg nn_rstctl 2
347    set_namelist namelist_cfg ln_clobber .true.
348    set_namelist namelist_cfg ln_read_cfg .true.
349    set_namelist namelist_cfg ln_linssh .false.
350    set_namelist namelist_cfg ln_icebergs .true.
351    set_namelist namelist_cfg nn_fwb 0
352    set_namelist namelist_cfg jpni 4
353    set_namelist namelist_cfg jpnj 8
354    set_namelist namelist_cfg jpnij 32
355    set_namelist namelist_ice_cfg ln_icediachk .true.
356##    set_namelist namelist_ice_cfg ln_icediahsb .true.
357    set_namelist namelist_top_cfg ln_rsttr .true.
358    set_namelist namelist_top_cfg nn_rsttr 2
359    set_namelist namelist_cfg cn_ocerst_in \"O2L3P_LONG_00000075_restart\"
360    set_namelist namelist_ice_cfg cn_icerst_in \"O2L3P_LONG_00000075_restart_ice\"
361    set_namelist namelist_top_cfg cn_trcrst_in \"O2L3P_LONG_00000075_restart_trc\"
362    # put ln_ironsed, ln_river, ln_ndepo, ln_dust
363    # if not you need input files, and for tests is not necessary
364    set_namelist namelist_pisces_cfg ln_presatm .false.
365    set_namelist namelist_pisces_cfg ln_varpar .false.
366    set_namelist namelist_pisces_cfg ln_dust .false.
367    set_namelist namelist_pisces_cfg ln_solub .false.
368    set_namelist namelist_pisces_cfg ln_river .false.
369    set_namelist namelist_pisces_cfg ln_ndepo .false.
370    set_namelist namelist_pisces_cfg ln_ironsed .false.
371    set_namelist namelist_pisces_cfg ln_ironice .false.
372    set_namelist namelist_pisces_cfg ln_hydrofe .false.
373    # put ln_pisdmp to false : no restoring to global mean value
374    set_namelist namelist_pisces_cfg ln_pisdmp .false.
375    for (( i=1; i<=$NPROC; i++)) ; do
376        L_NPROC=$(( $i - 1 ))
377        L_NPROC=`printf "%04d\n" ${L_NPROC}`
378        ln -sf ../LONG/O2L3P_LONG_00000075_restart_${L_NPROC}.nc .
379        ln -sf ../LONG/O2L3P_LONG_00000075_restart_trc_${L_NPROC}.nc .
380        ln -sf ../LONG/O2L3P_LONG_00000075_restart_ice_${L_NPROC}.nc .
381        ln -sf ../LONG/O2L3P_LONG_icebergs_00000075_restart_${L_NPROC}.nc O2L3P_LONG_00000075_restart_icebergs_${L_NPROC}.nc
382    done
383    if [ ${USING_MPMD} == "yes" ] ; then
384       set_xio_using_server iodef.xml true
385    else
386       set_xio_using_server iodef.xml false
387    fi
388    cd ${SETTE_DIR}
389    . ./prepare_job.sh input_ORCA2_LIM3_PISCES.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS}
390    cd ${SETTE_DIR}
391    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
392fi
393
394if [ ${config} -eq 4 ] ;  then
395    ## Reproducibility tests for ORCA2_LIM3_PISCES
396    export TEST_NAME="REPRO_4_8"
397    cd ${CONFIG_DIR0}
398    . ./makenemo -m ${CMP_NAM} -n ORCA2LIM3PIS_32 -r ORCA2_LIM3_PISCES -j 8 del_key ${DEL_KEYS}
399    cd ${SETTE_DIR}
400    . ./param.cfg
401    . ./all_functions.sh
402    . ./prepare_exe_dir.sh
403    JOB_FILE=${EXE_DIR}/run_job.sh
404    NPROC=32
405    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
406    cd ${EXE_DIR}
407    set_namelist namelist_cfg nn_it000 1
408    set_namelist namelist_cfg nn_itend 75
409    set_namelist namelist_cfg nn_fwb 0
410    set_namelist namelist_cfg ln_ctl .false.
411    set_namelist namelist_cfg ln_clobber .true.
412    set_namelist namelist_cfg ln_read_cfg .true.
413    set_namelist namelist_cfg ln_linssh .false.
414    set_namelist namelist_cfg ln_icebergs .true.
415    set_namelist namelist_cfg jpni 4
416    set_namelist namelist_cfg jpnj 8
417    set_namelist namelist_cfg jpnij 32
418    set_namelist namelist_ice_cfg ln_icediachk .true.
419    set_namelist namelist_ice_cfg ln_icediahsb .true.
420    set_namelist namelist_top_cfg ln_trcdta .false.
421    # put ln_ironsed, ln_river, ln_ndepo, ln_dust to false
422    # if not you need input files, and for tests is not necessary
423    set_namelist namelist_pisces_cfg ln_presatm .false.
424    set_namelist namelist_pisces_cfg ln_varpar .false.
425    set_namelist namelist_pisces_cfg ln_dust .false.
426    set_namelist namelist_pisces_cfg ln_solub .false.
427    set_namelist namelist_pisces_cfg ln_river .false.
428    set_namelist namelist_pisces_cfg ln_ndepo .false.
429    set_namelist namelist_pisces_cfg ln_ironsed .false.
430    set_namelist namelist_pisces_cfg ln_ironice .false.
431    set_namelist namelist_pisces_cfg ln_hydrofe .false.
432    # put ln_pisdmp to false : no restoring to global mean value
433    set_namelist namelist_pisces_cfg ln_pisdmp .false.
434    if [ ${USING_MPMD} == "yes" ] ; then
435       set_xio_using_server iodef.xml true
436    else
437       set_xio_using_server iodef.xml false
438    fi
439    cd ${SETTE_DIR}
440    . ./prepare_job.sh input_ORCA2_LIM3_PISCES.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS}
441    cd ${SETTE_DIR}
442    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
443
444    cd ${SETTE_DIR}
445    export TEST_NAME="REPRO_8_4"
446    . ./prepare_exe_dir.sh
447    JOB_FILE=${EXE_DIR}/run_job.sh
448    NPROC=32
449    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
450    cd ${EXE_DIR}
451    set_namelist namelist_cfg nn_it000 1
452    set_namelist namelist_cfg nn_itend 75
453    set_namelist namelist_cfg ln_clobber .true.
454    set_namelist namelist_cfg ln_read_cfg .true.
455    set_namelist namelist_cfg ln_linssh .false.
456    set_namelist namelist_cfg ln_icebergs .true.
457    set_namelist namelist_cfg nn_fwb 0
458    set_namelist namelist_cfg jpni 8
459    set_namelist namelist_cfg jpnj 4
460    set_namelist namelist_cfg jpnij 32
461    set_namelist namelist_ice_cfg ln_icediachk .true.
462    set_namelist namelist_ice_cfg ln_icediahsb .true.
463    set_namelist namelist_top_cfg ln_trcdta .false.
464    # put ln_ironsed, ln_river, ln_ndepo, ln_dust to false
465    # if not you need input files, and for tests is not necessary
466    set_namelist namelist_pisces_cfg ln_presatm .false.
467    set_namelist namelist_pisces_cfg ln_varpar .false.
468    set_namelist namelist_pisces_cfg ln_dust .false.
469    set_namelist namelist_pisces_cfg ln_solub .false.
470    set_namelist namelist_pisces_cfg ln_river .false.
471    set_namelist namelist_pisces_cfg ln_ndepo .false.
472    set_namelist namelist_pisces_cfg ln_ironsed .false.
473    set_namelist namelist_pisces_cfg ln_ironice .false.
474    set_namelist namelist_pisces_cfg ln_hydrofe .false.
475    # put ln_pisdmp to false : no restoring to global mean value
476    set_namelist namelist_pisces_cfg ln_pisdmp .false.
477    if [ ${USING_MPMD} == "yes" ] ; then
478       set_xio_using_server iodef.xml true
479    else
480       set_xio_using_server iodef.xml false
481    fi
482    cd ${SETTE_DIR}
483    . ./prepare_job.sh input_ORCA2_LIM3_PISCES.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS}
484    cd ${SETTE_DIR}
485    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
486fi
487
488# TESTS FOR ORCA2_OFF_PISCES CONFIGURATION
489if [ ${config} -eq 5 ] ;  then
490    ## Restartability tests for ORCA2_OFF_PISCES
491    export TEST_NAME="LONG"
492    cd ${CONFIG_DIR0}
493    . ./makenemo -m ${CMP_NAM} -n ORCA2OFFPIS_LONG -r ORCA2_OFF_PISCES -j 8 del_key ${DEL_KEYS}
494    cd ${SETTE_DIR}
495    . ./param.cfg
496    . ./all_functions.sh
497    . ./prepare_exe_dir.sh
498    JOB_FILE=${EXE_DIR}/run_job.sh
499    NPROC=32
500    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
501    cd ${EXE_DIR}
502    set_namelist namelist_cfg cn_exp \"OFFP_LONG\"
503    set_namelist namelist_cfg nn_it000 1
504    set_namelist namelist_cfg nn_itend 40
505    set_namelist namelist_cfg nn_stock 20
506    set_namelist namelist_cfg ln_clobber .true.
507    set_namelist namelist_cfg ln_read_cfg .true.
508    set_namelist namelist_cfg ln_linssh .true.
509    set_namelist namelist_cfg jpni 4
510    set_namelist namelist_cfg jpnj 8
511    set_namelist namelist_cfg jpnij 32
512    set_namelist namelist_top_cfg ln_trcdta .false.
513    # put ln_ironsed, ln_river, ln_ndepo, ln_dust to false
514    # if not you need input files, and for tests is not necessary
515    set_namelist namelist_pisces_cfg ln_presatm .false.
516    set_namelist namelist_pisces_cfg ln_varpar .false.
517    set_namelist namelist_pisces_cfg ln_dust .false.
518    set_namelist namelist_pisces_cfg ln_solub .false.
519    set_namelist namelist_pisces_cfg ln_river .false.
520    set_namelist namelist_pisces_cfg ln_ndepo .false.
521    set_namelist namelist_pisces_cfg ln_ironsed .false.
522    set_namelist namelist_pisces_cfg ln_ironice .false.
523    set_namelist namelist_pisces_cfg ln_hydrofe .false.
524    # put ln_pisdmp to false : no restoring to global mean value
525    set_namelist namelist_pisces_cfg ln_pisdmp .false.
526    if [ ${USING_MPMD} == "yes" ] ; then
527       set_xio_using_server iodef.xml true
528    else
529       set_xio_using_server iodef.xml false
530    fi
531    cd ${SETTE_DIR}
532    . ./prepare_job.sh input_ORCA2_OFF_PISCES.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS}
533   
534    cd ${SETTE_DIR}
535    export TEST_NAME="SHORT"
536    . ./prepare_exe_dir.sh
537    cd ${EXE_DIR}
538    set_namelist namelist_cfg cn_exp \"OFFP_SHORT\"
539    set_namelist namelist_cfg nn_it000 21
540    set_namelist namelist_cfg nn_itend 40
541    set_namelist namelist_cfg nn_stock 20
542    set_namelist namelist_cfg ln_clobber .true.
543    set_namelist namelist_cfg ln_read_cfg .true.
544    set_namelist namelist_cfg ln_linssh .true.
545    set_namelist namelist_cfg jpni 4
546    set_namelist namelist_cfg jpnj 8
547    set_namelist namelist_cfg jpnij 32
548    set_namelist namelist_top_cfg ln_rsttr .true.
549    set_namelist namelist_top_cfg nn_rsttr 2
550    set_namelist namelist_top_cfg cn_trcrst_in \"OFFP_LONG_00000020_restart_trc\"
551    for (( i=1; i<=$NPROC; i++)) ; do
552        L_NPROC=$(( $i - 1 ))
553        L_NPROC=`printf "%04d\n" ${L_NPROC}`
554        ln -sf ../LONG/OFFP_LONG_00000020_restart_trc_${L_NPROC}.nc .
555    done
556    # put ln_ironsed, ln_river, ln_ndepo, ln_dust
557    # if not you need input files, and for tests is not necessary
558    set_namelist namelist_pisces_cfg ln_presatm .false.
559    set_namelist namelist_pisces_cfg ln_varpar .false.
560    set_namelist namelist_pisces_cfg ln_dust .false.
561    set_namelist namelist_pisces_cfg ln_solub .false.
562    set_namelist namelist_pisces_cfg ln_river .false.
563    set_namelist namelist_pisces_cfg ln_ndepo .false.
564    set_namelist namelist_pisces_cfg ln_ironsed .false.
565    set_namelist namelist_pisces_cfg ln_ironice .false.
566    set_namelist namelist_pisces_cfg ln_hydrofe .false.
567    # put ln_pisdmp to false : no restoring to global mean value
568    set_namelist namelist_pisces_cfg ln_pisdmp .false.
569    if [ ${USING_MPMD} == "yes" ] ; then
570       set_xio_using_server iodef.xml true
571    else
572       set_xio_using_server iodef.xml false
573    fi
574    cd ${SETTE_DIR}
575    . ./prepare_job.sh input_ORCA2_OFF_PISCES.cfg $NPROC ${TEST_NAME}  ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS}
576    cd ${SETTE_DIR}
577    . ./fcm_job.sh $NPROC  ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
578fi
579
580if [ ${config} -eq 6 ] ;  then
581    ## Reproducibility tests for ORCA2_OFF_PISCES
582    export TEST_NAME="REPRO_4_8"
583    cd ${CONFIG_DIR0}
584    . ./makenemo -m ${CMP_NAM} -n ORCA2OFFPIS_32 -r ORCA2_OFF_PISCES -j 8 del_key ${DEL_KEYS}
585    cd ${SETTE_DIR}
586    . ./param.cfg
587    . ./all_functions.sh
588    . ./prepare_exe_dir.sh
589    JOB_FILE=${EXE_DIR}/run_job.sh
590    NPROC=32
591    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
592    cd ${EXE_DIR}
593    set_namelist namelist_cfg nn_it000 1
594    set_namelist namelist_cfg nn_itend 40
595    set_namelist namelist_cfg ln_ctl .false.
596    set_namelist namelist_cfg ln_clobber .true.
597    set_namelist namelist_cfg ln_read_cfg .true.
598    set_namelist namelist_cfg ln_linssh .true.
599    set_namelist namelist_cfg jpni 4
600    set_namelist namelist_cfg jpnj 8
601    set_namelist namelist_cfg jpnij 32
602    set_namelist namelist_top_cfg ln_trcdta .false.
603    # put ln_ironsed, ln_river, ln_ndepo, ln_dust to false
604    # if not you need input files, and for tests is not necessary
605    set_namelist namelist_pisces_cfg ln_presatm .false.
606    set_namelist namelist_pisces_cfg ln_varpar .false.
607    set_namelist namelist_pisces_cfg ln_dust .false.
608    set_namelist namelist_pisces_cfg ln_solub .false.
609    set_namelist namelist_pisces_cfg ln_river .false.
610    set_namelist namelist_pisces_cfg ln_ndepo .false.
611    set_namelist namelist_pisces_cfg ln_ironsed .false.
612    set_namelist namelist_pisces_cfg ln_ironice .false.
613    set_namelist namelist_pisces_cfg ln_hydrofe .false.
614    # put ln_pisdmp to false : no restoring to global mean value
615    set_namelist namelist_pisces_cfg ln_pisdmp .false.
616    if [ ${USING_MPMD} == "yes" ] ; then
617       set_xio_using_server iodef.xml true
618    else
619       set_xio_using_server iodef.xml false
620    fi
621    cd ${SETTE_DIR}
622    . ./prepare_job.sh input_ORCA2_OFF_PISCES.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS}
623    cd ${SETTE_DIR}
624    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
625
626    cd ${SETTE_DIR}
627    export TEST_NAME="REPRO_8_4"
628    . ./prepare_exe_dir.sh
629    JOB_FILE=${EXE_DIR}/run_job.sh
630    NPROC=32
631    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
632    cd ${EXE_DIR}
633    set_namelist namelist_cfg nn_it000 1
634    set_namelist namelist_cfg nn_itend 40
635    set_namelist namelist_cfg ln_ctl .false.
636    set_namelist namelist_cfg ln_clobber .true.
637    set_namelist namelist_cfg ln_read_cfg .true.
638    set_namelist namelist_cfg ln_linssh .true.
639    set_namelist namelist_cfg jpni 8
640    set_namelist namelist_cfg jpnj 4
641    set_namelist namelist_cfg jpnij 32
642    set_namelist namelist_top_cfg ln_trcdta .false.
643    # put ln_ironsed, ln_river, ln_ndepo, ln_dust to false
644    # if not you need input files, and for tests is not necessary
645    set_namelist namelist_pisces_cfg ln_presatm .false.
646    set_namelist namelist_pisces_cfg ln_varpar .false.
647    set_namelist namelist_pisces_cfg ln_dust .false.
648    set_namelist namelist_pisces_cfg ln_solub .false.
649    set_namelist namelist_pisces_cfg ln_river .false.
650    set_namelist namelist_pisces_cfg ln_ndepo .false.
651    set_namelist namelist_pisces_cfg ln_ironsed .false.
652    set_namelist namelist_pisces_cfg ln_ironice .false.
653    set_namelist namelist_pisces_cfg ln_hydrofe .false.
654    # put ln_pisdmp to false : no restoring to global mean value
655    set_namelist namelist_pisces_cfg ln_pisdmp .false.
656    if [ ${USING_MPMD} == "yes" ] ; then
657       set_xio_using_server iodef.xml true
658    else
659       set_xio_using_server iodef.xml false
660    fi
661    cd ${SETTE_DIR}
662    . ./prepare_job.sh input_ORCA2_OFF_PISCES.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS}
663    cd ${SETTE_DIR}
664    . ./fcm_job.sh $NPROC  ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
665fi
666
667# TESTS FOR AMM12 CONFIGURATION
668if [ ${config} -eq 7 ] ;  then
669    ## Restartability tests for AMM12
670    export TEST_NAME="LONG"
671    cd ${CONFIG_DIR0}
672    . ./makenemo -m ${CMP_NAM} -n AMM12_LONG -r AMM12 -j 8 del_key ${DEL_KEYS}
673    cd ${SETTE_DIR}
674    . ./param.cfg
675    . ./all_functions.sh
676    . ./prepare_exe_dir.sh
677    JOB_FILE=${EXE_DIR}/run_job.sh
678    NPROC=32
679    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
680    cd ${EXE_DIR}
681    set_namelist namelist_cfg nn_it000 1
682    set_namelist namelist_cfg nn_itend 576
683    set_namelist namelist_cfg nn_stock 288
684    set_namelist namelist_cfg nn_fwb 0
685    set_namelist namelist_cfg ln_ctl .false.
686    set_namelist namelist_cfg ln_clobber .true.
687    set_namelist namelist_cfg ln_read_cfg .true.
688    set_namelist namelist_cfg ln_linssh .false.
689    set_namelist namelist_cfg jpni 4
690    set_namelist namelist_cfg jpnj 8
691    set_namelist namelist_cfg jpnij 32
692    if [ ${USING_MPMD} == "yes" ] ; then
693       set_xio_using_server iodef.xml true
694    else
695       set_xio_using_server iodef.xml false
696    fi
697    cd ${SETTE_DIR}
698    . ./prepare_job.sh input_AMM12.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS}
699
700    cd ${SETTE_DIR}
701    export TEST_NAME="SHORT"
702    . ./prepare_exe_dir.sh
703    cd ${EXE_DIR}
704    set_namelist namelist_cfg nn_it000 289
705    set_namelist namelist_cfg nn_itend 576
706    set_namelist namelist_cfg nn_fwb 0
707    set_namelist namelist_cfg ln_ctl .false.
708    set_namelist namelist_cfg ln_clobber .true.
709    set_namelist namelist_cfg ln_read_cfg .true.
710    set_namelist namelist_cfg ln_linssh .false.
711    set_namelist namelist_cfg jpni 4
712    set_namelist namelist_cfg jpnj 8
713    set_namelist namelist_cfg jpnij 32
714    set_namelist namelist_cfg ln_rstart .true.
715    set_namelist namelist_cfg nn_rstctl 2
716    set_namelist namelist_cfg cn_ocerst_in \"AMM12_00000288_restart_oce_out\"
717    set_namelist namelist_cfg nn_date0 20120102
718    for (( i=1; i<=$NPROC; i++)) ; do
719        L_NPROC=$(( $i - 1 ))
720        L_NPROC=`printf "%04d\n" ${L_NPROC}`
721        ln -sf ../LONG/AMM12_00000288_restart_oce_out_${L_NPROC}.nc .
722    done
723    if [ ${USING_MPMD} == "yes" ] ; then
724       set_xio_using_server iodef.xml true
725    else
726       set_xio_using_server iodef.xml false
727    fi
728    cd ${SETTE_DIR}
729    . ./prepare_job.sh input_AMM12.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS}
730    cd ${SETTE_DIR}
731    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
732fi
733
734if [ ${config} -eq 8 ] ;  then
735## Reproducibility tests for AMM12
736    export TEST_NAME="REPRO_8_4"
737    cd ${CONFIG_DIR0}
738    . ./makenemo -m ${CMP_NAM} -n AMM12_32 -r AMM12 -j 8 del_key ${DEL_KEYS}
739    cd ${SETTE_DIR}
740    . ./param.cfg
741    . ./all_functions.sh
742    . ./prepare_exe_dir.sh
743    JOB_FILE=${EXE_DIR}/run_job.sh
744    NPROC=32
745    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
746    cd ${EXE_DIR}
747    set_namelist namelist_cfg nn_it000 1
748    set_namelist namelist_cfg nn_itend 576
749    set_namelist namelist_cfg nn_fwb 0
750    set_namelist namelist_cfg ln_ctl .false.
751    set_namelist namelist_cfg ln_clobber .true.
752    set_namelist namelist_cfg ln_read_cfg .true.
753    set_namelist namelist_cfg ln_linssh .false.
754    set_namelist namelist_cfg jpni 8
755    set_namelist namelist_cfg jpnj 4
756    set_namelist namelist_cfg jpnij 32
757    if [ ${USING_MPMD} == "yes" ] ; then
758       set_xio_using_server iodef.xml true
759    else
760       set_xio_using_server iodef.xml false
761    fi
762    cd ${SETTE_DIR}
763    . ./prepare_job.sh input_AMM12.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS}
764    cd ${SETTE_DIR}
765    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
766
767    cd ${SETTE_DIR}
768    export TEST_NAME="REPRO_4_8"
769    . ./prepare_exe_dir.sh
770    JOB_FILE=${EXE_DIR}/run_job.sh
771    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
772    cd ${EXE_DIR}
773    set_namelist namelist_cfg nn_it000 1
774    set_namelist namelist_cfg nn_itend 576
775    set_namelist namelist_cfg nn_fwb 0
776    set_namelist namelist_cfg ln_ctl .false.
777    set_namelist namelist_cfg ln_clobber .true.
778    set_namelist namelist_cfg ln_read_cfg .true.
779    set_namelist namelist_cfg ln_linssh .false.
780    set_namelist namelist_cfg jpni 4
781    set_namelist namelist_cfg jpnj 8
782    set_namelist namelist_cfg jpnij 32
783    if [ ${USING_MPMD} == "yes" ] ; then
784       set_xio_using_server iodef.xml true
785    else
786       set_xio_using_server iodef.xml false
787    fi
788    cd ${SETTE_DIR}
789    . ./prepare_job.sh input_AMM12.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS}
790    cd ${SETTE_DIR}
791    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
792fi
793
794
795# TESTS FOR ORCA2_SAS_LIM3 CONFIGURATION
796if [ ${config} -eq 9 ] ;  then
797    ## Restartability tests for SAS
798    export TEST_NAME="LONG"
799    cd ${CONFIG_DIR0}
800    . ./makenemo -m ${CMP_NAM} -n SAS_LONG -r ORCA2_SAS_LIM3 -j 8 del_key ${DEL_KEYS}
801    cd ${SETTE_DIR}
802    . ./param.cfg
803    . ./all_functions.sh
804    . ./prepare_exe_dir.sh
805    JOB_FILE=${EXE_DIR}/run_job.sh
806    NPROC=32
807    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
808    cd ${EXE_DIR}
809    set_namelist namelist_cfg cn_exp \"SAS\"
810    set_namelist namelist_cfg nn_it000 1
811    set_namelist namelist_cfg nn_itend 100
812    set_namelist namelist_cfg nn_stock 50
813    set_namelist namelist_cfg ln_ctl .false.
814    set_namelist namelist_cfg ln_clobber .true.
815    set_namelist namelist_cfg ln_read_cfg .true.
816    set_namelist namelist_cfg ln_linssh .true.
817    set_namelist namelist_cfg nn_fwb 0
818    set_namelist namelist_cfg jpni 4
819    set_namelist namelist_cfg jpnj 8
820    set_namelist namelist_cfg jpnij 32
821    set_namelist namelist_ice_cfg ln_icediachk .true.
822    if [ ${USING_MPMD} == "yes" ] ; then
823       set_xio_using_server iodef.xml true
824    else
825       set_xio_using_server iodef.xml false
826    fi
827    cd ${SETTE_DIR}
828    . ./prepare_job.sh input_SAS.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS}
829
830    cd ${SETTE_DIR}
831    export TEST_NAME="SHORT"
832    . ./prepare_exe_dir.sh
833    cd ${EXE_DIR}
834    set_namelist namelist_cfg cn_exp \"SAS\"
835    set_namelist namelist_cfg nn_it000 51
836    set_namelist namelist_cfg nn_itend 100
837    set_namelist namelist_cfg ln_ctl .false.
838    set_namelist namelist_cfg ln_clobber .true.
839    set_namelist namelist_cfg ln_read_cfg .true.
840    set_namelist namelist_cfg ln_linssh .true.
841    set_namelist namelist_cfg nn_fwb 0
842    set_namelist namelist_cfg jpni 4
843    set_namelist namelist_cfg jpnj 8
844    set_namelist namelist_cfg jpnij 32
845    set_namelist namelist_cfg ln_rstart .true.
846    set_namelist namelist_cfg nn_rstctl 2
847    set_namelist namelist_ice_cfg ln_icediachk .true.
848    set_namelist namelist_ice_cfg cn_icerst_in \"SAS_00000050_restart_ice\"
849    if [ ${USING_MPMD} == "yes" ] ; then
850       set_xio_using_server iodef.xml true
851    else
852       set_xio_using_server iodef.xml false
853    fi
854    for (( i=1; i<=$NPROC; i++)) ; do
855        L_NPROC=$(( $i - 1 ))
856        L_NPROC=`printf "%04d\n" ${L_NPROC}`
857        ln -sf ../LONG/SAS_00000050_restart_ice_${L_NPROC}.nc .
858    done
859    cd ${SETTE_DIR}
860    . ./prepare_job.sh input_SAS.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS}
861    cd ${SETTE_DIR}
862    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
863fi
864
865# TESTS FOR ISOMIP CONFIGURATION
866if [ ${config} -eq 10 ] ;  then
867    ## Restartability tests for ISOMIP
868    export TEST_NAME="LONG"
869    cd ${CONFIG_DIR0}
870    . ./makenemo -m ${CMP_NAM} -n ISOMIP_LONG -r ISOMIP -a TEST_CASES -j 8 del_key ${DEL_KEYS}
871    cd ${SETTE_DIR}
872    . ./param.cfg
873    . ./all_functions.sh
874    . ./prepare_exe_dir.sh
875    JOB_FILE=${EXE_DIR}/run_job.sh
876    NPROC=32
877    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
878    cd ${EXE_DIR}
879    set_namelist namelist_cfg cn_exp \"ISOMIP_LONG\"
880    set_namelist namelist_cfg nn_it000 1
881    set_namelist namelist_cfg nn_itend 96
882    set_namelist namelist_cfg nn_stock 48
883    set_namelist namelist_cfg ln_clobber .true.
884    set_namelist namelist_cfg ln_read_cfg .false.
885    set_namelist namelist_cfg jpni 4
886    set_namelist namelist_cfg jpnj 8
887    set_namelist namelist_cfg jpnij 32
888    if [ ${USING_MPMD} == "yes" ] ; then
889       set_xio_using_server iodef.xml true
890    else
891       set_xio_using_server iodef.xml false
892    fi
893    cd ${SETTE_DIR}
894    . ./prepare_job.sh input_ISOMIP.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS}
895
896    cd ${SETTE_DIR}
897    export TEST_NAME="SHORT"
898    . ./prepare_exe_dir.sh
899    cd ${EXE_DIR}
900    set_namelist namelist_cfg cn_exp \"ISOMIP_SHORT\"
901    set_namelist namelist_cfg nn_it000 49
902    set_namelist namelist_cfg nn_itend 96
903    set_namelist namelist_cfg nn_stock 48
904    set_namelist namelist_cfg ln_rstart .true.
905    set_namelist namelist_cfg nn_rstctl 2
906    set_namelist namelist_cfg ln_clobber .true.
907    set_namelist namelist_cfg ln_read_cfg .false.
908    set_namelist namelist_cfg jpni 4
909    set_namelist namelist_cfg jpnj 8
910    set_namelist namelist_cfg jpnij 32
911    set_namelist namelist_cfg cn_ocerst_in \"ISOMIP_LONG_00000048_restart\"
912    if [ ${USING_MPMD} == "yes" ] ; then
913       set_xio_using_server iodef.xml true
914    else
915       set_xio_using_server iodef.xml false
916    fi
917    for (( i=1; i<=$NPROC; i++)) ; do
918        L_NPROC=$(( $i - 1 ))
919        L_NPROC=`printf "%04d\n" ${L_NPROC}`
920        ln -sf ../LONG/ISOMIP_LONG_00000048_restart_${L_NPROC}.nc .
921    done
922    if [ ${USING_MPMD} == "yes" ] ; then
923       set_xio_using_server iodef.xml true
924    else
925       set_xio_using_server iodef.xml false
926    fi
927    cd ${SETTE_DIR}
928    . ./prepare_job.sh input_ISOMIP.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS}
929    cd ${SETTE_DIR}
930    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
931fi
932if [ ${config} -eq 11 ] ;  then
933    ## Reproducibility tests for ISOMIP
934    export TEST_NAME="REPRO_4_8"
935    cd ${CONFIG_DIR0}
936    . ./makenemo -m ${CMP_NAM} -n ISOMIP_32 -r ISOMIP -a TEST_CASES -j 8 del_key ${DEL_KEYS}
937    cd ${SETTE_DIR}
938    . ./param.cfg
939    . ./all_functions.sh
940    . ./prepare_exe_dir.sh
941    JOB_FILE=${EXE_DIR}/run_job.sh
942    NPROC=32
943    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
944    cd ${EXE_DIR}
945    set_namelist namelist_cfg cn_exp \"ISOMIP_14\"
946    set_namelist namelist_cfg nn_it000 1
947    set_namelist namelist_cfg nn_itend 48
948    set_namelist namelist_cfg ln_ctl .false.
949    set_namelist namelist_cfg ln_clobber .true.
950    set_namelist namelist_cfg ln_read_cfg .false.
951    set_namelist namelist_cfg jpni 4
952    set_namelist namelist_cfg jpnj 8
953    set_namelist namelist_cfg jpnij 32
954    if [ ${USING_MPMD} == "yes" ] ; then
955       set_xio_using_server iodef.xml true
956    else
957       set_xio_using_server iodef.xml false
958    fi
959    cd ${SETTE_DIR}
960    . ./prepare_job.sh input_ISOMIP.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS}
961    cd ${SETTE_DIR}
962    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
963
964    cd ${SETTE_DIR}
965    export TEST_NAME="REPRO_8_4"
966    . ./prepare_exe_dir.sh
967    JOB_FILE=${EXE_DIR}/run_job.sh
968    NPROC=32
969    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
970    cd ${EXE_DIR}
971    set_namelist namelist_cfg cn_exp \"ISOMIP_22\"
972    set_namelist namelist_cfg nn_it000 1
973    set_namelist namelist_cfg nn_itend 48
974    set_namelist namelist_cfg ln_ctl .false.
975    set_namelist namelist_cfg ln_clobber .true.
976    set_namelist namelist_cfg ln_read_cfg .false.
977    set_namelist namelist_cfg jpni 8
978    set_namelist namelist_cfg jpnj 4
979    set_namelist namelist_cfg jpnij 32
980    if [ ${USING_MPMD} == "yes" ] ; then
981       set_xio_using_server iodef.xml true
982    else
983       set_xio_using_server iodef.xml false
984    fi
985    cd ${SETTE_DIR}
986    . ./prepare_job.sh input_ISOMIP.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS}
987    cd ${SETTE_DIR}
988    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
989
990fi
991
992## Test assimilation interface code, OBS and ASM for reproducibility
993## Restartability not tested (ASM code not restartable while increments are being applied)
994if [ ${config} -eq 12 ] ; then
995   ## Reproducibility tests for ORCA2_LIM3_OBS
996    export TEST_NAME="REPRO_4_8"
997    cd ${CONFIG_DIR0}
998    . ./makenemo -m ${CMP_NAM} -n ORCA2_LIM3_OBS -r ORCA2_LIM3_PISCES -d "OPA_SRC LIM_SRC_3"  -j 8 add_key "key_asminc" del_key "key_top"
999    cd ${SETTE_DIR}
1000    . ./param.cfg
1001    . ./all_functions.sh
1002    . ./prepare_exe_dir.sh
1003    JOB_FILE=${EXE_DIR}/run_job.sh
1004    NPROC=32
1005    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
1006    cd ${EXE_DIR}
1007    set_namelist namelist_cfg nn_it000 1
1008    set_namelist namelist_cfg nn_itend 75
1009    set_namelist namelist_cfg nn_fwb 0
1010    set_namelist namelist_cfg ln_ctl .false.
1011    set_namelist namelist_cfg ln_clobber .true.
1012    set_namelist namelist_cfg ln_read_cfg .true.
1013    set_namelist namelist_cfg ln_linssh .false.
1014    set_namelist namelist_cfg ln_icebergs .false.
1015    set_namelist namelist_cfg jpni 4
1016    set_namelist namelist_cfg jpnj 8
1017    set_namelist namelist_cfg jpnij 32
1018    set_namelist namelist_cfg ln_diaobs .true.
1019    set_namelist namelist_cfg ln_t3d .true.
1020    set_namelist namelist_cfg ln_s3d .true.
1021    set_namelist namelist_cfg ln_sst .true.
1022    set_namelist namelist_cfg ln_sla .true.
1023    set_namelist namelist_cfg ln_sic .true.
1024    set_namelist namelist_cfg ln_vel3d .true.
1025    set_namelist namelist_cfg ln_bkgwri .true.
1026    set_namelist namelist_cfg ln_trainc .true.
1027    set_namelist namelist_cfg ln_dyninc .true.
1028    set_namelist namelist_cfg ln_sshinc .true.
1029    set_namelist namelist_cfg ln_asmiau .true.
1030    #remove all useless options for pisces (due to ORCA2_LIM3_PISCES reference configuration)
1031    set_namelist namelist_top_cfg ln_trcdta .false.
1032    # put ln_ironsed, ln_river, ln_ndepo, ln_dust to false
1033    # if not you need input files, and for tests is not necessary
1034    set_namelist namelist_pisces_cfg ln_presatm .false.
1035    set_namelist namelist_pisces_cfg ln_varpar .false.
1036    set_namelist namelist_pisces_cfg ln_dust .false.
1037    set_namelist namelist_pisces_cfg ln_solub .false.
1038    set_namelist namelist_pisces_cfg ln_river .false.
1039    set_namelist namelist_pisces_cfg ln_ndepo .false.
1040    set_namelist namelist_pisces_cfg ln_ironsed .false.
1041    set_namelist namelist_pisces_cfg ln_ironice .false.
1042    set_namelist namelist_pisces_cfg ln_hydrofe .false.
1043    if [ ${USING_MPMD} == "yes" ] ; then
1044       set_xio_using_server iodef.xml true
1045    else
1046       set_xio_using_server iodef.xml false
1047    fi
1048    cd ${SETTE_DIR}
1049    . ./prepare_job.sh input_ORCA2_LIM3_OBS.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS}
1050    cd ${SETTE_DIR}
1051    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
1052
1053   cd ${SETTE_DIR}
1054    export TEST_NAME="REPRO_8_4"
1055    . ./prepare_exe_dir.sh
1056    JOB_FILE=${EXE_DIR}/run_job.sh
1057    NPROC=32
1058    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
1059    cd ${EXE_DIR}
1060    set_namelist namelist_cfg nn_it000 1
1061    set_namelist namelist_cfg nn_itend 75
1062    set_namelist namelist_cfg nn_fwb 0
1063    set_namelist namelist_cfg ln_ctl .false.
1064    set_namelist namelist_cfg ln_clobber .true.
1065    set_namelist namelist_cfg ln_read_cfg .true.
1066    set_namelist namelist_cfg ln_linssh .false.
1067    set_namelist namelist_cfg ln_icebergs .false.
1068    set_namelist namelist_cfg jpni 8
1069    set_namelist namelist_cfg jpnj 4
1070    set_namelist namelist_cfg jpnij 32
1071    set_namelist namelist_cfg ln_diaobs .true.
1072    set_namelist namelist_cfg ln_t3d .true.
1073    set_namelist namelist_cfg ln_s3d .true.
1074    set_namelist namelist_cfg ln_sst .true.
1075    set_namelist namelist_cfg ln_sla .true.
1076    set_namelist namelist_cfg ln_sic .true.
1077    set_namelist namelist_cfg ln_vel3d .true.
1078    set_namelist namelist_cfg ln_bkgwri .true.
1079    set_namelist namelist_cfg ln_trainc .true.
1080    set_namelist namelist_cfg ln_dyninc .true.
1081    set_namelist namelist_cfg ln_sshinc .true.
1082    set_namelist namelist_cfg ln_asmiau .true.
1083    #remove all useless options for pisces (due to ORCA2_LIM3_PISCES reference configuration)
1084    set_namelist namelist_top_cfg ln_trcdta .false.
1085    # put ln_ironsed, ln_river, ln_ndepo, ln_dust to false
1086    # if not you need input files, and for tests is not necessary
1087    set_namelist namelist_pisces_cfg ln_presatm .false.
1088    set_namelist namelist_pisces_cfg ln_varpar .false.
1089    set_namelist namelist_pisces_cfg ln_dust .false.
1090    set_namelist namelist_pisces_cfg ln_solub .false.
1091    set_namelist namelist_pisces_cfg ln_river .false.
1092    set_namelist namelist_pisces_cfg ln_ndepo .false.
1093    set_namelist namelist_pisces_cfg ln_ironsed .false.
1094    set_namelist namelist_pisces_cfg ln_ironice .false.
1095    set_namelist namelist_pisces_cfg ln_hydrofe .false.
1096    if [ ${USING_MPMD} == "yes" ] ; then
1097       set_xio_using_server iodef.xml true
1098    else
1099       set_xio_using_server iodef.xml false
1100    fi
1101    cd ${SETTE_DIR}
1102    . ./prepare_job.sh input_ORCA2_LIM3_OBS.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS}
1103    cd ${SETTE_DIR}
1104    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
1105fi
1106# TEST FOR ORCA2_LIM3_AGRIF : simple test of running AGRIF (no restartability neither reproducibility tests)
1107if [ ${config} -eq 13 ] ;  then
1108    ## ORCA2_LIM3 with Agulhas AGRIF zoom in MPI
1109    export TEST_NAME="SHORT"
1110    cd ${CONFIG_DIR0}
1111    . ./makenemo -m ${CMP_NAM} -n ORCA2AGUL_1_2 -r ORCA2_LIM3_PISCES -d "OPA_SRC LIM_SRC_3 NST_SRC" -j 8 add_key "key_agrif" del_key "key_top"
1112    cd ${SETTE_DIR}
1113    . ./param.cfg
1114    . ./all_functions.sh
1115    . ./prepare_exe_dir.sh
1116    JOB_FILE=${EXE_DIR}/run_job.sh
1117    NPROC=2
1118    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
1119    cd ${EXE_DIR}
1120    set_namelist namelist_cfg nn_it000 1
1121    set_namelist namelist_cfg nn_itend 75
1122    set_namelist namelist_cfg ln_ctl .false.
1123    set_namelist namelist_cfg ln_clobber .true.
1124    set_namelist namelist_cfg ln_read_cfg .true.
1125    set_namelist namelist_cfg ln_linssh .true.
1126    set_namelist namelist_cfg ln_hpg_sco .false.
1127    set_namelist namelist_cfg ln_hpg_zps .true.
1128    set_namelist namelist_cfg nn_fwb 0
1129    set_namelist namelist_cfg jpni 1
1130    set_namelist namelist_cfg jpnj 2
1131    set_namelist namelist_cfg jpnij 2
1132    set_namelist 1_namelist_cfg nn_it000 1
1133    set_namelist 1_namelist_cfg nn_itend 150
1134    set_namelist 1_namelist_cfg nn_fsbc 1
1135    set_namelist 1_namelist_cfg ln_ctl .false.
1136    set_namelist 1_namelist_cfg ln_clobber .true.
1137    set_namelist 1_namelist_cfg ln_read_cfg .true.
1138    set_namelist 1_namelist_cfg ln_linssh .true.
1139    set_namelist 1_namelist_cfg ln_zdfiwm .false.
1140    set_namelist 1_namelist_cfg ln_hpg_sco .false.
1141    set_namelist 1_namelist_cfg ln_hpg_zps .true.
1142    if [ ${USING_MPMD} == "yes" ] ; then
1143       set_xio_using_server iodef.xml true
1144    else
1145       set_xio_using_server iodef.xml false
1146    fi
1147    cd ${SETTE_DIR}
1148    . ./prepare_job.sh input_ORCA2_LIM3_AGRIF.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS}
1149    cd ${SETTE_DIR}
1150    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
1151fi
1152
1153# test code corruption with AGRIF
1154# Compile and run with or without AGRIF ORCA2_LIM3
1155if [ ${config} -eq 14 ] ;  then
1156    # First run same as 15 but without zoom
1157    export TEST_NAME="SHORT_NOZOOM"
1158    cd ${CONFIG_DIR0}
1159    . ./makenemo -m ${CMP_NAM} -n ORCA2AGUL_2_2 -r ORCA2_LIM3_PISCES -d "OPA_SRC LIM_SRC_3 NST_SRC" -j 8 add_key "key_agrif" del_key "key_top"
1160    cd ${SETTE_DIR}
1161    . ./param.cfg
1162    . ./all_functions.sh
1163    . ./prepare_exe_dir.sh
1164    JOB_FILE=${EXE_DIR}/run_job.sh
1165    NPROC=4
1166    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
1167    cd ${EXE_DIR}
1168    set_namelist namelist_cfg nn_it000 1
1169    set_namelist namelist_cfg nn_itend 75
1170    set_namelist namelist_cfg ln_ctl .false.
1171    set_namelist namelist_cfg ln_clobber .true.
1172    set_namelist namelist_cfg ln_read_cfg .true.
1173    set_namelist namelist_cfg ln_linssh .true.
1174    set_namelist namelist_cfg ln_hpg_sco .false.
1175    set_namelist namelist_cfg ln_hpg_zps .true.
1176    set_namelist namelist_cfg nn_fwb 0
1177    set_namelist namelist_cfg jpni 2
1178    set_namelist namelist_cfg jpnj 2
1179    set_namelist namelist_cfg jpnij 4
1180#
1181#   Set the number of fine grids to zero:   
1182    sed -i "1s/.*/0/" ${EXE_DIR}/AGRIF_FixedGrids.in
1183
1184    if [ ${USING_MPMD} == "yes" ] ; then
1185       set_xio_using_server iodef.xml true
1186    else
1187       set_xio_using_server iodef.xml false
1188    fi
1189    cd ${SETTE_DIR}
1190    . ./prepare_job.sh input_ORCA2_LIM3_AGRIF.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS}
1191    cd ${SETTE_DIR}
1192    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
1193
1194    export TEST_NAME="SHORT_NOAGRIF"
1195    cd ${CONFIG_DIR0}
1196    . ./makenemo -m ${CMP_NAM} -n ORCA2AGUL_2_2_NAG -r ORCA2_LIM3_PISCES -d "OPA_SRC LIM_SRC_3 NST_SRC" -j 8 del_key "key_top"
1197    cd ${SETTE_DIR}
1198    . ./param.cfg
1199    . ./all_functions.sh
1200    . ./prepare_exe_dir.sh
1201    JOB_FILE=${EXE_DIR}/run_job.sh
1202    NPROC=4
1203    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
1204    cd ${EXE_DIR}
1205    set_namelist namelist_cfg nn_it000 1
1206    set_namelist namelist_cfg nn_itend 75
1207    set_namelist namelist_cfg ln_ctl .false.
1208    set_namelist namelist_cfg ln_clobber .true.
1209    set_namelist namelist_cfg ln_read_cfg .true.
1210    set_namelist namelist_cfg ln_linssh .true.
1211    set_namelist namelist_cfg ln_hpg_sco .false.
1212    set_namelist namelist_cfg ln_hpg_zps .true.
1213    set_namelist namelist_cfg nn_fwb 0
1214    set_namelist namelist_cfg jpni 2
1215    set_namelist namelist_cfg jpnj 2
1216    set_namelist namelist_cfg jpnij 4
1217#
1218    if [ ${USING_MPMD} == "yes" ] ; then
1219       set_xio_using_server iodef.xml true
1220    else
1221       set_xio_using_server iodef.xml false
1222    fi
1223    cd ${SETTE_DIR}
1224    . ./prepare_job.sh input_ORCA2_LIM3_AGRIF.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS}
1225    cd ${SETTE_DIR}
1226    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
1227
1228fi
1229
1230## Restartability tests for ORCA2_LIM3_AGRIF
1231if [ ${config} -eq 15 ] ;  then
1232    export TEST_NAME="LONG"
1233    cd ${CONFIG_DIR0}
1234    . ./makenemo -m ${CMP_NAM} -n ORCA2AGUL_LONG -r ORCA2_LIM3_PISCES -d "OPA_SRC LIM_SRC_3 NST_SRC" -j 8 add_key "key_agrif" del_key "key_top"
1235    cd ${SETTE_DIR}
1236    . ./param.cfg
1237    . ./all_functions.sh
1238    . ./prepare_exe_dir.sh
1239    JOB_FILE=${EXE_DIR}/run_job.sh
1240    NPROC=4
1241    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
1242    cd ${EXE_DIR}
1243    set_namelist namelist_cfg cn_exp \"O2LP_LONG\"
1244    set_namelist namelist_cfg nn_it000 1
1245    set_namelist namelist_cfg nn_itend 150
1246    set_namelist namelist_cfg nn_stock 75
1247    set_namelist namelist_cfg ln_clobber .true.
1248    set_namelist namelist_cfg ln_read_cfg .true.
1249    set_namelist namelist_cfg ln_linssh .true.
1250    set_namelist namelist_cfg ln_hpg_sco .false.
1251    set_namelist namelist_cfg ln_hpg_zps .true.
1252    set_namelist namelist_cfg nn_fwb 0
1253    set_namelist namelist_cfg jpni 2
1254    set_namelist namelist_cfg jpnj 2
1255    set_namelist namelist_cfg jpnij 4
1256    set_namelist 1_namelist_cfg cn_exp \"O2LP_LONG\"
1257    set_namelist 1_namelist_cfg nn_it000 1
1258    set_namelist 1_namelist_cfg nn_itend 300
1259    set_namelist 1_namelist_cfg nn_stock 150
1260    set_namelist 1_namelist_cfg nn_fsbc 1
1261    set_namelist 1_namelist_cfg ln_ctl .false.
1262    set_namelist 1_namelist_cfg ln_clobber .true.
1263    set_namelist 1_namelist_cfg ln_read_cfg .true.
1264    set_namelist 1_namelist_cfg ln_linssh .true.
1265    set_namelist 1_namelist_cfg ln_zdfiwm .false.
1266    set_namelist 1_namelist_cfg ln_hpg_sco .false.
1267    set_namelist 1_namelist_cfg ln_hpg_zps .true.
1268#
1269    if [ ${USING_MPMD} == "yes" ] ; then
1270       set_xio_using_server iodef.xml true
1271    else
1272       set_xio_using_server iodef.xml false
1273    fi
1274    cd ${SETTE_DIR}
1275    . ./prepare_job.sh input_ORCA2_LIM3_AGRIF.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS}
1276   
1277    cd ${SETTE_DIR}
1278    export TEST_NAME="SHORT"
1279    . ./prepare_exe_dir.sh
1280    cd ${EXE_DIR}
1281    set_namelist namelist_cfg cn_exp \"O2LP_SHORT\"
1282    set_namelist namelist_cfg nn_it000 76
1283    set_namelist namelist_cfg nn_itend 150
1284    set_namelist namelist_cfg nn_stock 75
1285    set_namelist namelist_cfg ln_rstart .true.
1286    set_namelist namelist_cfg nn_rstctl 2
1287    set_namelist namelist_cfg ln_clobber .true.
1288    set_namelist namelist_cfg ln_read_cfg .true.
1289    set_namelist namelist_cfg ln_linssh .true.
1290    set_namelist namelist_cfg ln_hpg_sco .false.
1291    set_namelist namelist_cfg ln_hpg_zps .true.
1292    set_namelist namelist_cfg nn_fwb 0
1293    set_namelist namelist_cfg jpni 2
1294    set_namelist namelist_cfg jpnj 2
1295    set_namelist namelist_cfg jpnij 4
1296    set_namelist 1_namelist_cfg cn_exp \"O2LP_SHORT\"
1297    set_namelist 1_namelist_cfg nn_it000 151
1298    set_namelist 1_namelist_cfg nn_itend 300
1299    set_namelist 1_namelist_cfg nn_stock 150
1300    set_namelist 1_namelist_cfg nn_fsbc 1
1301    set_namelist 1_namelist_cfg ln_rstart .true.
1302    set_namelist 1_namelist_cfg nn_rstctl 2
1303    set_namelist 1_namelist_cfg ln_clobber .true.
1304    set_namelist 1_namelist_cfg ln_read_cfg .true.
1305    set_namelist 1_namelist_cfg ln_linssh .true.
1306    set_namelist 1_namelist_cfg ln_zdfiwm .false.
1307    set_namelist 1_namelist_cfg ln_hpg_sco .false.
1308    set_namelist 1_namelist_cfg ln_hpg_zps .true.
1309    set_namelist namelist_cfg cn_ocerst_in \"O2LP_LONG_00000075_restart\"
1310    set_namelist namelist_ice_cfg cn_icerst_in \"O2LP_LONG_00000075_restart_ice\"
1311    set_namelist 1_namelist_cfg cn_ocerst_in \"O2LP_LONG_00000150_restart\"
1312    set_namelist 1_namelist_ice_cfg cn_icerst_in \"O2LP_LONG_00000150_restart_ice\"
1313
1314    for (( i=1; i<=$NPROC; i++)) ; do
1315        L_NPROC=$(( $i - 1 ))
1316        L_NPROC=`printf "%04d\n" ${L_NPROC}`
1317        ln -sf ../LONG/O2LP_LONG_00000075_restart_${L_NPROC}.nc .
1318        ln -sf ../LONG/O2LP_LONG_00000075_restart_ice_${L_NPROC}.nc .
1319        ln -sf ../LONG/1_O2LP_LONG_00000150_restart_${L_NPROC}.nc .
1320        ln -sf ../LONG/1_O2LP_LONG_00000150_restart_ice_${L_NPROC}.nc .
1321    done
1322    if [ ${USING_MPMD} == "yes" ] ; then
1323       set_xio_using_server iodef.xml true
1324    else
1325       set_xio_using_server iodef.xml false
1326    fi
1327    cd ${SETTE_DIR}
1328    . ./prepare_job.sh input_ORCA2_LIM3_AGRIF.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS}
1329    cd ${SETTE_DIR}
1330    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
1331fi
1332
1333## Reproducibility tests for ORCA2_LIM3_AGRIF
1334if [ ${config} -eq 16 ] ;  then
1335    export TEST_NAME="REPRO_4_4"
1336    cd ${CONFIG_DIR0}
1337    . ./makenemo -m ${CMP_NAM} -n ORCA2AGUL_16 -r ORCA2_LIM3_PISCES -d "OPA_SRC LIM_SRC_3 NST_SRC" -j 8 add_key "key_agrif" del_key "key_top"
1338    cd ${SETTE_DIR}
1339    . ./param.cfg
1340    . ./all_functions.sh
1341    . ./prepare_exe_dir.sh
1342    JOB_FILE=${EXE_DIR}/run_job.sh
1343    NPROC=16
1344    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
1345    cd ${EXE_DIR}
1346    set_namelist namelist_cfg nn_it000 1
1347    set_namelist namelist_cfg nn_itend 75
1348    set_namelist namelist_cfg ln_ctl .false.
1349    set_namelist namelist_cfg ln_clobber .true.
1350    set_namelist namelist_cfg ln_read_cfg .true.
1351    set_namelist namelist_cfg ln_linssh .true.
1352    set_namelist namelist_cfg ln_hpg_sco .false.
1353    set_namelist namelist_cfg ln_hpg_zps .true.
1354    set_namelist namelist_cfg nn_fwb 0
1355    set_namelist namelist_cfg jpni 4
1356    set_namelist namelist_cfg jpnj 4
1357    set_namelist namelist_cfg jpnij 16
1358    set_namelist 1_namelist_cfg nn_it000 1
1359    set_namelist 1_namelist_cfg nn_itend 150
1360    set_namelist 1_namelist_cfg nn_fsbc 1
1361    set_namelist 1_namelist_cfg ln_ctl .false.
1362    set_namelist 1_namelist_cfg ln_clobber .true.
1363    set_namelist 1_namelist_cfg ln_read_cfg .true.
1364    set_namelist 1_namelist_cfg ln_zdfiwm .false.
1365    set_namelist 1_namelist_cfg ln_linssh .true.
1366    set_namelist 1_namelist_cfg ln_zdfiwm .false.
1367    set_namelist 1_namelist_cfg ln_hpg_sco .false.
1368    set_namelist 1_namelist_cfg ln_hpg_zps .true.
1369
1370    if [ ${USING_MPMD} == "yes" ] ; then
1371       set_xio_using_server iodef.xml true
1372    else
1373       set_xio_using_server iodef.xml false
1374    fi
1375    cd ${SETTE_DIR}
1376    . ./prepare_job.sh input_ORCA2_LIM3_AGRIF.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS}
1377    cd ${SETTE_DIR}
1378    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
1379
1380    cd ${SETTE_DIR}
1381    export TEST_NAME="REPRO_2_8"
1382    . ./prepare_exe_dir.sh
1383    JOB_FILE=${EXE_DIR}/run_job.sh
1384    NPROC=16
1385    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
1386    cd ${EXE_DIR}
1387    set_namelist namelist_cfg nn_it000 1
1388    set_namelist namelist_cfg nn_itend 75
1389    set_namelist namelist_cfg ln_ctl .false.
1390    set_namelist namelist_cfg ln_clobber .true.
1391    set_namelist namelist_cfg ln_read_cfg .true.
1392    set_namelist namelist_cfg ln_linssh .true.
1393    set_namelist namelist_cfg ln_hpg_sco .false.
1394    set_namelist namelist_cfg ln_hpg_zps .true.
1395    set_namelist namelist_cfg nn_fwb 0
1396    set_namelist namelist_cfg jpni 2
1397    set_namelist namelist_cfg jpnj 8
1398    set_namelist namelist_cfg jpnij 16
1399    set_namelist 1_namelist_cfg nn_it000 1
1400    set_namelist 1_namelist_cfg nn_itend 150
1401    set_namelist 1_namelist_cfg ln_ctl .false.
1402    set_namelist 1_namelist_cfg nn_fsbc 1
1403    set_namelist 1_namelist_cfg ln_clobber .true.
1404    set_namelist 1_namelist_cfg ln_read_cfg .true.
1405    set_namelist 1_namelist_cfg ln_linssh .true.
1406    set_namelist 1_namelist_cfg ln_zdfiwm .false.
1407    set_namelist 1_namelist_cfg ln_hpg_sco .false.
1408    set_namelist 1_namelist_cfg ln_hpg_zps .true.
1409
1410    if [ ${USING_MPMD} == "yes" ] ; then
1411       set_xio_using_server iodef.xml true
1412    else
1413       set_xio_using_server iodef.xml false
1414    fi
1415    cd ${SETTE_DIR}
1416    . ./prepare_job.sh input_ORCA2_LIM3_AGRIF.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS}
1417    cd ${SETTE_DIR}
1418    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
1419fi
1420
1421done
Note: See TracBrowser for help on using the repository browser.