[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) |
---|
| 7 | ############################################################# |
---|
| 8 | #set -x |
---|
| 9 | set -o posix |
---|
| 10 | #set -u |
---|
| 11 | #set -e |
---|
| 12 | #+ |
---|
[2354] | 13 | # |
---|
[2500] | 14 | # ================ |
---|
| 15 | # sette.sh |
---|
| 16 | # ================ |
---|
| 17 | # |
---|
| 18 | # ---------------------------------------------- |
---|
| 19 | # Set of tests for NEMO |
---|
| 20 | # ---------------------------------------------- |
---|
| 21 | # |
---|
| 22 | # SYNOPSIS |
---|
| 23 | # ======== |
---|
| 24 | # |
---|
| 25 | # :: |
---|
| 26 | # |
---|
| 27 | # $ ./sette.sh |
---|
| 28 | # |
---|
| 29 | # DESCRIPTION |
---|
| 30 | # =========== |
---|
| 31 | # |
---|
[2545] | 32 | # principal script is sette.sh, that calls |
---|
[2500] | 33 | # |
---|
[2545] | 34 | # makenemo |
---|
| 35 | # |
---|
| 36 | # creates the exectuable in ${CONFIG_NAME}/BLD/bin/nemo.exe |
---|
| 37 | # |
---|
| 38 | # (and its link opa in ${CONFIG_NAME}/EXP00) |
---|
| 39 | # |
---|
| 40 | # param.cfg : sets and loads following directories |
---|
| 41 | # |
---|
| 42 | # Executing directory (EXE_DIR) |
---|
| 43 | # |
---|
| 44 | # Forcing files storing (FORCING_DIR) |
---|
| 45 | # |
---|
| 46 | # Input files storing (INPUT_DIR) |
---|
| 47 | # |
---|
| 48 | # Temporary directory (if needed) (TMPDIR) |
---|
| 49 | # |
---|
| 50 | # Output files storing (OUTPUT_DIR) |
---|
| 51 | # |
---|
| 52 | # (note: this file is the same for all configrations to be tested with sette) |
---|
| 53 | # |
---|
| 54 | # all_functions.sh : loads functions used by sette (note: new functions can added here) |
---|
| 55 | # |
---|
| 56 | # set_namelist : function declared in all_functions that set namelist parameters for tests |
---|
| 57 | # |
---|
| 58 | # fcm_job.sh |
---|
| 59 | # |
---|
| 60 | # runs job and saves output files (ocean.output, solver.stat, grid_files, restart, ice_evolu, ftrace.out) |
---|
| 61 | # |
---|
| 62 | # (note this job needs to have an input_CONFIG.cfg in which found tar input file) |
---|
| 63 | # |
---|
| 64 | # (note other files can be saved adding at the end of fcm_job list of saved files) |
---|
| 65 | # |
---|
| 66 | # NOTE: if job is not launched for some problems you have executable ready in ${CONFIG_NAME}/EXP00 directory |
---|
| 67 | # |
---|
| 68 | # at the end the directory ${CONFIG_NAME}/EXP00/VALIDATION is created |
---|
| 69 | # |
---|
| 70 | # and output files, solver.stat, ocean.output are put in ${CONFIG_NAME}/EXP00/VALIDATION directory |
---|
| 71 | # |
---|
| 72 | # and restart files and changed namelists are leaved in ${CONFIG_NAME}/EXP00 directory |
---|
| 73 | # |
---|
| 74 | # in ${SETTE_DIR} is created output.sette with the echo of commands run |
---|
| 75 | # |
---|
| 76 | # if sette.sh is stopped in output.sette there is written the last command executed by sette.sh |
---|
| 77 | # |
---|
| 78 | # if you run: ./sette.sh 2>&1 | tee out.sette |
---|
| 79 | # |
---|
| 80 | # in ${SETTE_DIR} out.sette is redirected standard error & standard output |
---|
| 81 | # |
---|
| 82 | # |
---|
[2500] | 83 | # EXAMPLES |
---|
| 84 | # ======== |
---|
| 85 | # |
---|
| 86 | # :: |
---|
| 87 | # |
---|
| 88 | # $ ./sette.sh |
---|
| 89 | # |
---|
| 90 | # |
---|
[2354] | 91 | # TODO |
---|
| 92 | # ==== |
---|
| 93 | # |
---|
| 94 | # option debug |
---|
| 95 | # |
---|
| 96 | # EVOLUTIONS |
---|
| 97 | # ========== |
---|
| 98 | # |
---|
[2500] | 99 | # $Id$ |
---|
[2354] | 100 | # |
---|
| 101 | # * creation |
---|
[2500] | 102 | # |
---|
[2354] | 103 | #- |
---|
| 104 | # |
---|
[2500] | 105 | SETTE_DIR=/PATH/OF/SETTE |
---|
[2494] | 106 | |
---|
[2354] | 107 | cd ${SETTE_DIR} |
---|
| 108 | . ../CONFIG/makenemo -m ifort_linux -n GYRE_1_1 -r GYRE |
---|
| 109 | cd ${SETTE_DIR} |
---|
| 110 | . param.cfg |
---|
[2359] | 111 | . all_functions.sh |
---|
[2494] | 112 | set_namelist namelist nn_it000 1 |
---|
| 113 | set_namelist namelist nn_itend 75 |
---|
[2354] | 114 | cd ${SETTE_DIR} |
---|
| 115 | . ./fcm_job.sh input_GYRE.cfg 1 |
---|
| 116 | |
---|
| 117 | cd ${SETTE_DIR} |
---|
[2539] | 118 | . ../CONFIG/makenemo -n ORCA2_LIM_1_2 -r ORCA2_LIM add_key "key_mpp_mpi key_nproci=1 key_nprocj=2" |
---|
[2354] | 119 | cd ${SETTE_DIR} |
---|
| 120 | . param.cfg |
---|
[2359] | 121 | . all_functions.sh |
---|
[2494] | 122 | set_namelist namelist nn_it000 1 |
---|
| 123 | set_namelist namelist nn_itend 75 |
---|
[2354] | 124 | cd ${SETTE_DIR} |
---|
| 125 | . ./fcm_job.sh input_ORCA2_LIM.cfg 2 |
---|
| 126 | |
---|