source: branches/2017/dev_METO_2017/NEMOGCM/SETTE/sette.sh @ 8989

Last change on this file since 8989 was 8989, checked in by timgraham, 3 years ago

Merged head of trunk into branch

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