source: branches/dev_r7148_ORCA2_LIM3_icb/NEMOGCM/SETTE/sette.sh @ 7202

Last change on this file since 7202 was 7202, checked in by mathiot, 5 years ago

add iceberg in ORCA2LIM3 config

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