source: branches/2017/dev_r8183_ICEMODEL/NEMOGCM/SETTE/sette.sh @ 8514

Last change on this file since 8514 was 8514, checked in by clem, 3 years ago

changes in style - part5 - almost done

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