Changeset 554 for trunk/libIGCM/AA_pack_restart
- Timestamp:
- 02/20/12 17:39:05 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/libIGCM/AA_pack_restart
r547 r554 33 33 #-Q- sx8brodie # pour recevoir un mail en cas de depassement du temps Elapsed (ou autre pb.) 34 34 #-Q- sx8brodie # @ notification = error 35 #-Q- sx8brodie # @ environment = $DEBUG_debug ; $MODIPSL ; $libIGCM ; $libIGCM_SX ; $SUBMIT_DIR ; $DateBegin ; $ PeriodDateBegin ; $PeriodDateEnd; $StandAlone ; $MASTER35 #-Q- sx8brodie # @ environment = $DEBUG_debug ; $MODIPSL ; $libIGCM ; $libIGCM_SX ; $SUBMIT_DIR ; $DateBegin ; $DateEnd ; $PeriodPack ; $StandAlone ; $MASTER 36 36 #-Q- sx8brodie # @ queue 37 37 #-Q- aix6 #!/bin/ksh … … 49 49 #-Q- aix6 # pour recevoir un mail en cas de depassement du temps Elapsed (ou autre pb.) 50 50 #-Q- aix6 # @ notification = error 51 #-Q- aix6 # @ environment = $DEBUG_debug ; $MODIPSL ; $libIGCM ; $libIGCM_SX ; $SUBMIT_DIR ; $DateBegin ; $ PeriodDateBegin ; $PeriodDateEnd; $StandAlone ; $MASTER51 #-Q- aix6 # @ environment = $DEBUG_debug ; $MODIPSL ; $libIGCM ; $libIGCM_SX ; $SUBMIT_DIR ; $DateBegin ; $DateEnd ; $PeriodPack ; $StandAlone ; $MASTER 52 52 #-Q- aix6 # @ queue 53 53 #-Q- ulam #!/bin/ksh … … 65 65 #-Q- ulam # pour recevoir un mail en cas de depassement du temps Elapsed (ou autre pb.) 66 66 #-Q- ulam # @ notification = error 67 #-Q- ulam # @ environment = $DEBUG_debug ; $MODIPSL ; $libIGCM ; $libIGCM_SX ; $SUBMIT_DIR ; $DateBegin ; $ PeriodDateBegin ; $PeriodDateEnd; $StandAlone ; $MASTER67 #-Q- ulam # @ environment = $DEBUG_debug ; $MODIPSL ; $libIGCM ; $libIGCM_SX ; $SUBMIT_DIR ; $DateBegin ; $DateEnd ; $PeriodPack ; $StandAlone ; $MASTER 68 68 #-Q- ulam # @ queue 69 69 #-Q- sx8mercure #!/bin/ksh … … 132 132 StandAlone=${StandAlone:=true} 133 133 134 #D- Flag to determine begin date for restart pack 135 #D- Default : value from AA_job if any 136 DateBegin=20000101 137 138 #D- Flag to determine end date for restart pack 139 #D- Default : value from AA_job if any 140 DateEnd=20691231 141 142 #D- Flag to determine pack period 143 #D- Default : value from AA_job if any 144 period_pack=${period_pack:=10Y} 145 146 SUBMIT_DIR=${PWD} 147 148 RUN_DIR_PATH=/scratch/cont003/p86denv/Pack_Test 134 #D- Path to libIGCM 135 #D- Default : value from AA_job if any 136 # WARNING For StandAlone use : To run this script on some machine (ulam and cesium) 137 # WARNING you must check MirrorlibIGCM variable in sys library. 138 # WARNING If this variable is true, you must use libIGCM_POST path instead 139 # WARNING of your running libIGCM directory. 140 libIGCM=${libIGCM:=::modipsl::/libIGCM} 149 141 150 142 #-D- $hostname of the MASTER job when SUBMIT_DIR is not visible on postprocessing computer. 151 143 MASTER=${MASTER:=mercure|titane|brodie|vargas} 152 144 145 #D- Flag to determine begin date for restart pack 146 #D- Default : value from AA_job if any 147 DateBegin=${DateBegin:=20000101) 148 149 #D- Flag to determine end date for restart pack 150 #D- Default : value from AA_job if any 151 DateEnd=${DateEnd:=20691231} 152 153 #D- Flag to determine pack period 154 #D- Default : value from AA_job if any 155 PeriodPack=${PeriodPack:=10Y} 156 157 #D- Uncomment to run interactively 158 #D- For testing purpose, will be remove 159 #SUBMIT_DIR=${PWD} 160 #RUN_DIR_PATH=${SCRATCHDIR}/Pack_Test 161 162 #D- Increased verbosity (1, 2, 3) 163 #D- Default : value from AA_job if any 164 Verbosity=${Verbosity:=3} 165 153 166 #D- Low level debug : to bypass lib test checks and stack construction 154 167 #D- Default : value from AA_job if any 155 libIGCM=${libIGCM:=/work/cont003/p86denv/PARA_XEON_CM5_IPSLCM5A.16122011_39L/modipsl/libIGCM}156 157 # WARNING for StandAlone use : To run this script on some machine,158 # you must check MirrorlibIGCM variable in sys library.159 # If this variable is true, you must use libIGCM_POST path instead160 # of your running libIGCM directory.161 162 #D- Increased verbosity (1, 2, 3)163 #D- Default : value from AA_job if any164 Verbosity=${Verbosity:=3}165 166 #D- Low level debug : to bypass lib test checks and stack construction167 #D- Default : value from AA_job if any168 168 DEBUG_debug=${DEBUG_debug:=false} 169 170 #D- Keep following comments for now. Will be remove. 169 171 170 172 #on veut archiver les fichiers restart … … 187 189 # $1= PATH/config_card d'une simulation avec 188 190 # TagName/JobName/ExperimentName/SpaceName/DateBegin/DateEnd/PATH_SIMUL 189 # $2= period_pack en M/m ou Y/y191 # $2=PeriodPack en M/m ou Y/y 190 192 191 193 ######################################################################## … … 264 266 #### Preparation de l'environnement 265 267 # repertoire dans lequel seront crees les archives 266 #STORE_RESTART=${R_SAVE}/RESTART 267 #IGCM_sys_MkdirArchive ${STORE_RESTART} 268 269 STORE_RESTART=/scratch/cont003/p86denv/Pack_Test/RESTART 270 mkdir -p ${STORE_RESTART} 271 272 #### 0- lecture de config.card 273 #### on veut les renseignements suivants : 274 #### JobName, PATH_SIMUL, DateBegin et DateEnd 275 268 STORE_RESTART=${R_SAVE}/RESTART 269 IGCM_sys_MkdirArchive ${STORE_RESTART} 270 271 #STORE_RESTART=/scratch/cont003/p86denv/Pack_Test/RESTART 272 #mkdir -p ${STORE_RESTART} 273 274 # Switch to script variables meaning (try to be compatible with ipsl_pack TGCC moving procedure) 276 275 JobName=${config_UserChoices_JobName} 277 #DateBegin=$( IGCM_date_ConvertFormatToGregorian ${config_UserChoices_DateBegin} )278 #DateEnd=$( IGCM_date_ConvertFormatToGregorian ${config_UserChoices_DateEnd} )279 276 PATH_SIMUL=${R_BUFR} 280 277 echo $JobName $PATH_SIMUL $DateBegin $DateEnd … … 305 302 306 303 ### 2- creer les listes de fichiers par periode #### 307 ###Â 2.1- dechiffrer period_pack et le separer en year et month ###308 case ${ period_pack} in304 ###Â 2.1- dechiffrer PeriodPack et le separer en year et month ### 305 case ${PeriodPack} in 309 306 *Y|*y) 310 periodpackinyear=$( echo ${ period_pack} | sed -e 's/[yY]//' )307 periodpackinyear=$( echo ${PeriodPack} | sed -e 's/[yY]//' ) 311 308 periodpackinmonth=0 312 309 ;; … … 314 311 *M|*m) 315 312 periodpackinyear=0 316 periodpackinmonth=$( echo ${ period_pack} | sed -e 's/[mM]//' )313 periodpackinmonth=$( echo ${PeriodPack} | sed -e 's/[mM]//' ) 317 314 ;; 318 315 319 316 *) 320 echo " period_pack doit etre en mois ou annees"317 echo "PeriodPack doit etre en mois ou annees" 321 318 IGCM_debug_Exit "period pack unit" 322 319 ;; … … 368 365 if [ ${date_file} -lt ${date_end_pack} ] && [ ${date_file} -ge ${date_begin_pack} ] ; then 369 366 echo $( basename ${file} ) >> ${RUN_DIR}/liste_pack_${number_pack}.txt 367 # Will not work. Need to find a better ordering. 370 368 # elif [ ${date_file} -ge ${date_end_pack} ] ; then 371 369 # break … … 377 375 date_begin_pack=${year_begin_pack}$( printf "%02i\n" ${month_begin_pack} )01 378 376 379 tar -cvf ${STORE_RESTART}/restart_pack_${number_pack}.tar --dereference --files-from ${RUN_DIR}/liste_pack_${number_pack}.txt 377 # Here we create tar files directly in $STORE. Avoid to create then to copy. 378 tar -cvf ${STORE_RESTART}/${JobName}_${year_begin_pack}_${year_end_pack}_restart.tar --dereference --files-from ${RUN_DIR}/liste_pack_${number_pack}.txt 380 379 cat ${RUN_DIR}/liste_pack_${number_pack}.txt | xargs rm 381 380 mv ${RUN_DIR}/liste_pack_${number_pack}.txt ${STORE_RESTART}
Note: See TracChangeset
for help on using the changeset viewer.