Changeset 128 for trunk/libIGCM/libIGCM_config
- Timestamp:
- 06/04/09 09:08:25 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/libIGCM/libIGCM_config/libIGCM_config.ksh
r124 r128 19 19 IGCM_debug_PushStack "IGCM_config_Initialize" 20 20 21 echo22 # Where do we run ?23 uname -a24 25 21 # Debug Print : 26 22 echo … … 198 194 R_OUT_EXE=${R_SAVE}/Exe 199 195 196 #==================================================== 197 # Experience type : DEB(ug), DEV(elopment), RUN 198 if [ X${JobType} != XRUN ] ; then 199 echo 200 echo "====================================================" 201 echo "libIGCM JOB is NOT in RUN type mode." 202 echo "!! OUTPUT files will NOT be PROTECTED !!" 203 echo "Be carefull : you can ERASE the result of this job !" 204 205 case ${JobType} in 206 DEB) 207 echo "DEBUG mode : activation of 'set -vx' mode.";; 208 DEV) 209 echo "DEVelopment mode : no protection for output files." 210 ;; 211 esac 212 echo "====================================================" 213 echo 214 fi 215 200 216 IGCM_debug_PopStack "IGCM_config_Initialize" 201 217 } … … 206 222 IGCM_debug_PushStack "IGCM_config_Analyse_PeriodLength" 207 223 208 echo "config_UserChoices_PeriodLength : " ${config_UserChoices_PeriodLength} ${month} ${year}209 210 224 typeset i 211 225 … … 213 227 case ${config_UserChoices_PeriodLength} in 214 228 *Y|*y) 215 #MM a enlever apres les tests 216 echo " ${config_UserChoices_PeriodLength} | gawk -F '[yY]' " '{print $1}' 217 PeriodLengthInYears=$( echo ${config_UserChoices_PeriodLength} | gawk -F '[yY]' '{print $1}' ) 229 PeriodLengthInYears=$( echo ${config_UserChoices_PeriodLength} | sed -e 's/[yY]//' ) 218 230 IGCM_debug_Print 1 "Number of years for PeriodLength : ${PeriodLengthInYears}" 219 231 PeriodLengthInDays=0 … … 225 237 ;; 226 238 *M|*m) 227 PeriodLengthInMonths=$( echo ${config_UserChoices_PeriodLength} | gawk -F '[mM]' '{print $1}' )239 PeriodLengthInMonths=$( echo ${config_UserChoices_PeriodLength} | sed -e 's/[mM]//' ) 228 240 IGCM_debug_Print 1 "Number of months for PeriodLength : ${PeriodLengthInMonths}" 229 241 PeriodLengthInDays=0 … … 239 251 ;; 240 252 *D|*d) 241 PeriodLengthInDays=$( echo ${config_UserChoices_PeriodLength} | gawk -F '[dD]' '{print $1}' ) ;; 253 PeriodLengthInMonths=0 254 PeriodLengthInDays=$( echo ${config_UserChoices_PeriodLength} | sed -e 's/[dD]//' );; 242 255 *) 243 256 IGCM_debug_Exit "IGCM_config_Analyse_PeriodLength " ${config_UserChoices_PeriodLength} " invalid period length : choose in *Y, *M, *D." … … 371 384 372 385 # Test if the same run as already been saved : 373 if [ ${DRYRUN} -le 0 ] ; then 386 if [ X${JobType} = XRUN ] ; then 387 if [ ${DRYRUN} -le 0 ] ; then 388 if ( IGCM_sys_TestFileArchive ${R_OUT_KSH}/${PREFIX}_${Exe_Output} ) ; then 389 IGCM_debug_Exit "IGCM_config_PeriodStart" "RErun an old job." 390 IGCM_debug_Print 1 "Because of readonly permissions, you can't RErun a job when saved files" 391 IGCM_debug_Print 1 " are still in the ARCHIVE directory. You must deleted those files, or " 392 IGCM_debug_Print 1 " the whole ${R_SAVE} tree." 393 IGCM_debug_Verif_Exit 394 fi 395 fi 396 else 374 397 if ( IGCM_sys_TestFileArchive ${R_OUT_KSH}/${PREFIX}_${Exe_Output} ) ; then 375 IGCM_debug_Exit "IGCM_config_PeriodStart" "RErun an old job." 376 IGCM_debug_Print 1 "Because of readonly permissions, you can't RErun a job when saved files" 377 IGCM_debug_Print 1 " are still in the ARCHIVE directory. You must deleted those files, or " 378 IGCM_debug_Print 1 " the whole ${R_SAVE} tree." 379 IGCM_debug_Verif_Exit 380 fi 381 fi 398 IGCM_debug_Print 1 "IGCM_config_PeriodStart" "RErun an old job. DEBUG of DEV mode." 399 fi 400 fi 401 382 402 IGCM_debug_PopStack "IGCM_config_PeriodStart" 383 403 }
Note: See TracChangeset
for help on using the changeset viewer.