[622] | 1 | #-Q- curie ###################### |
---|
| 2 | #-Q- curie ## CURIE TGCC/CEA ## |
---|
| 3 | #-Q- curie ###################### |
---|
[837] | 4 | #-Q- curie #MSUB -r MONITORING # Nom du job |
---|
[1468] | 5 | #-Q- curie #MSUB -o MONITORING.out_%I |
---|
| 6 | #-Q- curie #MSUB -e MONITORING.out_%I |
---|
[622] | 7 | #-Q- curie #MSUB -n 1 # Reservation du processus |
---|
[1468] | 8 | #-Q- curie #MSUB -T 80000 # Limite de temps elapsed du job |
---|
[1154] | 9 | #-Q- curie #MSUB -q ::default_node:: |
---|
[1274] | 10 | #-Q- curie #MSUB -c ::default_core:: |
---|
[704] | 11 | #-Q- curie #MSUB -Q normal |
---|
[837] | 12 | #-Q- curie #MSUB -A ::default_project:: |
---|
[681] | 13 | #-Q- curie set +x |
---|
[1437] | 14 | #-Q- irene ###################### |
---|
| 15 | #-Q- irene ## IRENE TGCC/CEA ## |
---|
| 16 | #-Q- irene ###################### |
---|
| 17 | #-Q- irene #MSUB -r MONITORING # Job name |
---|
[1468] | 18 | #-Q- irene #MSUB -o MONITORING.out_%I |
---|
| 19 | #-Q- irene #MSUB -e MONITORING.out_%I |
---|
[1437] | 20 | #-Q- irene #MSUB -n 1 # Number of cores |
---|
| 21 | #-Q- irene #MSUB -T 80000 # Maximum elapsed time |
---|
[1468] | 22 | #-Q- irene #MSUB -q ::default_node:: |
---|
| 23 | #-Q- irene #MSUB -c ::default_core:: |
---|
[1437] | 24 | #-Q- irene #MSUB -Q normal |
---|
[1468] | 25 | #-Q- irene #MSUB -A ::default_post_project:: |
---|
[1460] | 26 | #-Q- irene #MSUB -m store,work,scratch |
---|
[1437] | 27 | #-Q- irene set +x |
---|
[1498] | 28 | #-Q- jeanzay #!/bin/ksh |
---|
| 29 | #-Q- jeanzay ###################### |
---|
| 30 | #-Q- jeanzay ## JEANZAY IDRIS ## |
---|
| 31 | #-Q- jeanzay ###################### |
---|
| 32 | #-Q- jeanzay #SBATCH --job-name=MONITORING # Job Name |
---|
[1501] | 33 | #-Q- jeanzay #SBATCH --output=MONITORING.out_%J # standard output |
---|
| 34 | #-Q- jeanzay #SBATCH --error=MONITORING.out_%J # error output |
---|
[1498] | 35 | #-Q- jeanzay #SBATCH --ntasks=1 # Number of core |
---|
| 36 | #-Q- jeanzay #SBATCH --hint=nomultithread # 1 processus MPI par coeur physique (pas d'hyperthreading) |
---|
| 37 | #-Q- jeanzay #SBATCH --time=10:00:00 # Wall clock limit (seconds) |
---|
| 38 | #-Q- jeanzay #SBATCH --account ::default_project::@cpu |
---|
[1499] | 39 | #-Q- jeanzay #SBATCH --partition=prepost |
---|
[1498] | 40 | #-Q- jeanzay set +x |
---|
[770] | 41 | #-Q- ada #!/bin/ksh |
---|
| 42 | #-Q- ada ####################### |
---|
[929] | 43 | #-Q- ada ## ADA IDRIS ## |
---|
[770] | 44 | #-Q- ada ####################### |
---|
[1409] | 45 | #-Q- ada # @ job_type = mpich |
---|
[848] | 46 | #-Q- ada # @ requirements = (Feature == "prepost") |
---|
[770] | 47 | #-Q- ada # Temps Elapsed max. d'une requete hh:mm:ss |
---|
[982] | 48 | #-Q- ada # @ wall_clock_limit = 4:00:00 |
---|
[1414] | 49 | #-Q- ada # Memory required for ferret (_SEP _MAR variables) |
---|
| 50 | #-Q- ada # @ as_limit = 30Gb |
---|
[770] | 51 | #-Q- ada # Nom du travail LoadLeveler |
---|
| 52 | #-Q- ada # @ job_name = MONITORING |
---|
[837] | 53 | #-Q- ada # Fichier de sortie standard du travail |
---|
[770] | 54 | #-Q- ada # @ output = $(job_name).$(jobid) |
---|
| 55 | #-Q- ada # Fichier de sortie d'erreur du travail |
---|
| 56 | #-Q- ada # @ error = $(job_name).$(jobid) |
---|
| 57 | #-Q- ada # pour recevoir un mail en cas de depassement du temps Elapsed (ou autre pb.) |
---|
| 58 | #-Q- ada # @ notification = error |
---|
[1290] | 59 | #-Q- ada # @ environment = $DEBUG_debug ; $BigBrother ; $postProcessingStopLevel ; $POST_DIR ; $Script_Post_Output ; $SUBMIT_DIR ; $libIGCM ; $StandAlone ; $RESOL_ATM ; $RESOL_OCE ; $RESOL_ICE ; $RESOL_MBG ; $RESOL_SRF ; wall_clock_limit=$(wall_clock_limit) |
---|
[770] | 60 | #-Q- ada # @ queue |
---|
[281] | 61 | #-Q- lxiv8 ###################### |
---|
| 62 | #-Q- lxiv8 ## OBELIX LSCE ## |
---|
| 63 | #-Q- lxiv8 ###################### |
---|
| 64 | #-Q- lxiv8 #PBS -N MONITORING |
---|
| 65 | #-Q- lxiv8 #PBS -m a |
---|
| 66 | #-Q- lxiv8 #PBS -j oe |
---|
| 67 | #-Q- lxiv8 #PBS -q medium |
---|
| 68 | #-Q- lxiv8 #PBS -o MONITORING.$$ |
---|
| 69 | #-Q- lxiv8 #PBS -S /bin/ksh |
---|
[1184] | 70 | #-Q- ifort_CICLAD ###################### |
---|
| 71 | #-Q- ifort_CICLAD ## CICLAD IPSL ## |
---|
| 72 | #-Q- ifort_CICLAD ###################### |
---|
| 73 | #-Q- ifort_CICLAD #PBS -N MONITORING |
---|
| 74 | #-Q- ifort_CICLAD #PBS -m a |
---|
| 75 | #-Q- ifort_CICLAD #PBS -j oe |
---|
| 76 | #-Q- ifort_CICLAD #PBS -q std |
---|
| 77 | #-Q- ifort_CICLAD #PBS -S /bin/ksh |
---|
[2] | 78 | #-Q- default #!/bin/ksh |
---|
| 79 | #-Q- default ################## |
---|
| 80 | #-Q- default ## DEFAULT HOST ## |
---|
| 81 | #-Q- default ################## |
---|
| 82 | |
---|
[373] | 83 | #************************************************************** |
---|
| 84 | # Author: Sebastien Denvil |
---|
| 85 | # Contact: Sebastien.Denvil__at__ipsl.jussieu.fr |
---|
| 86 | # $Revision:: $ Revision of last commit |
---|
| 87 | # $Author:: $ Author of last commit |
---|
| 88 | # $Date:: $ Date of last commit |
---|
[2] | 89 | # IPSL (2006) |
---|
| 90 | # This software is governed by the CeCILL licence see libIGCM/libIGCM_CeCILL.LIC |
---|
[373] | 91 | # |
---|
| 92 | #************************************************************** |
---|
[2] | 93 | |
---|
[108] | 94 | #set -eu |
---|
| 95 | #set -vx |
---|
| 96 | |
---|
[2] | 97 | date |
---|
| 98 | |
---|
[770] | 99 | #-Q- ada export OMP_NUM_THREADS=1 |
---|
[2] | 100 | |
---|
[1356] | 101 | #D- Task type DO NOT CHANGE (computing, post-processing or checking) |
---|
[712] | 102 | TaskType=post-processing |
---|
| 103 | |
---|
[280] | 104 | ######################################################################## |
---|
| 105 | |
---|
| 106 | #D- Flag to determine if this job in a standalone mode |
---|
| 107 | #D- Default : value from AA_job if any |
---|
| 108 | StandAlone=${StandAlone:=true} |
---|
| 109 | |
---|
[554] | 110 | #D- Path to libIGCM |
---|
[280] | 111 | #D- Default : value from AA_job if any |
---|
[770] | 112 | # WARNING For StandAlone use : To run this script on some machine (ada and cesium) |
---|
[554] | 113 | # WARNING you must check MirrorlibIGCM variable in sys library. |
---|
| 114 | # WARNING If this variable is true, you must use libIGCM_POST path instead |
---|
| 115 | # WARNING of your running libIGCM directory. |
---|
[280] | 116 | libIGCM=${libIGCM:=::modipsl::/libIGCM} |
---|
| 117 | |
---|
[334] | 118 | #D- Increased verbosity (1, 2, 3) |
---|
| 119 | #D- Default : value from AA_job if any |
---|
| 120 | Verbosity=${Verbosity:=3} |
---|
| 121 | |
---|
| 122 | #D- Low level debug : to bypass lib test checks and stack construction |
---|
| 123 | #D- Default : value from AA_job if any |
---|
| 124 | DEBUG_debug=${DEBUG_debug:=false} |
---|
| 125 | |
---|
| 126 | #D- TEMPORARY Flag to determine atmospheric resolution |
---|
| 127 | #D- Default : value from atmospheric driver if any |
---|
| 128 | RESOL_ATM=${RESOL_ATM:=ALL} |
---|
| 129 | |
---|
| 130 | #D- Flag to determine surface resolution |
---|
| 131 | #D- Default : value from surface driver if any |
---|
| 132 | RESOL_SRF=${RESOL_SRF:=ALL} |
---|
| 133 | |
---|
| 134 | #D- Flag to determine surface resolution |
---|
| 135 | #D- Default : value from surface driver if any |
---|
| 136 | RESOL_SBG=${RESOL_SBG:=ALL} |
---|
| 137 | |
---|
| 138 | #D- TEMPORARY Flag to determine ocean resolution |
---|
| 139 | #D- Default : value from ocean driver if any |
---|
| 140 | RESOL_OCE=${RESOL_OCE:=ORCA2} |
---|
| 141 | |
---|
| 142 | #D- TEMPORARY Flag to determine ice resolution |
---|
| 143 | #D- Default : value from ice driver if any |
---|
[1326] | 144 | RESOL_ICE=${RESOL_OCE:=ORCA2} |
---|
[334] | 145 | |
---|
| 146 | #D- TEMPORARY Flag to determine marine biogeochemistry resolution |
---|
| 147 | #D- Default : value from ice driver if any |
---|
[1326] | 148 | RESOL_MBG=${RESOL_OCE:=ORCA2} |
---|
[334] | 149 | |
---|
[2] | 150 | ###################################################################### |
---|
| 151 | |
---|
[108] | 152 | . ${libIGCM}/libIGCM_debug/libIGCM_debug.ksh |
---|
| 153 | . ${libIGCM}/libIGCM_card/libIGCM_card.ksh |
---|
| 154 | . ${libIGCM}/libIGCM_date/libIGCM_date.ksh |
---|
| 155 | #------- |
---|
| 156 | . ${libIGCM}/libIGCM_sys/libIGCM_sys.ksh |
---|
[731] | 157 | . ${libIGCM}/libIGCM_config/libIGCM_config.ksh |
---|
[832] | 158 | #------- |
---|
[1192] | 159 | RUN_DIR=${RUN_DIR_PATH} |
---|
| 160 | IGCM_sys_MkdirWork ${RUN_DIR} |
---|
| 161 | IGCM_sys_Cd ${RUN_DIR} |
---|
| 162 | #------- |
---|
[832] | 163 | ( ${DEBUG_debug} ) && IGCM_debug_Check |
---|
| 164 | ( ${DEBUG_debug} ) && IGCM_card_Check |
---|
| 165 | ( ${DEBUG_debug} ) && IGCM_date_Check |
---|
[2] | 166 | |
---|
| 167 | ###################################################################### |
---|
| 168 | |
---|
[901] | 169 | #set -vx |
---|
[2] | 170 | |
---|
[436] | 171 | # ------------------------------------------------------------------ |
---|
| 172 | # Test if all was right before proceeding further |
---|
| 173 | # ------------------------------------------------------------------ |
---|
[1206] | 174 | IGCM_debug_Verif_Exit |
---|
[436] | 175 | |
---|
[2] | 176 | if [ ${StandAlone} = true ] ; then |
---|
[785] | 177 | CARD_DIR=${SUBMIT_DIR} |
---|
[2] | 178 | else |
---|
[785] | 179 | CARD_DIR=${RUN_DIR} |
---|
| 180 | IGCM_sys_Get_Master ${SUBMIT_DIR}/config.card ${RUN_DIR_PATH} |
---|
| 181 | IGCM_sys_Get_Master ${SUBMIT_DIR}/run.card ${RUN_DIR_PATH} |
---|
| 182 | IGCM_sys_Get_Master ${SUBMIT_DIR}/COMP ${RUN_DIR_PATH} |
---|
| 183 | IGCM_sys_Get_Master ${SUBMIT_DIR}/POST ${RUN_DIR_PATH} |
---|
[2] | 184 | fi |
---|
| 185 | |
---|
[727] | 186 | #================================== |
---|
[2] | 187 | # First of all |
---|
| 188 | # |
---|
[727] | 189 | # Read libIGCM compatibility version in config.card |
---|
| 190 | # Read UserChoices section |
---|
| 191 | # Read Ensemble section |
---|
| 192 | # Read Post section |
---|
| 193 | # Define all netcdf output directories |
---|
| 194 | #================================== |
---|
| 195 | IGCM_config_CommonConfiguration ${CARD_DIR}/config.card |
---|
[658] | 196 | |
---|
[1198] | 197 | # ------------------------------------------------------------------ |
---|
| 198 | # Activate BigBrother so as to supervise this job |
---|
| 199 | # ------------------------------------------------------------------ |
---|
| 200 | IGCM_debug_BigBro_Initialize |
---|
| 201 | |
---|
[263] | 202 | #================================== |
---|
[727] | 203 | # Read ListOfComponents section: |
---|
| 204 | IGCM_card_DefineArrayFromSection ${CARD_DIR}/config.card ListOfComponents |
---|
[591] | 205 | |
---|
[727] | 206 | # Create R_FIGR that has been defined by IGCM_config_CommonConfiguration |
---|
[591] | 207 | IGCM_sys_MkdirArchive ${R_FIGR} |
---|
[102] | 208 | # |
---|
[591] | 209 | IGCM_sys_TestDirArchive ${R_FIGR}/MONITORING |
---|
[102] | 210 | if [ $? = 0 ] ; then |
---|
[785] | 211 | IGCM_debug_Print 1 "Get MONITORING directory from archive" |
---|
| 212 | IGCM_sys_Get_Dir ${R_FIGR}/MONITORING ${RUN_DIR} |
---|
[102] | 213 | else |
---|
[785] | 214 | IGCM_debug_Print 1 "MONITORING first pass. Nothing has been done before" |
---|
[102] | 215 | fi |
---|
[2] | 216 | # -------------------------------------------- |
---|
[901] | 217 | # Insert your commands between III...III lines |
---|
[2] | 218 | # and precise produced directories to save |
---|
| 219 | # IIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIII |
---|
| 220 | |
---|
| 221 | for comp in ${config_ListOfComponents[*]} ; do |
---|
[785] | 222 | IGCM_debug_Print 1 "################## Component: ${comp} ######################" |
---|
| 223 | liste_file_monitoring="" |
---|
| 224 | IGCM_card_DefineArrayFromOption ${CARD_DIR}/config.card ListOfComponents ${comp} |
---|
| 225 | eval compname=\${config_ListOfComponents_${comp}[0]} > /dev/null 2>&1 |
---|
[181] | 226 | |
---|
[785] | 227 | PATH_monitoring_file="" |
---|
| 228 | eval monitoring_file=monitoring01_${compname}_\${RESOL_${comp}}.cfg > /dev/null 2>&1 |
---|
[1326] | 229 | if [[ -d ${CARD_DIR}/POST && -f ${CARD_DIR}/POST/${monitoring_file} ]] ; then |
---|
| 230 | PATH_monitoring_file=${CARD_DIR}/POST/${monitoring_file} |
---|
[1329] | 231 | elif [[ -d ${CARD_DIR}/POST && -f ${CARD_DIR}/POST/monitoring01_${compname}.cfg ]] ; then |
---|
[785] | 232 | PATH_monitoring_file=${CARD_DIR}/POST/monitoring01_${compname}.cfg |
---|
| 233 | elif [ -f ${FER_ATLAS}/${monitoring_file} ] ; then |
---|
| 234 | PATH_monitoring_file=${FER_ATLAS}/${monitoring_file} |
---|
| 235 | else |
---|
| 236 | IGCM_debug_Print 1 "No monitoring file found for this component. Was expecting ${monitoring_file}" |
---|
| 237 | IGCM_debug_Print 1 "Step to next component" |
---|
| 238 | continue |
---|
| 239 | fi |
---|
| 240 | # |
---|
| 241 | if [ X${PATH_monitoring_file} != X"" ] ; then |
---|
| 242 | IGCM_debug_Print 1 "Monitoring file used : ${PATH_monitoring_file}" |
---|
[901] | 243 | IGCM_debug_Print 1 "Determine which frequency of time series to be used." |
---|
| 244 | |
---|
| 245 | FreqTS=$( grep FreqTS ${PATH_monitoring_file} | grep -v \# | awk -F "=" '{print $2}' ) |
---|
| 246 | if [ X${FreqTS} = X ] ; then |
---|
| 247 | # Default frequency is MO |
---|
| 248 | FreqTS=MO |
---|
| 249 | fi |
---|
| 250 | |
---|
| 251 | IGCM_debug_Print 1 "Times series frequency to be used is ${FreqTS}" |
---|
[785] | 252 | IGCM_debug_Print 1 "Determine which files we need." |
---|
[901] | 253 | . monitoring01 -l2 --listcommand 'IGCM_sys_RshArchive_NoError ls' ${PATH_monitoring_file} ${R_SAVE}/${comp}/Analyse/TS_${FreqTS} |
---|
| 254 | liste_file_monitoring=$( . monitoring01 -q -l2 --listcommand 'IGCM_sys_RshArchive_NoError ls' ${PATH_monitoring_file} ${R_SAVE}/${comp}/Analyse/TS_${FreqTS} ) |
---|
[785] | 255 | fi |
---|
| 256 | # |
---|
| 257 | if [ ! "X${liste_file_monitoring}" = X ] ; then |
---|
| 258 | IGCM_sys_Get /l liste_file_monitoring ${RUN_DIR} |
---|
| 259 | IGCM_debug_Print 1 "monitoring01 -c ${CARD_DIR} -p ${comp} --time -t \"${config_UserChoices_JobName} monitoring\" -o ${RUN_DIR}/MONITORING ${PATH_monitoring_file} ." |
---|
| 260 | IGCM_debug_Print 1 "monitoring01 starts ................................................." |
---|
| 261 | monitoring01 -c ${CARD_DIR} -p ${comp} --time -t "${config_UserChoices_JobName} monitoring" -o ${RUN_DIR}/MONITORING ${PATH_monitoring_file} . |
---|
| 262 | else |
---|
| 263 | IGCM_debug_Print 1 "No time series detected by this command :" |
---|
[901] | 264 | IGCM_debug_Print 1 "monitoring01 -l2 --listcommand 'IGCM_sys_RshArchive_NoError ls' ${PATH_monitoring_file} ${R_SAVE}/${comp}/Analyse/TS_${FreqTS}" |
---|
| 265 | . monitoring01 -l2 --listcommand 'IGCM_sys_RshArchive_NoError ls' ${PATH_monitoring_file} ${R_SAVE}/${comp}/Analyse/TS_${FreqTS} |
---|
[785] | 266 | fi |
---|
[1333] | 267 | |
---|
| 268 | # Now do cleaning before starting with next component |
---|
| 269 | rm -f ${RUN_DIR}/*nc |
---|
| 270 | |
---|
[2] | 271 | done |
---|
| 272 | |
---|
| 273 | # IIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIII |
---|
| 274 | |
---|
| 275 | # Save files |
---|
[587] | 276 | IGCM_sys_Put_Dir MONITORING ${R_FIGR} |
---|
[2] | 277 | |
---|
| 278 | # Dods copy |
---|
[903] | 279 | if [ X${config_Post_DodsCopy} = XTRUE ] ; then |
---|
| 280 | IGCM_sys_Put_Dods MONITORING |
---|
| 281 | fi |
---|
[203] | 282 | |
---|
[590] | 283 | # Clean RUN_DIR_PATH (necessary for cesium and titane only) |
---|
[203] | 284 | IGCM_sys_RmRunDir -Rf ${RUN_DIR_PATH} |
---|
[1198] | 285 | |
---|
| 286 | # ------------------------------------------------------------------ |
---|
| 287 | # Finalize BigBrother to inform that the jobs end |
---|
| 288 | # ------------------------------------------------------------------ |
---|
| 289 | IGCM_debug_BigBro_Finalize |
---|