New URL for NEMO forge!   http://forge.nemo-ocean.eu

Since March 2022 along with NEMO 4.2 release, the code development moved to a self-hosted GitLab.
This present forge is now archived and remained online for history.
sette.sh in utils/CI/sette – NEMO

source: utils/CI/sette/sette.sh @ 9756

Last change on this file since 9756 was 9756, checked in by clem, 4 years ago

repair sette for test cases (in particular sas-biper and vortex)

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