- Timestamp:
- 03/01/10 16:59:54 (14 years ago)
- Location:
- trunk/libIGCM
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/libIGCM/AA_create_se
r231 r236 230 230 if [ X${FileName0} != X${NULL_STR} ] ; then 231 231 # 232 #IGCM_debug_Print 1 "Component : ${compname}"233 #234 232 # INITIALISATION 235 233 # 236 234 eval NbFiles=\${#${ListFilesName}[@]} > /dev/null 2>&1 237 typeset i= 0235 typeset i=2 238 236 # 239 237 until [ $i -eq $NbFiles ]; do 240 238 # 241 eval file_in_=\${${ListFilesName}[$i]} > /dev/null 2>&1 242 eval file_in=${file_in_} 243 let $(( i_ = i+2 )) 244 eval flag_post_=\${${ListFilesName}[$i_]} > /dev/null 2>&1 239 eval flag_post_=\${${ListFilesName}[$i]} > /dev/null 2>&1 245 240 eval flag_post=${flag_post_} 246 241 # 247 242 if [ X${flag_post} != XNONE ] ; then 248 243 # 249 # Initialize ${flag_post}_${compname}_${post_freq}244 # Check if seasonal is required for this file 250 245 # 251 eval export ${flag_post}_${compname}_SeasonalFrequency=true 246 IGCM_card_DefineArrayFromOption ${card} ${flag_post} Seasonal 247 # 248 if [ ! X$( eval echo \${${compname}_${flag_post}_Seasonal} ) = XON ] ; then 249 continue 250 fi 251 # 252 # CREATE LIST 253 # 254 FILE=$( echo ${flag_post} | awk "-FPost_" '{print $2}' ) 255 # 256 DIRECTORY=${R_SAVE}/${comp}/Analyse/SE 257 # 258 TestedFile=${config_UserChoices_JobName}_SE_${an_deb}_${an_fin}_${FILE}.nc 259 # 260 IGCM_sys_TestFileArchive ${DIRECTORY}/${TestedFile} 261 if [ ! $? = 0 ] ; then 262 eval set +A LISTE_FILE_${comp} \$\{LISTE_FILE_${comp}[*]} ${FILE} 263 if [ ! ${RebuildFrequency} = true ] ; then 264 IGCM_card_DefineArrayFromOption ${card} Post_${FILE} Patches 265 eval set +A LISTE_PATCHES_${FILE} \$\{${compname}_Post_${FILE}_Patches[*]} 266 if [ X$( eval echo \${LISTE_PATCHES_${FILE}[0]} ) != X${NULL_STR} ]; then 267 for Patch in $( eval echo \${LISTE_PATCHES_${FILE}[*]} ); do 268 if [ Xload${Patch} != X ] ; then 269 . ${libIGCM}/libIGCM_post/IGCM_${Patch}.ksh 270 eval load${Patch}=loaded 271 fi 272 done 273 fi 274 fi 275 fi 252 276 fi 253 277 let $(( i=i+3 )) 254 done 278 done # until [ $i -eq $NbFiles ] 255 279 fi 256 257 for element in $( env | grep Post_ | grep ${compname}_SeasonalFrequency | grep -i "=true" ) ; do258 #259 FILE=$( echo ${element} | awk -F "_${compname}_SeasonalFrequency" '{print $1}' | awk "-FPost_" '{print $2}' )260 #261 # CREATE LIST262 #263 DIRECTORY=${R_SAVE}/${comp}/Analyse/SE264 #265 TestedFile=${config_UserChoices_JobName}_SE_${an_deb}_${an_fin}_${FILE}.nc266 #267 IGCM_sys_TestFileArchive ${DIRECTORY}/${TestedFile}268 if [ ! $? = 0 ] ; then269 eval set +A LISTE_FILE_${comp} \$\{LISTE_FILE_${comp}[*]} ${FILE}270 if [ ! ${RebuildFrequency} = true ] ; then271 IGCM_card_DefineArrayFromOption ${card} Post_${FILE} Patches272 eval set +A LISTE_PATCHES_${FILE} \$\{${compname}_Post_${FILE}_Patches[*]}273 if [ X$( eval echo \${LISTE_PATCHES_${FILE}[0]} ) != X${NULL_STR} ]; then274 for Patch in $( eval echo \${LISTE_PATCHES_${FILE}[*]} ); do275 if [ Xload${Patch} != X ] ; then276 . ${libIGCM}/libIGCM_post/IGCM_${Patch}.ksh277 eval load${Patch}=loaded278 fi279 done280 fi281 fi282 fi283 #284 done # for element285 280 done # for comp 286 281 -
trunk/libIGCM/AA_create_ts
r229 r236 290 290 # 291 291 FILE=$( echo ${flag_post} | awk "-FPost_" '{print $2}' ) 292 IGCM_card_DefineArrayFromOption ${card} Post_${FILE} TimeSeriesVars${Dimension} 292 IGCM_card_DefineArrayFromOption ${card} Post_${FILE} TimeSeriesVars${Dimension} 293 IGCM_card_DefineVariableFromOption ${card} Post_${FILE} ChunckJob${Dimension} 293 294 # 295 # If TimeSeriesVars list is empty we skip 296 # 294 297 if [ $( eval echo \${${compname}_Post_${FILE}_TimeSeriesVars${Dimension}} ) = ${NULL_STR} ] ; then 295 298 # 296 299 IGCM_debug_Print 3 "Nothing to do for ${FILE} according to ${card}" 300 IGCM_debug_Print 3 "TimeSeriesVars${Dimension} for ${FILE} is empty" 297 301 (( i=i+3 )) 298 302 continue … … 300 304 fi 301 305 # 302 # If we are not a Chunck type task, skip files/variables handled by chunck task 306 # If files/variables has been switch off by ChunckJob${Dimension}=0 we skip 307 # 308 if [ X$( eval echo \${${compname}_Post_${FILE}_ChunckJob${Dimension}} ) = X0 ] ; then 309 IGCM_debug_Print 3 "Nothing to do for ${FILE} according to ${card}" 310 IGCM_debug_Print 3 "ChunckJob${Dimension}=0 for ${FILE} so it has been switched off" 311 (( i=i+3 )) 312 continue 313 fi 314 # 315 # If we are not a Chunck type task, we skip files/variables handled by chunck task 303 316 # 304 317 if ( [ ! X${TsTask} = XChunck${Dimension} ] && [ ! X${TsTask} = X ] && [ ! XChunck${Dimension} = XChunck ] ) ; then 305 IGCM_card_DefineVariableFromOption ${card} Post_${FILE} ChunckJob${Dimension}306 318 if [ ! $( eval echo \${${compname}_Post_${FILE}_ChunckJob${Dimension}} ) = NONE ] ; then 307 319 IGCM_debug_Print 3 "Nothing to do for ${FILE} TimeSeriesVars${Dimension} according to ${card}" … … 311 323 fi 312 324 fi 325 # 326 # Now on we know we have things to do 327 # 328 313 329 # 314 330 # We need coordinates axis to properly fill produced time series -
trunk/libIGCM/AA_rebuild_fromArchive
r229 r236 22 22 #-Q- sx8brodie # pour recevoir un mail en cas de depassement du temps Elapsed (ou autre pb.) 23 23 #-Q- sx8brodie # @ notification = error 24 #-Q- sx8brodie # @ environment = $DEBUG_debug ; $MODIPSL ; $libIGCM ; $libIGCM_SX ; $SUBMIT_DIR ; $REBUILD_DIR ; $RebuildFromArchive ; $POST_DIR ; $DateBegin ; $PeriodDateBegin ; $PeriodDateEnd ; $NbRebuildDir ; $StandAlone ; $RESOL_ATM ; $RESOL_OCE ; $RESOL_ICE ; $RESOL_MBG ; $RESOL_SRF ; $RESOL_SBG ; $MASTER ; $ config_UserChoices_JobName ; $R_SAVE24 #-Q- sx8brodie # @ environment = $DEBUG_debug ; $MODIPSL ; $libIGCM ; $libIGCM_SX ; $SUBMIT_DIR ; $REBUILD_DIR ; $RebuildFromArchive ; $POST_DIR ; $DateBegin ; $PeriodDateBegin ; $PeriodDateEnd ; $NbRebuildDir ; $StandAlone ; $RESOL_ATM ; $RESOL_OCE ; $RESOL_ICE ; $RESOL_MBG ; $RESOL_SRF ; $RESOL_SBG ; $MASTER ; $RebuildFromArchive ; $config_UserChoices_JobName ; $R_SAVE 25 25 #-Q- sx8brodie # @ queue 26 26 #-Q- aix6 #!/bin/ksh … … 38 38 #-Q- aix6 # pour recevoir un mail en cas de depassement du temps Elapsed (ou autre pb.) 39 39 #-Q- aix6 # @ notification = error 40 #-Q- aix6 # @ environment = $DEBUG_debug ; $MODIPSL ; $libIGCM ; $libIGCM_SX ; $SUBMIT_DIR ; $REBUILD_DIR ; $RebuildFromArchive ; $POST_DIR ; $DateBegin ; $PeriodDateBegin ; $PeriodDateEnd ; $NbRebuildDir ; $StandAlone ; $RESOL_ATM ; $RESOL_OCE ; $RESOL_ICE ; $RESOL_MBG ; $RESOL_SRF ; $RESOL_SBG ; $MASTER ; $ config_UserChoices_JobName ; $R_SAVE40 #-Q- aix6 # @ environment = $DEBUG_debug ; $MODIPSL ; $libIGCM ; $libIGCM_SX ; $SUBMIT_DIR ; $REBUILD_DIR ; $RebuildFromArchive ; $POST_DIR ; $DateBegin ; $PeriodDateBegin ; $PeriodDateEnd ; $NbRebuildDir ; $StandAlone ; $RESOL_ATM ; $RESOL_OCE ; $RESOL_ICE ; $RESOL_MBG ; $RESOL_SRF ; $RESOL_SBG ; $MASTER ; $RebuildFromArchive ; $config_UserChoices_JobName ; $R_SAVE 41 41 #-Q- aix6 # @ queue 42 42 #-Q- sx8mercure #!/bin/ksh … … 124 124 config_UserChoices_JobName=${config_UserChoices_JobName:=name_of_the_job} 125 125 126 #D- Directory where output data are stored (needed in standalone mode for mask patch 126 #D- Directory where output data are stored (needed in standalone mode for mask patch) 127 127 #D- Default : value from AA_job if any 128 128 R_SAVE=${R_SAVE:=/path/to/your/ARCHIVE/FILES} … … 184 184 IGCM_sys_Cd ${RUN_DIR} 185 185 # 186 ListAllRebuildDir=$( IGCM_sys_RshArchive ls -d ${REBUILD_DIR}/REBUILD_* | grep -B $(( ${NbRebuildDir} -1 )) ${LastPeriodForRebuild} ) 186 if [ ${RebuildFromArchive} = true ] ; then 187 ListAllRebuildDir=$( IGCM_sys_RshArchive ls -d ${REBUILD_DIR}/REBUILD_* | grep -B $(( ${NbRebuildDir} -1 )) ${LastPeriodForRebuild} ) 188 else 189 ListAllRebuildDir=$( IGCM_sys_RshMaster ls -d ${REBUILD_DIR}/REBUILD_* | grep -B $(( ${NbRebuildDir} -1 )) ${LastPeriodForRebuild} ) 190 fi 187 191 # 188 192 189 193 for directory in ${ListAllRebuildDir} ; do 190 194 # 191 IGCM_sys_Get_Dir ${directory} ${RUN_DIR} 195 if [ ${RebuildFromArchive} = true ] ; then 196 IGCM_sys_Get_Dir ${directory} ${RUN_DIR} 197 else 198 IGCM_sys_Get_Master ${directory} ${RUN_DIR} 199 fi 192 200 # 193 201 IGCM_sys_Cd ${RUN_DIR}/$( basename ${directory} ) … … 201 209 IGCM_sys_Cd ${RUN_DIR} 202 210 # Clean Up 203 IGCM_sys_RshArchive rm -rf ${directory} 211 if [ ${RebuildFromArchive} = true ] ; then 212 IGCM_sys_RshArchive rm -rf ${directory} 213 else 214 IGCM_sys_Rm -rf ${directory} 215 fi 204 216 done 205 217 206 # Clean RUN_DIR_PATH (necessary for cesium )218 # Clean RUN_DIR_PATH (necessary for cesium only) 207 219 IGCM_sys_RmRunDir -Rf ${RUN_DIR_PATH} -
trunk/libIGCM/AA_rebuild_fromWorkdir
r229 r236 22 22 #-Q- sx8brodie # pour recevoir un mail en cas de depassement du temps Elapsed (ou autre pb.) 23 23 #-Q- sx8brodie # @ notification = error 24 #-Q- sx8brodie # @ environment = $DEBUG_debug ; $MODIPSL ; $libIGCM ; $libIGCM_SX ; $SUBMIT_DIR ; $REBUILD_DIR ; $RebuildFromArchive ; $POST_DIR ; $DateBegin ; $PeriodDateBegin ; $PeriodDateEnd ; $NbRebuildDir ; $StandAlone ; $RESOL_ATM ; $RESOL_OCE ; $RESOL_ICE ; $RESOL_MBG ; $RESOL_SRF ; $RESOL_SBG ; $MASTER ; $ config_UserChoices_JobName ; $R_SAVE24 #-Q- sx8brodie # @ environment = $DEBUG_debug ; $MODIPSL ; $libIGCM ; $libIGCM_SX ; $SUBMIT_DIR ; $REBUILD_DIR ; $RebuildFromArchive ; $POST_DIR ; $DateBegin ; $PeriodDateBegin ; $PeriodDateEnd ; $NbRebuildDir ; $StandAlone ; $RESOL_ATM ; $RESOL_OCE ; $RESOL_ICE ; $RESOL_MBG ; $RESOL_SRF ; $RESOL_SBG ; $MASTER ; $RebuildFromArchive ; $config_UserChoices_JobName ; $R_SAVE 25 25 #-Q- sx8brodie # @ queue 26 26 #-Q- aix6 #!/bin/ksh … … 39 39 #-Q- aix6 # pour recevoir un mail en cas de depassement du temps Elapsed (ou autre pb.) 40 40 #-Q- aix6 # @ notification = error 41 #-Q- aix6 # @ environment = $DEBUG_debug ; $MODIPSL ; $libIGCM ; $libIGCM_SX ; $SUBMIT_DIR ; $REBUILD_DIR ; $RebuildFromArchive ; $POST_DIR ; $DateBegin ; $PeriodDateBegin ; $PeriodDateEnd ; $NbRebuildDir ; $StandAlone ; $RESOL_ATM ; $RESOL_OCE ; $RESOL_ICE ; $RESOL_MBG ; $RESOL_SRF ; $RESOL_SBG ; $MASTER ; $ config_UserChoices_JobName ; $R_SAVE41 #-Q- aix6 # @ environment = $DEBUG_debug ; $MODIPSL ; $libIGCM ; $libIGCM_SX ; $SUBMIT_DIR ; $REBUILD_DIR ; $RebuildFromArchive ; $POST_DIR ; $DateBegin ; $PeriodDateBegin ; $PeriodDateEnd ; $NbRebuildDir ; $StandAlone ; $RESOL_ATM ; $RESOL_OCE ; $RESOL_ICE ; $RESOL_MBG ; $RESOL_SRF ; $RESOL_SBG ; $MASTER ; $RebuildFromArchive ; $config_UserChoices_JobName ; $R_SAVE 42 42 #-Q- aix6 # @ queue 43 43 #-Q- sx8mercure #!/bin/ksh … … 181 181 #set -vx 182 182 183 #RUN_DIR=${REBUILD_DIR}184 183 RUN_DIR=${RUN_DIR_PATH} 185 184 IGCM_sys_MkdirWork ${RUN_DIR} 186 185 IGCM_sys_Cd ${RUN_DIR} 187 186 # 188 ListAllRebuildDir=$( IGCM_sys_RshMaster ls -d ${REBUILD_DIR}/REBUILD_* | grep -B $(( ${NbRebuildDir} -1 )) ${LastPeriodForRebuild} ) 187 if [ ${RebuildFromArchive} = true ] ; then 188 ListAllRebuildDir=$( IGCM_sys_RshArchive ls -d ${REBUILD_DIR}/REBUILD_* | grep -B $(( ${NbRebuildDir} -1 )) ${LastPeriodForRebuild} ) 189 else 190 ListAllRebuildDir=$( IGCM_sys_RshMaster ls -d ${REBUILD_DIR}/REBUILD_* | grep -B $(( ${NbRebuildDir} -1 )) ${LastPeriodForRebuild} ) 191 fi 189 192 # 193 190 194 for directory in ${ListAllRebuildDir} ; do 191 195 # 192 IGCM_sys_Get_Master ${directory} ${RUN_DIR} 196 if [ ${RebuildFromArchive} = true ] ; then 197 IGCM_sys_Get_Dir ${directory} ${RUN_DIR} 198 else 199 IGCM_sys_Get_Master ${directory} ${RUN_DIR} 200 fi 193 201 # 194 202 IGCM_sys_Cd ${RUN_DIR}/$( basename ${directory} ) … … 202 210 IGCM_sys_Cd ${RUN_DIR} 203 211 # Clean Up 204 IGCM_sys_Rm -rf ${directory} 212 if [ ${RebuildFromArchive} = true ] ; then 213 IGCM_sys_RshArchive rm -rf ${directory} 214 else 215 IGCM_sys_Rm -rf ${directory} 216 fi 205 217 done 206 218 -
trunk/libIGCM/libIGCM_comp/libIGCM_comp.ksh
r168 r236 163 163 TimeSeriesChunck3D=false 164 164 fi 165 # Seasonal case 166 IGCM_card_DefineArrayFromOption ${card} ${flag_post} Seasonal 167 if [ $( eval echo \${${compname}_${flag_post}_Seasonal} ) = ON ] ; then 168 Seasonal=true 169 fi 165 170 fi 166 171 (( i=i+3 )) … … 596 601 eval ExeNameIn=\${config_Executable_${comp}[0]} 597 602 eval ExeNameOut=\${config_Executable_${comp}[1]} 603 604 # If missing executable then stop! 605 if [ ! X${ExeNameIn} = X ] && [ ! -f ${R_EXE}/${ExeNameIn} ] ; then 606 IGCM_debug_Exit "IGCM_comp_Update missing executable ${ExeNameIn}" 607 fi 598 608 599 609 if [ ${Period} -eq 1 ] && [ -f ${R_EXE}/${ExeNameIn} ] ; then -
trunk/libIGCM/libIGCM_post/libIGCM_post.ksh
r210 r236 165 165 typeset POST NbDays PeriodEndJul PostEndJul LengthDays 166 166 POST=false 167 167 # 168 # ONLY IF SOMETHING NEEDS TO BE DONE (EATHER TIME SERIES OR SEASONAL) COMPUTE THE MODULOS 169 # 170 if ( [ X${TimeSeries} = Xtrue ] || [ X${TimeSeries2D} = Xtrue ] || [ X${TimeSeries3D} = Xtrue ] ) ; then 171 list_post=TimeSeriesFrequency 172 fi 173 # 174 if [ X${Seasonal} = Xtrue ] ; then 175 list_post=${list_post} SeasonalFrequency 176 fi 177 # 168 178 # READ TIME SERIES OR SEASONAL FREQUENCY 169 # AND TURN ON THE FLAG WHEN MODULO IS ZERO 170 for post_freq in TimeSeriesFrequency SeasonalFrequency ; do 179 # AND TURN ON THE SUBMISSION FLAG WHEN MODULO IS ZERO 180 # 181 for post_freq in ${list_post} ; do 171 182 # 172 183 # Initialize … … 196 207 fi 197 208 # 198 # For each componant select determine which files need post-processing 199 # 200 for comp in ${config_ListOfComponents[*]} ; do 201 # 202 #echo "-----" 203 eval compname=\${config_ListOfComponents_${comp}[0]} > /dev/null 2>&1 204 ListFilesName=${compname}_OutputFiles_List 205 eval FileName0=\${${ListFilesName}[0]} > /dev/null 2>&1 206 # 207 if [ X${FileName0} != X${NULL_STR} ] ; then 208 # 209 #IGCM_debug_Print 1 "Component : ${compname}" 210 # 211 # INITIALISATION 212 # 213 eval NbFiles=\${#${ListFilesName}[@]} > /dev/null 2>&1 214 typeset i=0 215 # 216 until [ $i -eq $NbFiles ]; do 217 # 218 eval file_in_=\${${ListFilesName}[$i]} > /dev/null 2>&1 219 eval file_in=${file_in_} 220 let $(( i_ = i+2 )) 221 eval flag_post_=\${${ListFilesName}[$i_]} > /dev/null 2>&1 222 eval flag_post=${flag_post_} 223 # 224 if [ X${flag_post} != XNONE ] ; then 225 # 226 case ${config_Post_post_freq} in 227 *y|*Y) 228 PeriodYear=$( echo ${config_Post_post_freq} | sed -e "s/[yY]//" ) 229 # 230 case ${config_UserChoices_PeriodLength} in 231 *Y|*y) 232 PeriodPost=$( echo ${config_UserChoices_PeriodLength} | sed -e "s/[yY]//" ) 233 if [ ${PeriodPost} -le ${PeriodYear} ] ; then 234 if [ $( expr $(( ${CumulPeriod} * ${PeriodPost} - ${PeriodOffset} )) % ${PeriodYear} ) -eq 0 ] ; then 235 [ $(( ${CumulPeriod} * ${PeriodPost} - ${PeriodOffset} )) -ne 0 ] && eval ${post_freq}=true 236 [ $(( ${CumulPeriod} * ${PeriodPost} - ${PeriodOffset} )) -ne 0 ] && POST=true 237 fi 238 else 239 IGCM_debug_Print 3 "PeriodLength frequency ${config_UserChoices_PeriodLength} not compatbile with" 240 IGCM_debug_Print 3 "${flag_post} frequency : ${config_Post_post_freq} " 241 fi ;; 242 *M|*m) 243 PeriodPost=$( echo ${config_UserChoices_PeriodLength} | sed -e "s/[mM]//" ) 244 if [ ${PeriodPost} -le $(( ${PeriodYear} * 12 )) ] ; then 245 if [ $( expr $(( ${CumulPeriod} * ${PeriodPost} - ${PeriodOffset} * 12 )) % $(( ${PeriodYear} * 12 )) ) -eq 0 ] ; then 246 [ $(( ${CumulPeriod} * ${PeriodPost} - ${PeriodOffset} * 12 )) -ne 0 ] && eval ${post_freq}=true 247 [ $(( ${CumulPeriod} * ${PeriodPost} - ${PeriodOffset} * 12 )) -ne 0 ] && POST=true 248 fi 249 else 250 IGCM_debug_Print 3 "PeriodLength frequency ${config_UserChoices_PeriodLength} not compatbile with" 251 IGCM_debug_Print 3 "${flag_post} frequency : ${config_Post_post_freq} " 252 fi ;; 253 *D|*d) 254 PeriodPost=$( echo ${config_UserChoices_PeriodLength} | sed -e "s/[dD]//" ) 255 NbDays=$( IGCM_date_DaysInYear ${year} ) 256 if [ ${config_UserChoices_CalendarType} = 360d ] | [ ${config_UserChoices_CalendarType} = noleap ] ; then 257 if [ ${PeriodPost} -le $(( ${PeriodYear} * ${NbDays} )) ] ; then 258 if [ $( expr $(( ${CumulPeriod} - ( ${PeriodOffset} * ${NbDays} / ${PeriodPost} ) )) % \ 259 $(( ${NbDays} * ${PeriodYear} / ${PeriodPost} )) ) -eq 0 ] ; then 260 [ $(( ${CumulPeriod} - ( ${PeriodOffset} * ${NbDays} / ${PeriodPost} ) )) -ne 0 ] && eval ${post_freq}=true 261 [ $(( ${CumulPeriod} - ( ${PeriodOffset} * ${NbDays} / ${PeriodPost} ) )) -ne 0 ] POST=true 262 fi 263 else 264 IGCM_debug_Print 3 "PeriodLength frequency ${config_UserChoices_PeriodLength} not compatbile with" 265 IGCM_debug_Print 3 "${flag_post} frequency : ${config_Post_post_freq} " 266 fi 267 else 209 case ${config_Post_post_freq} in 210 *y|*Y) 211 PeriodYear=$( echo ${config_Post_post_freq} | sed -e "s/[yY]//" ) 212 # 213 case ${config_UserChoices_PeriodLength} in 214 *Y|*y) 215 PeriodPost=$( echo ${config_UserChoices_PeriodLength} | sed -e "s/[yY]//" ) 216 if [ ${PeriodPost} -le ${PeriodYear} ] ; then 217 if [ $( expr $(( ${CumulPeriod} * ${PeriodPost} - ${PeriodOffset} )) % ${PeriodYear} ) -eq 0 ] ; then 218 [ $(( ${CumulPeriod} * ${PeriodPost} - ${PeriodOffset} )) -ne 0 ] && eval ${post_freq}=true 219 [ $(( ${CumulPeriod} * ${PeriodPost} - ${PeriodOffset} )) -ne 0 ] && POST=true 220 fi 221 else 222 IGCM_debug_Print 3 "PeriodLength frequency ${config_UserChoices_PeriodLength} not compatbile with" 223 IGCM_debug_Print 3 "${flag_post} frequency : ${config_Post_post_freq} " 224 fi ;; 225 *M|*m) 226 PeriodPost=$( echo ${config_UserChoices_PeriodLength} | sed -e "s/[mM]//" ) 227 if [ ${PeriodPost} -le $(( ${PeriodYear} * 12 )) ] ; then 228 if [ $( expr $(( ${CumulPeriod} * ${PeriodPost} - ${PeriodOffset} * 12 )) % $(( ${PeriodYear} * 12 )) ) -eq 0 ] ; then 229 [ $(( ${CumulPeriod} * ${PeriodPost} - ${PeriodOffset} * 12 )) -ne 0 ] && eval ${post_freq}=true 230 [ $(( ${CumulPeriod} * ${PeriodPost} - ${PeriodOffset} * 12 )) -ne 0 ] && POST=true 231 fi 232 else 233 IGCM_debug_Print 3 "PeriodLength frequency ${config_UserChoices_PeriodLength} not compatbile with" 234 IGCM_debug_Print 3 "${flag_post} frequency : ${config_Post_post_freq} " 235 fi ;; 236 *D|*d) 237 PeriodPost=$( echo ${config_UserChoices_PeriodLength} | sed -e "s/[dD]//" ) 238 NbDays=$( IGCM_date_DaysInYear ${year} ) 239 if [ ${config_UserChoices_CalendarType} = 360d ] | [ ${config_UserChoices_CalendarType} = noleap ] ; then 240 if [ ${PeriodPost} -le $(( ${PeriodYear} * ${NbDays} )) ] ; then 241 if [ $( expr $(( ${CumulPeriod} - ( ${PeriodOffset} * ${NbDays} / ${PeriodPost} ) )) % \ 242 $(( ${NbDays} * ${PeriodYear} / ${PeriodPost} )) ) -eq 0 ] ; then 243 [ $(( ${CumulPeriod} - ( ${PeriodOffset} * ${NbDays} / ${PeriodPost} ) )) -ne 0 ] && eval ${post_freq}=true 244 [ $(( ${CumulPeriod} - ( ${PeriodOffset} * ${NbDays} / ${PeriodPost} ) )) -ne 0 ] POST=true 245 fi 246 else 247 IGCM_debug_Print 3 "PeriodLength frequency ${config_UserChoices_PeriodLength} not compatbile with" 248 IGCM_debug_Print 3 "${flag_post} frequency : ${config_Post_post_freq} " 249 fi 250 else 268 251 # if [ ${PeriodYear} -eq 1 ] ; then 269 252 # PeriodEndJul=$( IGCM_date_ConvertGregorianDateToJulian ${PeriodDateEnd} ) … … 276 259 # fi 277 260 # else 278 279 280 261 IGCM_debug_Print 3 "For ${post_freq} with leap calendar, for ${comp} and ${file_in} :" 262 IGCM_debug_Print 3 "We have a daily PeriodLength frequency and RebuildFrequency=${PeriodYear}Y." 263 IGCM_debug_Print 3 "No post-treatment. Case not properly handle at this moment." 281 264 # fi 282 fi;; 283 esac ;; 284 *M|*m) 285 PeriodMonth=$( echo ${config_Post_post_freq} | sed -e "s/[mM]//" ) 286 case ${config_UserChoices_PeriodLength} in 287 *Y|*y) 288 IGCM_debug_Print 3 "PeriodLength frequency ${config_UserChoices_PeriodLength} not compatbile with" 289 IGCM_debug_Print 3 "${flag_post} frequency : ${config_Post_post_freq} " ;; 290 *M|*m) 291 PeriodPost=$( echo ${config_UserChoices_PeriodLength} | sed -e "s/[mM]//" ) 292 if [ ${PeriodPost} -le ${PeriodMonth} ] ; then 293 if [ $( expr $(( ${CumulPeriod} * ${PeriodPost} - ${PeriodOffset} )) % ${PeriodMonth} ) -eq 0 ] ; then 294 [ $(( ${CumulPeriod} * ${PeriodPost} - ${PeriodOffset} )) -ne 0 ] && eval ${post_freq}=true 295 [ $(( ${CumulPeriod} * ${PeriodPost} - ${PeriodOffset} )) -ne 0 ] && POST=true 296 fi 297 else 298 IGCM_debug_Print 3 "PeriodLength frequency ${config_UserChoices_PeriodLength} not compatbile with" 299 IGCM_debug_Print 3 "${flag_post} frequency : ${config_Post_post_freq} " 300 fi;; 301 *D|*d) 302 IGCM_debug_Print 3 "PeriodLength frequency ${config_UserChoices_PeriodLength} not compatbile with" 303 IGCM_debug_Print 3 "${flag_post} frequency : ${config_Post_post_freq} " ;; 304 esac ;; 305 *D|*d) 306 PeriodDay=$( echo ${config_Post_post_freq} | sed -e "s/[dD]//" ) 307 case ${config_UserChoices_PeriodLength} in 308 *Y|*y) 309 IGCM_debug_Print 3 "PeriodLength frequency ${config_UserChoices_PeriodLength} not compatbile with" 310 IGCM_debug_Print 3 "${flag_post} frequency : ${config_Post_post_freq} " ;; 311 *M|*m) 312 IGCM_debug_Print 3 "PeriodLength frequency ${config_UserChoices_PeriodLength} not compatbile with" 313 IGCM_debug_Print 3 "${flag_post} frequency : ${config_Post_post_freq} " ;; 314 *D|*d) 315 PeriodPost=$( echo ${config_UserChoices_PeriodLength} | sed -e "s/[dD]//" ) 316 if [ ${PeriodPost} -le ${PeriodDay} ] ; then 317 if [ $( expr $(( ${CumulPeriod} * ${PeriodPost} - ${PeriodOffset} )) % ${PeriodDay} ) -eq 0 ] ; then 318 [ $(( ${CumulPeriod} * ${PeriodPost} - ${PeriodOffset} )) -ne 0 ] && eval ${post_freq}=true 319 [ $(( ${CumulPeriod} * ${PeriodPost} - ${PeriodOffset} )) -ne 0 ] && POST=true 320 fi 321 else 322 IGCM_debug_Print 3 "PeriodLength frequency ${config_UserChoices_PeriodLength} not compatbile with" 323 IGCM_debug_Print 3 "${flag_post} frequency : ${config_Post_post_freq} " 324 fi;; 325 esac ;; 326 NONE|none) 327 ;; 328 *) 329 IGCM_debug_Print 3 "KeyWord not allowed for ${post_freq} in config.card" 330 ;; 331 esac 332 fi 333 let $(( i=i+3 )) 334 done 335 fi 336 done 265 fi;; 266 esac ;; 267 *M|*m) 268 PeriodMonth=$( echo ${config_Post_post_freq} | sed -e "s/[mM]//" ) 269 case ${config_UserChoices_PeriodLength} in 270 *Y|*y) 271 IGCM_debug_Print 3 "PeriodLength frequency ${config_UserChoices_PeriodLength} not compatbile with" 272 IGCM_debug_Print 3 "${flag_post} frequency : ${config_Post_post_freq} " ;; 273 *M|*m) 274 PeriodPost=$( echo ${config_UserChoices_PeriodLength} | sed -e "s/[mM]//" ) 275 if [ ${PeriodPost} -le ${PeriodMonth} ] ; then 276 if [ $( expr $(( ${CumulPeriod} * ${PeriodPost} - ${PeriodOffset} )) % ${PeriodMonth} ) -eq 0 ] ; then 277 [ $(( ${CumulPeriod} * ${PeriodPost} - ${PeriodOffset} )) -ne 0 ] && eval ${post_freq}=true 278 [ $(( ${CumulPeriod} * ${PeriodPost} - ${PeriodOffset} )) -ne 0 ] && POST=true 279 fi 280 else 281 IGCM_debug_Print 3 "PeriodLength frequency ${config_UserChoices_PeriodLength} not compatbile with" 282 IGCM_debug_Print 3 "${flag_post} frequency : ${config_Post_post_freq} " 283 fi;; 284 *D|*d) 285 IGCM_debug_Print 3 "PeriodLength frequency ${config_UserChoices_PeriodLength} not compatbile with" 286 IGCM_debug_Print 3 "${flag_post} frequency : ${config_Post_post_freq} " ;; 287 esac ;; 288 *D|*d) 289 PeriodDay=$( echo ${config_Post_post_freq} | sed -e "s/[dD]//" ) 290 case ${config_UserChoices_PeriodLength} in 291 *Y|*y) 292 IGCM_debug_Print 3 "PeriodLength frequency ${config_UserChoices_PeriodLength} not compatbile with" 293 IGCM_debug_Print 3 "${flag_post} frequency : ${config_Post_post_freq} " ;; 294 *M|*m) 295 IGCM_debug_Print 3 "PeriodLength frequency ${config_UserChoices_PeriodLength} not compatbile with" 296 IGCM_debug_Print 3 "${flag_post} frequency : ${config_Post_post_freq} " ;; 297 *D|*d) 298 PeriodPost=$( echo ${config_UserChoices_PeriodLength} | sed -e "s/[dD]//" ) 299 if [ ${PeriodPost} -le ${PeriodDay} ] ; then 300 if [ $( expr $(( ${CumulPeriod} * ${PeriodPost} - ${PeriodOffset} )) % ${PeriodDay} ) -eq 0 ] ; then 301 [ $(( ${CumulPeriod} * ${PeriodPost} - ${PeriodOffset} )) -ne 0 ] && eval ${post_freq}=true 302 [ $(( ${CumulPeriod} * ${PeriodPost} - ${PeriodOffset} )) -ne 0 ] && POST=true 303 fi 304 else 305 IGCM_debug_Print 3 "PeriodLength frequency ${config_UserChoices_PeriodLength} not compatbile with" 306 IGCM_debug_Print 3 "${flag_post} frequency : ${config_Post_post_freq} " 307 fi;; 308 esac ;; 309 NONE|none) 310 ;; 311 *) 312 IGCM_debug_Print 3 "KeyWord not allowed for ${post_freq} in config.card" 313 ;; 314 esac 337 315 done 338 316 # … … 662 640 # 663 641 typeset listVarEnv 664 listVarEnv="DEBUG_debug,MODIPSL,libIGCM,libIGCM_SX,SUBMIT_DIR,REBUILD_DIR,POST_DIR,MASTER, DateBegin,PeriodDateBegin,PeriodDateEnd,NbRebuildDir,StandAlone,RESOL_ATM,RESOL_OCE,RESOL_ICE,RESOL_MBG,RESOL_SRF,RESOL_BIOS,config_UserChoices_JobName,R_SAVE"642 listVarEnv="DEBUG_debug,MODIPSL,libIGCM,libIGCM_SX,SUBMIT_DIR,REBUILD_DIR,POST_DIR,MASTER,RebuildFromArchive,DateBegin,PeriodDateBegin,PeriodDateEnd,NbRebuildDir,StandAlone,RESOL_ATM,RESOL_OCE,RESOL_ICE,RESOL_MBG,RESOL_SRF,RESOL_BIOS,config_UserChoices_JobName,R_SAVE" 665 643 IGCM_sys_RshPost <<-EOF 666 644 export DEBUG_debug=${DEBUG_debug} … … 672 650 export POST_DIR=${POST_DIR} 673 651 export MASTER=${MASTER} 652 export RebuildFromArchive=${config_Post_RebuildFromArchive} 674 653 export DateBegin=${DateBegin} 675 654 export PeriodDateBegin=${PeriodDateBegin} … … 698 677 # 699 678 typeset listVarEnv 700 listVarEnv="DEBUG_debug,MODIPSL,libIGCM,libIGCM_SX,SUBMIT_DIR,REBUILD_DIR,POST_DIR,MASTER, DateBegin,PeriodDateBegin,PeriodDateEnd,NbRebuildDir,StandAlone,RESOL_ATM,RESOL_OCE,RESOL_ICE,RESOL_MBG,RESOL_SRF,RESOL_BIOS,config_UserChoices_JobName,R_SAVE"679 listVarEnv="DEBUG_debug,MODIPSL,libIGCM,libIGCM_SX,SUBMIT_DIR,REBUILD_DIR,POST_DIR,MASTER,RebuildFromArchive,DateBegin,PeriodDateBegin,PeriodDateEnd,NbRebuildDir,StandAlone,RESOL_ATM,RESOL_OCE,RESOL_ICE,RESOL_MBG,RESOL_SRF,RESOL_BIOS,config_UserChoices_JobName,R_SAVE" 701 680 IGCM_sys_RshPost <<-EOF 702 681 export DEBUG_debug=${DEBUG_debug} … … 708 687 export POST_DIR=${POST_DIR} 709 688 export MASTER=${MASTER} 689 export RebuildFromArchive=${config_Post_RebuildFromArchive} 710 690 export DateBegin=${DateBegin} 711 691 export PeriodDateBegin=${PeriodDateBegin}
Note: See TracChangeset
for help on using the changeset viewer.