[622] | 1 | #-Q- curie ###################### |
---|
| 2 | #-Q- curie ## CURIE TGCC/CEA ## |
---|
| 3 | #-Q- curie ###################### |
---|
[837] | 4 | #-Q- curie #MSUB -r MONITORING # Nom du job |
---|
[622] | 5 | #-Q- curie #MSUB -eo |
---|
| 6 | #-Q- curie #MSUB -n 1 # Reservation du processus |
---|
| 7 | #-Q- curie #MSUB -T 86400 # Limite de temps elapsed du job |
---|
[741] | 8 | #-Q- curie #MSUB -q xlarge |
---|
[704] | 9 | #-Q- curie #MSUB -Q normal |
---|
[837] | 10 | #-Q- curie #MSUB -A ::default_project:: |
---|
[681] | 11 | #-Q- curie set +x |
---|
[770] | 12 | #-Q- ada #!/bin/ksh |
---|
| 13 | #-Q- ada ####################### |
---|
| 14 | #-Q- ada ## ADA IDRIS ## |
---|
| 15 | #-Q- ada ####################### |
---|
[848] | 16 | #-Q- ada # @ job_type = serial |
---|
| 17 | #-Q- ada # @ requirements = (Feature == "prepost") |
---|
[770] | 18 | #-Q- ada # Temps Elapsed max. d'une requete hh:mm:ss |
---|
| 19 | #-Q- ada # @ wall_clock_limit = 1:00:00 |
---|
| 20 | #-Q- ada # Nom du travail LoadLeveler |
---|
| 21 | #-Q- ada # @ job_name = MONITORING |
---|
[837] | 22 | #-Q- ada # Fichier de sortie standard du travail |
---|
[770] | 23 | #-Q- ada # @ output = $(job_name).$(jobid) |
---|
| 24 | #-Q- ada # Fichier de sortie d'erreur du travail |
---|
| 25 | #-Q- ada # @ error = $(job_name).$(jobid) |
---|
| 26 | #-Q- ada # pour recevoir un mail en cas de depassement du temps Elapsed (ou autre pb.) |
---|
| 27 | #-Q- ada # @ notification = error |
---|
| 28 | #-Q- ada # @ environment = $POST_DIR ; $SUBMIT_DIR ; $libIGCM ; $libIGCM_SX ; $R_INIT ; $R_BC ; $StandAlone ; $RESOL_ATM ; $RESOL_OCE ; $RESOL_ICE ; $RESOL_MBG ; $RESOL_SRF ; $R_SAVE ; $config_UserChoices_JobName ; $config_UserChoices_TagName ; $YEARS ; $MASTER |
---|
| 29 | #-Q- ada # @ queue |
---|
[172] | 30 | #-Q- sx9mercure #!/bin/ksh |
---|
[616] | 31 | #-Q- sx9mercure ###################### |
---|
| 32 | #-Q- sx9mercure ## SX9MERCURE CCRT ## |
---|
| 33 | #-Q- sx9mercure ###################### |
---|
| 34 | #-Q- sx9mercure #PBS -N MONITORING # Nom du job |
---|
| 35 | #-Q- sx9mercure #PBS -j o # regroupement des stdout et stderr |
---|
| 36 | #-Q- sx9mercure #PBS -S /usr/bin/ksh # shell de soumission |
---|
| 37 | #-Q- sx9mercure #PBS -l memsz_job=1gb # Limite memoire a 1 Go |
---|
| 38 | #-Q- sx9mercure #PBS -l elapstim_req=1:00:00 # Limite temps a 2 heures |
---|
| 39 | #-Q- sx9mercure #PBS -q scalaire |
---|
[640] | 40 | #-Q- sx9mercure #PBS -r n |
---|
[222] | 41 | #-Q- titane #!/bin/ksh |
---|
| 42 | #-Q- titane ###################### |
---|
| 43 | #-Q- titane ## TITANE CEA ## |
---|
| 44 | #-Q- titane ###################### |
---|
[837] | 45 | #-Q- titane #MSUB -r MONITORING # Nom du job |
---|
[544] | 46 | #-Q- titane #MSUB -eo |
---|
[222] | 47 | #-Q- titane #MSUB -n 1 # Reservation du processus |
---|
| 48 | #-Q- titane #MSUB -T 86400 # Limite de temps elapsed du job |
---|
[544] | 49 | #-Q- titane #MSUB -q mono |
---|
[643] | 50 | #-Q- titane #MSUB -E '-rn' |
---|
[281] | 51 | #-Q- lxiv8 ###################### |
---|
| 52 | #-Q- lxiv8 ## OBELIX LSCE ## |
---|
| 53 | #-Q- lxiv8 ###################### |
---|
| 54 | #-Q- lxiv8 #PBS -N MONITORING |
---|
| 55 | #-Q- lxiv8 #PBS -m a |
---|
| 56 | #-Q- lxiv8 #PBS -j oe |
---|
| 57 | #-Q- lxiv8 #PBS -q medium |
---|
| 58 | #-Q- lxiv8 #PBS -o MONITORING.$$ |
---|
| 59 | #-Q- lxiv8 #PBS -S /bin/ksh |
---|
[2] | 60 | #-Q- default #!/bin/ksh |
---|
| 61 | #-Q- default ################## |
---|
| 62 | #-Q- default ## DEFAULT HOST ## |
---|
| 63 | #-Q- default ################## |
---|
| 64 | |
---|
[373] | 65 | #************************************************************** |
---|
| 66 | # Author: Sebastien Denvil |
---|
| 67 | # Contact: Sebastien.Denvil__at__ipsl.jussieu.fr |
---|
| 68 | # $Revision:: $ Revision of last commit |
---|
| 69 | # $Author:: $ Author of last commit |
---|
| 70 | # $Date:: $ Date of last commit |
---|
[2] | 71 | # IPSL (2006) |
---|
| 72 | # This software is governed by the CeCILL licence see libIGCM/libIGCM_CeCILL.LIC |
---|
[373] | 73 | # |
---|
| 74 | #************************************************************** |
---|
[2] | 75 | |
---|
[108] | 76 | #set -eu |
---|
| 77 | #set -vx |
---|
| 78 | |
---|
[2] | 79 | date |
---|
| 80 | |
---|
[770] | 81 | #-Q- ada export OMP_NUM_THREADS=1 |
---|
[2] | 82 | |
---|
[712] | 83 | #D- Task type (computing or post-processing) |
---|
| 84 | TaskType=post-processing |
---|
| 85 | |
---|
[280] | 86 | ######################################################################## |
---|
| 87 | |
---|
| 88 | #D- Flag to determine if this job in a standalone mode |
---|
| 89 | #D- Default : value from AA_job if any |
---|
| 90 | StandAlone=${StandAlone:=true} |
---|
| 91 | |
---|
[554] | 92 | #D- Path to libIGCM |
---|
[280] | 93 | #D- Default : value from AA_job if any |
---|
[770] | 94 | # WARNING For StandAlone use : To run this script on some machine (ada and cesium) |
---|
[554] | 95 | # WARNING you must check MirrorlibIGCM variable in sys library. |
---|
| 96 | # WARNING If this variable is true, you must use libIGCM_POST path instead |
---|
| 97 | # WARNING of your running libIGCM directory. |
---|
[280] | 98 | libIGCM=${libIGCM:=::modipsl::/libIGCM} |
---|
| 99 | |
---|
[334] | 100 | #D- Increased verbosity (1, 2, 3) |
---|
| 101 | #D- Default : value from AA_job if any |
---|
| 102 | Verbosity=${Verbosity:=3} |
---|
| 103 | |
---|
| 104 | #D- Low level debug : to bypass lib test checks and stack construction |
---|
| 105 | #D- Default : value from AA_job if any |
---|
| 106 | DEBUG_debug=${DEBUG_debug:=false} |
---|
| 107 | |
---|
| 108 | #D- TEMPORARY Flag to determine atmospheric resolution |
---|
| 109 | #D- Default : value from atmospheric driver if any |
---|
| 110 | RESOL_ATM=${RESOL_ATM:=ALL} |
---|
| 111 | |
---|
| 112 | #D- Flag to determine surface resolution |
---|
| 113 | #D- Default : value from surface driver if any |
---|
| 114 | RESOL_SRF=${RESOL_SRF:=ALL} |
---|
| 115 | |
---|
| 116 | #D- Flag to determine surface resolution |
---|
| 117 | #D- Default : value from surface driver if any |
---|
| 118 | RESOL_SBG=${RESOL_SBG:=ALL} |
---|
| 119 | |
---|
| 120 | #D- TEMPORARY Flag to determine ocean resolution |
---|
| 121 | #D- Default : value from ocean driver if any |
---|
| 122 | RESOL_OCE=${RESOL_OCE:=ORCA2} |
---|
| 123 | |
---|
| 124 | #D- TEMPORARY Flag to determine ice resolution |
---|
| 125 | #D- Default : value from ice driver if any |
---|
| 126 | RESOL_ICE=${RESOL_ICE:=ORCA2} |
---|
| 127 | |
---|
| 128 | #D- TEMPORARY Flag to determine marine biogeochemistry resolution |
---|
| 129 | #D- Default : value from ice driver if any |
---|
| 130 | RESOL_MBG=${RESOL_MBG:=ORCA2} |
---|
| 131 | |
---|
[2] | 132 | ###################################################################### |
---|
| 133 | |
---|
[108] | 134 | . ${libIGCM}/libIGCM_debug/libIGCM_debug.ksh |
---|
| 135 | . ${libIGCM}/libIGCM_card/libIGCM_card.ksh |
---|
| 136 | . ${libIGCM}/libIGCM_date/libIGCM_date.ksh |
---|
| 137 | #------- |
---|
| 138 | . ${libIGCM}/libIGCM_sys/libIGCM_sys.ksh |
---|
[731] | 139 | . ${libIGCM}/libIGCM_config/libIGCM_config.ksh |
---|
[832] | 140 | #------- |
---|
| 141 | ( ${DEBUG_debug} ) && IGCM_debug_Check |
---|
| 142 | ( ${DEBUG_debug} ) && IGCM_card_Check |
---|
| 143 | ( ${DEBUG_debug} ) && IGCM_date_Check |
---|
[2] | 144 | |
---|
| 145 | ###################################################################### |
---|
| 146 | |
---|
| 147 | #set -vx |
---|
| 148 | |
---|
| 149 | #=========================================== |
---|
[36] | 150 | RUN_DIR=${RUN_DIR_PATH} |
---|
[34] | 151 | IGCM_sys_MkdirWork ${RUN_DIR} |
---|
| 152 | IGCM_sys_Cd ${RUN_DIR} |
---|
| 153 | |
---|
[436] | 154 | # ------------------------------------------------------------------ |
---|
| 155 | # Test if all was right before proceeding further |
---|
| 156 | # ------------------------------------------------------------------ |
---|
| 157 | IGCM_debug_Verif_Exit_Post |
---|
| 158 | |
---|
[2] | 159 | if [ ${StandAlone} = true ] ; then |
---|
[785] | 160 | CARD_DIR=${SUBMIT_DIR} |
---|
[2] | 161 | else |
---|
[785] | 162 | CARD_DIR=${RUN_DIR} |
---|
| 163 | IGCM_sys_Get_Master ${SUBMIT_DIR}/config.card ${RUN_DIR_PATH} |
---|
| 164 | IGCM_sys_Get_Master ${SUBMIT_DIR}/run.card ${RUN_DIR_PATH} |
---|
| 165 | IGCM_sys_Get_Master ${SUBMIT_DIR}/COMP ${RUN_DIR_PATH} |
---|
| 166 | IGCM_sys_Get_Master ${SUBMIT_DIR}/POST ${RUN_DIR_PATH} |
---|
[2] | 167 | fi |
---|
| 168 | |
---|
[727] | 169 | #================================== |
---|
[2] | 170 | # First of all |
---|
| 171 | # |
---|
[727] | 172 | # Read libIGCM compatibility version in config.card |
---|
| 173 | # Read UserChoices section |
---|
| 174 | # Read Ensemble section |
---|
| 175 | # Read Post section |
---|
| 176 | # Define all netcdf output directories |
---|
| 177 | #================================== |
---|
| 178 | IGCM_config_CommonConfiguration ${CARD_DIR}/config.card |
---|
[658] | 179 | |
---|
[263] | 180 | #================================== |
---|
[727] | 181 | # Read ListOfComponents section: |
---|
| 182 | IGCM_card_DefineArrayFromSection ${CARD_DIR}/config.card ListOfComponents |
---|
[591] | 183 | |
---|
[727] | 184 | # Create R_FIGR that has been defined by IGCM_config_CommonConfiguration |
---|
[591] | 185 | IGCM_sys_MkdirArchive ${R_FIGR} |
---|
[102] | 186 | # |
---|
[591] | 187 | IGCM_sys_TestDirArchive ${R_FIGR}/MONITORING |
---|
[102] | 188 | if [ $? = 0 ] ; then |
---|
[785] | 189 | IGCM_debug_Print 1 "Get MONITORING directory from archive" |
---|
| 190 | IGCM_sys_Get_Dir ${R_FIGR}/MONITORING ${RUN_DIR} |
---|
[102] | 191 | else |
---|
[785] | 192 | IGCM_debug_Print 1 "MONITORING first pass. Nothing has been done before" |
---|
[102] | 193 | fi |
---|
[2] | 194 | # -------------------------------------------- |
---|
| 195 | # Insert your commands between III...III lines |
---|
| 196 | # and precise produced directories to save |
---|
| 197 | # IIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIII |
---|
| 198 | |
---|
| 199 | for comp in ${config_ListOfComponents[*]} ; do |
---|
[785] | 200 | IGCM_debug_Print 1 "################## Component: ${comp} ######################" |
---|
| 201 | liste_file_monitoring="" |
---|
| 202 | IGCM_card_DefineArrayFromOption ${CARD_DIR}/config.card ListOfComponents ${comp} |
---|
| 203 | eval compname=\${config_ListOfComponents_${comp}[0]} > /dev/null 2>&1 |
---|
[181] | 204 | |
---|
[785] | 205 | PATH_monitoring_file="" |
---|
| 206 | eval monitoring_file=monitoring01_${compname}_\${RESOL_${comp}}.cfg > /dev/null 2>&1 |
---|
| 207 | if [[ -d ${CARD_DIR}/POST && -f ${CARD_DIR}/POST/monitoring01_${compname}.cfg ]] ; then |
---|
| 208 | PATH_monitoring_file=${CARD_DIR}/POST/monitoring01_${compname}.cfg |
---|
| 209 | elif [ -f ${FER_ATLAS}/${monitoring_file} ] ; then |
---|
| 210 | PATH_monitoring_file=${FER_ATLAS}/${monitoring_file} |
---|
| 211 | else |
---|
| 212 | IGCM_debug_Print 1 "No monitoring file found for this component. Was expecting ${monitoring_file}" |
---|
| 213 | IGCM_debug_Print 1 "Step to next component" |
---|
| 214 | continue |
---|
| 215 | fi |
---|
| 216 | # |
---|
| 217 | if [ X${PATH_monitoring_file} != X"" ] ; then |
---|
| 218 | IGCM_debug_Print 1 "Monitoring file used : ${PATH_monitoring_file}" |
---|
| 219 | IGCM_debug_Print 1 "Determine which files we need." |
---|
[846] | 220 | . monitoring01 -l2 --listcommand 'IGCM_sys_RshArchive_NoError ls' ${PATH_monitoring_file} ${R_SAVE}/${comp}/Analyse/TS_MO |
---|
| 221 | liste_file_monitoring=$( . monitoring01 -q -l2 --listcommand 'IGCM_sys_RshArchive_NoError ls' ${PATH_monitoring_file} ${R_SAVE}/${comp}/Analyse/TS_MO ) |
---|
[785] | 222 | fi |
---|
| 223 | # |
---|
| 224 | if [ ! "X${liste_file_monitoring}" = X ] ; then |
---|
| 225 | IGCM_sys_Get /l liste_file_monitoring ${RUN_DIR} |
---|
| 226 | IGCM_debug_Print 1 "monitoring01 -c ${CARD_DIR} -p ${comp} --time -t \"${config_UserChoices_JobName} monitoring\" -o ${RUN_DIR}/MONITORING ${PATH_monitoring_file} ." |
---|
| 227 | IGCM_debug_Print 1 "monitoring01 starts ................................................." |
---|
| 228 | monitoring01 -c ${CARD_DIR} -p ${comp} --time -t "${config_UserChoices_JobName} monitoring" -o ${RUN_DIR}/MONITORING ${PATH_monitoring_file} . |
---|
| 229 | else |
---|
| 230 | IGCM_debug_Print 1 "No time series detected by this command :" |
---|
[846] | 231 | IGCM_debug_Print 1 "monitoring01 -l2 --listcommand 'IGCM_sys_RshArchive_NoError ls' ${PATH_monitoring_file} ${R_SAVE}/${comp}/Analyse/TS_MO" |
---|
| 232 | . monitoring01 -l2 --listcommand 'IGCM_sys_RshArchive_NoError ls' ${PATH_monitoring_file} ${R_SAVE}/${comp}/Analyse/TS_MO |
---|
[785] | 233 | fi |
---|
| 234 | # |
---|
[2] | 235 | done |
---|
| 236 | |
---|
| 237 | # IIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIII |
---|
| 238 | |
---|
| 239 | # Save files |
---|
[587] | 240 | IGCM_sys_Put_Dir MONITORING ${R_FIGR} |
---|
[2] | 241 | |
---|
| 242 | # Dods copy |
---|
| 243 | IGCM_sys_Put_Dods MONITORING |
---|
[203] | 244 | |
---|
[590] | 245 | # Clean RUN_DIR_PATH (necessary for cesium and titane only) |
---|
[203] | 246 | IGCM_sys_RmRunDir -Rf ${RUN_DIR_PATH} |
---|