source: branches/2017/dev_merge_2017/NEMOGCM/SETTE/sette.sh @ 9019

Last change on this file since 9019 was 9019, checked in by timgraham, 4 years ago

Merge of dev_CNRS_2017 into branch

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