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

Last change on this file since 2769 was 2756, checked in by flavoni, 10 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
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# principal script is sette.sh, that calls
38#
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#
45#   param.cfg : sets and loads following directories
46#
47#   Executing directory (EXE_DIR)
48#
49
50#
51#   Input files storing (INPUT_DIR)
52#
53#   Temporary directory (if needed) (TMPDIR)
54#
55#   Validation directory (NEMO_VALIDATION_DIR)
56#
57#   (note: this file is the same for all configrations to be tested with sette)
58#
59#  all_functions.sh : loads functions used by sette (note: new functions can be added here)
60#
61#  set_namelist : function declared in all_functions that set namelist parameters for tests
62#
63#  fcm_job.sh
64#
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)
72#
73#   (note this job needs to have an input_CONFIG.cfg in which can be found input tar file)
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#
79#  NOTE: the changed namelists are leaved in ${CONFIG_NAME}/EXP00 directory
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#
90# EXAMPLES
91# ========
92#
93# ::
94#
95#  $ ./sette.sh
96#
97#
98# TODO
99# ====
100#
101# option debug
102#
103# EVOLUTIONS
104# ==========
105#
106# $Id$
107#
108#   * creation
109#
110#-
111#
112#-
113# Compiler among those in NEMOGCM/ARCH
114COMPILER=PW6_VARGAS
115
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
122
123CMP_NAM=${1:-$COMPILER}
124## NBTEST=8
125## echo "TOTAL NUMBER OF TEST" ${NBTEST}
126## for (( config=2; config<=${NBTEST}; config++ ))
127
128for config in 1 2 3 4 5 6 7 8
129do
130
131if [ ${config} -eq 1 ] ;  then
132    # Restartability tests for GYRE_LOBSTER
133    cd ${SETTE_DIR}
134    . ../CONFIG/makenemo -m ${CMP_NAM} -n GYRELOB_LONG -r GYRE_LOBSTER del_key "key_diatrc"
135    cd ${SETTE_DIR}
136    . param.cfg
137    . all_functions.sh
138    copy_original namelist
139    copy_original namelist_top
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
144    set_namelist namelist ln_clobber .true.
145    set_namelist namelist_top ln_trcrad .false.
146    cd ${SETTE_DIR}
147    . ./fcm_job.sh input_GYRE.cfg 1 LONG
148   
149    cd ${SETTE_DIR}
150    copy_original namelist
151    copy_original namelist_top
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
158    set_namelist namelist ln_clobber .true.
159    set_namelist namelist cn_ocerst_in \"GYRELOB_LONG_00000060_restart.nc\"
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
169# Restartability tests for ORCA2_LIM_PISCES
170    cd ${SETTE_DIR}
171    . ../CONFIG/makenemo -m ${CMP_NAM} -n ORCA2LIMPIS_LONG -r ORCA2_LIM_PISCES del_key "key_dtatrc key_diatrc"
172    cd ${SETTE_DIR}
173    copy_original namelist
174    copy_original namelist_top
175    copy_original namelist_pisces
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
182    set_namelist namelist ln_clobber .true.
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}
195    copy_original namelist
196    copy_original namelist_ice
197    copy_original namelist_top
198    copy_original namelist_pisces
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
205    set_namelist namelist ln_clobber .true.
206    set_namelist namelist cn_ocerst_in \"O2LP_LONG_00000075_restart.nc\"
207    set_namelist namelist_ice cn_icerst_in \"O2LP_LONG_00000075_restart_ice.nc\"
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
224    ## Restartability tests for POMME
225    cd ${SETTE_DIR}
226    . ../CONFIG/makenemo -m ${CMP_NAM} -n POMME_LONG -r POMME
227    cd ${SETTE_DIR}
228    . param.cfg
229    . all_functions.sh
230    copy_original namelist
231    set_namelist namelist cn_exp \"POMME_LONG\"
232    set_namelist namelist nn_it000 1
233    set_namelist namelist nn_itend 600
234    set_namelist namelist ln_clobber .true.
235    cd ${SETTE_DIR}
236    . ./fcm_job.sh input_POMME.cfg 1 LONG
237   
238    cd ${SETTE_DIR}
239    copy_original namelist
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
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
249    cd ${SETTE_DIR}
250    . ./fcm_job.sh input_POMME.cfg 1 SHORT
251fi
252
253if [ ${config} -eq 4 ] ;  then
254    ## Reproducilibity tests for GYRE_LOBSTER
255    cd ${SETTE_DIR}
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"
257    cd ${SETTE_DIR}
258    . param.cfg
259    . all_functions.sh
260    copy_original namelist
261    set_namelist namelist cn_exp \"GYRELOB_14\"
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.
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
271    cd ${SETTE_DIR}
272    . ./fcm_job.sh input_GYRE.cfg 4 REPRO_1_4
273   
274    cd ${SETTE_DIR}
275    copy_original namelist
276    set_namelist namelist cn_exp \"GYRELOB_22\"
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.
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
285    cd ${SETTE_DIR}
286    . ./fcm_job.sh input_GYRE.cfg 4 REPRO_2_2
287fi
288
289if [ ${config} -eq 5 ] ;  then
290    ## Repropducilibity tests for ORCA2_LIM_PISCES
291    cd ${SETTE_DIR}
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" 
293    cd ${SETTE_DIR}
294    . param.cfg
295    . all_functions.sh
296    copy_original namelist
297    copy_original namelist_pisces
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.
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
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}
314    . ./fcm_job.sh input_ORCA2_LIM_PISCES.cfg 16 REPRO_4_4
315   
316    cd ${SETTE_DIR}
317    copy_original namelist
318    copy_original namelist_pisces
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.
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
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}
335    . ./fcm_job.sh input_ORCA2_LIM_PISCES.cfg 16 REPRO_2_8
336fi
337
338if [ ${config} -eq 6 ] ;  then
339    ## Reproductibility tests for POMME
340    cd ${SETTE_DIR}
341    . ../CONFIG/makenemo -m ${CMP_NAM} -n POMME_4 -r POMME add_key "key_mpp_mpi key_mpp_rep"
342    cd ${SETTE_DIR}
343    . param.cfg
344    . all_functions.sh
345    copy_original namelist
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.
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
354    cd ${SETTE_DIR}
355    . ./fcm_job.sh input_POMME.cfg 4 REPRO_1_4
356   
357    cd ${SETTE_DIR}
358    copy_original namelist
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.
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
367    cd ${SETTE_DIR}
368    . ./fcm_job.sh input_POMME.cfg 4 REPRO_2_2
369fi
370
371if [ ${config} -eq 7 ] ;  then
372    ## ORCA2_LIM with Agulhas AGRIF zoom
373    cd ${SETTE_DIR}
374    . ../CONFIG/makenemo -m ${CMP_NAM} -n ORCA2AGUL -r ORCA2_LIM add_key "key_agrif" del_key "key_vectopt_loop key_zdftmx" 
375    cd ${SETTE_DIR}
376    . param.cfg
377    . all_functions.sh
378    copy_original namelist
379    copy_original 1_namelist
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}
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" 
396    cd ${SETTE_DIR}
397    . param.cfg
398    . all_functions.sh
399    copy_original namelist
400    copy_original 1_namelist
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
416done
Note: See TracBrowser for help on using the repository browser.