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 |
---|
14 | set -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 | # Forcing files storing (FORCING_DIR) |
---|
50 | # |
---|
51 | # Input files storing (INPUT_DIR) |
---|
52 | # |
---|
53 | # Temporary directory (if needed) (TMPDIR) |
---|
54 | # |
---|
55 | # Output files storing (OUTPUT_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 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 (ocean.output, solver.stat, grid_files, restart, ice_evolu, ftrace.out) |
---|
66 | # |
---|
67 | # (note this job needs to have an input_CONFIG.cfg in which found tar input file) |
---|
68 | # |
---|
69 | # (note other files can be saved adding at the end of fcm_job list of saved files) |
---|
70 | # |
---|
71 | # NOTE: if job is not launched for some problems you have executable ready in ${CONFIG_NAME}/EXP00 directory |
---|
72 | # |
---|
73 | # at the end the directory ${CONFIG_NAME}/EXP00/VALIDATION is created |
---|
74 | # |
---|
75 | # and output files, solver.stat, ocean.output are put in ${CONFIG_NAME}/EXP00/VALIDATION directory |
---|
76 | # |
---|
77 | # and restart files and changed namelists are leaved in ${CONFIG_NAME}/EXP00 directory |
---|
78 | # |
---|
79 | # in ${SETTE_DIR} is created output.sette with the echo of commands run |
---|
80 | # |
---|
81 | # if sette.sh is stopped in output.sette there is written the last command executed by sette.sh |
---|
82 | # |
---|
83 | # if you run: ./sette.sh 2>&1 | tee out.sette |
---|
84 | # |
---|
85 | # in ${SETTE_DIR} out.sette is redirected standard error & standard output |
---|
86 | # |
---|
87 | # |
---|
88 | # EXAMPLES |
---|
89 | # ======== |
---|
90 | # |
---|
91 | # :: |
---|
92 | # |
---|
93 | # $ ./sette.sh |
---|
94 | # |
---|
95 | # |
---|
96 | # TODO |
---|
97 | # ==== |
---|
98 | # |
---|
99 | # option debug |
---|
100 | # |
---|
101 | # EVOLUTIONS |
---|
102 | # ========== |
---|
103 | # |
---|
104 | # $Id$ |
---|
105 | # |
---|
106 | # * creation |
---|
107 | # |
---|
108 | #- |
---|
109 | # |
---|
110 | SETTE_DIR=/PATH/OF/SETTE |
---|
111 | |
---|
112 | cd ${SETTE_DIR} |
---|
113 | . ../CONFIG/makenemo -m ifort_linux -n GYRE_1_1 -r GYRE |
---|
114 | cd ${SETTE_DIR} |
---|
115 | . param.cfg |
---|
116 | . all_functions.sh |
---|
117 | set_namelist namelist nn_it000 1 |
---|
118 | set_namelist namelist nn_itend 75 |
---|
119 | cd ${SETTE_DIR} |
---|
120 | . ./fcm_job.sh input_GYRE.cfg 1 |
---|
121 | |
---|
122 | cd ${SETTE_DIR} |
---|
123 | . ../CONFIG/makenemo -n ORCA2_LIM_1_2 -r ORCA2_LIM add_key "key_mpp_mpi key_nproci=1 key_nprocj=2" |
---|
124 | cd ${SETTE_DIR} |
---|
125 | . param.cfg |
---|
126 | . all_functions.sh |
---|
127 | set_namelist namelist nn_it000 1 |
---|
128 | set_namelist namelist nn_itend 75 |
---|
129 | cd ${SETTE_DIR} |
---|
130 | . ./fcm_job.sh input_ORCA2_LIM.cfg 2 |
---|
131 | |
---|