New URL for NEMO forge!   http://forge.nemo-ocean.eu

Since March 2022 along with NEMO 4.2 release, the code development moved to a self-hosted GitLab.
This present forge is now archived and remained online for history.
sette.sh in branches/UKMO/dev_r5518_GO6_package_port2021/NEMOGCM/SETTE – NEMO

source: branches/UKMO/dev_r5518_GO6_package_port2021/NEMOGCM/SETTE/sette.sh @ 15338

Last change on this file since 15338 was 15338, checked in by andmirek, 3 years ago

Ticket GO29: tests 5 and 6

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