source: branches/2015/dev_r5204_CNRS_PISCES_dcy/NEMOGCM/SETTE/sette.sh @ 5367

Last change on this file since 5367 was 5367, checked in by cetlod, 5 years ago

NEMOGCM_dev_r5204_CNRS_PISCES_dcy : merge in dev_r5171_CNRS_LIM3_seaicebgc

  • Property svn:executable set to *
File size: 47.1 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 -x
15set -o posix
16#set -u
17#set -e
18# ===========
19# DESCRIPTION
20# ===========
21#
22# Variables to be checked by user:
23#
24# COMPILER          : name of compiler as defined in NEMOGCM/ARCH directory
25# BATCH_COMMAND_PAR :  name of the command for submitting parallel batch jobs
26# BATCH_COMMAND_SEQ :  name of the command for submitting sequential batch jobs 
27# INTERACT_FLAG     : flag to run in interactive mode "yes"
28#                           to run in batch mode "no"
29# MPIRUN_FLAG       : flag to run in parallel (MPI) "yes"
30#                           to run in sequential mode (NB_PROC = 1) "no"
31# USING_XIOS        : flag to control the activation of key_iomput
32#                      "yes" to compile using key_iomput and link to the external XIOS library
33#                      "no"  to compile without key_iomput and link to the old IOIPSL library
34# USING_MPMD        : flag to control the use of stand-alone IO servers
35#                     requires USING_XIOS="yes"
36#                      "yes" to run in MPMD (detached) mode with stand-alone IO servers
37#                      "no"  to run in SPMD (attached) mode without separate IO servers
38# NUM_XIOSERVERS    : number of stand-alone IO servers to employ
39#                     set to zero if USING_MPMD="no"
40#
41# Principal script is sette.sh, that calls
42#
43#  makenemo  : to create successive exectuables in ${CONFIG_NAME}/BLD/bin/nemo.exe
44#              and links to opa in ${CONFIG_NAME}/EXP00)
45#
46#  param.cfg : sets and loads following directories:
47#
48#   FORCING_DIR         : is the directory for forcing files (tarfile)
49#   INPUT_DIR           : is the directory for input files storing
50#   TMPDIR              : is the temporary directory (if needed)
51#   NEMO_VALIDATION_DIR : is the validation directory
52#
53#   (NOTE: this file is the same for all configrations to be tested with sette)
54#
55#   all_functions.sh : loads functions used by sette (note: new functions can be added here)
56#   set_namelist     : function declared in all_functions that sets namelist parameters
57#   post_test_tidyup : creates validation storage directory and copies required output files
58#                      (solver.stat and ocean.output) in it after execution of test.
59#
60#  VALIDATION tree is:
61#
62#   NEMO_VALIDATION_DIR/WCONFIG_NAME/WCOMPILER_NAME/TEST_NAME/REVISION_NUMBER(or DATE)
63#
64#  prepare_exe_dir.sh : defines and creates directory where the test is executed
65#                       execution directory takes name of TEST_NAME defined for every test
66#                       in sette.sh. (each test in executed in its own directory)
67#
68#  prepare_job.sh     : to generate the script run_job.sh
69#
70#  fcm_job.sh         : run in batch (INTERACT_FLAG="no") or interactive (INTERACT_FLAG="yes")
71#                        see sette.sh and BATCH_TEMPLATE directory
72#
73#  NOTE: jobs requiring initial or forcing data need to have an input_CONFIG.cfg in which
74#        can be found paths to the input tar file)
75#  NOTE: if job is not launched for any reason you have the executable ready in ${EXE_DIR}
76#        directory
77#  NOTE: the changed namelists are left in ${EXE_DIR} directory whereas original namelists
78#        remain in ${NEW_CONF}/EXP00
79#
80#  NOTE: a log file, output.sette, is created in ${SETTE_DIR} with the echoes of
81#        executed commands
82#
83#  NOTE: if sette.sh is stopped in output.sette there is written the last command
84#        executed by sette.sh
85#
86# example use: ./sette.sh
87#########################################################################################
88#
89# Compiler among those in NEMOGCM/ARCH
90COMPILER=X64_ADA
91export BATCH_COMMAND_PAR="llsubmit"
92export BATCH_COMMAND_SEQ=$BATCH_COMMAND_PAR
93export INTERACT_FLAG="no"
94export MPIRUN_FLAG="yes"
95export USING_XIOS="yes"
96#
97export DEL_KEYS="key_iomput"
98if [ ${USING_XIOS} == "yes" ] 
99 then
100   export DEL_KEYS=""
101fi
102#
103# Settings which control the use of stand alone servers (only relevant if using xios)
104#
105export USING_MPMD="no"
106export NUM_XIOSERVERS=4
107export JOB_PREFIX=batch-mpmd
108#
109if [ ${USING_MPMD} == "no" ] 
110 then
111   export NUM_XIOSERVERS=0
112   export JOB_PREFIX=batch
113fi
114#
115#
116if [ ${USING_MPMD} == "yes" ] && [ ${USING_XIOS} == "no"]
117 then
118   echo "Incompatible choices. MPMD mode requires the XIOS server"
119   exit
120fi
121#
122
123# Directory to run the tests
124SETTE_DIR=$(cd $(dirname "$0"); pwd)
125MAIN_DIR=${SETTE_DIR%/SETTE}
126CONFIG_DIR=${MAIN_DIR}/CONFIG
127TOOLS_DIR=${MAIN_DIR}/TOOLS
128COMPIL_DIR=${TOOLS_DIR}/COMPILE
129
130CMP_NAM=${1:-$COMPILER}
131# Copy job_batch_COMPILER file for specific compiler into job_batch_template
132cd ${SETTE_DIR}
133cp BATCH_TEMPLATE/${JOB_PREFIX}-${COMPILER} job_batch_template || exit
134# Description of configuration tested:
135# GYRE            : 1 &  2
136# ORCA2_LIM_PISCES: 3 &  4
137# ORCA2_OFF_PISCES: 5 &  6
138# ORCA2_LIM3      : 7 &  8
139# AMM12           : 9 & 10
140# SAS             :11 & 12
141# ISOMIP          :13 & 14
142# ORCA2_LIM_OBS:   15
143# ORCA2_AGRIF_LIM :16
144for config in  1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
145
146do
147
148# TESTS FOR GYRE CONFIGURATION
149if [ ${config} -eq 1 ] ;  then
150    ## Restartability tests for GYRE
151    export TEST_NAME="LONG"
152    cd ${CONFIG_DIR}
153    . ./makenemo -m ${CMP_NAM} -n GYRE_LONG -r GYRE -j 8 del_key ${DEL_KEYS}
154    cd ${SETTE_DIR}
155    . ./param.cfg
156    . ./all_functions.sh
157    . ./prepare_exe_dir.sh
158    JOB_FILE=${EXE_DIR}/run_job.sh
159    NPROC=4
160    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
161    cd ${EXE_DIR} 
162    set_namelist namelist_cfg cn_exp \"GYRE_LONG\"
163    set_namelist namelist_cfg nn_it000 1
164    set_namelist namelist_cfg nn_itend 120
165    set_namelist namelist_cfg nn_stock 60
166    set_namelist namelist_cfg ln_clobber .true.
167    set_namelist namelist_cfg nn_fwb 0
168    set_namelist namelist_cfg nn_solv 2
169    set_namelist namelist_cfg jpni 2
170    set_namelist namelist_cfg jpnj 2
171    set_namelist namelist_cfg jpnij 4
172    if [ ${USING_MPMD} == "yes" ] ; then
173       set_xio_using_server iodef.xml true
174    else
175       set_xio_using_server iodef.xml false
176    fi
177    cd ${SETTE_DIR}
178    . ./prepare_job.sh input_GYRE.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS}
179
180    cd ${SETTE_DIR}
181    export TEST_NAME="SHORT"
182    . ./prepare_exe_dir.sh
183    cd ${EXE_DIR}
184    set_namelist namelist_cfg cn_exp \"GYRE_SHORT\"
185    set_namelist namelist_cfg nn_it000 61
186    set_namelist namelist_cfg nn_itend 120
187    set_namelist namelist_cfg nn_stock 60
188    set_namelist namelist_cfg ln_rstart .true.
189    set_namelist namelist_cfg nn_rstctl 2
190    set_namelist namelist_cfg ln_clobber .true.
191    set_namelist namelist_cfg nn_fwb 0
192    set_namelist namelist_cfg nn_solv 2
193    set_namelist namelist_cfg jpni 2
194    set_namelist namelist_cfg jpnj 2
195    set_namelist namelist_cfg jpnij 4
196    set_namelist namelist_cfg cn_ocerst_in \"GYRE_LONG_00000060_restart\"
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/GYRE_LONG_00000060_restart_${L_NPROC}.nc .
206    done
207    if [ ${USING_MPMD} == "yes" ] ; then
208       set_xio_using_server iodef.xml true
209    else
210       set_xio_using_server iodef.xml false
211    fi
212    cd ${SETTE_DIR}
213    . ./prepare_job.sh input_GYRE.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS}
214    cd ${SETTE_DIR}
215    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
216fi
217
218if [ ${config} -eq 2 ] ;  then
219    ## Reproducibility tests for GYRE
220    export TEST_NAME="REPRO_1_4"
221    cd ${CONFIG_DIR}
222    . ./makenemo -m ${CMP_NAM} -n GYRE_4 -r GYRE -j 8 add_key "key_mpp_rep" del_key ${DEL_KEYS}
223    cd ${SETTE_DIR}
224    . ./param.cfg
225    . ./all_functions.sh
226    . ./prepare_exe_dir.sh
227    JOB_FILE=${EXE_DIR}/run_job.sh
228    NPROC=4
229    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
230    cd ${EXE_DIR}
231    set_namelist namelist_cfg cn_exp \"GYRE_14\"
232    set_namelist namelist_cfg nn_it000 1
233    set_namelist namelist_cfg nn_itend 60
234    set_namelist namelist_cfg nn_fwb 0
235    set_namelist namelist_cfg nn_bench 0
236    set_namelist namelist_cfg ln_ctl .false.
237    set_namelist namelist_cfg ln_clobber .true.
238    set_namelist namelist_cfg nn_solv 2
239    set_namelist namelist_cfg jpni 1
240    set_namelist namelist_cfg jpnj 4
241    set_namelist namelist_cfg jpnij 4
242    if [ ${USING_MPMD} == "yes" ] ; then
243       set_xio_using_server iodef.xml true
244    else
245       set_xio_using_server iodef.xml false
246    fi
247    cd ${SETTE_DIR}
248    . ./prepare_job.sh input_GYRE.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS}
249    cd ${SETTE_DIR}
250    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
251
252    cd ${SETTE_DIR}
253    export TEST_NAME="REPRO_2_2"
254    . ./prepare_exe_dir.sh
255    JOB_FILE=${EXE_DIR}/run_job.sh
256    NPROC=4
257    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
258    cd ${EXE_DIR}
259    set_namelist namelist_cfg cn_exp \"GYRE_22\"
260    set_namelist namelist_cfg nn_it000 1
261    set_namelist namelist_cfg nn_itend 60
262    set_namelist namelist_cfg nn_fwb 0
263    set_namelist namelist_cfg ln_ctl .false.
264    set_namelist namelist_cfg ln_clobber .true.
265    set_namelist namelist_cfg nn_solv 2
266    set_namelist namelist_cfg jpni 2
267    set_namelist namelist_cfg jpnj 2
268    set_namelist namelist_cfg jpnij 4
269    if [ ${USING_MPMD} == "yes" ] ; then
270       set_xio_using_server iodef.xml true
271    else
272       set_xio_using_server iodef.xml false
273    fi
274    cd ${SETTE_DIR}
275    . ./prepare_job.sh input_GYRE.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS}
276    cd ${SETTE_DIR}
277    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
278
279fi
280
281# TESTS FOR ORCA2_LIM_PISCES CONFIGURATION
282if [ ${config} -eq 3 ] ;  then
283    ## Restartability tests for ORCA2_LIM_PISCES
284    export TEST_NAME="LONG"
285    cd ${CONFIG_DIR}
286    . ./makenemo -m ${CMP_NAM} -n ORCA2LIMPIS_LONG -r ORCA2_LIM_PISCES -j 8 del_key ${DEL_KEYS}
287    cd ${SETTE_DIR}
288    . ./param.cfg
289    . ./all_functions.sh
290    . ./prepare_exe_dir.sh
291    JOB_FILE=${EXE_DIR}/run_job.sh
292    NPROC=4
293    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
294    cd ${EXE_DIR}
295    set_namelist namelist_cfg cn_exp \"O2LP_LONG\"
296    set_namelist namelist_cfg nn_it000 1
297    set_namelist namelist_cfg nn_itend 150
298    set_namelist namelist_cfg nn_stock 75
299    set_namelist namelist_cfg ln_clobber .true.
300    set_namelist namelist_cfg nn_fwb 0
301    set_namelist namelist_cfg jpni 2
302    set_namelist namelist_cfg jpnj 2
303    set_namelist namelist_cfg jpnij 4
304    set_namelist namelist_cfg nn_solv 2
305    set_namelist namelist_top_cfg ln_trcdta .false.
306    set_namelist namelist_top_cfg ln_diatrc .false.
307    # put ln_ironsed, ln_river, ln_ndepo, ln_dust to false
308    # if not you need input files, and for tests is not necessary
309    set_namelist namelist_pisces_cfg ln_presatm .false.
310    set_namelist namelist_pisces_cfg ln_varpar .false.
311    set_namelist namelist_pisces_cfg ln_dust .false.
312    set_namelist namelist_pisces_cfg ln_solub .false.
313    set_namelist namelist_pisces_cfg ln_river .false.
314    set_namelist namelist_pisces_cfg ln_ndepo .false.
315    set_namelist namelist_pisces_cfg ln_ironsed .false.
316    set_namelist namelist_pisces_cfg ln_hydrofe .false.
317    if [ ${USING_MPMD} == "yes" ] ; then
318       set_xio_using_server iodef.xml true
319    else
320       set_xio_using_server iodef.xml false
321    fi
322    cd ${SETTE_DIR}
323    . ./prepare_job.sh input_ORCA2_LIM_PISCES.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS}
324   
325    cd ${SETTE_DIR}
326    export TEST_NAME="SHORT"
327    . ./prepare_exe_dir.sh
328    cd ${EXE_DIR}
329    set_namelist namelist_cfg cn_exp \"O2LP_SHORT\"
330    set_namelist namelist_cfg nn_it000 76
331    set_namelist namelist_cfg nn_itend 150
332    set_namelist namelist_cfg nn_stock 75
333    set_namelist namelist_cfg ln_rstart .true.
334    set_namelist namelist_cfg nn_rstctl 2
335    set_namelist namelist_cfg ln_clobber .true.
336    set_namelist namelist_cfg nn_fwb 0
337    set_namelist namelist_cfg jpni 2
338    set_namelist namelist_cfg jpnj 2
339    set_namelist namelist_cfg jpnij 4
340    set_namelist namelist_cfg nn_solv 2
341    set_namelist namelist_top_cfg ln_diatrc .false.
342    set_namelist namelist_top_cfg ln_rsttr .true.
343    set_namelist namelist_top_cfg nn_rsttr 2
344    set_namelist namelist_cfg cn_ocerst_in \"O2LP_LONG_00000075_restart\"
345    set_namelist namelist_ice_cfg cn_icerst_in \"O2LP_LONG_00000075_restart_ice\"
346    set_namelist namelist_top_cfg cn_trcrst_in \"O2LP_LONG_00000075_restart_trc\"
347    # put ln_ironsed, ln_river, ln_ndepo, ln_dust
348    # if not you need input files, and for tests is not necessary
349    set_namelist namelist_pisces_cfg ln_presatm .false.
350    set_namelist namelist_pisces_cfg ln_varpar .false.
351    set_namelist namelist_pisces_cfg ln_dust .false.
352    set_namelist namelist_pisces_cfg ln_solub .false.
353    set_namelist namelist_pisces_cfg ln_river .false.
354    set_namelist namelist_pisces_cfg ln_ndepo .false.
355    set_namelist namelist_pisces_cfg ln_ironsed .false.
356    set_namelist namelist_pisces_cfg ln_hydrofe .false.
357    # put ln_pisdmp to false : no restoring to global mean value
358    set_namelist namelist_pisces_cfg ln_pisdmp .false.
359    for (( i=1; i<=$NPROC; i++)) ; do
360        L_NPROC=$(( $i - 1 ))
361        L_NPROC=`printf "%04d\n" ${L_NPROC}`
362        ln -sf ../LONG/O2LP_LONG_00000075_restart_${L_NPROC}.nc .
363        ln -sf ../LONG/O2LP_LONG_00000075_restart_trc_${L_NPROC}.nc .
364        ln -sf ../LONG/O2LP_LONG_00000075_restart_ice_${L_NPROC}.nc .
365    done
366    if [ ${USING_MPMD} == "yes" ] ; then
367       set_xio_using_server iodef.xml true
368    else
369       set_xio_using_server iodef.xml false
370    fi
371    cd ${SETTE_DIR}
372    . ./prepare_job.sh input_ORCA2_LIM_PISCES.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS}
373    cd ${SETTE_DIR}
374    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
375fi
376
377if [ ${config} -eq 4 ] ;  then
378    ## Reproducibility tests for ORCA2_LIM_PISCES
379    export TEST_NAME="REPRO_4_4"
380    cd ${CONFIG_DIR}
381    . ./makenemo -m ${CMP_NAM} -n ORCA2LIMPIS_16 -r ORCA2_LIM_PISCES -j 8 add_key "key_mpp_rep" del_key ${DEL_KEYS}
382    cd ${SETTE_DIR}
383    . ./param.cfg
384    . ./all_functions.sh
385    . ./prepare_exe_dir.sh
386    JOB_FILE=${EXE_DIR}/run_job.sh
387    NPROC=16
388    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
389    cd ${EXE_DIR}
390    set_namelist namelist_cfg nn_it000 1
391    set_namelist namelist_cfg nn_itend 75
392    set_namelist namelist_cfg nn_fwb 0
393    set_namelist namelist_cfg ln_ctl .false.
394    set_namelist namelist_cfg ln_clobber .true.
395    set_namelist namelist_cfg jpni 4
396    set_namelist namelist_cfg jpnj 4
397    set_namelist namelist_cfg jpnij 16
398    set_namelist namelist_cfg nn_solv 2
399    set_namelist namelist_top_cfg ln_trcdta .false.
400    set_namelist namelist_top_cfg ln_diatrc .false.
401    # put ln_ironsed, ln_river, ln_ndepo, ln_dust to false
402    # if not you need input files, and for tests is not necessary
403    set_namelist namelist_pisces_cfg ln_presatm .false.
404    set_namelist namelist_pisces_cfg ln_varpar .false.
405    set_namelist namelist_pisces_cfg ln_dust .false.
406    set_namelist namelist_pisces_cfg ln_solub .false.
407    set_namelist namelist_pisces_cfg ln_river .false.
408    set_namelist namelist_pisces_cfg ln_ndepo .false.
409    set_namelist namelist_pisces_cfg ln_ironsed .false.
410    set_namelist namelist_pisces_cfg ln_hydrofe .false.
411    # put ln_pisdmp to false : no restoring to global mean value
412    set_namelist namelist_pisces_cfg ln_pisdmp .false.
413    if [ ${USING_MPMD} == "yes" ] ; then
414       set_xio_using_server iodef.xml true
415    else
416       set_xio_using_server iodef.xml false
417    fi
418    cd ${SETTE_DIR}
419    . ./prepare_job.sh input_ORCA2_LIM_PISCES.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS}
420    cd ${SETTE_DIR}
421    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
422
423    cd ${SETTE_DIR}
424    export TEST_NAME="REPRO_2_8"
425    . ./prepare_exe_dir.sh
426    JOB_FILE=${EXE_DIR}/run_job.sh
427    NPROC=16
428    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
429    cd ${EXE_DIR}
430    set_namelist namelist_cfg nn_it000 1
431    set_namelist namelist_cfg nn_itend 75
432    set_namelist namelist_cfg ln_clobber .true.
433    set_namelist namelist_cfg nn_fwb 0
434    set_namelist namelist_cfg jpni 2
435    set_namelist namelist_cfg jpnj 8
436    set_namelist namelist_cfg jpnij 16
437    set_namelist namelist_cfg nn_solv 2
438    set_namelist namelist_top_cfg ln_trcdta .false.
439    set_namelist namelist_top_cfg ln_diatrc .false.
440    # put ln_ironsed, ln_river, ln_ndepo, ln_dust to false
441    # if not you need input files, and for tests is not necessary
442    set_namelist namelist_pisces_cfg ln_presatm .false.
443    set_namelist namelist_pisces_cfg ln_varpar .false.
444    set_namelist namelist_pisces_cfg ln_dust .false.
445    set_namelist namelist_pisces_cfg ln_solub .false.
446    set_namelist namelist_pisces_cfg ln_river .false.
447    set_namelist namelist_pisces_cfg ln_ndepo .false.
448    set_namelist namelist_pisces_cfg ln_ironsed .false.
449    set_namelist namelist_pisces_cfg ln_hydrofe .false.
450    # put ln_pisdmp to false : no restoring to global mean value
451    set_namelist namelist_pisces_cfg ln_pisdmp .false.
452    if [ ${USING_MPMD} == "yes" ] ; then
453       set_xio_using_server iodef.xml true
454    else
455       set_xio_using_server iodef.xml false
456    fi
457    cd ${SETTE_DIR}
458    . ./prepare_job.sh input_ORCA2_LIM_PISCES.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS}
459    cd ${SETTE_DIR}
460    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
461fi
462
463# TESTS FOR ORCA2_OFF_PISCES CONFIGURATION
464if [ ${config} -eq 5 ] ;  then
465    ## Restartability tests for ORCA2_OFF_PISCES
466    export TEST_NAME="LONG"
467    cd ${CONFIG_DIR}
468    . ./makenemo -m ${CMP_NAM} -n ORCA2OFFPIS_LONG -r ORCA2_OFF_PISCES -j 8 add_key "key_mpp_rep" del_key ${DEL_KEYS}
469    cd ${SETTE_DIR}
470    . ./param.cfg
471    . ./all_functions.sh
472    . ./prepare_exe_dir.sh
473    JOB_FILE=${EXE_DIR}/run_job.sh
474    NPROC=4
475    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
476    cd ${EXE_DIR}
477    set_namelist namelist_cfg cn_exp \"OFFP_LONG\"
478    set_namelist namelist_cfg nn_it000 1
479    set_namelist namelist_cfg nn_itend 40
480    set_namelist namelist_cfg nn_stock 20
481    set_namelist namelist_cfg ln_clobber .true.
482    set_namelist namelist_cfg jpni 2
483    set_namelist namelist_cfg jpnj 2
484    set_namelist namelist_cfg jpnij 4
485    set_namelist namelist_top_cfg ln_trcdta .false.
486    set_namelist namelist_top_cfg ln_diatrc .false.
487    # put ln_ironsed, ln_river, ln_ndepo, ln_dust to false
488    # if not you need input files, and for tests is not necessary
489    set_namelist namelist_pisces_cfg ln_presatm .false.
490    set_namelist namelist_pisces_cfg ln_varpar .false.
491    set_namelist namelist_pisces_cfg ln_dust .false.
492    set_namelist namelist_pisces_cfg ln_solub .false.
493    set_namelist namelist_pisces_cfg ln_river .false.
494    set_namelist namelist_pisces_cfg ln_ndepo .false.
495    set_namelist namelist_pisces_cfg ln_ironsed .false.
496    set_namelist namelist_pisces_cfg ln_hydrofe .false.
497    # put ln_pisdmp to false : no restoring to global mean value
498    set_namelist namelist_pisces_cfg ln_pisdmp .false.
499    if [ ${USING_MPMD} == "yes" ] ; then
500       set_xio_using_server iodef.xml true
501    else
502       set_xio_using_server iodef.xml false
503    fi
504    cd ${SETTE_DIR}
505    . ./prepare_job.sh input_ORCA2_OFF_PISCES.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS}
506   
507    cd ${SETTE_DIR}
508    export TEST_NAME="SHORT"
509    . ./prepare_exe_dir.sh
510    cd ${EXE_DIR}
511    set_namelist namelist_cfg cn_exp \"OFFP_SHORT\"
512    set_namelist namelist_cfg nn_it000 21
513    set_namelist namelist_cfg nn_itend 40
514    set_namelist namelist_cfg nn_stock 20
515    set_namelist namelist_cfg ln_clobber .true.
516    set_namelist namelist_cfg jpni 2
517    set_namelist namelist_cfg jpnj 2
518    set_namelist namelist_cfg jpnij 4
519    set_namelist namelist_top_cfg ln_diatrc .false.
520    set_namelist namelist_top_cfg ln_rsttr .true.
521    set_namelist namelist_top_cfg nn_rsttr 2
522    set_namelist namelist_top_cfg cn_trcrst_in \"OFFP_LONG_00000020_restart_trc\"
523    for (( i=1; i<=$NPROC; i++)) ; do
524        L_NPROC=$(( $i - 1 ))
525        L_NPROC=`printf "%04d\n" ${L_NPROC}`
526        ln -sf ../LONG/OFFP_LONG_00000020_restart_trc_${L_NPROC}.nc .
527    done
528    # put ln_ironsed, ln_river, ln_ndepo, ln_dust
529    # if not you need input files, and for tests is not necessary
530    set_namelist namelist_pisces_cfg ln_presatm .false.
531    set_namelist namelist_pisces_cfg ln_varpar .false.
532    set_namelist namelist_pisces_cfg ln_dust .false.
533    set_namelist namelist_pisces_cfg ln_solub .false.
534    set_namelist namelist_pisces_cfg ln_river .false.
535    set_namelist namelist_pisces_cfg ln_ndepo .false.
536    set_namelist namelist_pisces_cfg ln_ironsed .false.
537    set_namelist namelist_pisces_cfg ln_hydrofe .false.
538    # put ln_pisdmp to false : no restoring to global mean value
539    set_namelist namelist_pisces_cfg ln_pisdmp .false.
540    if [ ${USING_MPMD} == "yes" ] ; then
541       set_xio_using_server iodef.xml true
542    else
543       set_xio_using_server iodef.xml false
544    fi
545    cd ${SETTE_DIR}
546    . ./prepare_job.sh input_ORCA2_OFF_PISCES.cfg $NPROC ${TEST_NAME}  ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS}
547    cd ${SETTE_DIR}
548    . ./fcm_job.sh $NPROC  ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
549fi
550
551if [ ${config} -eq 6 ] ;  then
552    ## Reproducibility tests for ORCA2_OFF_PISCES
553    export TEST_NAME="REPRO_4_4"
554    cd ${CONFIG_DIR}
555    . ./makenemo -m ${CMP_NAM} -n ORCA2OFFPIS_16 -r ORCA2_OFF_PISCES -j 8 add_key "key_mpp_rep" del_key ${DEL_KEYS}
556    cd ${SETTE_DIR}
557    . ./param.cfg
558    . ./all_functions.sh
559    . ./prepare_exe_dir.sh
560    JOB_FILE=${EXE_DIR}/run_job.sh
561    NPROC=16
562    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
563    cd ${EXE_DIR}
564    set_namelist namelist_cfg nn_it000 1
565    set_namelist namelist_cfg nn_itend 40
566    set_namelist namelist_cfg ln_ctl .false.
567    set_namelist namelist_cfg ln_clobber .true.
568    set_namelist namelist_cfg jpni 4
569    set_namelist namelist_cfg jpnj 4
570    set_namelist namelist_cfg jpnij 16
571    set_namelist namelist_top_cfg ln_trcdta .false.
572    set_namelist namelist_top_cfg ln_diatrc .false.
573    # put ln_ironsed, ln_river, ln_ndepo, ln_dust to false
574    # if not you need input files, and for tests is not necessary
575    set_namelist namelist_pisces_cfg ln_presatm .false.
576    set_namelist namelist_pisces_cfg ln_varpar .false.
577    set_namelist namelist_pisces_cfg ln_dust .false.
578    set_namelist namelist_pisces_cfg ln_solub .false.
579    set_namelist namelist_pisces_cfg ln_river .false.
580    set_namelist namelist_pisces_cfg ln_ndepo .false.
581    set_namelist namelist_pisces_cfg ln_ironsed .false.
582    set_namelist namelist_pisces_cfg ln_hydrofe .false.
583    # put ln_pisdmp to false : no restoring to global mean value
584    set_namelist namelist_pisces_cfg ln_pisdmp .false.
585    if [ ${USING_MPMD} == "yes" ] ; then
586       set_xio_using_server iodef.xml true
587    else
588       set_xio_using_server iodef.xml false
589    fi
590    cd ${SETTE_DIR}
591    . ./prepare_job.sh input_ORCA2_OFF_PISCES.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS}
592    cd ${SETTE_DIR}
593    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
594
595    cd ${SETTE_DIR}
596    export TEST_NAME="REPRO_2_8"
597    . ./prepare_exe_dir.sh
598    JOB_FILE=${EXE_DIR}/run_job.sh
599    NPROC=16
600    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
601    cd ${EXE_DIR}
602    set_namelist namelist_cfg nn_it000 1
603    set_namelist namelist_cfg nn_itend 40
604    set_namelist namelist_cfg ln_ctl .false.
605    set_namelist namelist_cfg ln_clobber .true.
606    set_namelist namelist_cfg jpni 2
607    set_namelist namelist_cfg jpnj 8
608    set_namelist namelist_cfg jpnij 16
609    set_namelist namelist_top_cfg ln_trcdta .false.
610    set_namelist namelist_top_cfg ln_diatrc .false.
611    # put ln_ironsed, ln_river, ln_ndepo, ln_dust to false
612    # if not you need input files, and for tests is not necessary
613    set_namelist namelist_pisces_cfg ln_presatm .false.
614    set_namelist namelist_pisces_cfg ln_varpar .false.
615    set_namelist namelist_pisces_cfg ln_dust .false.
616    set_namelist namelist_pisces_cfg ln_solub .false.
617    set_namelist namelist_pisces_cfg ln_river .false.
618    set_namelist namelist_pisces_cfg ln_ndepo .false.
619    set_namelist namelist_pisces_cfg ln_ironsed .false.
620    set_namelist namelist_pisces_cfg ln_hydrofe .false.
621    # put ln_pisdmp to false : no restoring to global mean value
622    set_namelist namelist_pisces_cfg ln_pisdmp .false.
623    if [ ${USING_MPMD} == "yes" ] ; then
624       set_xio_using_server iodef.xml true
625    else
626       set_xio_using_server iodef.xml false
627    fi
628    cd ${SETTE_DIR}
629    . ./prepare_job.sh input_ORCA2_OFF_PISCES.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS}
630    cd ${SETTE_DIR}
631    . ./fcm_job.sh $NPROC  ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
632fi
633
634
635# TESTS FOR ORCA2_LIM3 CONFIGURATION
636if [ ${config} -eq 7 ] ;  then
637    ## Restartability tests for ORCA2_LIM3
638    export TEST_NAME="LONG"
639    cd ${CONFIG_DIR}
640    . ./makenemo -m ${CMP_NAM} -n ORCA2LIM3_LONG -r ORCA2_LIM3 -j 8 del_key ${DEL_KEYS}
641    cd ${SETTE_DIR}
642    . ./param.cfg
643    . ./all_functions.sh
644    . ./prepare_exe_dir.sh
645    JOB_FILE=${EXE_DIR}/run_job.sh
646    NPROC=4
647    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
648    cd ${EXE_DIR}
649    set_namelist namelist_cfg cn_exp \"O2L3_LONG\"
650    set_namelist namelist_cfg nn_it000 1
651    set_namelist namelist_cfg nn_itend 150
652    set_namelist namelist_cfg nn_stock 75
653    set_namelist namelist_cfg ln_clobber .true.
654    set_namelist namelist_cfg nn_fwb 0
655    set_namelist namelist_cfg jpni 2
656    set_namelist namelist_cfg jpnj 2
657    set_namelist namelist_cfg jpnij 4
658    set_namelist namelist_cfg nn_solv 2
659    if [ ${USING_MPMD} == "yes" ] ; then
660       set_xio_using_server iodef.xml true
661    else
662       set_xio_using_server iodef.xml false
663    fi
664    cd ${SETTE_DIR}
665    . ./prepare_job.sh input_ORCA2_LIM3.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS}
666   
667    cd ${SETTE_DIR}
668    export TEST_NAME="SHORT"
669    . ./prepare_exe_dir.sh
670    cd ${EXE_DIR}
671    set_namelist namelist_cfg cn_exp \"O2L3_SHORT\"
672    set_namelist namelist_cfg nn_it000 76
673    set_namelist namelist_cfg nn_itend 150
674    set_namelist namelist_cfg nn_stock 75
675    set_namelist namelist_cfg ln_rstart .true.
676    set_namelist namelist_cfg nn_rstctl 2
677    set_namelist namelist_cfg ln_clobber .true.
678    set_namelist namelist_cfg nn_fwb 0
679    set_namelist namelist_cfg jpni 2
680    set_namelist namelist_cfg jpnj 2
681    set_namelist namelist_cfg jpnij 4
682    set_namelist namelist_cfg nn_solv 2
683    set_namelist namelist_cfg cn_ocerst_in \"O2L3_LONG_00000075_restart\"
684    set_namelist namelist_ice_cfg cn_icerst_in \"O2L3_LONG_00000075_restart_ice\"
685    for (( i=1; i<=$NPROC; i++)) ; do
686        L_NPROC=$(( $i - 1 ))
687        L_NPROC=`printf "%04d\n" ${L_NPROC}`
688        ln -sf ../LONG/O2L3_LONG_00000075_restart_${L_NPROC}.nc .
689        ln -sf ../LONG/O2L3_LONG_00000075_restart_ice_${L_NPROC}.nc .
690    done
691    if [ ${USING_MPMD} == "yes" ] ; then
692       set_xio_using_server iodef.xml true
693    else
694       set_xio_using_server iodef.xml false
695    fi
696    cd ${SETTE_DIR}
697    . ./prepare_job.sh input_ORCA2_LIM3.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS}
698    cd ${SETTE_DIR}
699    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
700fi
701
702if [ ${config} -eq 8 ] ;  then
703    ## Reproducibility tests for ORCA2_LIM3
704    export TEST_NAME="REPRO_4_4"
705    cd ${CONFIG_DIR}
706    . ./makenemo -m ${CMP_NAM} -n ORCA2LIM3_16 -r ORCA2_LIM3 -j 8 add_key "key_mpp_rep" del_key ${DEL_KEYS}
707    cd ${SETTE_DIR}
708    . ./param.cfg
709    . ./all_functions.sh
710    . ./prepare_exe_dir.sh
711    JOB_FILE=${EXE_DIR}/run_job.sh
712    NPROC=16
713    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
714    cd ${EXE_DIR}
715    set_namelist namelist_cfg nn_it000 1
716    set_namelist namelist_cfg nn_itend 75
717    set_namelist namelist_cfg nn_fwb 0
718    set_namelist namelist_cfg ln_ctl .false.
719    set_namelist namelist_cfg ln_clobber .true.
720    set_namelist namelist_cfg jpni 4
721    set_namelist namelist_cfg jpnj 4
722    set_namelist namelist_cfg jpnij 16
723    set_namelist namelist_cfg nn_solv 2
724    if [ ${USING_MPMD} == "yes" ] ; then
725       set_xio_using_server iodef.xml true
726    else
727       set_xio_using_server iodef.xml false
728    fi
729    cd ${SETTE_DIR}
730    . ./prepare_job.sh input_ORCA2_LIM3.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS}
731    cd ${SETTE_DIR}
732    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
733
734    cd ${SETTE_DIR}
735    export TEST_NAME="REPRO_2_8"
736    . ./prepare_exe_dir.sh
737    JOB_FILE=${EXE_DIR}/run_job.sh
738    NPROC=16
739    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
740    cd ${EXE_DIR}
741    set_namelist namelist_cfg nn_it000 1
742    set_namelist namelist_cfg nn_itend 75
743    set_namelist namelist_cfg ln_clobber .true.
744    set_namelist namelist_cfg nn_fwb 0
745    set_namelist namelist_cfg jpni 2
746    set_namelist namelist_cfg jpnj 8
747    set_namelist namelist_cfg jpnij 16
748    set_namelist namelist_cfg nn_solv 2
749    if [ ${USING_MPMD} == "yes" ] ; then
750       set_xio_using_server iodef.xml true
751    else
752       set_xio_using_server iodef.xml false
753    fi
754
755    cd ${SETTE_DIR}
756    . ./prepare_job.sh input_ORCA2_LIM3.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS}
757    cd ${SETTE_DIR}
758    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
759fi
760
761
762# TESTS FOR AMM12 CONFIGURATION
763if [ ${config} -eq 9 ] ;  then
764    ## Restartability tests for AMM12
765    export TEST_NAME="LONG"
766    cd ${CONFIG_DIR}
767    . ./makenemo -m ${CMP_NAM} -n AMM12_LONG -r AMM12 -j 8 add_key "key_tide" del_key ${DEL_KEYS}
768    cd ${SETTE_DIR}
769    . ./param.cfg
770    . ./all_functions.sh
771    . ./prepare_exe_dir.sh
772    JOB_FILE=${EXE_DIR}/run_job.sh
773    NPROC=32
774    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
775    cd ${EXE_DIR}
776    set_namelist namelist_cfg nn_it000 1
777    set_namelist namelist_cfg nn_itend 576
778    set_namelist namelist_cfg nn_stock 288
779    set_namelist namelist_cfg nn_fwb 0
780    set_namelist namelist_cfg ln_ctl .false.
781    set_namelist namelist_cfg ln_clobber .true.
782    set_namelist namelist_cfg jpni 8
783    set_namelist namelist_cfg jpnj 4
784    set_namelist namelist_cfg jpnij 32
785    if [ ${USING_MPMD} == "yes" ] ; then
786       set_xio_using_server iodef.xml true
787    else
788       set_xio_using_server iodef.xml false
789    fi
790    cd ${SETTE_DIR}
791    . ./prepare_job.sh input_AMM12.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS}
792
793    cd ${SETTE_DIR}
794    export TEST_NAME="SHORT"
795    . ./prepare_exe_dir.sh
796    cd ${EXE_DIR}
797    set_namelist namelist_cfg nn_it000 289
798    set_namelist namelist_cfg nn_itend 576
799    set_namelist namelist_cfg nn_fwb 0
800    set_namelist namelist_cfg ln_ctl .false.
801    set_namelist namelist_cfg ln_clobber .true.
802    set_namelist namelist_cfg jpni 8
803    set_namelist namelist_cfg jpnj 4
804    set_namelist namelist_cfg jpnij 32
805    set_namelist namelist_cfg ln_rstart .true.
806    set_namelist namelist_cfg nn_rstctl 2
807    set_namelist namelist_cfg cn_ocerst_in \"AMM12_00000288_restart_oce_out\"
808    set_namelist namelist_cfg nn_date0 20120102
809    for (( i=1; i<=$NPROC; i++)) ; do
810        L_NPROC=$(( $i - 1 ))
811        L_NPROC=`printf "%04d\n" ${L_NPROC}`
812        ln -sf ../LONG/AMM12_00000288_restart_oce_out_${L_NPROC}.nc .
813    done
814    if [ ${USING_MPMD} == "yes" ] ; then
815       set_xio_using_server iodef.xml true
816    else
817       set_xio_using_server iodef.xml false
818    fi
819    cd ${SETTE_DIR}
820    . ./prepare_job.sh input_AMM12.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS}
821    cd ${SETTE_DIR}
822    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
823fi
824
825if [ ${config} -eq 10 ] ;  then
826## Reproducibility tests for AMM12
827    export TEST_NAME="REPRO_8_4"
828    cd ${CONFIG_DIR}
829    . ./makenemo -m ${CMP_NAM} -n AMM12_32 -r AMM12 -j 8 add_key "key_mpp_rep key_tide" del_key ${DEL_KEYS}
830    cd ${SETTE_DIR}
831    . ./param.cfg
832    . ./all_functions.sh
833    . ./prepare_exe_dir.sh
834    JOB_FILE=${EXE_DIR}/run_job.sh
835    NPROC=32
836    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
837    cd ${EXE_DIR}
838    set_namelist namelist_cfg nn_it000 1
839    set_namelist namelist_cfg nn_itend 576
840    set_namelist namelist_cfg nn_fwb 0
841    set_namelist namelist_cfg ln_ctl .false.
842    set_namelist namelist_cfg ln_clobber .true.
843    set_namelist namelist_cfg jpni 8
844    set_namelist namelist_cfg jpnj 4
845    set_namelist namelist_cfg jpnij 32
846    if [ ${USING_MPMD} == "yes" ] ; then
847       set_xio_using_server iodef.xml true
848    else
849       set_xio_using_server iodef.xml false
850    fi
851    cd ${SETTE_DIR}
852    . ./prepare_job.sh input_AMM12.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS}
853    cd ${SETTE_DIR}
854    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
855
856    cd ${SETTE_DIR}
857    export TEST_NAME="REPRO_4_8"
858    . ./prepare_exe_dir.sh
859    cd ${EXE_DIR}
860    set_namelist namelist_cfg nn_it000 1
861    set_namelist namelist_cfg nn_itend 576
862    set_namelist namelist_cfg nn_fwb 0
863    set_namelist namelist_cfg ln_ctl .false.
864    set_namelist namelist_cfg ln_clobber .true.
865    set_namelist namelist_cfg jpni 4
866    set_namelist namelist_cfg jpnj 8
867    set_namelist namelist_cfg jpnij 32
868    if [ ${USING_MPMD} == "yes" ] ; then
869       set_xio_using_server iodef.xml true
870    else
871       set_xio_using_server iodef.xml false
872    fi
873    cd ${SETTE_DIR}
874    . ./prepare_job.sh input_AMM12.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS}
875    cd ${SETTE_DIR}
876    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
877fi
878
879
880# TESTS FOR ORCA2_SAS_LIM CONFIGURATION
881if [ ${config} -eq 11 ] ;  then
882    ## Restartability tests for SAS
883    export TEST_NAME="LONG"
884    cd ${CONFIG_DIR}
885    . ./makenemo -m ${CMP_NAM} -n SAS_LONG -r ORCA2_SAS_LIM -j 8 add_key "key_mpp_rep" del_key ${DEL_KEYS}
886    cd ${SETTE_DIR}
887    . ./param.cfg
888    . ./all_functions.sh
889    . ./prepare_exe_dir.sh
890    JOB_FILE=${EXE_DIR}/run_job.sh
891    NPROC=32
892    \rm $JOB_FILE
893    cd ${EXE_DIR}
894    set_namelist namelist_cfg cn_exp \"SAS\"
895    set_namelist namelist_cfg nn_it000 1
896    set_namelist namelist_cfg nn_itend 100
897    set_namelist namelist_cfg nn_stock 50
898    set_namelist namelist_cfg ln_ctl .false.
899    set_namelist namelist_cfg ln_clobber .true.
900    set_namelist namelist_cfg nn_fwb 0
901    set_namelist namelist_cfg jpni 8
902    set_namelist namelist_cfg jpnj 4
903    set_namelist namelist_cfg jpnij 32
904    if [ ${USING_MPMD} == "yes" ] ; then
905       set_xio_using_server iodef.xml true
906    else
907       set_xio_using_server iodef.xml false
908    fi
909    cd ${SETTE_DIR}
910    . ./prepare_job.sh input_SAS.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS}
911
912    cd ${SETTE_DIR}
913    export TEST_NAME="SHORT"
914    . ./prepare_exe_dir.sh
915    cd ${EXE_DIR}
916    set_namelist namelist_cfg cn_exp \"SAS\"
917    set_namelist namelist_cfg nn_it000 51
918    set_namelist namelist_cfg nn_itend 100
919    set_namelist namelist_cfg ln_ctl .false.
920    set_namelist namelist_cfg ln_clobber .true.
921    set_namelist namelist_cfg nn_fwb 0
922    set_namelist namelist_cfg jpni 8
923    set_namelist namelist_cfg jpnj 4
924    set_namelist namelist_cfg jpnij 32
925    set_namelist namelist_cfg nn_rstctl 2
926    set_namelist namelist_cfg cn_ocerst_in \"SAS_00000050_restart\"
927    for (( i=1; i<=$NPROC; i++)) ; do
928        L_NPROC=$(( $i - 1 ))
929        L_NPROC=`printf "%04d\n" ${L_NPROC}`
930        ln -sf ../LONG/SAS_00000050_restart_${L_NPROC}.nc .
931    done
932    if [ ${USING_MPMD} == "yes" ] ; then
933       set_xio_using_server iodef.xml true
934    else
935       set_xio_using_server iodef.xml false
936    fi
937    cd ${SETTE_DIR}
938    . ./prepare_job.sh input_SAS.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS}
939    cd ${SETTE_DIR}
940    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
941fi
942
943if [ ${config} -eq 12 ] ;  then
944## Reproducibility tests for ORCA2_SAS_LIM
945    export TEST_NAME="REPRO_8_4"
946    cd ${CONFIG_DIR}
947    . ./makenemo -m ${CMP_NAM} -n SAS_32 -r ORCA2_SAS_LIM -j 8 add_key "key_mpp_rep" del_key ${DEL_KEYS}
948    cd ${SETTE_DIR}
949    . ./param.cfg
950    . ./all_functions.sh
951    . ./prepare_exe_dir.sh
952    JOB_FILE=${EXE_DIR}/run_job.sh
953    NPROC=32
954    \rm ${JOB_FILE}
955    cd ${EXE_DIR}
956    set_namelist namelist_cfg cn_exp \"SAS\"
957    set_namelist namelist_cfg nn_it000 51
958    set_namelist namelist_cfg nn_itend 100
959    set_namelist namelist_cfg ln_ctl .false.
960    set_namelist namelist_cfg ln_clobber .true.
961    set_namelist namelist_cfg nn_fwb 0
962    set_namelist namelist_cfg jpni 8
963    set_namelist namelist_cfg jpnj 4
964    set_namelist namelist_cfg jpnij 32
965    if [ ${USING_MPMD} == "yes" ] ; then
966       set_xio_using_server iodef.xml true
967    else
968       set_xio_using_server iodef.xml false
969    fi
970    cd ${SETTE_DIR}
971    . ./prepare_job.sh input_SAS.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE}  ${NUM_XIOSERVERS}
972    cd ${SETTE_DIR}
973    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
974    cd ${SETTE_DIR}
975    export TEST_NAME="REPRO_4_8"
976    . ./prepare_exe_dir.sh
977    cd ${EXE_DIR}
978    set_namelist namelist_cfg cn_exp \"SAS\"
979    set_namelist namelist_cfg nn_it000 51
980    set_namelist namelist_cfg nn_itend 100
981    set_namelist namelist_cfg ln_ctl .false.
982    set_namelist namelist_cfg ln_clobber .true.
983    set_namelist namelist_cfg nn_fwb 0
984    set_namelist namelist_cfg jpni 4
985    set_namelist namelist_cfg jpnj 8
986    set_namelist namelist_cfg jpnij 32
987    if [ ${USING_MPMD} == "yes" ] ; then
988       set_xio_using_server iodef.xml true
989    else
990       set_xio_using_server iodef.xml false
991    fi
992    cd ${SETTE_DIR}
993    . ./prepare_job.sh input_SAS.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS}
994    cd ${SETTE_DIR}
995    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
996fi
997# TESTS FOR ISOMIP CONFIGURATION
998if [ ${config} -eq 13 ] ;  then
999    ## Restartability tests for ISOMIP
1000    export TEST_NAME="LONG"
1001    cd ${CONFIG_DIR}
1002    . ./makenemo -m ${CMP_NAM} -n ISOMIP_LONG -r ISOMIP -j 8 del_key ${DEL_KEYS}
1003    cd ${SETTE_DIR}
1004    . ./param.cfg
1005    . ./all_functions.sh
1006    . ./prepare_exe_dir.sh
1007    JOB_FILE=${EXE_DIR}/run_job.sh
1008    NPROC=4
1009    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
1010    cd ${EXE_DIR}
1011    set_namelist namelist_cfg cn_exp \"ISOMIP_LONG\"
1012    set_namelist namelist_cfg nn_it000 1
1013    set_namelist namelist_cfg nn_itend 96
1014    set_namelist namelist_cfg nn_stock 48
1015    set_namelist namelist_cfg ln_clobber .true.
1016    set_namelist namelist_cfg nn_fwb 0
1017    set_namelist namelist_cfg nn_solv 2
1018    set_namelist namelist_cfg jpni 2
1019    set_namelist namelist_cfg jpnj 2
1020    set_namelist namelist_cfg jpnij 4
1021    if [ ${USING_MPMD} == "yes" ] ; then
1022       set_xio_using_server iodef.xml true
1023    else
1024       set_xio_using_server iodef.xml false
1025    fi
1026    cd ${SETTE_DIR}
1027    . ./prepare_job.sh input_ISOMIP.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS}
1028
1029    cd ${SETTE_DIR}
1030    export TEST_NAME="SHORT"
1031    . ./prepare_exe_dir.sh
1032    cd ${EXE_DIR}
1033    set_namelist namelist_cfg cn_exp \"ISOMIP_SHORT\"
1034    set_namelist namelist_cfg nn_it000 49
1035    set_namelist namelist_cfg nn_itend 96
1036    set_namelist namelist_cfg nn_stock 48
1037    set_namelist namelist_cfg ln_rstart .true.
1038    set_namelist namelist_cfg nn_rstctl 2
1039    set_namelist namelist_cfg ln_clobber .true.
1040    set_namelist namelist_cfg nn_fwb 0
1041    set_namelist namelist_cfg nn_solv 2
1042    set_namelist namelist_cfg jpni 2
1043    set_namelist namelist_cfg jpnj 2
1044    set_namelist namelist_cfg jpnij 4
1045    set_namelist namelist_cfg cn_ocerst_in \"ISOMIP_LONG_00000048_restart\"
1046    if [ ${USING_MPMD} == "yes" ] ; then
1047       set_xio_using_server iodef.xml true
1048    else
1049       set_xio_using_server iodef.xml false
1050    fi
1051    for (( i=1; i<=$NPROC; i++)) ; do
1052        L_NPROC=$(( $i - 1 ))
1053        L_NPROC=`printf "%04d\n" ${L_NPROC}`
1054        ln -sf ../LONG/ISOMIP_LONG_00000048_restart_${L_NPROC}.nc .
1055    done
1056    if [ ${USING_MPMD} == "yes" ] ; then
1057       set_xio_using_server iodef.xml true
1058    else
1059       set_xio_using_server iodef.xml false
1060    fi
1061    cd ${SETTE_DIR}
1062    . ./prepare_job.sh input_ISOMIP.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS}
1063    cd ${SETTE_DIR}
1064    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
1065fi
1066if [ ${config} -eq 14 ] ;  then
1067    ## Reproducibility tests for ISOMIP
1068    export TEST_NAME="REPRO_1_4"
1069    cd ${CONFIG_DIR}
1070    . ./makenemo -m ${CMP_NAM} -n ISOMIP_4 -r ISOMIP -j 8 add_key "key_mpp_rep" del_key ${DEL_KEYS}
1071    cd ${SETTE_DIR}
1072    . ./param.cfg
1073    . ./all_functions.sh
1074    . ./prepare_exe_dir.sh
1075    JOB_FILE=${EXE_DIR}/run_job.sh
1076    NPROC=4
1077    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
1078    cd ${EXE_DIR}
1079    set_namelist namelist_cfg cn_exp \"ISOMIP_14\"
1080    set_namelist namelist_cfg nn_it000 1
1081    set_namelist namelist_cfg nn_itend 48
1082    set_namelist namelist_cfg nn_fwb 0
1083    set_namelist namelist_cfg nn_bench 0
1084    set_namelist namelist_cfg ln_ctl .false.
1085    set_namelist namelist_cfg ln_clobber .true.
1086    set_namelist namelist_cfg nn_solv 2
1087    set_namelist namelist_cfg jpni 1
1088    set_namelist namelist_cfg jpnj 4
1089    set_namelist namelist_cfg jpnij 4
1090    if [ ${USING_MPMD} == "yes" ] ; then
1091       set_xio_using_server iodef.xml true
1092    else
1093       set_xio_using_server iodef.xml false
1094    fi
1095    cd ${SETTE_DIR}
1096    . ./prepare_job.sh input_ISOMIP.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS}
1097    cd ${SETTE_DIR}
1098    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
1099
1100    cd ${SETTE_DIR}
1101    export TEST_NAME="REPRO_2_2"
1102    . ./prepare_exe_dir.sh
1103    JOB_FILE=${EXE_DIR}/run_job.sh
1104    NPROC=4
1105    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
1106    cd ${EXE_DIR}
1107    set_namelist namelist_cfg cn_exp \"ISOMIP_22\"
1108    set_namelist namelist_cfg nn_it000 1
1109    set_namelist namelist_cfg nn_itend 48
1110    set_namelist namelist_cfg nn_fwb 0
1111    set_namelist namelist_cfg ln_ctl .false.
1112    set_namelist namelist_cfg ln_clobber .true.
1113    set_namelist namelist_cfg nn_solv 2
1114    set_namelist namelist_cfg jpni 2
1115    set_namelist namelist_cfg jpnj 2
1116    set_namelist namelist_cfg jpnij 4
1117    if [ ${USING_MPMD} == "yes" ] ; then
1118       set_xio_using_server iodef.xml true
1119    else
1120       set_xio_using_server iodef.xml false
1121    fi
1122    cd ${SETTE_DIR}
1123    . ./prepare_job.sh input_ISOMIP.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS}
1124    cd ${SETTE_DIR}
1125    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
1126
1127fi
1128
1129## Test assimilation interface code, OBS and ASM for reproducibility
1130## Restartability not tested (ASM code not restartable while increments are being applied)
1131if [ ${config} -eq 15 ] ; then
1132   ## Reproducibility tests for ORCA2_LIM_OBS
1133    export TEST_NAME="REPRO_4_4"
1134    cd ${CONFIG_DIR}
1135    . ./makenemo -m ${CMP_NAM} -n ORCA2_LIM_OBS -r ORCA2_LIM -j 8 add_key "key_mpp_rep key_diaobs key_asminc" del_key ${DEL_KEYS}
1136    cd ${SETTE_DIR}
1137    . ./param.cfg
1138    . ./all_functions.sh
1139    . ./prepare_exe_dir.sh
1140    JOB_FILE=${EXE_DIR}/run_job.sh
1141    NPROC=16
1142    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
1143    cd ${EXE_DIR}
1144    set_namelist namelist_cfg nn_it000 1
1145    set_namelist namelist_cfg nn_itend 75
1146    set_namelist namelist_cfg nn_fwb 0
1147    set_namelist namelist_cfg ln_ctl .false.
1148    set_namelist namelist_cfg ln_clobber .true.
1149    set_namelist namelist_cfg jpni 4
1150    set_namelist namelist_cfg jpnj 4
1151    set_namelist namelist_cfg jpnij 16
1152    set_namelist namelist_cfg nn_solv 2   
1153    set_namelist namelist_cfg ln_t3d .true.
1154    set_namelist namelist_cfg ln_s3d .true.
1155    set_namelist namelist_cfg ln_profb .true.
1156    set_namelist namelist_cfg ln_sst .true.
1157    set_namelist namelist_cfg ln_sstfb .true.
1158    set_namelist namelist_cfg ln_sla .true.
1159    set_namelist namelist_cfg ln_slafb .true.
1160    set_namelist namelist_cfg ln_seaice .false.
1161    set_namelist namelist_cfg ln_bkgwri .true.
1162    set_namelist namelist_cfg ln_trainc .true.
1163    set_namelist namelist_cfg ln_dyninc .true.
1164    set_namelist namelist_cfg ln_sshinc .true.
1165    set_namelist namelist_cfg ln_asmiau .true.
1166    if [ ${USING_MPMD} == "yes" ] ; then
1167       set_xio_using_server iodef.xml true
1168    else
1169       set_xio_using_server iodef.xml false
1170    fi
1171    cd ${SETTE_DIR}
1172    . ./prepare_job.sh input_ORCA2_LIM_OBS.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS}
1173    cd ${SETTE_DIR}
1174    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
1175
1176   cd ${SETTE_DIR}
1177    export TEST_NAME="REPRO_2_8"
1178    . ./prepare_exe_dir.sh
1179    JOB_FILE=${EXE_DIR}/run_job.sh
1180    NPROC=16
1181    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
1182    cd ${EXE_DIR}
1183    set_namelist namelist_cfg nn_it000 1
1184    set_namelist namelist_cfg nn_itend 75
1185    set_namelist namelist_cfg nn_fwb 0
1186    set_namelist namelist_cfg ln_ctl .false.
1187    set_namelist namelist_cfg ln_clobber .true.
1188    set_namelist namelist_cfg jpni 2
1189    set_namelist namelist_cfg jpnj 8
1190    set_namelist namelist_cfg jpnij 16
1191    set_namelist namelist_cfg nn_solv 2
1192    set_namelist namelist_cfg ln_t3d .true.
1193    set_namelist namelist_cfg ln_s3d .true.
1194    set_namelist namelist_cfg ln_profb .true.
1195    set_namelist namelist_cfg ln_sst .true.
1196    set_namelist namelist_cfg ln_sstfb .true.
1197    set_namelist namelist_cfg ln_sla .true.
1198    set_namelist namelist_cfg ln_slafb .true.
1199    set_namelist namelist_cfg ln_seaice .false.
1200    set_namelist namelist_cfg ln_bkgwri .true.
1201    set_namelist namelist_cfg ln_trainc .true.
1202    set_namelist namelist_cfg ln_dyninc .true.
1203    set_namelist namelist_cfg ln_sshinc .true.
1204    set_namelist namelist_cfg ln_asmiau .true.
1205    if [ ${USING_MPMD} == "yes" ] ; then
1206       set_xio_using_server iodef.xml true
1207    else
1208       set_xio_using_server iodef.xml false
1209    fi
1210    cd ${SETTE_DIR}
1211    . ./prepare_job.sh input_ORCA2_LIM_OBS.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS}
1212    cd ${SETTE_DIR}
1213    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
1214fi
1215# TEST FOR ORCA2_LIM_AGRIF : simple test of running AGRIF (no restartability neither reproducibility tests)
1216if [ ${config} -eq 16 ] ;  then
1217    ## ORCA2_LIM with Agulhas AGRIF zoom in MPI
1218    export TEST_NAME="SHORT"
1219    cd ${CONFIG_DIR}
1220    . ./makenemo -m ${CMP_NAM} -n ORCA2AGUL_1_2 -r ORCA2_LIM -j 8 add_key "key_mpp_rep key_agrif" del_key "key_zdftmx" del_key ${DEL_KEYS}
1221    cd ${SETTE_DIR}
1222    . ./param.cfg
1223    . ./all_functions.sh
1224    . ./prepare_exe_dir.sh
1225    JOB_FILE=${EXE_DIR}/run_job.sh
1226    NPROC=2
1227    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
1228    cd ${EXE_DIR}
1229    set_namelist namelist_cfg nn_it000 1
1230    set_namelist namelist_cfg nn_itend 75
1231    set_namelist namelist_cfg ln_ctl .false.
1232    set_namelist namelist_cfg ln_clobber .true.
1233    set_namelist namelist_cfg nn_fwb 0
1234    set_namelist namelist_cfg jpni 1
1235    set_namelist namelist_cfg jpnj 2
1236    set_namelist namelist_cfg jpnij 2
1237    set_namelist 1_namelist_cfg nn_it000 1
1238    set_namelist 1_namelist_cfg nn_itend 150
1239    set_namelist 1_namelist_cfg ln_ctl .false.
1240    set_namelist 1_namelist_cfg ln_clobber .true.
1241    if [ ${USING_MPMD} == "yes" ] ; then
1242       set_xio_using_server iodef.xml true
1243    else
1244       set_xio_using_server iodef.xml false
1245    fi
1246    cd ${SETTE_DIR}
1247    . ./prepare_job.sh input_ORCA2_LIM_AGRIF.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS}
1248    cd ${SETTE_DIR}
1249    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
1250fi
1251
1252done
Note: See TracBrowser for help on using the repository browser.