Changeset 590
- Timestamp:
- 03/21/12 11:02:21 (12 years ago)
- Location:
- trunk/libIGCM
- Files:
-
- 18 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/libIGCM/AA_SaveSourceModifications
r554 r590 145 145 fi 146 146 147 # Clean RUN_DIR_PATH (necessary for cesium )147 # Clean RUN_DIR_PATH (necessary for cesium and titane only) 148 148 if ( ! ${DEBUG_debug} ) ; then 149 149 IGCM_sys_RmRunDir -Rf ${RUN_DIR_PATH} -
trunk/libIGCM/AA_atlas_LMDZ
r587 r590 231 231 [ $? = 0 ] && IGCM_sys_Put_Dods ${R_ATLAS} 232 232 233 # Clean RUN_DIR_PATH (necessary for cesium )233 # Clean RUN_DIR_PATH (necessary for cesium and titane only) 234 234 IGCM_sys_RmRunDir -Rf ${RUN_DIR_PATH} -
trunk/libIGCM/AA_atlas_ORCA_LIM
r587 r590 272 272 [ $? = 0 ] && IGCM_sys_Put_Dods ${R_ATLAS} 273 273 274 # Clean RUN_DIR_PATH (necessary for cesium )274 # Clean RUN_DIR_PATH (necessary for cesium and titane only) 275 275 IGCM_sys_RmRunDir -Rf ${RUN_DIR_PATH} -
trunk/libIGCM/AA_atlas_ORCHIDEE
r587 r590 237 237 [ $? = 0 ] && IGCM_sys_Put_Dods ${R_ATLAS} 238 238 239 # Clean RUN_DIR_PATH (necessary for cesium )239 # Clean RUN_DIR_PATH (necessary for cesium and titane only) 240 240 IGCM_sys_RmRunDir -Rf ${RUN_DIR_PATH} -
trunk/libIGCM/AA_atlas_PISCES
r587 r590 237 237 [ $? = 0 ] && IGCM_sys_Put_Dods ${R_ATLAS} 238 238 239 # Clean RUN_DIR_PATH (necessary for cesium )239 # Clean RUN_DIR_PATH (necessary for cesium and titane only) 240 240 IGCM_sys_RmRunDir -Rf ${RUN_DIR_PATH} -
trunk/libIGCM/AA_create_multi_se
r554 r590 539 539 fi 540 540 541 # Clean RUN_DIR_PATH (necessary for cesium )541 # Clean RUN_DIR_PATH (necessary for cesium and titane only) 542 542 IGCM_sys_RmRunDir -Rf ${RUN_DIR_PATH} -
trunk/libIGCM/AA_create_se
r554 r590 690 690 fi 691 691 692 # Clean RUN_DIR_PATH (necessary for cesium )692 # Clean RUN_DIR_PATH (necessary for cesium and titane only) 693 693 IGCM_sys_RmRunDir -Rf ${RUN_DIR_PATH} -
trunk/libIGCM/AA_create_ts
r554 r590 862 862 fi 863 863 864 # Clean RUN_DIR_PATH (necessary for cesium )864 # Clean RUN_DIR_PATH (necessary for cesium and titane only) 865 865 IGCM_sys_RmRunDir -Rf ${RUN_DIR_PATH} 866 866 -
trunk/libIGCM/AA_monitoring
r587 r590 292 292 IGCM_sys_Put_Dods MONITORING 293 293 294 # Clean RUN_DIR_PATH (necessary for cesium )294 # Clean RUN_DIR_PATH (necessary for cesium and titane only) 295 295 IGCM_sys_RmRunDir -Rf ${RUN_DIR_PATH} -
trunk/libIGCM/AA_pack_debug
r589 r590 3 3 #-Q- cesium ## CESIUM CEA ## 4 4 #-Q- cesium ###################### 5 #-Q- cesium #MSUB -r PACKDEBUG # Nom du job 5 #-Q- cesium #MSUB -r PACKDEBUG # Nom du job 6 6 #-Q- cesium #MSUB -N 1 # Reservation du noeud 7 7 #-Q- cesium #MSUB -n 1 # Reservation du processus … … 27 27 #-Q- sx8brodie # Nom du travail LoadLeveler 28 28 #-Q- sx8brodie # @ job_name = PACKDEBUG 29 #-Q- sx8brodie # Fichier de sortie standard du travail 29 #-Q- sx8brodie # Fichier de sortie standard du travail 30 30 #-Q- sx8brodie # @ output = $(job_name).$(jobid) 31 31 #-Q- sx8brodie # Fichier de sortie d'erreur du travail … … 81 81 #-Q- sx9mercure ## CESIUM CEA ## 82 82 #-Q- sx9mercure ###################### 83 #-Q- sx9mercure #MSUB -r PACKDEBUG # Nom du job 83 #-Q- sx9mercure #MSUB -r PACKDEBUG # Nom du job 84 84 #-Q- sx9mercure #MSUB -N 1 # Reservation du noeud 85 85 #-Q- sx9mercure #MSUB -n 1 # Reservation du processus … … 91 91 #-Q- titane ## TITANE CEA ## 92 92 #-Q- titane ###################### 93 #-Q- titane #MSUB -r PACKDEBUG # Nom du job 93 #-Q- titane #MSUB -r PACKDEBUG # Nom du job 94 94 #-Q- titane #MSUB -eo 95 95 #-Q- titane #MSUB -n 1 # Reservation du processus … … 178 178 #RESTART/ATM_****.nc 179 179 #RESTART/OCE_****.nc 180 #Attention de bien conserver les dates d'origines 180 #Attention de bien conserver les dates d'origines 181 181 # 182 182 #Dans le cadre de la production nouvelle chaine 183 183 #ils auront directement le bon nom 184 184 # 185 #On veut egalement que l'archive soit par periode de temps 186 # cette periode est definie par la taille du pack donc connue 187 # en entree du script (1M, 1Y, 5Y, 10Y etc...) 188 # 189 # $1= PATH/config_card d'une simulation avec 190 # TagName/JobName/ExperimentName/SpaceName/DateBegin/DateEnd /PATH_SIMUL185 #On veut egalement que l'archive soit par periode de temps 186 # cette periode est definie par la taille du pack donc connue 187 # en entree du script (1M, 1Y, 5Y, 10Y etc...) 188 # 189 # $1= PATH/config_card d'une simulation avec 190 # TagName/JobName/ExperimentName/SpaceName/DateBegin/DateEnd 191 191 # $2=PeriodPack en M/m ou Y/y 192 192 … … 223 223 fi 224 224 225 # 225 #==================================================== 226 226 # First of all 227 227 # 228 #### 0- lecture de config.card 229 #### on veut les renseignements suivants : 230 #### JobName, PATH_SIMUL, DateBegin et DateEnd 231 228 # Read config.card 232 229 IGCM_card_DefineArrayFromSection ${CARD_DIR}/config.card UserChoices 233 230 typeset option … … 250 247 251 248 #==================================================== 252 #R_SAVE : Job output storage directory 253 #R_BUFR : Job output buffered directory 249 # Prepare environment 250 #R_SAVE : Job output storage directory 251 #R_BUFR : Job output buffered directory 252 #STORE_DEBUG : Where we store tar files 254 253 255 254 if ( [ ! X${config_UserChoices_SpaceName} = X ] && [ ! X${config_UserChoices_ExperimentName} = X ] ) ; then … … 264 263 [ $? != 0 ] && IGCM_debug_Exit "IGCM_sys_TestDirArchive" 265 264 266 #### Preparation de l'environnement 267 # repertoire dans lequel seront crees les archives 268 #STORE_DEBUG=/scratch/cont003/p86denv/Pack_Test/DEBUG 265 #STORE_DEBUG=/ccc/store/cont003/dsm/p86denv/.../DEBUG 269 266 STORE_DEBUG=${R_SAVE}/DEBUG 270 267 IGCM_sys_MkdirArchive ${STORE_DEBUG} 271 268 269 #cd ${STORE_DEBUG} 270 #rm -f * 271 272 272 # Switch to script variables meaning (try to be compatible with ipsl_pack TGCC moving procedure) 273 273 JobName=${config_UserChoices_JobName} 274 PATH_SIMUL=${R_BUFR} 275 echo $JobName $PATH_SIMUL $DateBegin $DateEnd 276 277 #### 1- renommer les fichiers ###### 278 #cd ${STORE_DEBUG} 279 #rm -rf * 280 281 # On les copie sur le scratchdir en changeant le nom et conservant la date 274 echo $JobName $DateBegin $DateEnd 275 282 276 # Clear txt file lists 283 277 rm -f ${RUN_DIR}/liste_debug_files.txt … … 286 280 287 281 # Create sorted debug list to work with 288 find ${ PATH_SIMUL}/*/Debug -type f | sort >> ${RUN_DIR}/liste_debug_files.txt282 find ${R_BUFR}/*/Debug -type f | sort >> ${RUN_DIR}/liste_debug_files.txt 289 283 290 284 # Rename debug files we will work with using symlinks … … 318 312 extract_date_file=$( echo ${file} | sed -e "s/.*${JobName}_[0-9]*_//" ) 319 313 date_file=$( echo ${extract_date_file} | sed 's/\([0-9]\{8\}\)_.*$/\1/g' ) 320 # echo pack n°${number_pack} ${date_file} ${date_begin_pack} ${date_end_pack} 321 if [ ${date_file} -le ${date_end_pack} ] && [ ${date_file} -ge ${date_begin_pack} ] ; then 314 # echo pack n°${number_pack} ${date_file} ${date_begin_pack} ${date_end_pack} 315 if [ ${date_file} -le ${date_end_pack} ] && [ ${date_file} -ge ${date_begin_pack} ] ; then 322 316 echo $( basename ${file} ) >> ${RUN_DIR}/liste_pack_${number_pack}.txt 323 echo $( readlink ${file} ) >> ${RUN_DIR}/liste_remove_pack_${number_pack}.txt 324 317 echo $( readlink ${file} ) >> ${RUN_DIR}/liste_remove_pack_${number_pack}.txt 325 318 # Will not work. Need to find a better ordering. 326 319 # elif [ ${date_file} -ge ${date_end_pack} ] ; then … … 350 343 351 344 done 345 346 # Clean RUN_DIR_PATH (necessary for cesium and titane only) 347 IGCM_sys_RmRunDir -Rf ${RUN_DIR_PATH} 348 349 date -
trunk/libIGCM/AA_pack_output
r585 r590 3 3 #-Q- cesium ## CESIUM CEA ## 4 4 #-Q- cesium ###################### 5 #-Q- cesium #MSUB -r PACKOUTPUT # Nom du job 5 #-Q- cesium #MSUB -r PACKOUTPUT # Nom du job 6 6 #-Q- cesium #MSUB -N 1 # Reservation du noeud 7 7 #-Q- cesium #MSUB -n 1 # Reservation du processus … … 27 27 #-Q- sx8brodie # Nom du travail LoadLeveler 28 28 #-Q- sx8brodie # @ job_name = PACKOUTPUT 29 #-Q- sx8brodie # Fichier de sortie standard du travail 29 #-Q- sx8brodie # Fichier de sortie standard du travail 30 30 #-Q- sx8brodie # @ output = $(job_name).$(jobid) 31 31 #-Q- sx8brodie # Fichier de sortie d'erreur du travail … … 81 81 #-Q- sx9mercure ## CESIUM CEA ## 82 82 #-Q- sx9mercure ###################### 83 #-Q- sx9mercure #MSUB -r PACKOUTPUT # Nom du job 83 #-Q- sx9mercure #MSUB -r PACKOUTPUT # Nom du job 84 84 #-Q- sx9mercure #MSUB -N 1 # Reservation du noeud 85 85 #-Q- sx9mercure #MSUB -n 1 # Reservation du processus … … 91 91 #-Q- titane ## TITANE CEA ## 92 92 #-Q- titane ###################### 93 #-Q- titane #MSUB -r PACKOUTPUT # Nom du job 93 #-Q- titane #MSUB -r PACKOUTPUT # Nom du job 94 94 #-Q- titane #MSUB -eo 95 95 #-Q- titane #MSUB -n 1 # Reservation du processus … … 200 200 fi 201 201 202 # 202 #==================================================== 203 203 # First of all 204 204 # 205 #### 0- lecture de config.card 206 #### on veut les renseignements suivants : 207 #### JobName, PATH_SIMUL, DateBegin et DateEnd 205 # Read config.card 208 206 209 207 IGCM_card_DefineArrayFromSection ${CARD_DIR}/config.card UserChoices … … 249 247 # Switch to script variables meaning (try to be compatible with ipsl_pack TGCC moving procedure) 250 248 JobName=${config_UserChoices_JobName} 251 PATH_SIMUL=${R_BUFR} 252 echo $JobName $PATH_SIMUL $DateBegin $DateEnd 249 echo $JobName $DateBegin $DateEnd 253 250 254 251 # ------------------------------------------------------------------ … … 268 265 269 266 IGCM_debug_PrintVariables 3 number_pack 270 DaysTemp=$( IGCM_date_DaysIn NextPeriod ${date_begin_pack} ${PeriodPack} )267 DaysTemp=$( IGCM_date_DaysInCurrentPeriod ${date_begin_pack} ${PeriodPack} ) 271 268 date_end_pack=$( IGCM_date_AddDaysToGregorianDate ${date_begin_pack} $(( ${DaysTemp} - 1 )) ) 272 269 … … 283 280 # Loop over the file type and pack them when in between date_begin_pack and date_end_pack 284 281 for myType in ${fileType} ; do 285 286 287 288 289 290 291 if [ ${date_file} -le ${date_end_pack} ] && [ ${date_file} -ge ${date_begin_pack} ] ; then 292 293 294 295 296 297 298 299 300 301 302 303 304 305 ncrcat --omp_num_threads 4-p ${dir} ${liste_file_tmp} --output ${output}306 307 ncrcat --omp_num_threads 4-x -v ${list_var} -p ${dir} ${liste_file_tmp} --output ${output}308 309 282 grep ${myType} liste_files.${dirID}.txt > liste_files.${dirID}.${myType}.txt 283 nbfile=0 284 for file in $( gawk '{print $11}' liste_files.${dirID}.${myType}.txt ); do 285 extract_date_file=$( echo ${file} | sed -e "s/.*${JobName}_[0-9]*_//" ) 286 date_file=$( echo ${extract_date_file} | sed 's/\([0-9]\{8\}\)_.*$/\1/g' ) 287 # echo pack n°${number_pack} ${date_file} ${date_begin_pack} ${date_end_pack} 288 if [ ${date_file} -le ${date_end_pack} ] && [ ${date_file} -ge ${date_begin_pack} ] ; then 289 echo ${file} >> liste_pack_${myType}_${number_pack}.txt 290 ncdump -h ${file} | grep -E 'float|double' | cut -f 1 -d '(' | cut -f 2 -d ' ' >> liste_variables_${myType}_${number_pack}.txt 291 (( nbfile = nbfile + 1 )) 292 fi 293 done 294 # Select list of variables to work with 295 list_var=$( cat liste_variables_${myType}_${number_pack}.txt | sort | uniq -c | awk -v nbfile=$nbfile '{if ($1 != nbfile) {print $2}}' | paste -s -d ',' ) 296 liste_file_tmp=$( for i in $( cat liste_pack_${myType}_${number_pack}.txt ) ; do basename $i ; done ) 297 # Create packed files 298 IGCM_debug_Print 1 "Ncrcat ongoing for ${dir} and ${myType}" 299 output=${JobName}_${date_begin_pack}_${date_end_pack}_${myType} 300 #cat liste_pack_${myType}_${number_pack}.txt | xargs ncrcat -v ${list_var} -o ${output} 301 if [ X${list_var} = X ] ; then 302 IGCM_sys_ncrcat -p ${dir} ${liste_file_tmp} --output ${output} 303 else 304 IGCM_sys_ncrcat -x -v ${list_var} -p ${dir} ${liste_file_tmp} --output ${output} 305 fi 306 # ------------------------------------------------------------------ 310 307 # Test if all was right before proceeding further 311 308 # ------------------------------------------------------------------ 312 309 IGCM_debug_Verif_Exit_Post 313 310 # Save it 314 315 311 IGCM_sys_Put_Out ${output} ${R_SAVE}/$( echo $dir | sed "s:${R_BUFR}/::" )/${output} 312 # ------------------------------------------------------------------ 316 313 # Test if all was right before proceeding further 317 314 # ------------------------------------------------------------------ 318 315 IGCM_debug_Verif_Exit_Post 319 316 # Clean file produced by ncrcat 320 317 IGCM_sys_Rm ${output} 321 318 # Clean files used by ncrcat 322 319 cat liste_pack_${myType}_${number_pack}.txt | xargs rm 323 320 # Save the list of files that has been pack (ncrcat) 324 325 321 mv liste_pack_${myType}_${date_begin_pack}_${date_end_pack}.txt ${STORE_DEBUG} 322 IGCM_debug_Print 1 "Ncrcat and cleaning done for ${dir} and ${myType}" 326 323 done 327 324 done … … 331 328 date_begin_pack=$( IGCM_date_AddDaysToGregorianDate ${date_end_pack} 1 ) 332 329 done 330 331 # Clean RUN_DIR_PATH (necessary for cesium and titane only) 332 IGCM_sys_RmRunDir -Rf ${RUN_DIR_PATH} 333 334 date -
trunk/libIGCM/AA_pack_restart
r589 r590 3 3 #-Q- cesium ## CESIUM CEA ## 4 4 #-Q- cesium ###################### 5 #-Q- cesium #MSUB -r PACKRESTART # Nom du job 5 #-Q- cesium #MSUB -r PACKRESTART # Nom du job 6 6 #-Q- cesium #MSUB -N 1 # Reservation du noeud 7 7 #-Q- cesium #MSUB -n 1 # Reservation du processus … … 27 27 #-Q- sx8brodie # Nom du travail LoadLeveler 28 28 #-Q- sx8brodie # @ job_name = PACKRESTART 29 #-Q- sx8brodie # Fichier de sortie standard du travail 29 #-Q- sx8brodie # Fichier de sortie standard du travail 30 30 #-Q- sx8brodie # @ output = $(job_name).$(jobid) 31 31 #-Q- sx8brodie # Fichier de sortie d'erreur du travail … … 81 81 #-Q- sx9mercure ## CESIUM CEA ## 82 82 #-Q- sx9mercure ###################### 83 #-Q- sx9mercure #MSUB -r PACKRESTART # Nom du job 83 #-Q- sx9mercure #MSUB -r PACKRESTART # Nom du job 84 84 #-Q- sx9mercure #MSUB -N 1 # Reservation du noeud 85 85 #-Q- sx9mercure #MSUB -n 1 # Reservation du processus … … 91 91 #-Q- titane ## TITANE CEA ## 92 92 #-Q- titane ###################### 93 #-Q- titane #MSUB -r PACKRESTART # Nom du job 93 #-Q- titane #MSUB -r PACKRESTART # Nom du job 94 94 #-Q- titane #MSUB -eo 95 95 #-Q- titane #MSUB -n 1 # Reservation du processus … … 178 178 #RESTART/ATM_****.nc 179 179 #RESTART/OCE_****.nc 180 #Attention de bien conserver les dates d'origines 180 #Attention de bien conserver les dates d'origines 181 181 # 182 182 #Dans le cadre de la production nouvelle chaine 183 183 #ils auront directement le bon nom 184 184 # 185 #On veut egalement que l'archive soit par periode de temps 186 # cette periode est definie par la taille du pack donc connue 187 # en entree du script (1M, 1Y, 5Y, 10Y etc...) 188 # 189 # $1= PATH/config_card d'une simulation avec 190 # TagName/JobName/ExperimentName/SpaceName/DateBegin/DateEnd /PATH_SIMUL185 #On veut egalement que l'archive soit par periode de temps 186 # cette periode est definie par la taille du pack donc connue 187 # en entree du script (1M, 1Y, 5Y, 10Y etc...) 188 # 189 # $1= PATH/config_card d'une simulation avec 190 # TagName/JobName/ExperimentName/SpaceName/DateBegin/DateEnd 191 191 # $2=PeriodPack en M/m ou Y/y 192 192 … … 223 223 fi 224 224 225 # 225 #==================================================== 226 226 # First of all 227 227 # 228 #### 0- lecture de config.card 229 #### on veut les renseignements suivants : 230 #### JobName, PATH_SIMUL, DateBegin et DateEnd 228 # Read config.card 231 229 232 230 IGCM_card_DefineArrayFromSection ${CARD_DIR}/config.card UserChoices … … 250 248 251 249 #==================================================== 252 #R_SAVE : Job output storage directory 253 #R_BUFR : Job output buffered directory 250 # Prepare environment 251 #R_SAVE : Job output storage directory 252 #R_BUFR : Job output buffered directory 253 #STORE_RESTART : Where we store tar files 254 254 255 255 if ( [ ! X${config_UserChoices_SpaceName} = X ] && [ ! X${config_UserChoices_ExperimentName} = X ] ) ; then … … 264 264 [ $? != 0 ] && IGCM_debug_Exit "IGCM_sys_TestDirArchive" 265 265 266 #### Preparation de l'environnement 267 # repertoire dans lequel seront crees les archives 268 #STORE_RESTART=/scratch/cont003/p86denv/Pack_Test/RESTART 266 #STORE_RESTART=/ccc/store/cont003/dsm/p86denv/.../RESTART 269 267 STORE_RESTART=${R_SAVE}/RESTART 270 268 IGCM_sys_MkdirArchive ${STORE_RESTART} 271 269 270 #cd ${STORE_RESTART} 271 #rm -f * 272 272 273 # Switch to script variables meaning (try to be compatible with ipsl_pack TGCC moving procedure) 273 274 JobName=${config_UserChoices_JobName} 274 PATH_SIMUL=${R_BUFR} 275 echo $JobName $PATH_SIMUL $DateBegin $DateEnd 276 277 #### 1- renommer les fichiers ###### 278 #cd ${STORE_RESTART} 279 #rm -rf * 280 281 # On les copie sur le scratchdir en changeant le nom et conservant la date 275 echo $JobName $R_BUFR $DateBegin $DateEnd 276 282 277 # Clear txt file lists 283 278 rm -f ${RUN_DIR}/liste_restart_files.txt … … 286 281 287 282 # Create sorted restart list to work with 288 find ${ PATH_SIMUL}/*/Restart -name "*nc" | sort >> ${RUN_DIR}/liste_restart_files.txt283 find ${R_BUFR}/*/Restart -name "*nc" | sort >> ${RUN_DIR}/liste_restart_files.txt 289 284 290 285 # Rename restart files we will work with using symlinks … … 318 313 extract_date_file=$( echo ${file} | sed -e "s/.*${JobName}_//" ) 319 314 date_file=$( echo ${extract_date_file} | sed 's/\([0-9]\{8\}\)_.*$/\1/g' ) 320 # echo pack n°${number_pack} ${date_file} ${date_begin_pack} ${date_end_pack} 321 if [ ${date_file} -le ${date_end_pack} ] && [ ${date_file} -ge ${date_begin_pack} ] ; then 322 echo $( basename ${file} ) >> ${RUN_DIR}/liste_pack_${number_pack}.txt 323 echo $( readlink ${file} ) >> ${RUN_DIR}/liste_remove_pack_${number_pack}.txt 324 325 # Will not work. Need to find a better ordering. 326 # elif [ ${date_file} -ge ${date_end_pack} ] ; then 327 # break 315 # echo pack n°${number_pack} ${date_file} ${date_begin_pack} ${date_end_pack} 316 if [ ${date_file} -le ${date_end_pack} ] && [ ${date_file} -ge ${date_begin_pack} ] ; then 317 echo $( basename ${file} ) >> ${RUN_DIR}/liste_pack_${number_pack}.txt 318 echo $( readlink ${file} ) >> ${RUN_DIR}/liste_remove_pack_${number_pack}.txt 319 # Will not work. Need to find a better ordering. 320 # elif [ ${date_file} -ge ${date_end_pack} ] ; then 321 # break 328 322 fi 329 323 done … … 350 344 351 345 done 346 347 # Clean RUN_DIR_PATH (necessary for cesium and titane only) 348 IGCM_sys_RmRunDir -Rf ${RUN_DIR_PATH} 349 350 date -
trunk/libIGCM/AA_rebuild_fromArchive
r554 r590 268 268 done 269 269 270 # Clean RUN_DIR_PATH (necessary for cesium only)270 # Clean RUN_DIR_PATH (necessary for cesium and titane only) 271 271 IGCM_sys_RmRunDir -Rf ${RUN_DIR_PATH} 272 273 date -
trunk/libIGCM/AA_rebuild_fromWorkdir
r554 r590 268 268 done 269 269 270 # Clean RUN_DIR_PATH (necessary for cesium only)270 # Clean RUN_DIR_PATH (necessary for cesium and titane only) 271 271 IGCM_sys_RmRunDir -Rf ${RUN_DIR_PATH} 272 273 date -
trunk/libIGCM/libIGCM_comp/libIGCM_comp.ksh
r588 r590 608 608 echo 609 609 610 typeset Date_tmp Date_r Path_r do_start CompOldName Path_OUT Path_BUF Buffered 610 typeset Date_tmp Date_r Path_r do_start CompOldName Path_OUT Path_BUF 611 typeset Buffered Archived Tared PotentialTarFile IsMatching TarFileFound 611 612 typeset comp compname comptagname card ListFilesName FileName0 NbFiles i i_ 612 613 typeset file_in file_out file_in_ file_out_ file_in_Name … … 637 638 eval CompOldName=${comp} 638 639 else 639 640 # Read component Restarts parameters 640 641 IGCM_card_DefineVariableFromOption ${SUBMIT_DIR}/config.card ${comp} Restart 641 642 eval do_start=\${config_${comp}_Restart} > /dev/null 2>&1 … … 731 732 732 733 if [ -f ${Path_BUF}*.nc ] ; then 734 IGCM_debug_Print 3 "Buffered restart" 733 735 Buffered=true 736 Archived=false 737 Tared=false 734 738 nb_restart_file=$(IGCM_sys_CountFileBuffer ${Path_BUF}_????.nc) 739 elif [ -f ${Path_OUT}*.nc ] ; then 740 IGCM_debug_Print 3 "Archived restart" 741 Buffered=false 742 Archived=true 743 Tared=false 744 nb_restart_file=$(IGCM_sys_CountFileArchive ${Path_OUT}_????.nc) 735 745 else 746 IGCM_debug_Print 3 "Tared restart" 736 747 Buffered=false 737 nb_restart_file=$(IGCM_sys_CountFileArchive ${Path_OUT}_????.nc) 748 Archived=false 749 Tared=true 750 # Look after the tar file we want if we did not found it already 751 if [ X${IsMatching} = X ] ; then 752 for PotentialTarFile in $( find ${R_SAVE}/RESTART -name "${config_UserChoices_JobName}_*_restart.tar" ) ; do 753 IsMatching=$( echo ${PotentialTarFile} | sed "s:^${config_UserChoices_JobName}_::" | sed "s:\.restart\.tar$::" | gawk -F_ -v restartdate=${LastPeriodDateEnd} '{if (($1 < restartdate) && ($2 > restartdate)) {print $1"_"$2}}' ) 754 if [ ! X${IsMatching} = X ] ; then 755 TarFileFound=${PotentialTarFile} 756 break 757 fi 758 done 759 fi 760 tar xvf ${TarFileFound} ${comp}_${generic_restart_file_name_in}*.nc 761 nb_restart_file=$( IGCM_sys_CountFileBuffer ${comp}_${generic_restart_file_name_in}_????.nc ) 738 762 fi 739 763 … … 742 766 until [ $j -ge $nb_restart_file ]; do 743 767 j4=${j} 744 if [ ${Buffered}] ; then768 if [ X${Buffered} = Xtrue ] ; then 745 769 IGCM_sys_GetBuffer ${Path_BUF}_${j4}.nc ${generic_restart_file_name_out}_${j4}.nc 746 el se770 elif [ X${Archived} = Xtrue ] ; then 747 771 IGCM_sys_Get ${Path_OUT}_${j4}.nc ${generic_restart_file_name_out}_${j4}.nc 772 elif [ X${Tared} = Xtrue ] ; then 773 IGCM_sys_Mv ${comp}_${generic_restart_file_name_in}_${j4}.nc ${generic_restart_file_name_out}_${j4}.nc 748 774 fi 749 775 (( j=j+1 )) 750 776 done 751 777 else 752 if [ ${Buffered}] ; then778 if [ X${Buffered} = Xtrue ] ; then 753 779 eval IGCM_sys_GetBuffer \${R_BUF_${comp}_R}/${file_in_Name} ${file_out} 754 el se780 elif [ X${Archived} = Xtrue ] ; then 755 781 eval IGCM_sys_Get \${R_OUT_${comp}_R}/${file_in_Name} ${file_out} 756 fi 757 fi 758 782 elif [ X${Tared} = Xtrue ] ; then 783 IGCM_sys_Mv ${comp}_${file_in_Name} ${file_out} 784 fi 785 fi 759 786 (( i=i+3 )) 760 787 done -
trunk/libIGCM/libIGCM_post/IGCM_Patch_20091118_mask.ksh
r588 r590 20 20 IGCM_debug_PushStack "IGCM_Patch_mask" $@ 21 21 22 if [ -f ${config_UserChoices_JobName}_mesh_mask.nc ] ; then22 if [ ! -f ${config_UserChoices_JobName}_mesh_mask.nc ] ; then 23 23 if [ -f ${R_BUFR}/OCE/Output/${config_UserChoices_JobName}_mesh_mask.nc ] ; then 24 IGCM_sys_Get ${R_BUFR}/OCE/Output/${config_UserChoices_JobName}_mesh_mask.nc .24 IGCM_sys_GetBuffer ${R_BUFR}/OCE/Output/${config_UserChoices_JobName}_mesh_mask.nc . 25 25 elif [ -f ${R_SAVE}/OCE/Output/${config_UserChoices_JobName}_mesh_mask.nc ] ; then 26 26 IGCM_sys_Get ${R_SAVE}/OCE/Output/${config_UserChoices_JobName}_mesh_mask.nc . -
trunk/libIGCM/libIGCM_post/libIGCM_post.ksh
r583 r590 245 245 [ $(( ( ${YearEnd} - ${YearBegin} + 1 ) % ${YearsChunckLength} )) = 0 ] && NbYearsChunckLoop=$(( ${NbYearsChunckLoop} - 1 )) 246 246 # Starting Year of the current chunck 247 ChunckTsYearBegin=$(( ${NbYearsChunckLoop} * 247 ChunckTsYearBegin=$(( ${NbYearsChunckLoop} * ${YearsChunckLength} + ${YearBegin} )) 248 248 # Starting date of the current chunck 249 249 ChunckTsDateBegin=${ChunckTsYearBegin}${MonthBegin}01 … … 412 412 fi 413 413 414 #============== PACK PROCESSING FOR RESTART AND DEBUG FILES =============# 415 if [ ${PackFrequency} = true ] ; then 416 IGCM_debug_Print 1 "PACK POST-PROCESSING" 417 echo 418 ## Need to Remember This One 419 SavedDateBegin=${DateBegin} 420 ## Need to Remember This One 421 SavedDateEnd=${DateEnd} 422 # 423 DaysTemp=$(( $( IGCM_date_DaysInPreviousPeriod ${PeriodDateEnd} ${config_Post_PackFrequency} end ) - 1 )) 424 # 425 PackDateBegin=$( IGCM_date_AddDaysToGregorianDate ${PeriodDateEnd} -${DaysTemp} ) 426 # 427 script=pack_debug 428 # 429 Script_Post_Output=${script}.${PeriodDateEnd} 430 # 431 listVarEnv="DEBUG_debug,MODIPSL,libIGCM,libIGCM_SX,SUBMIT_DIR,POST_DIR,MASTER,DateBegin,DateEnd,PeriodPack,StandAlone" 432 IGCM_sys_RshPost <<-EOF 433 export DEBUG_debug=${DEBUG_debug} 434 export MODIPSL=${MODIPSL} 435 export libIGCM_SX=${libIGCM} 436 export libIGCM=${libIGCM_POST} 437 export SUBMIT_DIR=${SUBMIT_DIR} 438 export POST_DIR=${POST_DIR} 439 export MASTER=${MASTER} 440 export DateBegin=${PackDateBegin} 441 export DateEnd=${PeriodDateEnd} 442 export PeriodPack=${config_Post_PackFrequency} 443 export StandAlone=false 444 export listVarEnv=${listVarEnv} 445 export Script_Post_Output=${Script_Post_Output} 446 . ${libIGCM_POST}/libIGCM_debug/libIGCM_debug.ksh 447 . ${libIGCM_POST}/libIGCM_sys/libIGCM_sys.ksh 448 IGCM_sys_MkdirWork ${POST_DIR} 449 IGCM_debug_Verif_Exit_Post 450 IGCM_sys_QsubPost ${script} 451 EOF 452 # 453 script=pack_restart 454 # 455 Script_Post_Output=${script}.${PeriodDateEnd} 456 # 457 IGCM_sys_RshPost <<-EOF 458 export DEBUG_debug=${DEBUG_debug} 459 export MODIPSL=${MODIPSL} 460 export libIGCM_SX=${libIGCM} 461 export libIGCM=${libIGCM_POST} 462 export SUBMIT_DIR=${SUBMIT_DIR} 463 export POST_DIR=${POST_DIR} 464 export MASTER=${MASTER} 465 export DateBegin=${PackDateBegin} 466 export DateEnd=${PeriodDateEnd} 467 export PeriodPack=${config_Post_PackFrequency} 468 export StandAlone=false 469 export listVarEnv=${listVarEnv} 470 export Script_Post_Output=${Script_Post_Output} 471 . ${libIGCM_POST}/libIGCM_debug/libIGCM_debug.ksh 472 . ${libIGCM_POST}/libIGCM_sys/libIGCM_sys.ksh 473 IGCM_sys_MkdirWork ${POST_DIR} 474 IGCM_debug_Verif_Exit_Post 475 IGCM_sys_QsubPost ${script} 476 EOF 477 # 478 script=pack_output 479 # 480 Script_Post_Output=${script}.${PeriodDateEnd} 481 # 482 if [ ${RebuildFrequency} = true ] ; then 483 # 484 if [ -f ${RUN_DIR}/REBUILD_${PeriodDateBegin}/rebuild.ksh ] ; then 485 # 486 # if [ X${MASTER} = Xtitane ] ; then 487 # echo "IGCM_sys_RshPost <<-EOF" >> ${RUN_DIR}/REBUILD_${PeriodDateBegin}/rebuild.ksh 488 # fi 489 echo "export DEBUG_debug=${DEBUG_debug} " >> ${RUN_DIR}/REBUILD_${PeriodDateBegin}/rebuild.ksh 490 echo "export MODIPSL=${MODIPSL} " >> ${RUN_DIR}/REBUILD_${PeriodDateBegin}/rebuild.ksh 491 echo "export libIGCM_SX=${libIGCM} " >> ${RUN_DIR}/REBUILD_${PeriodDateBegin}/rebuild.ksh 492 echo "export libIGCM=${libIGCM_POST} " >> ${RUN_DIR}/REBUILD_${PeriodDateBegin}/rebuild.ksh 493 echo "export SUBMIT_DIR=${SUBMIT_DIR} " >> ${RUN_DIR}/REBUILD_${PeriodDateBegin}/rebuild.ksh 494 echo "export POST_DIR=${POST_DIR} " >> ${RUN_DIR}/REBUILD_${PeriodDateBegin}/rebuild.ksh 495 echo "export MASTER=${MASTER} " >> ${RUN_DIR}/REBUILD_${PeriodDateBegin}/rebuild.ksh 496 echo "export DateBegin=${PackDateBegin} " >> ${RUN_DIR}/REBUILD_${PeriodDateBegin}/rebuild.ksh 497 echo "export DateEnd=${PeriodDateEnd} " >> ${RUN_DIR}/REBUILD_${PeriodDateBegin}/rebuild.ksh 498 echo "export PeriodPack=${config_Post_PackFrequency} " >> ${RUN_DIR}/REBUILD_${PeriodDateBegin}/rebuild.ksh 499 echo "export StandAlone=false " >> ${RUN_DIR}/REBUILD_${PeriodDateBegin}/rebuild.ksh 500 echo "export listVarEnv=${listVarEnv} " >> ${RUN_DIR}/REBUILD_${PeriodDateBegin}/rebuild.ksh 501 echo "export Script_Post_Output=${Script_Post_Output}" >> ${RUN_DIR}/REBUILD_${PeriodDateBegin}/rebuild.ksh 502 echo "export script=${script} " >> ${RUN_DIR}/REBUILD_${PeriodDateBegin}/rebuild.ksh 503 # if [ X${MASTER} = Xtitane ] ; then 504 # echo ". ${libIGCM_POST}/libIGCM_debug/libIGCM_debug.ksh" >> ${RUN_DIR}/REBUILD_${PeriodDateBegin}/rebuild.ksh 505 # echo ". ${libIGCM_POST}/libIGCM_sys/libIGCM_sys.ksh" >> ${RUN_DIR}/REBUILD_${PeriodDateBegin}/rebuild.ksh 506 # fi 507 echo "IGCM_sys_MkdirWork ${POST_DIR} " >> ${RUN_DIR}/REBUILD_${PeriodDateBegin}/rebuild.ksh 508 echo "IGCM_debug_Verif_Exit_Post " >> ${RUN_DIR}/REBUILD_${PeriodDateBegin}/rebuild.ksh 509 echo "IGCM_sys_QsubPost ${script} " >> ${RUN_DIR}/REBUILD_${PeriodDateBegin}/rebuild.ksh 510 # if [ X${MASTER} = Xtitane ] ; then 511 # echo "EOF" >> ${RUN_DIR}/REBUILD_${PeriodDateBegin}/rebuild.ksh 512 # fi 513 fi 514 else 515 IGCM_sys_RshPost <<-EOF 516 export DEBUG_debug=${DEBUG_debug} 517 export MODIPSL=${MODIPSL} 518 export libIGCM_SX=${libIGCM} 519 export libIGCM=${libIGCM_POST} 520 export SUBMIT_DIR=${SUBMIT_DIR} 521 export POST_DIR=${POST_DIR} 522 export MASTER=${MASTER} 523 export DateBegin=${PackDateBegin} 524 export DateEnd=${PeriodDateEnd} 525 export PeriodPack=${config_Post_PackFrequency} 526 export StandAlone=false 527 export listVarEnv=${listVarEnv} 528 export Script_Post_Output=${Script_Post_Output} 529 . ${libIGCM_POST}/libIGCM_debug/libIGCM_debug.ksh 530 . ${libIGCM_POST}/libIGCM_sys/libIGCM_sys.ksh 531 IGCM_sys_MkdirWork ${POST_DIR} 532 IGCM_debug_Verif_Exit_Post 533 IGCM_sys_QsubPost ${script} 534 EOF 535 export DateBegin=${SavedDateBegin} 536 export DateEnd=${SavedDateEnd} 537 fi 538 fi 539 414 540 #============== REBUILD POST-PROCESSING =============# 415 541 if [ X${AsynchronousRebuild} = Xtrue ] ; then … … 473 599 IGCM_sys_QsubPost ${script} 474 600 EOF 475 fi476 477 #============== PACK PROCESSING FOR RESTART AND DEBUG FILES =============#478 if [ ${PackFrequency} = true ] ; then479 IGCM_debug_Print 1 "PACK POST-PROCESSING"480 echo481 ## Need to Remember This One482 SavedDateBegin=${DateBegin}483 ## Need to Remember This One484 SavedDateEnd=${DateEnd}485 #486 DaysTemp=$(( $( IGCM_date_DaysInPreviousPeriod ${PeriodDateEnd} ${config_Post_PackFrequency} end ) - 1 ))487 #488 PackDateBegin=$( IGCM_date_AddDaysToGregorianDate ${PeriodDateEnd} -${DaysTemp} )489 #490 script=pack_debug491 #492 Script_Post_Output=${script}.${PeriodDateEnd}493 #494 listVarEnv="DEBUG_debug,MODIPSL,libIGCM,libIGCM_SX,SUBMIT_DIR,POST_DIR,MASTER,DateBegin,DateEnd,PeriodPack,StandAlone"495 IGCM_sys_RshPost <<-EOF496 export DEBUG_debug=${DEBUG_debug}497 export MODIPSL=${MODIPSL}498 export libIGCM_SX=${libIGCM}499 export libIGCM=${libIGCM_POST}500 export SUBMIT_DIR=${SUBMIT_DIR}501 export POST_DIR=${POST_DIR}502 export MASTER=${MASTER}503 export DateBegin=${PackDateBegin}504 export DateEnd=${PeriodDateEnd}505 export PeriodPack=${config_Post_PackFrequency}506 export StandAlone=false507 export listVarEnv=${listVarEnv}508 export Script_Post_Output=${Script_Post_Output}509 . ${libIGCM_POST}/libIGCM_debug/libIGCM_debug.ksh510 . ${libIGCM_POST}/libIGCM_sys/libIGCM_sys.ksh511 IGCM_sys_MkdirWork ${POST_DIR}512 IGCM_debug_Verif_Exit_Post513 IGCM_sys_QsubPost ${script}514 EOF515 #516 script=pack_restart517 #518 Script_Post_Output=${script}.${PeriodDateEnd}519 #520 IGCM_sys_RshPost <<-EOF521 export DEBUG_debug=${DEBUG_debug}522 export MODIPSL=${MODIPSL}523 export libIGCM_SX=${libIGCM}524 export libIGCM=${libIGCM_POST}525 export SUBMIT_DIR=${SUBMIT_DIR}526 export POST_DIR=${POST_DIR}527 export MASTER=${MASTER}528 export DateBegin=${PackDateBegin}529 export DateEnd=${PeriodDateEnd}530 export PeriodPack=${config_Post_PackFrequency}531 export StandAlone=false532 export listVarEnv=${listVarEnv}533 export Script_Post_Output=${Script_Post_Output}534 . ${libIGCM_POST}/libIGCM_debug/libIGCM_debug.ksh535 . ${libIGCM_POST}/libIGCM_sys/libIGCM_sys.ksh536 IGCM_sys_MkdirWork ${POST_DIR}537 IGCM_debug_Verif_Exit_Post538 IGCM_sys_QsubPost ${script}539 EOF540 #541 script=pack_output542 #543 Script_Post_Output=${script}.${PeriodDateEnd}544 #545 IGCM_sys_RshPost <<-EOF546 export DEBUG_debug=${DEBUG_debug}547 export MODIPSL=${MODIPSL}548 export libIGCM_SX=${libIGCM}549 export libIGCM=${libIGCM_POST}550 export SUBMIT_DIR=${SUBMIT_DIR}551 export POST_DIR=${POST_DIR}552 export MASTER=${MASTER}553 export DateBegin=${PackDateBegin}554 export DateEnd=${PeriodDateEnd}555 export PeriodPack=${config_Post_PackFrequency}556 export StandAlone=false557 export listVarEnv=${listVarEnv}558 export Script_Post_Output=${Script_Post_Output}559 . ${libIGCM_POST}/libIGCM_debug/libIGCM_debug.ksh560 . ${libIGCM_POST}/libIGCM_sys/libIGCM_sys.ksh561 IGCM_sys_MkdirWork ${POST_DIR}562 IGCM_debug_Verif_Exit_Post563 #IGCM_sys_QsubPost ${script}564 EOF565 export DateBegin=${SavedDateBegin}566 export DateEnd=${SavedDateEnd}567 601 fi 568 602 IGCM_debug_PopStack "IGCM_post_Submit" … … 631 665 *M|*m) 632 666 PeriodMasterMonth=$( echo ${MasterFrequency} | sed -e "s/[mM]//" ) 633 case ${SlaveFrequency} in 667 case ${SlaveFrequency} in 634 668 *Y|*y) 635 669 PeriodSlaveYear=$( echo ${SlaveFrequency} | sed -e "s/[yY]//" ) -
trunk/libIGCM/libIGCM_sys/libIGCM_sys_titane.ksh
r587 r590 1832 1832 echo "IGCM_sys_ncrcat :" $@ 1833 1833 fi 1834 ncrcat $@1834 ncrcat --omp_num_threads 2 $@ 1835 1835 if [ $? -gt 0 ] ; then 1836 1836 echo "IGCM_sys_ncrcat : erreur ${@}."
Note: See TracChangeset
for help on using the changeset viewer.