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 @ 9776

Last change on this file since 9776 was 9776, checked in by clem, 6 years ago

change sette accordingly to the previous commit

  • Property svn:executable set to *
File size: 49.7 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 in the nordic seas + 1 zoom in the eq. Pacific (AGRIF_DEMO)
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_DEMO_ST -r AGRIF_DEMO -j 8 del_key ${DEL_KEYS}
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=16
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 20
967    set_namelist 1_namelist_cfg nn_stock 10
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 80
971    set_namelist 2_namelist_cfg nn_stock 40
972    set_namelist 3_namelist_cfg cn_exp \"AGRIF_LONG\"
973    set_namelist 3_namelist_cfg nn_it000 1
974    set_namelist 3_namelist_cfg nn_itend 240
975    set_namelist 3_namelist_cfg nn_stock 120
976
977    if [ ${USING_MPMD} == "yes" ] ; then
978       set_xio_using_server iodef.xml true
979    else
980       set_xio_using_server iodef.xml false
981    fi
982    cd ${SETTE_DIR}
983    . ./prepare_job.sh input_AGRIF.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS}
984   
985    cd ${SETTE_DIR}
986    export TEST_NAME="SHORT"
987    . ./prepare_exe_dir.sh
988    cd ${EXE_DIR}
989    set_namelist namelist_cfg cn_exp \"AGRIF_SHORT\"
990    set_namelist namelist_cfg nn_it000 11
991    set_namelist namelist_cfg nn_itend 20
992    set_namelist namelist_cfg nn_stock 10
993    set_namelist namelist_cfg ln_rstart .true.
994    set_namelist namelist_cfg nn_rstctl 2
995    set_namelist 1_namelist_cfg cn_exp \"AGRIF_SHORT\"
996    set_namelist 1_namelist_cfg nn_it000 11
997    set_namelist 1_namelist_cfg nn_itend 20
998    set_namelist 1_namelist_cfg nn_stock 10
999    set_namelist 1_namelist_cfg ln_rstart .true.
1000    set_namelist 1_namelist_cfg nn_rstctl 2
1001    set_namelist 2_namelist_cfg cn_exp \"AGRIF_SHORT\"
1002    set_namelist 2_namelist_cfg nn_it000 41
1003    set_namelist 2_namelist_cfg nn_itend 80
1004    set_namelist 2_namelist_cfg nn_stock 40
1005    set_namelist 2_namelist_cfg ln_rstart .true.
1006    set_namelist 2_namelist_cfg nn_rstctl 2
1007    set_namelist 3_namelist_cfg cn_exp \"AGRIF_SHORT\"
1008    set_namelist 3_namelist_cfg nn_it000 121
1009    set_namelist 3_namelist_cfg nn_itend 240
1010    set_namelist 3_namelist_cfg nn_stock 120
1011    set_namelist 3_namelist_cfg ln_rstart .true.
1012    set_namelist 3_namelist_cfg nn_rstctl 2
1013    set_namelist namelist_cfg cn_ocerst_in \"AGRIF_LONG_00000010_restart\"
1014    set_namelist namelist_ice_cfg cn_icerst_in \"AGRIF_LONG_00000010_restart_ice\"
1015    set_namelist 1_namelist_cfg cn_ocerst_in \"AGRIF_LONG_00000010_restart\"
1016    set_namelist 1_namelist_ice_cfg cn_icerst_in \"AGRIF_LONG_00000010_restart_ice\"
1017    set_namelist 2_namelist_cfg cn_ocerst_in \"AGRIF_LONG_00000040_restart\"
1018    set_namelist 2_namelist_ice_cfg cn_icerst_in \"AGRIF_LONG_00000040_restart_ice\"
1019    set_namelist 3_namelist_cfg cn_ocerst_in \"AGRIF_LONG_00000120_restart\"
1020    set_namelist 3_namelist_ice_cfg cn_icerst_in \"AGRIF_LONG_00000120_restart_ice\"
1021
1022    for (( i=1; i<=$NPROC; i++)) ; do
1023        L_NPROC=$(( $i - 1 ))
1024        L_NPROC=`printf "%04d\n" ${L_NPROC}`
1025        ln -sf ../LONG/AGRIF_LONG_00000010_restart_${L_NPROC}.nc .
1026        ln -sf ../LONG/AGRIF_LONG_00000010_restart_ice_${L_NPROC}.nc .
1027        ln -sf ../LONG/1_AGRIF_LONG_00000010_restart_${L_NPROC}.nc .
1028        ln -sf ../LONG/1_AGRIF_LONG_00000010_restart_ice_${L_NPROC}.nc .
1029        ln -sf ../LONG/2_AGRIF_LONG_00000040_restart_${L_NPROC}.nc .
1030        ln -sf ../LONG/2_AGRIF_LONG_00000040_restart_ice_${L_NPROC}.nc .
1031        ln -sf ../LONG/3_AGRIF_LONG_00000120_restart_${L_NPROC}.nc .
1032        ln -sf ../LONG/3_AGRIF_LONG_00000120_restart_ice_${L_NPROC}.nc .
1033    done
1034    if [ ${USING_MPMD} == "yes" ] ; then
1035       set_xio_using_server iodef.xml true
1036    else
1037       set_xio_using_server iodef.xml false
1038    fi
1039    cd ${SETTE_DIR}
1040    . ./prepare_job.sh input_AGRIF.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS}
1041    cd ${SETTE_DIR}
1042    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
1043
1044## Reproducibility tests
1045    export TEST_NAME="REPRO_4_8"
1046    cd ${MAIN_DIR}
1047    cd ${SETTE_DIR}
1048    . ./param.cfg
1049    . ./all_functions.sh
1050    . ./prepare_exe_dir.sh
1051    JOB_FILE=${EXE_DIR}/run_job.sh
1052    NPROC=32
1053    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
1054    cd ${EXE_DIR}
1055    set_namelist namelist_cfg cn_exp \"AGRIF_48\"
1056    set_namelist namelist_cfg nn_it000 1
1057    set_namelist namelist_cfg nn_itend 20
1058    set_namelist namelist_cfg jpni 4
1059    set_namelist namelist_cfg jpnj 8
1060    set_namelist namelist_cfg jpnij 32
1061    set_namelist 1_namelist_cfg cn_exp \"AGRIF_48\"
1062    set_namelist 1_namelist_cfg nn_it000 1
1063    set_namelist 1_namelist_cfg nn_itend 20
1064    set_namelist 1_namelist_cfg jpni 4
1065    set_namelist 1_namelist_cfg jpnj 8
1066    set_namelist 1_namelist_cfg jpnij 32
1067    set_namelist 2_namelist_cfg cn_exp \"AGRIF_48\"
1068    set_namelist 2_namelist_cfg nn_it000 1
1069    set_namelist 2_namelist_cfg nn_itend 80
1070    set_namelist 2_namelist_cfg jpni 4
1071    set_namelist 2_namelist_cfg jpnj 8
1072    set_namelist 2_namelist_cfg jpnij 32
1073    set_namelist 3_namelist_cfg cn_exp \"AGRIF_48\"
1074    set_namelist 3_namelist_cfg nn_it000 1
1075    set_namelist 3_namelist_cfg nn_itend 240
1076    set_namelist 3_namelist_cfg jpni 4
1077    set_namelist 3_namelist_cfg jpnj 8
1078    set_namelist 3_namelist_cfg jpnij 32
1079
1080    if [ ${USING_MPMD} == "yes" ] ; then
1081       set_xio_using_server iodef.xml true
1082    else
1083       set_xio_using_server iodef.xml false
1084    fi
1085    cd ${SETTE_DIR}
1086    . ./prepare_job.sh input_AGRIF.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS}
1087    cd ${SETTE_DIR}
1088    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
1089
1090    cd ${SETTE_DIR}
1091    export TEST_NAME="REPRO_8_4"
1092    . ./prepare_exe_dir.sh
1093    JOB_FILE=${EXE_DIR}/run_job.sh
1094    NPROC=32
1095    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
1096    cd ${EXE_DIR}
1097    set_namelist namelist_cfg cn_exp \"AGRIF_84\"
1098    set_namelist namelist_cfg nn_it000 1
1099    set_namelist namelist_cfg nn_itend 20
1100    set_namelist namelist_cfg jpni 8
1101    set_namelist namelist_cfg jpnj 4
1102    set_namelist namelist_cfg jpnij 32
1103    set_namelist 1_namelist_cfg cn_exp \"AGRIF_84\"
1104    set_namelist 1_namelist_cfg nn_it000 1
1105    set_namelist 1_namelist_cfg nn_itend 20
1106    set_namelist 1_namelist_cfg jpni 8
1107    set_namelist 1_namelist_cfg jpnj 4
1108    set_namelist 1_namelist_cfg jpnij 32
1109    set_namelist 2_namelist_cfg cn_exp \"AGRIF_84\"
1110    set_namelist 2_namelist_cfg nn_it000 1
1111    set_namelist 2_namelist_cfg nn_itend 80
1112    set_namelist 2_namelist_cfg jpni 8
1113    set_namelist 2_namelist_cfg jpnj 4
1114    set_namelist 2_namelist_cfg jpnij 32
1115    set_namelist 3_namelist_cfg cn_exp \"AGRIF_84\"
1116    set_namelist 3_namelist_cfg nn_it000 1
1117    set_namelist 3_namelist_cfg nn_itend 240
1118    set_namelist 3_namelist_cfg jpni 8
1119    set_namelist 3_namelist_cfg jpnj 4
1120    set_namelist 3_namelist_cfg jpnij 32
1121
1122    if [ ${USING_MPMD} == "yes" ] ; then
1123       set_xio_using_server iodef.xml true
1124    else
1125       set_xio_using_server iodef.xml false
1126    fi
1127    cd ${SETTE_DIR}
1128    . ./prepare_job.sh input_AGRIF.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS}
1129    cd ${SETTE_DIR}
1130    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
1131
1132## test code corruption with AGRIF (phase 1) ==> Compile with key_agrif but run with no zoom
1133    export TEST_NAME="ORCA2"
1134    cd ${MAIN_DIR}
1135    cd ${SETTE_DIR}
1136    . ./param.cfg
1137    . ./all_functions.sh
1138    . ./prepare_exe_dir.sh
1139    JOB_FILE=${EXE_DIR}/run_job.sh
1140    NPROC=32
1141    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
1142    cd ${EXE_DIR}
1143    set_namelist namelist_cfg cn_exp \"ORCA2\"
1144    set_namelist namelist_cfg nn_it000 1
1145    set_namelist namelist_cfg nn_itend 150
1146
1147#   Set the number of fine grids to zero:   
1148    sed -i "1s/.*/0/" ${EXE_DIR}/AGRIF_FixedGrids.in
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## test code corruption with AGRIF (phase 2) ==> Compile without key_agrif (to be compared with AGRIF_DEMO_ST/ORCA2)
1164if [ ${config} -eq 8 ] ;  then
1165    export TEST_NAME="ORCA2"
1166    cd ${MAIN_DIR}
1167    . ./makenemo -m ${CMP_NAM} -n AGRIF_DEMO_NOAGRIF_ST -r AGRIF_DEMO -j 8 del_key "key_agrif"
1168    cd ${SETTE_DIR}
1169    . ./param.cfg
1170    . ./all_functions.sh
1171    . ./prepare_exe_dir.sh
1172    JOB_FILE=${EXE_DIR}/run_job.sh
1173    NPROC=32
1174    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
1175    cd ${EXE_DIR}
1176    set_namelist namelist_cfg cn_exp \"ORCA2\"
1177    set_namelist namelist_cfg nn_it000 1
1178    set_namelist namelist_cfg nn_itend 150
1179#
1180    if [ ${USING_MPMD} == "yes" ] ; then
1181       set_xio_using_server iodef.xml true
1182    else
1183       set_xio_using_server iodef.xml false
1184    fi
1185    cd ${SETTE_DIR}
1186    . ./prepare_job.sh input_AGRIF.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS}
1187    cd ${SETTE_DIR}
1188    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
1189
1190fi
1191
1192# -------
1193# SPITZ12
1194# -------
1195if [ ${config} -eq 9 ] ;  then
1196## Restartability tests
1197    export TEST_NAME="LONG"
1198    cd ${MAIN_DIR}
1199    . ./makenemo -m ${CMP_NAM} -n SPITZ12_ST -r SPITZ12 -j 8 del_key ${DEL_KEYS}
1200    cd ${SETTE_DIR}
1201    . ./param.cfg
1202    . ./all_functions.sh
1203    . ./prepare_exe_dir.sh
1204    JOB_FILE=${EXE_DIR}/run_job.sh
1205    NPROC=32
1206    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
1207    cd ${EXE_DIR}
1208    set_namelist namelist_cfg cn_exp \"S12_LONG\"
1209    set_namelist namelist_cfg nn_it000 1
1210    set_namelist namelist_cfg nn_itend 240
1211    set_namelist namelist_cfg nn_stock 120
1212    set_namelist namelist_cfg nn_date0 20020101
1213    set_namelist namelist_cfg jpni 4
1214    set_namelist namelist_cfg jpnj 8
1215    set_namelist namelist_cfg jpnij 32
1216    #set_namelist namelist_ice_cfg ln_icediachk .true.
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   
1225    cd ${SETTE_DIR}
1226    export TEST_NAME="SHORT"
1227    . ./prepare_exe_dir.sh
1228    cd ${EXE_DIR}
1229    set_namelist namelist_cfg cn_exp \"S12_SHORT\"
1230    set_namelist namelist_cfg nn_it000 121
1231    set_namelist namelist_cfg nn_itend 240
1232    set_namelist namelist_cfg nn_stock 120
1233    set_namelist namelist_cfg ln_rstart .true.
1234    set_namelist namelist_cfg nn_rstctl 2
1235    set_namelist namelist_cfg jpni 4
1236    set_namelist namelist_cfg jpnj 8
1237    set_namelist namelist_cfg jpnij 32
1238    set_namelist namelist_cfg cn_ocerst_in \"S12_LONG_00000120_restart\"
1239    set_namelist namelist_ice_cfg cn_icerst_in \"S12_LONG_00000120_restart_ice\"
1240    for (( i=1; i<=$NPROC; i++)) ; do
1241        L_NPROC=$(( $i - 1 ))
1242        L_NPROC=`printf "%04d\n" ${L_NPROC}`
1243        ln -sf ../LONG/S12_LONG_00000120_restart_${L_NPROC}.nc .
1244        ln -sf ../LONG/S12_LONG_00000120_restart_ice_${L_NPROC}.nc .
1245    done
1246    if [ ${USING_MPMD} == "yes" ] ; then
1247       set_xio_using_server iodef.xml true
1248    else
1249       set_xio_using_server iodef.xml false
1250    fi
1251    cd ${SETTE_DIR}
1252    . ./prepare_job.sh input_SPITZ12.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS}
1253    cd ${SETTE_DIR}
1254    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
1255
1256## Reproducibility tests
1257    export TEST_NAME="REPRO_4_8"
1258    cd ${MAIN_DIR}
1259    cd ${SETTE_DIR}
1260    . ./param.cfg
1261    . ./all_functions.sh
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_48\"
1268    set_namelist namelist_cfg nn_it000 1
1269    set_namelist namelist_cfg nn_itend 120
1270    set_namelist namelist_cfg nn_date0 20020101
1271    set_namelist namelist_cfg jpni 4
1272    set_namelist namelist_cfg jpnj 8
1273    set_namelist namelist_cfg jpnij 32
1274    if [ ${USING_MPMD} == "yes" ] ; then
1275       set_xio_using_server iodef.xml true
1276    else
1277       set_xio_using_server iodef.xml false
1278    fi
1279    cd ${SETTE_DIR}
1280    . ./prepare_job.sh input_SPITZ12.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS}
1281    cd ${SETTE_DIR}
1282    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
1283
1284    cd ${SETTE_DIR}
1285    export TEST_NAME="REPRO_8_4"
1286    . ./prepare_exe_dir.sh
1287    JOB_FILE=${EXE_DIR}/run_job.sh
1288    NPROC=32
1289    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
1290    cd ${EXE_DIR}
1291    set_namelist namelist_cfg cn_exp \"S12_84\"
1292    set_namelist namelist_cfg nn_it000 1
1293    set_namelist namelist_cfg nn_itend 120
1294    set_namelist namelist_cfg nn_date0 20020101
1295    set_namelist namelist_cfg jpni 8
1296    set_namelist namelist_cfg jpnj 4
1297    set_namelist namelist_cfg jpnij 32
1298    if [ ${USING_MPMD} == "yes" ] ; then
1299       set_xio_using_server iodef.xml true
1300    else
1301       set_xio_using_server iodef.xml false
1302    fi
1303    cd ${SETTE_DIR}
1304    . ./prepare_job.sh input_SPITZ12.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS}
1305    cd ${SETTE_DIR}
1306    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
1307fi
1308
1309
1310done
Note: See TracBrowser for help on using the repository browser.