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 trunk/NEMOGCM/SETTE – NEMO

source: trunk/NEMOGCM/SETTE/sette.sh @ 2769

Last change on this file since 2769 was 2756, checked in by flavoni, 13 years ago

add copy_original function in SETTE to solve pb during re-run tests,... it not the best solution but it is one for the moment, see ticket #819

  • Property svn:executable set to *
  • Property svn:keywords set to Id
File size: 13.3 KB
RevLine 
[2539]1#!/bin/bash
[2500]2#############################################################
3# Author : Simona Flavoni for NEMO
4# Contact : sflod@locean-ipsl.upmc.fr
[2354]5#
[2500]6# sette.sh   : principal script of SET TEsts for NEMO (SETTE)
[2546]7# ----------------------------------------------------------------------
8# NEMO/SETTE , NEMO Consortium (2010)
9# Software governed by the CeCILL licence     (NEMOGCM/NEMO_CeCILL.txt)
10# ----------------------------------------------------------------------
11#
[2500]12#############################################################
13#set -x
14set -o posix
15#set -u
16#set -e
17#+
[2354]18#
[2500]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#
[2545]37# principal script is sette.sh, that calls
[2500]38#
[2545]39#  makenemo
40#
41#   creates the exectuable in ${CONFIG_NAME}/BLD/bin/nemo.exe
42#
43#   (and its link opa in ${CONFIG_NAME}/EXP00)
44#
[2754]45#   param.cfg : sets and loads following directories
[2545]46#
47#   Executing directory (EXE_DIR)
48#
[2675]49
[2545]50#
51#   Input files storing (INPUT_DIR)
52#
53#   Temporary directory (if needed) (TMPDIR)
[2665]54#
55#   Validation directory (NEMO_VALIDATION_DIR)
[2545]56#
57#   (note: this file is the same for all configrations to be tested with sette)
58#
[2665]59#  all_functions.sh : loads functions used by sette (note: new functions can be added here)
[2545]60#
61#  set_namelist : function declared in all_functions that set namelist parameters for tests
62#
63#  fcm_job.sh
64#
[2665]65#   runs job and saves output files (grid_files, restarts, ice_evolu, ftrace.out)
66#
67#   and it creates tree of VALIDATION, in which there are restart files, solver.stat and ocean.output
68#
69#   Tree of VALIDATION is:
70#
71#   NEMO_VALIDATION_DIR/WCONFIG_NAME/WCOMPILER_NAME/TEST_NAME/REVISION_NUMBER(or DATE)
[2545]72#
[2665]73#   (note this job needs to have an input_CONFIG.cfg in which can be found input tar file)
[2545]74#
75#   (note other files can be saved adding at the end of fcm_job list of saved files)
76#
77#  NOTE: if job is not launched for some problems you have executable ready in ${CONFIG_NAME}/EXP00 directory
78#
[2665]79#  NOTE: the changed namelists are leaved in ${CONFIG_NAME}/EXP00 directory
[2545]80#
81#  in ${SETTE_DIR} is created output.sette with the echo of commands run
82#
83#  if sette.sh is stopped in output.sette there is written the last command executed by sette.sh
84#
85#  if you run: ./sette.sh 2>&1 | tee out.sette
86#
87#  in ${SETTE_DIR} out.sette is redirected standard error & standard output
88#
89#
[2500]90# EXAMPLES
91# ========
92#
93# ::
94#
95#  $ ./sette.sh
96#
97#
[2354]98# TODO
99# ====
100#
101# option debug
102#
103# EVOLUTIONS
104# ==========
105#
[2500]106# $Id$
[2354]107#
108#   * creation
[2500]109#
[2354]110#-
111#
[2716]112#-
113# Compiler among those in NEMOGCM/ARCH
[2756]114COMPILER=PW6_VARGAS
[2675]115
[2716]116# Directory to run the tests
117SETTE_DIR=$(cd $(dirname "$0"); pwd)
118MAIN_DIR=${SETTE_DIR%/SETTE}
119CONFIG_DIR=${MAIN_DIR}/CONFIG
120TOOLS_DIR=${MAIN_DIR}/TOOLS
121COMPIL_DIR=${TOOLS_DIR}/COMPILE
[2494]122
[2725]123CMP_NAM=${1:-$COMPILER}
[2754]124## NBTEST=8
[2675]125## echo "TOTAL NUMBER OF TEST" ${NBTEST}
126## for (( config=2; config<=${NBTEST}; config++ ))
[2354]127
[2754]128for config in 1 2 3 4 5 6 7 8
[2675]129do
[2354]130
[2675]131if [ ${config} -eq 1 ] ;  then
132    # Restartability tests for GYRE_LOBSTER
133    cd ${SETTE_DIR}
[2716]134    . ../CONFIG/makenemo -m ${CMP_NAM} -n GYRELOB_LONG -r GYRE_LOBSTER del_key "key_diatrc"
[2675]135    cd ${SETTE_DIR}
136    . param.cfg
137    . all_functions.sh
[2756]138    copy_original namelist
139    copy_original namelist_top
[2675]140    set_namelist namelist cn_exp \"GYRELOB_LONG\"
141    set_namelist namelist nn_it000 1
142    set_namelist namelist nn_itend 120
143    set_namelist namelist nn_stock 60
[2716]144    set_namelist namelist ln_clobber .true.
[2675]145    set_namelist namelist_top ln_trcrad .false.
146    cd ${SETTE_DIR}
147    . ./fcm_job.sh input_GYRE.cfg 1 LONG
148   
[2754]149    cd ${SETTE_DIR}
[2756]150    copy_original namelist
151    copy_original namelist_top
[2675]152    set_namelist namelist cn_exp \"GYRELOB_SHORT\"
153    set_namelist namelist nn_it000 61
154    set_namelist namelist nn_itend 120
155    set_namelist namelist nn_stock 60
156    set_namelist namelist ln_rstart .true.
157    set_namelist namelist nn_rstctl 2
[2716]158    set_namelist namelist ln_clobber .true.
159    set_namelist namelist cn_ocerst_in \"GYRELOB_LONG_00000060_restart.nc\"
[2675]160    set_namelist namelist_top ln_trcrad .false.
161    set_namelist namelist_top ln_rsttr .true.
162    set_namelist namelist_top nn_rsttr 2
163    set_namelist namelist_top cn_trcrst_in \"GYRELOB_LONG_00000060_restart_trc\"
164    cd ${SETTE_DIR}
165    . ./fcm_job.sh input_GYRE.cfg 1 SHORT
166fi
167
168if [ ${config} -eq 2 ] ;  then
[2716]169# Restartability tests for ORCA2_LIM_PISCES
[2675]170    cd ${SETTE_DIR}
[2716]171    . ../CONFIG/makenemo -m ${CMP_NAM} -n ORCA2LIMPIS_LONG -r ORCA2_LIM_PISCES del_key "key_dtatrc key_diatrc"
[2675]172    cd ${SETTE_DIR}
[2756]173    copy_original namelist
174    copy_original namelist_top
175    copy_original namelist_pisces
[2675]176    . param.cfg
177    . all_functions.sh
178    set_namelist namelist cn_exp \"O2LP_LONG\"
179    set_namelist namelist nn_it000 1
180    set_namelist namelist nn_itend 150
181    set_namelist namelist nn_stock 75
[2716]182    set_namelist namelist ln_clobber .true.
[2675]183    set_namelist namelist_top ln_trcrad .false.
184    # put ln_pisdmp, ln_dustfer, ln_river, ln_ndepo, ln_sedinput to false
185    # if not you need input files, and for tests is not necessary
186    set_namelist namelist_pisces ln_pisdmp .false.
187    set_namelist namelist_pisces ln_dustfer .false.
188    set_namelist namelist_pisces ln_river .false.
189    set_namelist namelist_pisces ln_ndepo .false.
190    set_namelist namelist_pisces ln_sedinput .false.
191    cd ${SETTE_DIR}
192    . ./fcm_job.sh input_ORCA2_LIM_PISCES.cfg 1 LONG
193   
194    cd ${SETTE_DIR}
[2756]195    copy_original namelist
196    copy_original namelist_ice
197    copy_original namelist_top
198    copy_original namelist_pisces
[2675]199    set_namelist namelist cn_exp \"O2LP_SHORT\"
200    set_namelist namelist nn_it000 76
201    set_namelist namelist nn_itend 150
202    set_namelist namelist nn_stock 75
203    set_namelist namelist ln_rstart .true.
204    set_namelist namelist nn_rstctl 2
[2716]205    set_namelist namelist ln_clobber .true.
206    set_namelist namelist cn_ocerst_in \"O2LP_LONG_00000075_restart.nc\"
[2725]207    set_namelist namelist_ice cn_icerst_in \"O2LP_LONG_00000075_restart_ice.nc\"
[2675]208    set_namelist namelist_top ln_trcrad .false.
209    set_namelist namelist_top ln_rsttr .true.
210    set_namelist namelist_top nn_rsttr 2
211    set_namelist namelist_top cn_trcrst_in \"O2LP_LONG_00000075_restart_trc\"
212    # put ln_pisdmp, ln_dustfer, ln_river, ln_ndepo, ln_sedinput
213    # if not you need input files, and for tests is not necessary
214    set_namelist namelist_pisces ln_pisdmp .false.
215    set_namelist namelist_pisces ln_dustfer .false.
216    set_namelist namelist_pisces ln_river .false.
217    set_namelist namelist_pisces ln_ndepo .false.
218    set_namelist namelist_pisces ln_sedinput .false.
219    cd ${SETTE_DIR}
220    . ./fcm_job.sh input_ORCA2_LIM_PISCES.cfg 1 SHORT
221fi
222
223if [ ${config} -eq 3 ] ;  then
[2716]224    ## Restartability tests for POMME
[2675]225    cd ${SETTE_DIR}
[2725]226    . ../CONFIG/makenemo -m ${CMP_NAM} -n POMME_LONG -r POMME
[2675]227    cd ${SETTE_DIR}
228    . param.cfg
229    . all_functions.sh
[2756]230    copy_original namelist
[2675]231    set_namelist namelist cn_exp \"POMME_LONG\"
232    set_namelist namelist nn_it000 1
233    set_namelist namelist nn_itend 600
[2716]234    set_namelist namelist ln_clobber .true.
[2675]235    cd ${SETTE_DIR}
236    . ./fcm_job.sh input_POMME.cfg 1 LONG
237   
238    cd ${SETTE_DIR}
[2756]239    copy_original namelist
[2675]240    set_namelist namelist cn_exp \"POMME_SHORT\"
241    set_namelist namelist nn_it000 301
242    set_namelist namelist nn_itend 600
243    set_namelist namelist nn_stock 300
244    set_namelist namelist ln_rstart .true.
245    set_namelist namelist nn_rstctl 2
[2716]246    set_namelist namelist ln_clobber .true.
247    set_namelist namelist cn_ocerst_in \"POMME_LONG_00000075_restart.nc\"
248    mv ${OUTPUT_DIR}/restart.obc.output ${OUTPUT_DIR}/restart.obc
[2675]249    cd ${SETTE_DIR}
250    . ./fcm_job.sh input_POMME.cfg 1 SHORT
251fi
252
253if [ ${config} -eq 4 ] ;  then
[2716]254    ## Reproducilibity tests for GYRE_LOBSTER
[2675]255    cd ${SETTE_DIR}
[2754]256    . ../CONFIG/makenemo -m ${CMP_NAM} -n GYRELOB_4 -r GYRE_LOBSTER add_key "key_mpp_mpi key_mpp_rep" del_key "key_vectopt_loop key_diatrc"
[2675]257    cd ${SETTE_DIR}
258    . param.cfg
259    . all_functions.sh
[2756]260    copy_original namelist
[2754]261    set_namelist namelist cn_exp \"GYRELOB_14\"
[2675]262    set_namelist namelist nn_it000 1
263    set_namelist namelist nn_itend 75
264    set_namelist namelist nn_fwb 0
265    set_namelist namelist nn_bench 0
266    set_namelist namelist ln_ctl .false.
[2716]267    set_namelist namelist ln_clobber .true.
268    set_namelist namelist jpni 1
269    set_namelist namelist jpnj 4
270    set_namelist namelist jpnij 4
[2675]271    cd ${SETTE_DIR}
[2754]272    . ./fcm_job.sh input_GYRE.cfg 4 REPRO_1_4
[2675]273   
274    cd ${SETTE_DIR}
[2756]275    copy_original namelist
[2754]276    set_namelist namelist cn_exp \"GYRELOB_22\"
[2675]277    set_namelist namelist nn_it000 1
278    set_namelist namelist nn_itend 75
279    set_namelist namelist nn_fwb 0
280    set_namelist namelist ln_ctl .false.
[2716]281    set_namelist namelist ln_clobber .true.
282    set_namelist namelist jpni 2
283    set_namelist namelist jpnj 2
284    set_namelist namelist jpnij 4
[2675]285    cd ${SETTE_DIR}
[2754]286    . ./fcm_job.sh input_GYRE.cfg 4 REPRO_2_2
[2675]287fi
288
289if [ ${config} -eq 5 ] ;  then
290    ## Repropducilibity tests for ORCA2_LIM_PISCES
291    cd ${SETTE_DIR}
[2754]292    . ../CONFIG/makenemo -m ${CMP_NAM} -n ORCA2LIMPIS_16 -r ORCA2_LIM_PISCES add_key "key_mpp_mpi key_mpp_rep" del_key "key_vectopt_loop key_dtatrc key_diatrc" 
[2675]293    cd ${SETTE_DIR}
294    . param.cfg
295    . all_functions.sh
[2756]296    copy_original namelist
297    copy_original namelist_pisces
[2675]298    set_namelist namelist nn_it000 1
299    set_namelist namelist nn_itend 75
300    set_namelist namelist nn_fwb 0
301    set_namelist namelist ln_ctl .false.
[2716]302    set_namelist namelist ln_clobber .true.
303    set_namelist namelist jpni 4
304    set_namelist namelist jpnj 4
305    set_namelist namelist jpnij 16
[2675]306    # put ln_pisdmp, ln_dustfer, ln_river, ln_ndepo, ln_sedinput to false
307    # if not you need input files, and for tests is not necessary
308    set_namelist namelist_pisces ln_pisdmp .false.
309    set_namelist namelist_pisces ln_dustfer .false.
310    set_namelist namelist_pisces ln_river .false.
311    set_namelist namelist_pisces ln_ndepo .false.
312    set_namelist namelist_pisces ln_sedinput .false.
313    cd ${SETTE_DIR}
[2754]314    . ./fcm_job.sh input_ORCA2_LIM_PISCES.cfg 16 REPRO_4_4
[2716]315   
[2675]316    cd ${SETTE_DIR}
[2756]317    copy_original namelist
318    copy_original namelist_pisces
[2675]319    set_namelist namelist nn_it000 1
320    set_namelist namelist nn_itend 75
321    set_namelist namelist nn_fwb 0
322    set_namelist namelist ln_ctl .false.
[2716]323    set_namelist namelist ln_clobber .true.
324    set_namelist namelist jpni 2
325    set_namelist namelist jpnj 8
326    set_namelist namelist jpnij 16
[2675]327    # put ln_pisdmp, ln_dustfer, ln_river, ln_ndepo, ln_sedinput to false
328    # if not you need input files, and for tests is not necessary
329    set_namelist namelist_pisces ln_pisdmp .false.
330    set_namelist namelist_pisces ln_dustfer .false.
331    set_namelist namelist_pisces ln_river .false.
332    set_namelist namelist_pisces ln_ndepo .false.
333    set_namelist namelist_pisces ln_sedinput .false.
334    cd ${SETTE_DIR}
[2754]335    . ./fcm_job.sh input_ORCA2_LIM_PISCES.cfg 16 REPRO_2_8
[2675]336fi
337
338if [ ${config} -eq 6 ] ;  then
[2716]339    ## Reproductibility tests for POMME
[2675]340    cd ${SETTE_DIR}
[2754]341    . ../CONFIG/makenemo -m ${CMP_NAM} -n POMME_4 -r POMME add_key "key_mpp_mpi key_mpp_rep"
[2675]342    cd ${SETTE_DIR}
343    . param.cfg
344    . all_functions.sh
[2756]345    copy_original namelist
[2675]346    set_namelist namelist nn_it000 1
347    set_namelist namelist nn_itend 300
348    set_namelist namelist nn_fwb 0
349    set_namelist namelist ln_ctl .false.
[2716]350    set_namelist namelist ln_clobber .true.
351    set_namelist namelist jpni 1
352    set_namelist namelist jpnj 4
353    set_namelist namelist jpnij 4
[2675]354    cd ${SETTE_DIR}
[2754]355    . ./fcm_job.sh input_POMME.cfg 4 REPRO_1_4
[2675]356   
357    cd ${SETTE_DIR}
[2756]358    copy_original namelist
[2675]359    set_namelist namelist nn_it000 1
360    set_namelist namelist nn_itend 300
361    set_namelist namelist nn_fwb 0
362    set_namelist namelist ln_ctl .false.
[2716]363    set_namelist namelist ln_clobber .true.
364    set_namelist namelist jpni 2
365    set_namelist namelist jpnj 2
366    set_namelist namelist jpnij 4
[2675]367    cd ${SETTE_DIR}
[2754]368    . ./fcm_job.sh input_POMME.cfg 4 REPRO_2_2
[2675]369fi
370
[2732]371if [ ${config} -eq 7 ] ;  then
372    ## ORCA2_LIM with Agulhas AGRIF zoom
373    cd ${SETTE_DIR}
[2754]374    . ../CONFIG/makenemo -m ${CMP_NAM} -n ORCA2AGUL -r ORCA2_LIM add_key "key_agrif" del_key "key_vectopt_loop key_zdftmx" 
[2732]375    cd ${SETTE_DIR}
376    . param.cfg
377    . all_functions.sh
[2756]378    copy_original namelist
379    copy_original 1_namelist
[2732]380    set_namelist namelist nn_it000 1
381    set_namelist namelist nn_itend 75
382    set_namelist namelist ln_ctl .false.
383    set_namelist namelist ln_clobber .true.
384    set_namelist 1_namelist nn_it000 1
385    set_namelist 1_namelist nn_itend 150
386    set_namelist 1_namelist ln_ctl .false.
387    set_namelist 1_namelist ln_clobber .true.
388    cd ${SETTE_DIR}
389    . ./fcm_job.sh input_ORCA2_LIM.cfg 1 SHORT
390fi
391
392if [ ${config} -eq 8 ] ;  then
393    ## ORCA2_LIM with Agulhas AGRIF zoom in MPI
394    cd ${SETTE_DIR}
[2754]395    . ../CONFIG/makenemo -m ${CMP_NAM} -n ORCA2AGUL_1_2 -r ORCA2_LIM add_key "key_mpp_mpi key_agrif" del_key "key_vectopt_loop key_zdftmx" 
[2732]396    cd ${SETTE_DIR}
397    . param.cfg
398    . all_functions.sh
[2756]399    copy_original namelist
400    copy_original 1_namelist
[2732]401    set_namelist namelist nn_it000 1
402    set_namelist namelist nn_itend 75
403    set_namelist namelist ln_ctl .false.
404    set_namelist namelist ln_clobber .true.
405    set_namelist namelist jpni 1
406    set_namelist namelist jpnj 2
407    set_namelist namelist jpnij 2
408    set_namelist 1_namelist nn_it000 1
409    set_namelist 1_namelist nn_itend 150
410    set_namelist 1_namelist ln_ctl .false.
411    set_namelist 1_namelist ln_clobber .true.
412    cd ${SETTE_DIR}
413    . ./fcm_job.sh input_ORCA2_LIM.cfg 2 SHORT
414fi
415
[2675]416done
Note: See TracBrowser for help on using the repository browser.