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 branches/2012/dev_r3438_LOCEAN15_PISLOB/NEMOGCM/SETTE – NEMO

source: branches/2012/dev_r3438_LOCEAN15_PISLOB/NEMOGCM/SETTE/sette.sh @ 3535

Last change on this file since 3535 was 3535, checked in by flavoni, 11 years ago

update sette.sh, see ticket: #941

  • Property svn:executable set to *
  • Property svn:keywords set to Id
File size: 25.1 KB
Line 
1#!/bin/bash
2#############################################################
3# Author : Simona Flavoni for NEMO
4# Contact : sflod@locean-ipsl.upmc.fr
5#
6# sette.sh   : principal script of SET TEsts for NEMO (SETTE)
7# ----------------------------------------------------------------------
8# NEMO/SETTE , NEMO Consortium (2010)
9# Software governed by the CeCILL licence     (NEMOGCM/NEMO_CeCILL.txt)
10# ----------------------------------------------------------------------
11#
12#############################################################
13#set -x
14set -o posix
15#set -u
16#set -e
17#+
18#
19# ================
20# sette.sh
21# ================
22#
23# ----------------------------------------------
24# Set of tests for NEMO
25# ----------------------------------------------
26#
27# SYNOPSIS
28# ========
29#
30# ::
31#
32#  $ ./sette.sh
33#
34# DESCRIPTION
35# ===========
36#
37# Variables to be checked by user:
38#
39# COMPILER : name of compiler as defined in NEMOGCM/ARCH directory
40#
41# BATCH_COMMAND :  name of the command for batch submission
42#
43# INTERACT_FLAG :  flag to run in interactive mode "yes"
44#                       to run in batch mode "no"
45#
46# MPIRUN_FLAG   :  flag to run in parallel (MPI) "yes"
47#                       to run in sequential mode (NB_PROC = 1) "no"
48#
49# Principal script is sette.sh, that calls
50#
51#  makenemo
52#
53#   creates the exectuable in ${CONFIG_NAME}/BLD/bin/nemo.exe  (and its link opa in ${CONFIG_NAME}/EXP00)
54#
55#  param.cfg : sets and loads following directories:
56#
57#   FORCING_DIR : is the directory for forcing files (tarfile)
58#
59#   INPUT_DIR : is the directory for input files storing
60#
61#   TMPDIR : is the temporary directory (if needed)
62#
63#   NEMO_VALIDATION_DIR : is the validation directory
64#
65#   (NOTE: this file is the same for all configrations to be tested with sette)
66#
67#
68#  all_functions.sh : loads functions used by sette (note: new functions can be added here)
69#
70#   set_namelist : function declared in all_functions that set namelist parameters for tests
71#
72#   post_test_tidyup : creates validation storage directory and copy needed output files (solver.stat and ocean.output) in it after execution of test.
73#
74#   Tree of VALIDATION is:
75#
76#   NEMO_VALIDATION_DIR/WCONFIG_NAME/WCOMPILER_NAME/TEST_NAME/REVISION_NUMBER(or DATE)
77#
78#
79#  prepare_exe_dir.sh : defines and creates directory where the test is executed
80#
81#       execution directory takes name of TEST_NAME defined in every test in sette.sh
82#
83#       ( each test in executed in its own directory )
84#
85#
86#  prepare_job.sh
87#
88#  to generate the script run_job.sh
89#
90#  fcm_job.sh
91#
92#   run in batch (INTERACT_FLAG="no") or interactive (INTERACT_FLAG="yes") see sette.sh and BATCH_TEMPLATE directory
93#
94#   (note this job needs to have an input_CONFIG.cfg in which can be found input tar file)
95#
96#  NOTE: if job is not launched for some problems you have executable ready in ${EXE_DIR} directory
97#
98#  NOTE: the changed namelists are leaved in ${EXE_DIR} directory whereas original namelist remains in ${NEW_CONF}/EXP00
99#
100#  in ${SETTE_DIR} is created output.sette with the echo of executed commands
101#
102#  if sette.sh is stopped in output.sette there is written the last command executed by sette.sh
103#
104#  if you run: ./sette.sh 2>&1 | tee out.sette
105#
106#  in ${SETTE_DIR} out.sette is redirected standard error & standard output
107#
108#
109# EXAMPLES
110# ========
111#
112# ::
113#
114#  $ ./sette.sh
115#
116#
117# TODO
118# ====
119#
120# option debug
121#
122# EVOLUTIONS
123# ==========
124#
125# $Id : $
126#
127#   * creation
128#
129#-
130#
131#-
132# Compiler among those in NEMOGCM/ARCH
133COMPILER=PW6_VARGAS
134export BATCH_COMMAND_PAR="llsubmit"
135export BATCH_COMMAND_SEQ=$BATCH_COMMAND_PAR
136export INTERACT_FLAG="no"
137export MPIRUN_FLAG="yes"
138
139
140# Directory to run the tests
141SETTE_DIR=$(cd $(dirname "$0"); pwd)
142MAIN_DIR=${SETTE_DIR%/SETTE}
143CONFIG_DIR=${MAIN_DIR}/CONFIG
144TOOLS_DIR=${MAIN_DIR}/TOOLS
145COMPIL_DIR=${TOOLS_DIR}/COMPILE
146
147CMP_NAM=${1:-$COMPILER}
148# Copy job_batch_COMPILER file for specific compiler into job_batch_template
149cd ${SETTE_DIR}
150cp BATCH_TEMPLATE/batch-${COMPILER} job_batch_template || exit
151
152for config in 1 2 3 4 5 6 7 8 9
153do
154
155# TESTS FOR GYRE CONFIGURATION
156if [ ${config} -eq 1 ] ;  then
157    ## Restartability tests for GYRE
158    export TEST_NAME="LONG"
159    cd ${SETTE_DIR}
160    . ../CONFIG/makenemo -m ${CMP_NAM} -n GYRE_LONG -r GYRE -j 8 add_key "key_mpp_mpi" 
161    cd ${SETTE_DIR}
162    . param.cfg
163    . all_functions.sh
164    . prepare_exe_dir.sh
165    JOB_FILE=${EXE_DIR}/run_job.sh
166    NPROC=4
167    \rm ${JOB_FILE}
168    cd ${EXE_DIR}
169    set_namelist namelist cn_exp \"GYRE_LONG\"
170    set_namelist namelist nn_it000 1
171    set_namelist namelist nn_itend 120
172    set_namelist namelist nn_stock 60
173    set_namelist namelist ln_clobber .true.
174    set_namelist namelist nn_solv 2
175    set_namelist namelist jpni 2
176    set_namelist namelist jpnj 2
177    set_namelist namelist jpnij 4
178    cd ${SETTE_DIR}
179    . ./prepare_job.sh input_GYRE.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE}
180
181    cd ${SETTE_DIR}
182    export TEST_NAME="SHORT"
183    . prepare_exe_dir.sh
184    cd ${EXE_DIR}
185    set_namelist namelist cn_exp \"GYRE_SHORT\"
186    set_namelist namelist nn_it000 61
187    set_namelist namelist nn_itend 120
188    set_namelist namelist nn_stock 60
189    set_namelist namelist ln_rstart .true.
190    set_namelist namelist nn_rstctl 2
191    set_namelist namelist ln_clobber .true.
192    set_namelist namelist nn_solv 2
193    set_namelist namelist jpni 2
194    set_namelist namelist jpnj 2
195    set_namelist namelist jpnij 4
196    set_namelist namelist cn_ocerst_in \"GYRE_LONG_00000060_restart\"
197    for (( i=1; i<=$NPROC; i++)) ; do
198        L_NPROC=$(( $i - 1 ))
199        L_NPROC=`printf "%04d\n" ${L_NPROC}`
200        ln -sf ../LONG/${NEW_CONF}_00000060_restart_${L_NPROC}.nc .
201    done
202    cd ${SETTE_DIR}
203    . ./prepare_job.sh input_GYRE.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE}
204    cd ${SETTE_DIR}
205    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
206fi
207
208if [ ${config} -eq 2 ] ;  then
209    ## Reproducibility tests for GYRE
210    export TEST_NAME="REPRO_1_4"
211    cd ${SETTE_DIR}
212    . ../CONFIG/makenemo -m ${CMP_NAM} -n GYRE_4 -r GYRE -j 8 add_key "key_mpp_mpi key_mpp_rep"
213    cd ${SETTE_DIR}
214    . param.cfg
215    . all_functions.sh
216    . prepare_exe_dir.sh
217    JOB_FILE=${EXE_DIR}/run_job.sh
218    NPROC=4
219    \rm ${JOB_FILE}
220    cd ${EXE_DIR}
221    set_namelist namelist cn_exp \"GYRE_14\"
222    set_namelist namelist nn_it000 1
223    set_namelist namelist nn_itend 60
224    set_namelist namelist nn_fwb 0
225    set_namelist namelist nn_bench 0
226    set_namelist namelist ln_ctl .false.
227    set_namelist namelist ln_clobber .true.
228    set_namelist namelist nn_solv 2
229    set_namelist namelist jpni 1
230    set_namelist namelist jpnj 4
231    set_namelist namelist jpnij 4
232    cd ${SETTE_DIR}
233    . ./prepare_job.sh input_GYRE.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE}
234    cd ${SETTE_DIR}
235    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
236
237    cd ${SETTE_DIR}
238    export TEST_NAME="REPRO_2_2"
239    . prepare_exe_dir.sh
240    JOB_FILE=${EXE_DIR}/run_job.sh
241    NPROC=4
242    \rm $JOB_FILE
243    cd ${EXE_DIR}
244    set_namelist namelist cn_exp \"GYRE_22\"
245    set_namelist namelist nn_it000 1
246    set_namelist namelist nn_itend 60
247    set_namelist namelist nn_fwb 0
248    set_namelist namelist ln_ctl .false.
249    set_namelist namelist ln_clobber .true.
250    set_namelist namelist nn_solv 2
251    set_namelist namelist jpni 2
252    set_namelist namelist jpnj 2
253    set_namelist namelist jpnij 4
254    cd ${SETTE_DIR}
255    . ./prepare_job.sh input_GYRE.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE}
256    cd ${SETTE_DIR}
257    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
258
259fi
260
261# TESTS FOR ORCA2_LIM_PISCES CONFIGURATION
262if [ ${config} -eq 3 ] ;  then
263    ## Restartability tests for ORCA2_LIM_PISCES
264    export TEST_NAME="LONG"
265    cd ${SETTE_DIR}
266    . ../CONFIG/makenemo -m ${CMP_NAM} -n ORCA2LIMPIS_LONG -r ORCA2_LIM_PISCES -j 8 add_key "key_mpp_mpi"
267    cd ${SETTE_DIR}
268    . param.cfg
269    . all_functions.sh
270    . prepare_exe_dir.sh
271    JOB_FILE=${EXE_DIR}/run_job.sh
272    NPROC=4
273    \rm ${JOB_FILE}
274    cd ${EXE_DIR}
275    set_namelist namelist cn_exp \"O2LP_LONG\"
276    set_namelist namelist nn_it000 1
277    set_namelist namelist nn_itend 150
278    set_namelist namelist nn_stock 75
279    set_namelist namelist ln_clobber .true.
280    set_namelist namelist jpni 2
281    set_namelist namelist jpnj 2
282    set_namelist namelist jpnij 4
283    set_namelist namelist nn_solv 2
284    set_namelist namelist_top ln_trcdta .false.
285    set_namelist namelist_top ln_diatrc .false.
286    # put ln_ironsed, ln_river, ln_ndepo, ln_dust to false
287    # if not you need input files, and for tests is not necessary
288    set_namelist namelist_pisces ln_presatm .false.
289    set_namelist namelist_pisces ln_varpar .false.
290    set_namelist namelist_pisces ln_dust .false.
291    set_namelist namelist_pisces ln_solub .false.
292    set_namelist namelist_pisces ln_river .false.
293    set_namelist namelist_pisces ln_ndepo .false.
294    set_namelist namelist_pisces ln_ironsed .false.
295    set_namelist namelist_pisces ln_hydrofe .false.
296    cd ${SETTE_DIR}
297    . ./prepare_job.sh input_ORCA2_LIM_PISCES.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE}
298   
299    cd ${SETTE_DIR}
300    export TEST_NAME="SHORT"
301    . prepare_exe_dir.sh
302    cd ${EXE_DIR}
303    set_namelist namelist cn_exp \"O2LP_SHORT\"
304    set_namelist namelist nn_it000 76
305    set_namelist namelist nn_itend 150
306    set_namelist namelist nn_stock 75
307    set_namelist namelist ln_rstart .true.
308    set_namelist namelist nn_rstctl 2
309    set_namelist namelist ln_clobber .true.
310    set_namelist namelist jpni 2
311    set_namelist namelist jpnj 2
312    set_namelist namelist jpnij 4
313    set_namelist namelist nn_solv 2
314    set_namelist namelist_top ln_diatrc .false.
315    set_namelist namelist_top ln_rsttr .true.
316    set_namelist namelist_top nn_rsttr 2
317    set_namelist namelist cn_ocerst_in \"O2LP_LONG_00000075_restart\"
318    set_namelist namelist_ice cn_icerst_in \"O2LP_LONG_00000075_restart_ice\"
319    set_namelist namelist_top cn_trcrst_in \"O2LP_LONG_00000075_restart_trc\"
320    # put ln_ironsed, ln_river, ln_ndepo, ln_dust
321    # if not you need input files, and for tests is not necessary
322    set_namelist namelist_pisces ln_presatm .false.
323    set_namelist namelist_pisces ln_varpar .false.
324    set_namelist namelist_pisces ln_dust .false.
325    set_namelist namelist_pisces ln_solub .false.
326    set_namelist namelist_pisces ln_river .false.
327    set_namelist namelist_pisces ln_ndepo .false.
328    set_namelist namelist_pisces ln_ironsed .false.
329    set_namelist namelist_pisces ln_hydrofe .false.
330    # put ln_pisdmp to false : no restoring to global mean value
331    set_namelist namelist_pisces ln_pisdmp .false.
332    for (( i=1; i<=$NPROC; i++)) ; do
333        L_NPROC=$(( $i - 1 ))
334        L_NPROC=`printf "%04d\n" ${L_NPROC}`
335        ln -sf ../LONG/O2LP_LONG_00000075_restart_${L_NPROC-1}.nc .
336        ln -sf ../LONG/O2LP_LONG_00000075_restart_trc_${L_NPROC-1}.nc .
337        ln -sf ../LONG/O2LP_LONG_00000075_restart_ice_${L_NPROC-1}.nc .
338    done
339    cd ${SETTE_DIR}
340    . ./prepare_job.sh input_ORCA2_LIM_PISCES.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE}
341    cd ${SETTE_DIR}
342    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
343fi
344
345if [ ${config} -eq 4 ] ;  then
346    ## Reproducibility tests for ORCA2_LIM_PISCES
347    export TEST_NAME="REPRO_4_4"
348    cd ${SETTE_DIR}
349    . ../CONFIG/makenemo -m ${CMP_NAM} -n ORCA2LIMPIS_16 -r ORCA2_LIM_PISCES -j 8 add_key "key_mpp_mpi key_mpp_rep"
350    cd ${SETTE_DIR}
351    . param.cfg
352    . all_functions.sh
353    . prepare_exe_dir.sh
354    JOB_FILE=${EXE_DIR}/run_job.sh
355    NPROC=16
356    \rm $JOB_FILE
357    cd ${EXE_DIR}
358    set_namelist namelist nn_it000 1
359    set_namelist namelist nn_itend 75
360    set_namelist namelist nn_fwb 0
361    set_namelist namelist ln_ctl .false.
362    set_namelist namelist ln_clobber .true.
363    set_namelist namelist jpni 4
364    set_namelist namelist jpnj 4
365    set_namelist namelist jpnij 16
366    set_namelist namelist nn_solv 2
367    set_namelist namelist_top ln_trcdta .false.
368    set_namelist namelist_top ln_diatrc .false.
369    # put ln_ironsed, ln_river, ln_ndepo, ln_dust to false
370    # if not you need input files, and for tests is not necessary
371    set_namelist namelist_pisces ln_presatm .false.
372    set_namelist namelist_pisces ln_varpar .false.
373    set_namelist namelist_pisces ln_dust .false.
374    set_namelist namelist_pisces ln_solub .false.
375    set_namelist namelist_pisces ln_river .false.
376    set_namelist namelist_pisces ln_ndepo .false.
377    set_namelist namelist_pisces ln_ironsed .false.
378    set_namelist namelist_pisces ln_hydrofe .false.
379    # put ln_pisdmp to false : no restoring to global mean value
380    set_namelist namelist_pisces ln_pisdmp .false.
381    cd ${SETTE_DIR}
382    . ./prepare_job.sh input_ORCA2_LIM_PISCES.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE}
383    cd ${SETTE_DIR}
384    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
385
386    cd ${SETTE_DIR}
387    export TEST_NAME="REPRO_2_8"
388    . prepare_exe_dir.sh
389    JOB_FILE=${EXE_DIR}/run_job.sh
390    NPROC=16
391    \rm $JOB_FILE
392    cd ${EXE_DIR}
393    set_namelist namelist nn_it000 1
394    set_namelist namelist nn_itend 75
395    set_namelist namelist nn_fwb 0
396    set_namelist namelist ln_clobber .true.
397    set_namelist namelist jpni 2
398    set_namelist namelist jpnj 8
399    set_namelist namelist jpnij 16
400    set_namelist namelist nn_solv 2
401    set_namelist namelist_top ln_trcdta .false.
402    set_namelist namelist_top ln_diatrc .false.
403    # put ln_ironsed, ln_river, ln_ndepo, ln_dust to false
404    # if not you need input files, and for tests is not necessary
405    set_namelist namelist_pisces ln_presatm .false.
406    set_namelist namelist_pisces ln_varpar .false.
407    set_namelist namelist_pisces ln_dust .false.
408    set_namelist namelist_pisces ln_solub .false.
409    set_namelist namelist_pisces ln_river .false.
410    set_namelist namelist_pisces ln_ndepo .false.
411    set_namelist namelist_pisces ln_ironsed .false.
412    set_namelist namelist_pisces ln_hydrofe .false.
413    # put ln_pisdmp to false : no restoring to global mean value
414    set_namelist namelist_pisces ln_pisdmp .false.
415    cd ${SETTE_DIR}
416    . ./prepare_job.sh input_ORCA2_LIM_PISCES.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE}
417    cd ${SETTE_DIR}
418    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
419fi
420
421# TESTS FOR ORCA2_OFF_PISCES CONFIGURATION
422if [ ${config} -eq 5 ] ;  then
423    ## Restartability tests for ORCA2_OFF_PISCES
424    export TEST_NAME="LONG"
425    cd ${SETTE_DIR}
426    . ../CONFIG/makenemo -m ${CMP_NAM} -n ORCA2OFFPIS_LONG -r ORCA2_OFF_PISCES -j 8 add_key "key_mpp_rep" 
427    cd ${SETTE_DIR}
428    . param.cfg
429    . all_functions.sh
430    . prepare_exe_dir.sh
431    JOB_FILE=${EXE_DIR}/run_job.sh
432    NPROC=4
433    \rm $JOB_FILE
434    cd ${EXE_DIR}
435    set_namelist namelist cn_exp \"OFFP_LONG\"
436    set_namelist namelist nn_it000 1
437    set_namelist namelist nn_itend 40
438    set_namelist namelist nn_stock 20
439    set_namelist namelist ln_clobber .true.
440    set_namelist namelist jpni 2
441    set_namelist namelist jpnj 2
442    set_namelist namelist jpnij 4
443    set_namelist namelist_top ln_trcdta .false.
444    set_namelist namelist_top ln_diatrc .false.
445    # put ln_ironsed, ln_river, ln_ndepo, ln_dust to false
446    # if not you need input files, and for tests is not necessary
447    set_namelist namelist_pisces ln_presatm .false.
448    set_namelist namelist_pisces ln_varpar .false.
449    set_namelist namelist_pisces ln_dust .false.
450    set_namelist namelist_pisces ln_solub .false.
451    set_namelist namelist_pisces ln_river .false.
452    set_namelist namelist_pisces ln_ndepo .false.
453    set_namelist namelist_pisces ln_ironsed .false.
454    set_namelist namelist_pisces ln_hydrofe .false.
455    # put ln_pisdmp to false : no restoring to global mean value
456    set_namelist namelist_pisces ln_pisdmp .false.
457    cd ${SETTE_DIR}
458    . ./prepare_job.sh input_ORCA2_OFF_PISCES.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE}
459   
460    cd ${SETTE_DIR}
461    export TEST_NAME="SHORT"
462    . prepare_exe_dir.sh
463    cd ${EXE_DIR}
464    set_namelist namelist cn_exp \"OFFP_SHORT\"
465    set_namelist namelist nn_it000 21
466    set_namelist namelist nn_itend 40
467    set_namelist namelist nn_stock 20
468    set_namelist namelist ln_clobber .true.
469    set_namelist namelist jpni 2
470    set_namelist namelist jpnj 2
471    set_namelist namelist jpnij 4
472    cp ../LONG/OFFP_LONG_00000020_restart*nc .
473    set_namelist namelist_top ln_diatrc .false.
474    set_namelist namelist_top ln_rsttr .true.
475    set_namelist namelist_top nn_rsttr 2
476    set_namelist namelist_top cn_trcrst_in \"OFFP_LONG_00000020_restart_trc\"
477    for (( i=1; i<=$NPROC; i++)) ; do
478        L_NPROC=$(( $i - 1 ))
479        L_NPROC=`printf "%04d\n" ${L_NPROC}`
480        ln -sf ../LONG/OFFP_LONG_00000020_restart_${L_NPROC-1}.nc .
481        ln -sf ../LONG/OFFP_LONG_00000020_restart_${L_NPROC-1}_trc.nc .
482    done
483    # put ln_ironsed, ln_river, ln_ndepo, ln_dust
484    # if not you need input files, and for tests is not necessary
485    set_namelist namelist_pisces ln_presatm .false.
486    set_namelist namelist_pisces ln_varpar .false.
487    set_namelist namelist_pisces ln_dust .false.
488    set_namelist namelist_pisces ln_solub .false.
489    set_namelist namelist_pisces ln_river .false.
490    set_namelist namelist_pisces ln_ndepo .false.
491    set_namelist namelist_pisces ln_ironsed .false.
492    set_namelist namelist_pisces ln_hydrofe .false.
493    # put ln_pisdmp to false : no restoring to global mean value
494    set_namelist namelist_pisces ln_pisdmp .false.
495    cd ${SETTE_DIR}
496    . ./prepare_job.sh input_ORCA2_OFF_PISCES.cfg $NPROC ${TEST_NAME}  ${MPIRUN_FLAG} ${JOB_FILE}
497    cd ${SETTE_DIR}
498    . ./fcm_job.sh $NPROC  ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
499fi
500
501if [ ${config} -eq 6 ] ;  then
502    ## Reproducibility tests for ORCA2_OFF_PISCES
503    export TEST_NAME="REPRO_4_4"
504    cd ${SETTE_DIR}
505    . ../CONFIG/makenemo -m ${CMP_NAM} -n ORCA2OFFPIS_16 -r ORCA2_OFF_PISCES -j 8 add_key "key_mpp_mpi key_mpp_rep"
506    cd ${SETTE_DIR}
507    . param.cfg
508    . all_functions.sh
509    . prepare_exe_dir.sh
510    JOB_FILE=${EXE_DIR}/run_job.sh
511    NPROC=16
512    \rm $JOB_FILE
513    cd ${EXE_DIR}
514    set_namelist namelist nn_it000 1
515    set_namelist namelist nn_itend 40
516    set_namelist namelist ln_ctl .false.
517    set_namelist namelist ln_clobber .true.
518    set_namelist namelist jpni 4
519    set_namelist namelist jpnj 4
520    set_namelist namelist jpnij 16
521    set_namelist namelist_top ln_trcdta .false.
522    set_namelist namelist_top ln_diatrc .false.
523    # put ln_ironsed, ln_river, ln_ndepo, ln_dust to false
524    # if not you need input files, and for tests is not necessary
525    set_namelist namelist_pisces ln_presatm .false.
526    set_namelist namelist_pisces ln_varpar .false.
527    set_namelist namelist_pisces ln_dust .false.
528    set_namelist namelist_pisces ln_solub .false.
529    set_namelist namelist_pisces ln_river .false.
530    set_namelist namelist_pisces ln_ndepo .false.
531    set_namelist namelist_pisces ln_ironsed .false.
532    set_namelist namelist_pisces ln_hydrofe .false.
533    # put ln_pisdmp to false : no restoring to global mean value
534    set_namelist namelist_pisces ln_pisdmp .false.
535    cd ${SETTE_DIR}
536    . ./prepare_job.sh input_ORCA2_OFF_PISCES.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE}
537    cd ${SETTE_DIR}
538    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
539
540    cd ${SETTE_DIR}
541    export TEST_NAME="REPRO_2_8"
542    . prepare_exe_dir.sh
543    JOB_FILE=${EXE_DIR}/run_job.sh
544    NPROC=16
545    \rm $JOB_FILE
546    cd ${EXE_DIR}
547    set_namelist namelist nn_it000 1
548    set_namelist namelist nn_itend 40
549    set_namelist namelist ln_ctl .false.
550    set_namelist namelist ln_clobber .true.
551    set_namelist namelist jpni 2
552    set_namelist namelist jpnj 8
553    set_namelist namelist jpnij 16
554    set_namelist namelist_top ln_trcdta .false.
555    set_namelist namelist_top ln_diatrc .false.
556    # put ln_ironsed, ln_river, ln_ndepo, ln_dust to false
557    # if not you need input files, and for tests is not necessary
558    set_namelist namelist_pisces ln_presatm .false.
559    set_namelist namelist_pisces ln_varpar .false.
560    set_namelist namelist_pisces ln_dust .false.
561    set_namelist namelist_pisces ln_solub .false.
562    set_namelist namelist_pisces ln_river .false.
563    set_namelist namelist_pisces ln_ndepo .false.
564    set_namelist namelist_pisces ln_ironsed .false.
565    set_namelist namelist_pisces ln_hydrofe .false.
566    # put ln_pisdmp to false : no restoring to global mean value
567    set_namelist namelist_pisces ln_pisdmp .false.
568    cd ${SETTE_DIR}
569    . ./prepare_job.sh input_ORCA2_OFF_PISCES.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE}
570    cd ${SETTE_DIR}
571    . ./fcm_job.sh $NPROC  ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
572fi
573
574# TESTS FOR AMM12 CONFIGURATION
575if [ ${config} -eq 7 ] ;  then
576    ## Restartability tests for AMM12
577    export TEST_NAME="LONG"
578    cd ${SETTE_DIR}
579    . ../CONFIG/makenemo -m ${CMP_NAM} -n AMM12_LONG -r AMM12
580    cd ${SETTE_DIR}
581    . param.cfg
582    . all_functions.sh
583    . prepare_exe_dir.sh
584    JOB_FILE=${EXE_DIR}/run_job.sh
585    NPROC=32
586    \rm $JOB_FILE
587    cd ${EXE_DIR}
588    set_namelist namelist nn_it000 1
589    set_namelist namelist nn_itend 12
590    set_namelist namelist nn_stock 6
591    set_namelist namelist nn_fwb 0
592    set_namelist namelist ln_ctl .false.
593    set_namelist namelist ln_clobber .true.
594    set_namelist namelist nn_dyn2d 2
595    set_namelist namelist nn_tra_dta 0
596    set_namelist namelist jpni 8
597    set_namelist namelist jpnj 4
598    set_namelist namelist jpnij 32
599    cd ${SETTE_DIR}
600    . ./prepare_job.sh input_AMM12.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE}
601
602    cd ${SETTE_DIR}
603    export TEST_NAME="SHORT"
604    . prepare_exe_dir.sh
605    JOB_FILE=${EXE_DIR}/run_job.sh
606    NPROC=32
607    \rm $JOB_FILE
608    cd ${EXE_DIR}
609    set_namelist namelist nn_it000 7
610    set_namelist namelist nn_itend 12
611    set_namelist namelist nn_fwb 0
612    set_namelist namelist ln_ctl .false.
613    set_namelist namelist ln_clobber .true.
614    set_namelist namelist nn_dyn2d 2
615    set_namelist namelist nn_tra_dta 0
616    set_namelist namelist jpni 8
617    set_namelist namelist jpnj 4
618    set_namelist namelist jpnij 32
619    set_namelist namelist ln_rstart .true.
620    set_namelist namelist nn_rstctl 2
621    set_namelist namelist cn_ocerst_in \"AMM12_00000006_restart\"
622    for (( i=1; i<=$NPROC; i++)) ; do
623        L_NPROC=$(( $i - 1 ))
624        L_NPROC=`printf "%04d\n" ${L_NPROC}`
625        ln -sf ../LONG/AMM12_00000006_restart_${L_NPROC-1}.nc .
626    done
627    cd ${SETTE_DIR}
628    . ./prepare_job.sh input_AMM12.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE}
629    cd ${SETTE_DIR}
630    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
631fi
632
633if [ ${config} -eq 8 ] ;  then
634    ## Reproducibility tests for AMM12
635    export TEST_NAME="REPO_8_4"
636    cd ${SETTE_DIR}
637    . ../CONFIG/makenemo -m ${CMP_NAM} -n AMM12_32 -r AMM12 add_key "key_mpp_rep"
638    cd ${SETTE_DIR}
639    . param.cfg
640    . all_functions.sh
641    . prepare_exe_dir.sh
642    JOB_FILE=${EXE_DIR}/run_job.sh
643    NPROC=32
644    \rm ${JOB_FILE}
645    cd ${EXE_DIR}
646    set_namelist namelist nn_it000 1
647    set_namelist namelist nn_itend 12
648    set_namelist namelist nn_stock 6
649    set_namelist namelist nn_fwb 0
650    set_namelist namelist ln_ctl .false.
651    set_namelist namelist ln_clobber .true.
652    set_namelist namelist nn_dyn2d 2
653    set_namelist namelist nn_tra_dta 0
654    set_namelist namelist jpni 8
655    set_namelist namelist jpnj 4
656    set_namelist namelist jpnij 32
657    cd ${SETTE_DIR}
658    . ./prepare_job.sh input_AMM12.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE}
659    cd ${SETTE_DIR}
660    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
661
662    cd ${SETTE_DIR}
663    export TEST_NAME="REPO_4_8"
664    . prepare_exe_dir.sh
665    cd ${EXE_DIR}
666    set_namelist namelist nn_it000 1
667    set_namelist namelist nn_itend 576
668    set_namelist namelist nn_fwb 0
669    set_namelist namelist ln_ctl .false.
670    set_namelist namelist ln_clobber .true.
671    set_namelist namelist nn_dyn2d 2
672    set_namelist namelist nn_tra_dta 0
673    set_namelist namelist ln_clobber .true.
674    set_namelist namelist jpni 4
675    set_namelist namelist jpnj 8
676    set_namelist namelist jpnij 32
677    set_namelist namelist ln_rstart .true.
678    set_namelist namelist nn_rstctl 2
679    set_namelist namelist cn_ocerst_in \"../LONG/AMM12_00000006_restart\"
680    cd ${SETTE_DIR}
681    . ./prepare_job.sh input_AMM12.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE}
682    cd ${SETTE_DIR}
683    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
684fi
685
686# TEST FOR ORCA2_LIM_AGRIF : simple test of running AGRIF (no restartability neither reproducibility tests)
687if [ ${config} -eq 9 ] ;  then
688    ## ORCA2_LIM with Agulhas AGRIF zoom in MPI
689    export TEST_NAME="SHORT"
690    cd ${SETTE_DIR}
691    . ../CONFIG/makenemo -m ${CMP_NAM} -n ORCA2AGUL_1_2 -r ORCA2_LIM -j 8 add_key "key_mpp_mpi key_mpp_rep key_agrif" del_key "key_zdftmx"
692    cd ${SETTE_DIR}
693    . param.cfg
694    . all_functions.sh
695    . prepare_exe_dir.sh
696    JOB_FILE=${EXE_DIR}/run_job.sh
697    NPROC=2
698    \rm ${JOB_FILE}
699    cd ${EXE_DIR}
700    set_namelist namelist nn_it000 1
701    set_namelist namelist nn_itend 75
702    set_namelist namelist ln_ctl .false.
703    set_namelist namelist ln_clobber .true.
704    set_namelist namelist jpni 1
705    set_namelist namelist jpnj 2
706    set_namelist namelist jpnij 2
707    set_namelist 1_namelist nn_it000 1
708    set_namelist 1_namelist nn_itend 150
709    set_namelist 1_namelist ln_ctl .false.
710    set_namelist 1_namelist ln_clobber .true.
711    cd ${SETTE_DIR}
712    . ./prepare_job.sh input_ORCA2_LIM_AGRIF.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE}
713    cd ${SETTE_DIR}
714    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
715fi
716
717done
Note: See TracBrowser for help on using the repository browser.