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

Last change on this file since 9576 was 9576, checked in by nicolasmartin, 3 years ago

Global renaming for SETTE + fix for key_lim3 in MY_SRC: push remaining modifications in order to start from a clean checkout

  • Property svn:executable set to *
File size: 48.4 KB
Line 
1#!/bin/bash
2############################################################
3# Author : Simona Flavoni for NEMO
4# Contact: sflod@locean-ipsl.upmc.fr
5# 2013   : A.C. Coward added options for testing with XIOS in dettached mode
6#
7# sette.sh   : principal script of SET TEsts for NEMO (SETTE)
8# ----------------------------------------------------------------------
9# NEMO/SETTE , NEMO Consortium (2010)
10# Software governed by the CeCILL licence     (NEMOGCM/NEMO_CeCILL.txt)
11# ----------------------------------------------------------------------
12#
13#############################################################
14#set -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 nemo 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_SI3_PISCES  :  2
137# ORCA2_OFF_PISCES  :  3
138# AMM12             :  4
139# SAS               :  5
140# ORCA2_SI3_OBS     :  6
141# AGRIF             :  7 & 8  test AGRIF in a double zoom configuration (AGRIF_NORDIC)
142#                               and check that key_agrif without zoom = no key_agrif
143# SPITZ12           :  9      regional configuration including sea-ice and tides (Spitzbergen)
144
145#for config in 1 2 3 4 5 6 7 8 9
146for config in 9
147do
148
149# -----------
150# GYRE_PISCES
151# -----------
152if [ ${config} -eq 1 ] ;  then
153## Restartability tests for GYRE_PISCES
154    export TEST_NAME="LONG"
155    cd ${CONFIG_DIR0}
156    . ./makenemo -m ${CMP_NAM} -n GYRE_PISCES_ST -r GYRE_PISCES -j 8 del_key ${DEL_KEYS}
157    cd ${SETTE_DIR}
158    . ./param.cfg
159    . ./all_functions.sh
160    . ./prepare_exe_dir.sh
161    JOB_FILE=${EXE_DIR}/run_job.sh
162    NPROC=8
163    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
164    cd ${EXE_DIR} 
165    set_namelist namelist_cfg cn_exp \"GYREPIS_LONG\"
166    set_namelist namelist_cfg nn_it000 1
167    set_namelist namelist_cfg nn_itend 1080
168    set_namelist namelist_cfg nn_stock  540
169    set_namelist namelist_cfg ln_linssh .true.
170    set_namelist namelist_cfg jpni 2
171    set_namelist namelist_cfg jpnj 4
172    set_namelist namelist_cfg jpnij 8
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 541
187    set_namelist namelist_cfg nn_itend 1080
188    set_namelist namelist_cfg nn_stock 540
189    set_namelist namelist_cfg ln_rstart .true.
190    set_namelist namelist_cfg nn_rstctl 2
191    set_namelist namelist_cfg ln_linssh .true.
192    set_namelist namelist_cfg jpni 2
193    set_namelist namelist_cfg jpnj 4
194    set_namelist namelist_cfg jpnij 8
195    set_namelist namelist_top_cfg ln_rsttr .true.
196    set_namelist namelist_top_cfg nn_rsttr 2
197    set_namelist namelist_cfg cn_ocerst_in \"GYREPIS_LONG_00000540_restart\"
198    set_namelist namelist_top_cfg cn_trcrst_in \"GYREPIS_LONG_00000540_restart_trc\"
199    if [ ${USING_MPMD} == "yes" ] ; then
200       set_xio_using_server iodef.xml true
201    else
202       set_xio_using_server iodef.xml false
203    fi
204    for (( i=1; i<=$NPROC; i++)) ; do
205        L_NPROC=$(( $i - 1 ))
206        L_NPROC=`printf "%04d\n" ${L_NPROC}`
207        ln -sf ../LONG/GYREPIS_LONG_00000540_restart_${L_NPROC}.nc .
208        ln -sf ../LONG/GYREPIS_LONG_00000540_restart_trc_${L_NPROC}.nc .
209    done
210    if [ ${USING_MPMD} == "yes" ] ; then
211       set_xio_using_server iodef.xml true
212    else
213       set_xio_using_server iodef.xml false
214    fi
215    cd ${SETTE_DIR}
216    . ./prepare_job.sh input_GYRE.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS}
217    cd ${SETTE_DIR}
218    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
219
220## Reproducibility tests for GYRE_PISCES
221    export TEST_NAME="REPRO_2_4"
222    cd ${CONFIG_DIR0}
223    cd ${SETTE_DIR}
224    . ./param.cfg
225    . ./all_functions.sh
226    . ./prepare_exe_dir.sh
227    JOB_FILE=${EXE_DIR}/run_job.sh
228    NPROC=8
229    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
230    cd ${EXE_DIR}
231    set_namelist namelist_cfg cn_exp \"GYREPIS_48\"
232    set_namelist namelist_cfg nn_it000 1
233    set_namelist namelist_cfg nn_itend 1080
234    set_namelist namelist_cfg ln_linssh .true.
235    set_namelist namelist_cfg jpni 2
236    set_namelist namelist_cfg jpnj 4
237    set_namelist namelist_cfg jpnij 8
238    if [ ${USING_MPMD} == "yes" ] ; then
239       set_xio_using_server iodef.xml true
240    else
241       set_xio_using_server iodef.xml false
242    fi
243    cd ${SETTE_DIR}
244    . ./prepare_job.sh input_GYRE.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS}
245    cd ${SETTE_DIR}
246    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
247
248    cd ${SETTE_DIR}
249    export TEST_NAME="REPRO_4_2"
250    . ./prepare_exe_dir.sh
251    JOB_FILE=${EXE_DIR}/run_job.sh
252    NPROC=8
253    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
254    cd ${EXE_DIR}
255    set_namelist namelist_cfg cn_exp \"GYREPIS_84\"
256    set_namelist namelist_cfg nn_it000 1
257    set_namelist namelist_cfg nn_itend 1080
258    set_namelist namelist_cfg ln_linssh .true.
259    set_namelist namelist_cfg jpni 4
260    set_namelist namelist_cfg jpnj 2
261    set_namelist namelist_cfg jpnij 8
262    if [ ${USING_MPMD} == "yes" ] ; then
263       set_xio_using_server iodef.xml true
264    else
265       set_xio_using_server iodef.xml false
266    fi
267    cd ${SETTE_DIR}
268    . ./prepare_job.sh input_GYRE.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS}
269    cd ${SETTE_DIR}
270    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
271
272fi
273
274# -----------------
275# ORCA2_SI3_PISCES
276# -----------------
277if [ ${config} -eq 2 ] ;  then
278## Restartability tests for ORCA2_SI3_PISCES
279    export TEST_NAME="LONG"
280    cd ${CONFIG_DIR0}
281    . ./makenemo -m ${CMP_NAM} -n ORCA2_SI3_PISCES_ST -r ORCA2_SI3_PISCES -j 8 del_key ${DEL_KEYS}
282    cd ${SETTE_DIR}
283    . ./param.cfg
284    . ./all_functions.sh
285    . ./prepare_exe_dir.sh
286    JOB_FILE=${EXE_DIR}/run_job.sh
287    NPROC=32
288    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
289    cd ${EXE_DIR}
290    set_namelist namelist_cfg cn_exp \"O2L3P_LONG\"
291    set_namelist namelist_cfg nn_it000 1
292    set_namelist namelist_cfg nn_itend 1000
293    set_namelist namelist_cfg nn_stock 500
294    set_namelist namelist_cfg jpni 4
295    set_namelist namelist_cfg jpnj 8
296    set_namelist namelist_cfg jpnij 32
297    set_namelist namelist_ice_cfg ln_icediachk .true.
298    set_namelist namelist_top_cfg ln_trcdta .false.
299    # put ln_ironsed, ln_river, ln_ndepo, ln_dust to false
300    # if not you need input files, and for tests is not necessary
301    set_namelist namelist_pisces_cfg ln_presatm .false.
302    set_namelist namelist_pisces_cfg ln_varpar .false.
303    set_namelist namelist_pisces_cfg ln_dust .false.
304    set_namelist namelist_pisces_cfg ln_solub .false.
305    set_namelist namelist_pisces_cfg ln_river .false.
306    set_namelist namelist_pisces_cfg ln_ndepo .false.
307    set_namelist namelist_pisces_cfg ln_ironsed .false.
308    set_namelist namelist_pisces_cfg ln_ironice .false.
309    set_namelist namelist_pisces_cfg ln_hydrofe .false.
310    # put ln_pisdmp to false : no restoring to global mean value
311    set_namelist namelist_pisces_cfg ln_pisdmp .false.
312    if [ ${USING_MPMD} == "yes" ] ; then
313       set_xio_using_server iodef.xml true
314    else
315       set_xio_using_server iodef.xml false
316    fi
317    cd ${SETTE_DIR}
318    . ./prepare_job.sh input_ORCA2_SI3_PISCES.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS}
319   
320    cd ${SETTE_DIR}
321    export TEST_NAME="SHORT"
322    . ./prepare_exe_dir.sh
323    cd ${EXE_DIR}
324    set_namelist namelist_cfg cn_exp \"O2L3P_SHORT\"
325    set_namelist namelist_cfg nn_it000 501
326    set_namelist namelist_cfg nn_itend 1000
327    set_namelist namelist_cfg nn_stock 500
328    set_namelist namelist_cfg ln_rstart .true.
329    set_namelist namelist_cfg nn_rstctl 2
330    set_namelist namelist_cfg jpni 4
331    set_namelist namelist_cfg jpnj 8
332    set_namelist namelist_cfg jpnij 32
333    set_namelist namelist_top_cfg ln_rsttr .true.
334    set_namelist namelist_top_cfg nn_rsttr 2
335    set_namelist namelist_cfg cn_ocerst_in \"O2L3P_LONG_00000500_restart\"
336    set_namelist namelist_top_cfg cn_trcrst_in \"O2L3P_LONG_00000500_restart_trc\"
337    set_namelist namelist_ice_cfg cn_icerst_in \"O2L3P_LONG_00000500_restart_ice\"
338    # put ln_ironsed, ln_river, ln_ndepo, ln_dust
339    # if not you need input files, and for tests is not necessary
340    set_namelist namelist_pisces_cfg ln_presatm .false.
341    set_namelist namelist_pisces_cfg ln_varpar .false.
342    set_namelist namelist_pisces_cfg ln_dust .false.
343    set_namelist namelist_pisces_cfg ln_solub .false.
344    set_namelist namelist_pisces_cfg ln_river .false.
345    set_namelist namelist_pisces_cfg ln_ndepo .false.
346    set_namelist namelist_pisces_cfg ln_ironsed .false.
347    set_namelist namelist_pisces_cfg ln_ironice .false.
348    set_namelist namelist_pisces_cfg ln_hydrofe .false.
349    # put ln_pisdmp to false : no restoring to global mean value
350    set_namelist namelist_pisces_cfg ln_pisdmp .false.
351    for (( i=1; i<=$NPROC; i++)) ; do
352        L_NPROC=$(( $i - 1 ))
353        L_NPROC=`printf "%04d\n" ${L_NPROC}`
354        ln -sf ../LONG/O2L3P_LONG_00000500_restart_${L_NPROC}.nc .
355        ln -sf ../LONG/O2L3P_LONG_00000500_restart_trc_${L_NPROC}.nc .
356        ln -sf ../LONG/O2L3P_LONG_00000500_restart_ice_${L_NPROC}.nc .
357        ln -sf ../LONG/O2L3P_LONG_icebergs_00000500_restart_${L_NPROC}.nc O2L3P_LONG_00000500_restart_icebergs_${L_NPROC}.nc
358    done
359    if [ ${USING_MPMD} == "yes" ] ; then
360       set_xio_using_server iodef.xml true
361    else
362       set_xio_using_server iodef.xml false
363    fi
364    cd ${SETTE_DIR}
365    . ./prepare_job.sh input_ORCA2_SI3_PISCES.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS}
366    cd ${SETTE_DIR}
367    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
368
369## Reproducibility tests for ORCA2_SI3_PISCES
370    export TEST_NAME="REPRO_4_8"
371    cd ${CONFIG_DIR0}
372    cd ${SETTE_DIR}
373    . ./param.cfg
374    . ./all_functions.sh
375    . ./prepare_exe_dir.sh
376    JOB_FILE=${EXE_DIR}/run_job.sh
377    NPROC=32
378    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
379    cd ${EXE_DIR}
380    set_namelist namelist_cfg cn_exp \"O2L3P_48\"
381    set_namelist namelist_cfg nn_it000 1
382    set_namelist namelist_cfg nn_itend 1000
383    set_namelist namelist_cfg jpni 4
384    set_namelist namelist_cfg jpnj 8
385    set_namelist namelist_cfg jpnij 32
386    set_namelist namelist_top_cfg ln_trcdta .false.
387    # put ln_ironsed, ln_river, ln_ndepo, ln_dust to false
388    # if not you need input files, and for tests is not necessary
389    set_namelist namelist_pisces_cfg ln_presatm .false.
390    set_namelist namelist_pisces_cfg ln_varpar .false.
391    set_namelist namelist_pisces_cfg ln_dust .false.
392    set_namelist namelist_pisces_cfg ln_solub .false.
393    set_namelist namelist_pisces_cfg ln_river .false.
394    set_namelist namelist_pisces_cfg ln_ndepo .false.
395    set_namelist namelist_pisces_cfg ln_ironsed .false.
396    set_namelist namelist_pisces_cfg ln_ironice .false.
397    set_namelist namelist_pisces_cfg ln_hydrofe .false.
398    # put ln_pisdmp to false : no restoring to global mean value
399    set_namelist namelist_pisces_cfg ln_pisdmp .false.
400    if [ ${USING_MPMD} == "yes" ] ; then
401       set_xio_using_server iodef.xml true
402    else
403       set_xio_using_server iodef.xml false
404    fi
405    cd ${SETTE_DIR}
406    . ./prepare_job.sh input_ORCA2_SI3_PISCES.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS}
407    cd ${SETTE_DIR}
408    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
409
410    cd ${SETTE_DIR}
411    export TEST_NAME="REPRO_8_4"
412    . ./prepare_exe_dir.sh
413    JOB_FILE=${EXE_DIR}/run_job.sh
414    NPROC=32
415    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
416    cd ${EXE_DIR}
417    set_namelist namelist_cfg cn_exp \"O2L3P_84\"
418    set_namelist namelist_cfg nn_it000 1
419    set_namelist namelist_cfg nn_itend 1000
420    set_namelist namelist_cfg jpni 8
421    set_namelist namelist_cfg jpnj 4
422    set_namelist namelist_cfg jpnij 32
423    set_namelist namelist_top_cfg ln_trcdta .false.
424    # put ln_ironsed, ln_river, ln_ndepo, ln_dust to false
425    # if not you need input files, and for tests is not necessary
426    set_namelist namelist_pisces_cfg ln_presatm .false.
427    set_namelist namelist_pisces_cfg ln_varpar .false.
428    set_namelist namelist_pisces_cfg ln_dust .false.
429    set_namelist namelist_pisces_cfg ln_solub .false.
430    set_namelist namelist_pisces_cfg ln_river .false.
431    set_namelist namelist_pisces_cfg ln_ndepo .false.
432    set_namelist namelist_pisces_cfg ln_ironsed .false.
433    set_namelist namelist_pisces_cfg ln_ironice .false.
434    set_namelist namelist_pisces_cfg ln_hydrofe .false.
435    # put ln_pisdmp to false : no restoring to global mean value
436    set_namelist namelist_pisces_cfg ln_pisdmp .false.
437    if [ ${USING_MPMD} == "yes" ] ; then
438       set_xio_using_server iodef.xml true
439    else
440       set_xio_using_server iodef.xml false
441    fi
442    cd ${SETTE_DIR}
443    . ./prepare_job.sh input_ORCA2_SI3_PISCES.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS}
444    cd ${SETTE_DIR}
445    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
446fi
447
448# ----------------
449# ORCA2_OFF_PISCES
450# ----------------
451if [ ${config} -eq 3 ] ;  then
452## Restartability tests for ORCA2_OFF_PISCES
453    export TEST_NAME="LONG"
454    cd ${CONFIG_DIR0}
455    . ./makenemo -m ${CMP_NAM} -n ORCA2_OFF_PISCES_ST -r ORCA2_OFF_PISCES -j 8 del_key ${DEL_KEYS}
456    cd ${SETTE_DIR}
457    . ./param.cfg
458    . ./all_functions.sh
459    . ./prepare_exe_dir.sh
460    JOB_FILE=${EXE_DIR}/run_job.sh
461    NPROC=32
462    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
463    cd ${EXE_DIR}
464    set_namelist namelist_cfg cn_exp \"OFFP_LONG\"
465    set_namelist namelist_cfg nn_it000 1
466    set_namelist namelist_cfg nn_itend 380
467    set_namelist namelist_cfg nn_stock 190
468    set_namelist namelist_cfg jpni 4
469    set_namelist namelist_cfg jpnj 8
470    set_namelist namelist_cfg jpnij 32
471    set_namelist namelist_top_cfg ln_trcdta .false.
472    # put ln_ironsed, ln_river, ln_ndepo, ln_dust to false
473    # if not you need input files, and for tests is not necessary
474    set_namelist namelist_pisces_cfg ln_presatm .false.
475    set_namelist namelist_pisces_cfg ln_varpar .false.
476    set_namelist namelist_pisces_cfg ln_dust .false.
477    set_namelist namelist_pisces_cfg ln_solub .false.
478    set_namelist namelist_pisces_cfg ln_river .false.
479    set_namelist namelist_pisces_cfg ln_ndepo .false.
480    set_namelist namelist_pisces_cfg ln_ironsed .false.
481    set_namelist namelist_pisces_cfg ln_ironice .false.
482    set_namelist namelist_pisces_cfg ln_hydrofe .false.
483    # put ln_pisdmp to false : no restoring to global mean value
484    set_namelist namelist_pisces_cfg ln_pisdmp .false.
485    if [ ${USING_MPMD} == "yes" ] ; then
486       set_xio_using_server iodef.xml true
487    else
488       set_xio_using_server iodef.xml false
489    fi
490    cd ${SETTE_DIR}
491    . ./prepare_job.sh input_ORCA2_OFF_PISCES.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS}
492   
493    cd ${SETTE_DIR}
494    export TEST_NAME="SHORT"
495    . ./prepare_exe_dir.sh
496    cd ${EXE_DIR}
497    set_namelist namelist_cfg cn_exp \"OFFP_SHORT\"
498    set_namelist namelist_cfg nn_it000 191
499    set_namelist namelist_cfg nn_itend 380
500    set_namelist namelist_cfg nn_stock 190
501    set_namelist namelist_cfg jpni 4
502    set_namelist namelist_cfg jpnj 8
503    set_namelist namelist_cfg jpnij 32
504    set_namelist namelist_top_cfg ln_rsttr .true.
505    set_namelist namelist_top_cfg nn_rsttr 2
506    set_namelist namelist_top_cfg cn_trcrst_in \"OFFP_LONG_00000190_restart_trc\"
507    for (( i=1; i<=$NPROC; i++)) ; do
508        L_NPROC=$(( $i - 1 ))
509        L_NPROC=`printf "%04d\n" ${L_NPROC}`
510        ln -sf ../LONG/OFFP_LONG_00000190_restart_trc_${L_NPROC}.nc .
511    done
512    # put ln_ironsed, ln_river, ln_ndepo, ln_dust
513    # if not you need input files, and for tests is not necessary
514    set_namelist namelist_pisces_cfg ln_presatm .false.
515    set_namelist namelist_pisces_cfg ln_varpar .false.
516    set_namelist namelist_pisces_cfg ln_dust .false.
517    set_namelist namelist_pisces_cfg ln_solub .false.
518    set_namelist namelist_pisces_cfg ln_river .false.
519    set_namelist namelist_pisces_cfg ln_ndepo .false.
520    set_namelist namelist_pisces_cfg ln_ironsed .false.
521    set_namelist namelist_pisces_cfg ln_ironice .false.
522    set_namelist namelist_pisces_cfg ln_hydrofe .false.
523    # put ln_pisdmp to false : no restoring to global mean value
524    set_namelist namelist_pisces_cfg ln_pisdmp .false.
525    if [ ${USING_MPMD} == "yes" ] ; then
526       set_xio_using_server iodef.xml true
527    else
528       set_xio_using_server iodef.xml false
529    fi
530    cd ${SETTE_DIR}
531    . ./prepare_job.sh input_ORCA2_OFF_PISCES.cfg $NPROC ${TEST_NAME}  ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS}
532    cd ${SETTE_DIR}
533    . ./fcm_job.sh $NPROC  ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
534
535## Reproducibility tests for ORCA2_OFF_PISCES
536    export TEST_NAME="REPRO_4_8"
537    cd ${CONFIG_DIR0}
538    cd ${SETTE_DIR}
539    . ./param.cfg
540    . ./all_functions.sh
541    . ./prepare_exe_dir.sh
542    JOB_FILE=${EXE_DIR}/run_job.sh
543    NPROC=32
544    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
545    cd ${EXE_DIR}
546    set_namelist namelist_cfg cn_exp \"OFFP_48\"
547    set_namelist namelist_cfg nn_it000 1
548    set_namelist namelist_cfg nn_itend 380
549    set_namelist namelist_cfg jpni 4
550    set_namelist namelist_cfg jpnj 8
551    set_namelist namelist_cfg jpnij 32
552    set_namelist namelist_top_cfg ln_trcdta .false.
553    # put ln_ironsed, ln_river, ln_ndepo, ln_dust to false
554    # if not you need input files, and for tests is not necessary
555    set_namelist namelist_pisces_cfg ln_presatm .false.
556    set_namelist namelist_pisces_cfg ln_varpar .false.
557    set_namelist namelist_pisces_cfg ln_dust .false.
558    set_namelist namelist_pisces_cfg ln_solub .false.
559    set_namelist namelist_pisces_cfg ln_river .false.
560    set_namelist namelist_pisces_cfg ln_ndepo .false.
561    set_namelist namelist_pisces_cfg ln_ironsed .false.
562    set_namelist namelist_pisces_cfg ln_ironice .false.
563    set_namelist namelist_pisces_cfg ln_hydrofe .false.
564    # put ln_pisdmp to false : no restoring to global mean value
565    set_namelist namelist_pisces_cfg ln_pisdmp .false.
566    if [ ${USING_MPMD} == "yes" ] ; then
567       set_xio_using_server iodef.xml true
568    else
569       set_xio_using_server iodef.xml false
570    fi
571    cd ${SETTE_DIR}
572    . ./prepare_job.sh input_ORCA2_OFF_PISCES.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS}
573    cd ${SETTE_DIR}
574    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
575
576    cd ${SETTE_DIR}
577    export TEST_NAME="REPRO_8_4"
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 cn_exp \"OFFP_84\"
584    set_namelist namelist_cfg nn_it000 1
585    set_namelist namelist_cfg nn_itend 380
586    set_namelist namelist_cfg jpni 8
587    set_namelist namelist_cfg jpnj 4
588    set_namelist namelist_cfg jpnij 32
589    set_namelist namelist_top_cfg ln_trcdta .false.
590    # put ln_ironsed, ln_river, ln_ndepo, ln_dust to false
591    # if not you need input files, and for tests is not necessary
592    set_namelist namelist_pisces_cfg ln_presatm .false.
593    set_namelist namelist_pisces_cfg ln_varpar .false.
594    set_namelist namelist_pisces_cfg ln_dust .false.
595    set_namelist namelist_pisces_cfg ln_solub .false.
596    set_namelist namelist_pisces_cfg ln_river .false.
597    set_namelist namelist_pisces_cfg ln_ndepo .false.
598    set_namelist namelist_pisces_cfg ln_ironsed .false.
599    set_namelist namelist_pisces_cfg ln_ironice .false.
600    set_namelist namelist_pisces_cfg ln_hydrofe .false.
601    # put ln_pisdmp to false : no restoring to global mean value
602    set_namelist namelist_pisces_cfg ln_pisdmp .false.
603    if [ ${USING_MPMD} == "yes" ] ; then
604       set_xio_using_server iodef.xml true
605    else
606       set_xio_using_server iodef.xml false
607    fi
608    cd ${SETTE_DIR}
609    . ./prepare_job.sh input_ORCA2_OFF_PISCES.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS}
610    cd ${SETTE_DIR}
611    . ./fcm_job.sh $NPROC  ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
612fi
613
614# -----
615# AMM12
616# -----
617if [ ${config} -eq 4 ] ;  then
618    ## Restartability tests for AMM12
619    export TEST_NAME="LONG"
620    cd ${CONFIG_DIR0}
621    . ./makenemo -m ${CMP_NAM} -n AMM12_ST -r AMM12 -j 8 del_key ${DEL_KEYS}
622    cd ${SETTE_DIR}
623    . ./param.cfg
624    . ./all_functions.sh
625    . ./prepare_exe_dir.sh
626    JOB_FILE=${EXE_DIR}/run_job.sh
627    NPROC=32
628    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
629    cd ${EXE_DIR}
630    set_namelist namelist_cfg cn_exp \"AMM12_LONG\"
631    set_namelist namelist_cfg nn_it000 1
632    set_namelist namelist_cfg nn_itend 576
633    set_namelist namelist_cfg nn_stock 288
634    set_namelist namelist_cfg jpni 4
635    set_namelist namelist_cfg jpnj 8
636    set_namelist namelist_cfg jpnij 32
637    if [ ${USING_MPMD} == "yes" ] ; then
638       set_xio_using_server iodef.xml true
639    else
640       set_xio_using_server iodef.xml false
641    fi
642    cd ${SETTE_DIR}
643    . ./prepare_job.sh input_AMM12.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS}
644
645    cd ${SETTE_DIR}
646    export TEST_NAME="SHORT"
647    . ./prepare_exe_dir.sh
648    cd ${EXE_DIR}
649    set_namelist namelist_cfg cn_exp \"AMM12_SHORT\"
650    set_namelist namelist_cfg nn_it000 289
651    set_namelist namelist_cfg nn_itend 576
652    set_namelist namelist_cfg jpni 4
653    set_namelist namelist_cfg jpnj 8
654    set_namelist namelist_cfg jpnij 32
655    set_namelist namelist_cfg ln_rstart .true.
656    set_namelist namelist_cfg nn_rstctl 2
657    set_namelist namelist_cfg cn_ocerst_in \"AMM12_LONG_00000288_restart\"
658    set_namelist namelist_cfg nn_date0 20120102
659    for (( i=1; i<=$NPROC; i++)) ; do
660        L_NPROC=$(( $i - 1 ))
661        L_NPROC=`printf "%04d\n" ${L_NPROC}`
662        ln -sf ../LONG/AMM12_LONG_00000288_restart_${L_NPROC}.nc .
663    done
664    if [ ${USING_MPMD} == "yes" ] ; then
665       set_xio_using_server iodef.xml true
666    else
667       set_xio_using_server iodef.xml false
668    fi
669    cd ${SETTE_DIR}
670    . ./prepare_job.sh input_AMM12.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS}
671    cd ${SETTE_DIR}
672    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
673
674## Reproducibility tests for AMM12
675    export TEST_NAME="REPRO_8_4"
676    cd ${CONFIG_DIR0}
677    cd ${SETTE_DIR}
678    . ./param.cfg
679    . ./all_functions.sh
680    . ./prepare_exe_dir.sh
681    JOB_FILE=${EXE_DIR}/run_job.sh
682    NPROC=32
683    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
684    cd ${EXE_DIR}
685    set_namelist namelist_cfg cn_exp \"AMM12_84\"
686    set_namelist namelist_cfg nn_it000 1
687    set_namelist namelist_cfg nn_itend 576
688    set_namelist namelist_cfg jpni 8
689    set_namelist namelist_cfg jpnj 4
690    set_namelist namelist_cfg jpnij 32
691    if [ ${USING_MPMD} == "yes" ] ; then
692       set_xio_using_server iodef.xml true
693    else
694       set_xio_using_server iodef.xml false
695    fi
696    cd ${SETTE_DIR}
697    . ./prepare_job.sh input_AMM12.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS}
698    cd ${SETTE_DIR}
699    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
700
701    cd ${SETTE_DIR}
702    export TEST_NAME="REPRO_4_8"
703    . ./prepare_exe_dir.sh
704    JOB_FILE=${EXE_DIR}/run_job.sh
705    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
706    cd ${EXE_DIR}
707    set_namelist namelist_cfg cn_exp \"AMM12_48\"
708    set_namelist namelist_cfg nn_it000 1
709    set_namelist namelist_cfg nn_itend 576
710    set_namelist namelist_cfg jpni 4
711    set_namelist namelist_cfg jpnj 8
712    set_namelist namelist_cfg jpnij 32
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
724
725# ---------
726# ORCA2_SAS
727# ---------
728if [ ${config} -eq 5 ] ;  then
729## Restartability tests
730    export TEST_NAME="LONG"
731    cd ${CONFIG_DIR0}
732    . ./makenemo -m ${CMP_NAM} -n ORCA2_SAS_SI3_ST -r ORCA2_SAS_SI3 -j 8 del_key ${DEL_KEYS}
733    cd ${SETTE_DIR}
734    . ./param.cfg
735    . ./all_functions.sh
736    . ./prepare_exe_dir.sh
737    JOB_FILE=${EXE_DIR}/run_job.sh
738    NPROC=32
739    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
740    cd ${EXE_DIR}
741    set_namelist namelist_cfg cn_exp \"SAS\"
742    set_namelist namelist_cfg nn_it000 1
743    set_namelist namelist_cfg nn_itend 240
744    set_namelist namelist_cfg nn_stock 120
745    set_namelist namelist_cfg jpni 4
746    set_namelist namelist_cfg jpnj 8
747    set_namelist namelist_cfg jpnij 32
748    set_namelist namelist_ice_cfg ln_icediachk .true.
749    if [ ${USING_MPMD} == "yes" ] ; then
750       set_xio_using_server iodef.xml true
751    else
752       set_xio_using_server iodef.xml false
753    fi
754    cd ${SETTE_DIR}
755    . ./prepare_job.sh input_SAS.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS}
756
757    cd ${SETTE_DIR}
758    export TEST_NAME="SHORT"
759    . ./prepare_exe_dir.sh
760    cd ${EXE_DIR}
761    set_namelist namelist_cfg cn_exp \"SAS\"
762    set_namelist namelist_cfg nn_it000 121
763    set_namelist namelist_cfg nn_itend 240
764    set_namelist namelist_cfg jpni 4
765    set_namelist namelist_cfg jpnj 8
766    set_namelist namelist_cfg jpnij 32
767    set_namelist namelist_cfg ln_rstart .true.
768    set_namelist namelist_cfg nn_rstctl 2
769    set_namelist namelist_cfg nn_date0 010109
770    set_namelist namelist_cfg cn_ocerst_in \"SAS_00000120_restart\"
771    set_namelist namelist_ice_cfg cn_icerst_in \"SAS_00000120_restart_ice\"
772    if [ ${USING_MPMD} == "yes" ] ; then
773       set_xio_using_server iodef.xml true
774    else
775       set_xio_using_server iodef.xml false
776    fi
777    for (( i=1; i<=$NPROC; i++)) ; do
778        L_NPROC=$(( $i - 1 ))
779        L_NPROC=`printf "%04d\n" ${L_NPROC}`
780        ln -sf ../LONG/SAS_00000120_restart_${L_NPROC}.nc .
781        ln -sf ../LONG/SAS_00000120_restart_ice_${L_NPROC}.nc .
782    done
783    cd ${SETTE_DIR}
784    . ./prepare_job.sh input_SAS.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS}
785    cd ${SETTE_DIR}
786    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
787
788## Reproducibility tests
789    export TEST_NAME="REPRO_4_8"
790    cd ${CONFIG_DIR0}
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_48\"
800    set_namelist namelist_cfg nn_it000 1
801    set_namelist namelist_cfg nn_itend 75
802    set_namelist namelist_cfg jpni 4
803    set_namelist namelist_cfg jpnj 8
804    set_namelist namelist_cfg jpnij 32
805    if [ ${USING_MPMD} == "yes" ] ; then
806       set_xio_using_server iodef.xml true
807    else
808       set_xio_using_server iodef.xml false
809    fi
810    cd ${SETTE_DIR}
811    . ./prepare_job.sh input_SAS.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS}
812    cd ${SETTE_DIR}
813    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
814
815    cd ${SETTE_DIR}
816    export TEST_NAME="REPRO_8_4"
817    . ./prepare_exe_dir.sh
818    JOB_FILE=${EXE_DIR}/run_job.sh
819    NPROC=32
820    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
821    cd ${EXE_DIR}
822    set_namelist namelist_cfg cn_exp \"SAS_84\"
823    set_namelist namelist_cfg nn_it000 1
824    set_namelist namelist_cfg nn_itend 75
825    set_namelist namelist_cfg jpni 8
826    set_namelist namelist_cfg jpnj 4
827    set_namelist namelist_cfg jpnij 32
828    if [ ${USING_MPMD} == "yes" ] ; then
829       set_xio_using_server iodef.xml true
830    else
831       set_xio_using_server iodef.xml false
832    fi
833    cd ${SETTE_DIR}
834    . ./prepare_job.sh input_SAS.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS}
835    cd ${SETTE_DIR}
836    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
837
838fi
839
840
841# --------------
842# ORCA2_SI3_OBS
843# --------------
844## Test assimilation interface code, OBS and ASM for reproducibility
845## Restartability not tested (ASM code not restartable while increments are being applied)
846if [ ${config} -eq 6 ] ; then
847## Reproducibility tests
848    export TEST_NAME="REPRO_4_8"
849    cd ${CONFIG_DIR0}
850    . ./makenemo -m ${CMP_NAM} -n ORCA2_SI3_OBS_ST -r ORCA2_SI3_PISCES -d "OCE_SRC ICE_SRC"  -j 8 add_key "key_asminc" del_key "key_top"
851    cd ${SETTE_DIR}
852    . ./param.cfg
853    . ./all_functions.sh
854    . ./prepare_exe_dir.sh
855    JOB_FILE=${EXE_DIR}/run_job.sh
856    NPROC=32
857    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
858    cd ${EXE_DIR}
859    set_namelist namelist_cfg cn_exp \"O2L3OBS_48\"
860    set_namelist namelist_cfg nn_it000 1
861    set_namelist namelist_cfg nn_itend 75
862    set_namelist namelist_cfg ln_read_cfg .true.
863    set_namelist namelist_cfg jpni 4
864    set_namelist namelist_cfg jpnj 8
865    set_namelist namelist_cfg jpnij 32
866    set_namelist namelist_cfg ln_diaobs .true.
867    set_namelist namelist_cfg ln_t3d .true.
868    set_namelist namelist_cfg ln_s3d .true.
869    set_namelist namelist_cfg ln_sst .true.
870    set_namelist namelist_cfg ln_sla .true.
871    set_namelist namelist_cfg ln_sic .true.
872    set_namelist namelist_cfg ln_vel3d .true.
873    set_namelist namelist_cfg ln_bkgwri .true.
874    set_namelist namelist_cfg ln_trainc .true.
875    set_namelist namelist_cfg ln_dyninc .true.
876    set_namelist namelist_cfg ln_sshinc .true.
877    set_namelist namelist_cfg ln_asmiau .true.
878    #remove all useless options for pisces (due to ORCA2_SI3_PISCES reference configuration)
879    set_namelist namelist_top_cfg ln_trcdta .false.
880    # put ln_ironsed, ln_river, ln_ndepo, ln_dust to false
881    # if not you need input files, and for tests is not necessary
882    set_namelist namelist_pisces_cfg ln_presatm .false.
883    set_namelist namelist_pisces_cfg ln_varpar .false.
884    set_namelist namelist_pisces_cfg ln_dust .false.
885    set_namelist namelist_pisces_cfg ln_solub .false.
886    set_namelist namelist_pisces_cfg ln_river .false.
887    set_namelist namelist_pisces_cfg ln_ndepo .false.
888    set_namelist namelist_pisces_cfg ln_ironsed .false.
889    set_namelist namelist_pisces_cfg ln_ironice .false.
890    set_namelist namelist_pisces_cfg ln_hydrofe .false.
891    if [ ${USING_MPMD} == "yes" ] ; then
892       set_xio_using_server iodef.xml true
893    else
894       set_xio_using_server iodef.xml false
895    fi
896    cd ${SETTE_DIR}
897    . ./prepare_job.sh input_ORCA2_SI3_OBS.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS}
898    cd ${SETTE_DIR}
899    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
900
901   cd ${SETTE_DIR}
902    export TEST_NAME="REPRO_8_4"
903    . ./prepare_exe_dir.sh
904    JOB_FILE=${EXE_DIR}/run_job.sh
905    NPROC=32
906    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
907    cd ${EXE_DIR}
908    set_namelist namelist_cfg cn_exp \"O2L3OBS_84\"
909    set_namelist namelist_cfg nn_it000 1
910    set_namelist namelist_cfg nn_itend 75
911    set_namelist namelist_cfg ln_read_cfg .true.
912    set_namelist namelist_cfg jpni 8
913    set_namelist namelist_cfg jpnj 4
914    set_namelist namelist_cfg jpnij 32
915    set_namelist namelist_cfg ln_diaobs .true.
916    set_namelist namelist_cfg ln_t3d .true.
917    set_namelist namelist_cfg ln_s3d .true.
918    set_namelist namelist_cfg ln_sst .true.
919    set_namelist namelist_cfg ln_sla .true.
920    set_namelist namelist_cfg ln_sic .true.
921    set_namelist namelist_cfg ln_vel3d .true.
922    set_namelist namelist_cfg ln_bkgwri .true.
923    set_namelist namelist_cfg ln_trainc .true.
924    set_namelist namelist_cfg ln_dyninc .true.
925    set_namelist namelist_cfg ln_sshinc .true.
926    set_namelist namelist_cfg ln_asmiau .true.
927    #remove all useless options for pisces (due to ORCA2_SI3_PISCES reference configuration)
928    set_namelist namelist_top_cfg ln_trcdta .false.
929    # put ln_ironsed, ln_river, ln_ndepo, ln_dust to false
930    # if not you need input files, and for tests is not necessary
931    set_namelist namelist_pisces_cfg ln_presatm .false.
932    set_namelist namelist_pisces_cfg ln_varpar .false.
933    set_namelist namelist_pisces_cfg ln_dust .false.
934    set_namelist namelist_pisces_cfg ln_solub .false.
935    set_namelist namelist_pisces_cfg ln_river .false.
936    set_namelist namelist_pisces_cfg ln_ndepo .false.
937    set_namelist namelist_pisces_cfg ln_ironsed .false.
938    set_namelist namelist_pisces_cfg ln_ironice .false.
939    set_namelist namelist_pisces_cfg ln_hydrofe .false.
940    if [ ${USING_MPMD} == "yes" ] ; then
941       set_xio_using_server iodef.xml true
942    else
943       set_xio_using_server iodef.xml false
944    fi
945    cd ${SETTE_DIR}
946    . ./prepare_job.sh input_ORCA2_SI3_OBS.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS}
947    cd ${SETTE_DIR}
948    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
949fi
950
951# ------------
952# AGRIF NORDIC
953# -----------
954if [ ${config} -eq 7 ] ;  then
955## Restartability tests
956    export TEST_NAME="LONG"
957    cd ${CONFIG_DIR0}
958    . ./makenemo -m ${CMP_NAM} -n AGRIF_NORDIC_ST -r AGRIF_NORDIC -j 8 del_key "key_top"
959    cd ${SETTE_DIR}
960    . ./param.cfg
961    . ./all_functions.sh
962    . ./prepare_exe_dir.sh
963    JOB_FILE=${EXE_DIR}/run_job.sh
964    NPROC=32
965    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
966    cd ${EXE_DIR}
967    set_namelist namelist_cfg cn_exp \"AGRIF_LONG\"
968    set_namelist namelist_cfg nn_it000 1
969    set_namelist namelist_cfg nn_itend 20
970    set_namelist namelist_cfg nn_stock 10
971    set_namelist 1_namelist_cfg cn_exp \"AGRIF_LONG\"
972    set_namelist 1_namelist_cfg nn_it000 1
973    set_namelist 1_namelist_cfg nn_itend 80
974    set_namelist 1_namelist_cfg nn_stock 40
975    set_namelist 2_namelist_cfg cn_exp \"AGRIF_LONG\"
976    set_namelist 2_namelist_cfg nn_it000 1
977    set_namelist 2_namelist_cfg nn_itend 240
978    set_namelist 2_namelist_cfg nn_stock 120
979
980    if [ ${USING_MPMD} == "yes" ] ; then
981       set_xio_using_server iodef.xml true
982    else
983       set_xio_using_server iodef.xml false
984    fi
985    cd ${SETTE_DIR}
986    . ./prepare_job.sh input_AGRIF.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS}
987   
988    cd ${SETTE_DIR}
989    export TEST_NAME="SHORT"
990    . ./prepare_exe_dir.sh
991    cd ${EXE_DIR}
992    set_namelist namelist_cfg cn_exp \"AGRIF_SHORT\"
993    set_namelist namelist_cfg nn_it000 11
994    set_namelist namelist_cfg nn_itend 20
995    set_namelist namelist_cfg nn_stock 10
996    set_namelist namelist_cfg ln_rstart .true.
997    set_namelist namelist_cfg nn_rstctl 2
998    set_namelist 1_namelist_cfg cn_exp \"AGRIF_SHORT\"
999    set_namelist 1_namelist_cfg nn_it000 41
1000    set_namelist 1_namelist_cfg nn_itend 80
1001    set_namelist 1_namelist_cfg nn_stock 40
1002    set_namelist 1_namelist_cfg ln_rstart .true.
1003    set_namelist 1_namelist_cfg nn_rstctl 2
1004    set_namelist 2_namelist_cfg cn_exp \"AGRIF_SHORT\"
1005    set_namelist 2_namelist_cfg nn_it000 121
1006    set_namelist 2_namelist_cfg nn_itend 240
1007    set_namelist 2_namelist_cfg nn_stock 120
1008    set_namelist 2_namelist_cfg ln_rstart .true.
1009    set_namelist 2_namelist_cfg nn_rstctl 2
1010    set_namelist namelist_cfg cn_ocerst_in \"AGRIF_LONG_00000010_restart\"
1011    set_namelist namelist_ice_cfg cn_icerst_in \"AGRIF_LONG_00000010_restart_ice\"
1012    set_namelist 1_namelist_cfg cn_ocerst_in \"AGRIF_LONG_00000040_restart\"
1013    set_namelist 1_namelist_ice_cfg cn_icerst_in \"AGRIF_LONG_00000040_restart_ice\"
1014    set_namelist 2_namelist_cfg cn_ocerst_in \"AGRIF_LONG_00000120_restart\"
1015    set_namelist 2_namelist_ice_cfg cn_icerst_in \"AGRIF_LONG_00000120_restart_ice\"
1016
1017    for (( i=1; i<=$NPROC; i++)) ; do
1018        L_NPROC=$(( $i - 1 ))
1019        L_NPROC=`printf "%04d\n" ${L_NPROC}`
1020        ln -sf ../LONG/AGRIF_LONG_00000010_restart_${L_NPROC}.nc .
1021        ln -sf ../LONG/AGRIF_LONG_00000010_restart_ice_${L_NPROC}.nc .
1022        ln -sf ../LONG/1_AGRIF_LONG_00000040_restart_${L_NPROC}.nc .
1023        ln -sf ../LONG/1_AGRIF_LONG_00000040_restart_ice_${L_NPROC}.nc .
1024        ln -sf ../LONG/2_AGRIF_LONG_00000120_restart_${L_NPROC}.nc .
1025        ln -sf ../LONG/2_AGRIF_LONG_00000120_restart_ice_${L_NPROC}.nc .
1026    done
1027    if [ ${USING_MPMD} == "yes" ] ; then
1028       set_xio_using_server iodef.xml true
1029    else
1030       set_xio_using_server iodef.xml false
1031    fi
1032    cd ${SETTE_DIR}
1033    . ./prepare_job.sh input_AGRIF.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS}
1034    cd ${SETTE_DIR}
1035    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
1036
1037## Reproducibility tests
1038    export TEST_NAME="REPRO_4_8"
1039    cd ${CONFIG_DIR0}
1040    cd ${SETTE_DIR}
1041    . ./param.cfg
1042    . ./all_functions.sh
1043    . ./prepare_exe_dir.sh
1044    JOB_FILE=${EXE_DIR}/run_job.sh
1045    NPROC=32
1046    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
1047    cd ${EXE_DIR}
1048    set_namelist namelist_cfg cn_exp \"AGRIF_48\"
1049    set_namelist namelist_cfg nn_it000 1
1050    set_namelist namelist_cfg nn_itend 20
1051    set_namelist namelist_cfg jpni 4
1052    set_namelist namelist_cfg jpnj 8
1053    set_namelist namelist_cfg jpnij 32
1054    set_namelist 1_namelist_cfg nn_it000 1
1055    set_namelist 1_namelist_cfg nn_itend 80
1056    set_namelist 1_namelist_cfg jpni 4
1057    set_namelist 1_namelist_cfg jpnj 8
1058    set_namelist 1_namelist_cfg jpnij 32
1059    set_namelist 2_namelist_cfg nn_it000 1
1060    set_namelist 2_namelist_cfg nn_itend 240
1061    set_namelist 2_namelist_cfg jpni 4
1062    set_namelist 2_namelist_cfg jpnj 8
1063    set_namelist 2_namelist_cfg jpnij 32
1064
1065    if [ ${USING_MPMD} == "yes" ] ; then
1066       set_xio_using_server iodef.xml true
1067    else
1068       set_xio_using_server iodef.xml false
1069    fi
1070    cd ${SETTE_DIR}
1071    . ./prepare_job.sh input_AGRIF.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS}
1072    cd ${SETTE_DIR}
1073    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
1074
1075    cd ${SETTE_DIR}
1076    export TEST_NAME="REPRO_8_4"
1077    . ./prepare_exe_dir.sh
1078    JOB_FILE=${EXE_DIR}/run_job.sh
1079    NPROC=32
1080    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
1081    cd ${EXE_DIR}
1082    set_namelist namelist_cfg cn_exp \"AGRIF_84\"
1083    set_namelist namelist_cfg nn_it000 1
1084    set_namelist namelist_cfg nn_itend 20
1085    set_namelist namelist_cfg jpni 8
1086    set_namelist namelist_cfg jpnj 4
1087    set_namelist namelist_cfg jpnij 32
1088    set_namelist 1_namelist_cfg nn_it000 1
1089    set_namelist 1_namelist_cfg nn_itend 80
1090    set_namelist 1_namelist_cfg jpni 8
1091    set_namelist 1_namelist_cfg jpnj 4
1092    set_namelist 1_namelist_cfg jpnij 32
1093    set_namelist 2_namelist_cfg nn_it000 1
1094    set_namelist 2_namelist_cfg nn_itend 240
1095    set_namelist 2_namelist_cfg jpni 8
1096    set_namelist 2_namelist_cfg jpnj 4
1097    set_namelist 2_namelist_cfg jpnij 32
1098
1099    if [ ${USING_MPMD} == "yes" ] ; then
1100       set_xio_using_server iodef.xml true
1101    else
1102       set_xio_using_server iodef.xml false
1103    fi
1104    cd ${SETTE_DIR}
1105    . ./prepare_job.sh input_AGRIF.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS}
1106    cd ${SETTE_DIR}
1107    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
1108
1109## test code corruption with AGRIF (phase 1) ==> Compile with key_agrif but run with no zoom
1110    export TEST_NAME="ORCA2"
1111    cd ${CONFIG_DIR0}
1112    cd ${SETTE_DIR}
1113    . ./param.cfg
1114    . ./all_functions.sh
1115    . ./prepare_exe_dir.sh
1116    JOB_FILE=${EXE_DIR}/run_job.sh
1117    NPROC=32
1118    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
1119    cd ${EXE_DIR}
1120    set_namelist namelist_cfg cn_exp \"ORCA2\"
1121    set_namelist namelist_cfg nn_it000 1
1122    set_namelist namelist_cfg nn_itend 150
1123
1124#   Set the number of fine grids to zero:   
1125    sed -i "1s/.*/0/" ${EXE_DIR}/AGRIF_FixedGrids.in
1126
1127    if [ ${USING_MPMD} == "yes" ] ; then
1128       set_xio_using_server iodef.xml true
1129    else
1130       set_xio_using_server iodef.xml false
1131    fi
1132    cd ${SETTE_DIR}
1133    . ./prepare_job.sh input_AGRIF.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS}
1134    cd ${SETTE_DIR}
1135    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
1136
1137fi
1138
1139
1140## test code corruption with AGRIF (phase 2) ==> Compile without key_agrif (to be compared with AGRIF_NORDIC_ST/ORCA2)
1141if [ ${config} -eq 8 ] ;  then
1142    export TEST_NAME="ORCA2"
1143    cd ${CONFIG_DIR0}
1144    . ./makenemo -m ${CMP_NAM} -n AGRIF_NORDIC_NOAGRIF_ST -r AGRIF_NORDIC -j 8 del_key "key_top key_agrif"
1145    cd ${SETTE_DIR}
1146    . ./param.cfg
1147    . ./all_functions.sh
1148    . ./prepare_exe_dir.sh
1149    JOB_FILE=${EXE_DIR}/run_job.sh
1150    NPROC=32
1151    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
1152    cd ${EXE_DIR}
1153    set_namelist namelist_cfg cn_exp \"ORCA2\"
1154    set_namelist namelist_cfg nn_it000 1
1155    set_namelist namelist_cfg nn_itend 150
1156#
1157    if [ ${USING_MPMD} == "yes" ] ; then
1158       set_xio_using_server iodef.xml true
1159    else
1160       set_xio_using_server iodef.xml false
1161    fi
1162    cd ${SETTE_DIR}
1163    . ./prepare_job.sh input_AGRIF.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS}
1164    cd ${SETTE_DIR}
1165    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
1166
1167fi
1168
1169
1170# -------
1171# SPITZ12
1172# -------
1173if [ ${config} -eq 9 ] ;  then
1174## Restartability tests
1175    export TEST_NAME="LONG"
1176    cd ${CONFIG_DIR0}
1177    . ./makenemo -m ${CMP_NAM} -n SPITZ12_ST -r SPITZ12 -j 8 del_key ${DEL_KEYS}
1178    cd ${SETTE_DIR}
1179    . ./param.cfg
1180    . ./all_functions.sh
1181    . ./prepare_exe_dir.sh
1182    JOB_FILE=${EXE_DIR}/run_job.sh
1183    NPROC=32
1184    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
1185    cd ${EXE_DIR}
1186    set_namelist namelist_cfg cn_exp \"S12_LONG\"
1187    set_namelist namelist_cfg nn_it000 1
1188    set_namelist namelist_cfg nn_itend 100
1189    set_namelist namelist_cfg nn_stock 50
1190    set_namelist namelist_cfg jpni 4
1191    set_namelist namelist_cfg jpnj 8
1192    set_namelist namelist_cfg jpnij 32
1193    set_namelist namelist_ice_cfg ln_icediachk .true.
1194    if [ ${USING_MPMD} == "yes" ] ; then
1195       set_xio_using_server iodef.xml true
1196    else
1197       set_xio_using_server iodef.xml false
1198    fi
1199    cd ${SETTE_DIR}
1200    . ./prepare_job.sh input_SPITZ12.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS}
1201   
1202    cd ${SETTE_DIR}
1203    export TEST_NAME="SHORT"
1204    . ./prepare_exe_dir.sh
1205    cd ${EXE_DIR}
1206    set_namelist namelist_cfg cn_exp \"S12_SHORT\"
1207    set_namelist namelist_cfg nn_it000 51
1208    set_namelist namelist_cfg nn_itend 100
1209    set_namelist namelist_cfg nn_stock 50
1210    set_namelist namelist_cfg ln_rstart .true.
1211    set_namelist namelist_cfg nn_rstctl 2
1212    set_namelist namelist_cfg jpni 4
1213    set_namelist namelist_cfg jpnj 8
1214    set_namelist namelist_cfg jpnij 32
1215    set_namelist namelist_cfg cn_ocerst_in \"S12_LONG_00000050_restart\"
1216    set_namelist namelist_ice_cfg cn_icerst_in \"S12_LONG_00000050_restart_ice\"
1217    for (( i=1; i<=$NPROC; i++)) ; do
1218        L_NPROC=$(( $i - 1 ))
1219        L_NPROC=`printf "%04d\n" ${L_NPROC}`
1220        ln -sf ../LONG/S12_LONG_00000050_restart_${L_NPROC}.nc .
1221        ln -sf ../LONG/S12_LONG_00000050_restart_ice_${L_NPROC}.nc .
1222    done
1223    if [ ${USING_MPMD} == "yes" ] ; then
1224       set_xio_using_server iodef.xml true
1225    else
1226       set_xio_using_server iodef.xml false
1227    fi
1228    cd ${SETTE_DIR}
1229    . ./prepare_job.sh input_SPITZ12.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS}
1230    cd ${SETTE_DIR}
1231    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
1232
1233## Reproducibility tests
1234    export TEST_NAME="REPRO_4_8"
1235    cd ${CONFIG_DIR0}
1236    cd ${SETTE_DIR}
1237    . ./param.cfg
1238    . ./all_functions.sh
1239    . ./prepare_exe_dir.sh
1240    JOB_FILE=${EXE_DIR}/run_job.sh
1241    NPROC=32
1242    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
1243    cd ${EXE_DIR}
1244    set_namelist namelist_cfg cn_exp \"S12_48\"
1245    set_namelist namelist_cfg nn_it000 1
1246    set_namelist namelist_cfg nn_itend 100
1247    set_namelist namelist_cfg jpni 4
1248    set_namelist namelist_cfg jpnj 8
1249    set_namelist namelist_cfg jpnij 32
1250    if [ ${USING_MPMD} == "yes" ] ; then
1251       set_xio_using_server iodef.xml true
1252    else
1253       set_xio_using_server iodef.xml false
1254    fi
1255    cd ${SETTE_DIR}
1256    . ./prepare_job.sh input_SPITZ12.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS}
1257    cd ${SETTE_DIR}
1258    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
1259
1260    cd ${SETTE_DIR}
1261    export TEST_NAME="REPRO_8_4"
1262    . ./prepare_exe_dir.sh
1263    JOB_FILE=${EXE_DIR}/run_job.sh
1264    NPROC=32
1265    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
1266    cd ${EXE_DIR}
1267    set_namelist namelist_cfg cn_exp \"S12_84\"
1268    set_namelist namelist_cfg nn_it000 1
1269    set_namelist namelist_cfg nn_itend 100
1270    set_namelist namelist_cfg jpni 8
1271    set_namelist namelist_cfg jpnj 4
1272    set_namelist namelist_cfg jpnij 32
1273    if [ ${USING_MPMD} == "yes" ] ; then
1274       set_xio_using_server iodef.xml true
1275    else
1276       set_xio_using_server iodef.xml false
1277    fi
1278    cd ${SETTE_DIR}
1279    . ./prepare_job.sh input_SPITZ12.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS}
1280    cd ${SETTE_DIR}
1281    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
1282fi
1283
1284
1285done
Note: See TracBrowser for help on using the repository browser.