source: branches/2016/dev_r7012_ROBUST5_CNRS/NEMOGCM/SETTE/sette.sh @ 7198

Last change on this file since 7198 was 7198, checked in by lovato, 4 years ago

New top interface : merge with dev_r7012_ROBUST5_CMCC (#1783) and update sette.sh

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