[2] | 1 | #!/bin/ksh |
---|
| 2 | |
---|
| 3 | #************************************************************** |
---|
| 4 | # Author: Sebastien Denvil, Martial Mancip |
---|
| 5 | # Contact: Sebastien.Denvil@ipsl.jussieu.fr Martial.Mancip@ipsl.jussieu.fr |
---|
[4] | 6 | # $Date$ |
---|
[5] | 7 | # $Author$ |
---|
| 8 | # $Revision$ |
---|
[2] | 9 | # IPSL (2006) |
---|
| 10 | # This software is governed by the CeCILL licence see libIGCM/libIGCM_CeCILL.LIC |
---|
| 11 | # History: |
---|
| 12 | # Modification: |
---|
| 13 | # |
---|
| 14 | #************************************************************** |
---|
| 15 | |
---|
| 16 | #=================================== |
---|
| 17 | function IGCM_config_Initialize |
---|
| 18 | { |
---|
| 19 | IGCM_debug_PushStack "IGCM_config_Initialize" |
---|
| 20 | |
---|
| 21 | # Debug Print : |
---|
| 22 | echo |
---|
| 23 | IGCM_debug_Print 1 "IGCM_config_Initialize :" |
---|
| 24 | echo |
---|
| 25 | |
---|
| 26 | # Test modipsl tree existence. |
---|
| 27 | IGCM_sys_TestDir ${MODIPSL} |
---|
[67] | 28 | [ $? != 0 ] && IGCM_debug_Exit "IGCM_sys_TestDirArchive" |
---|
[2] | 29 | IGCM_sys_TestDir ${libIGCM} |
---|
[67] | 30 | [ $? != 0 ] && IGCM_debug_Exit "IGCM_sys_TestDirArchive" |
---|
[2] | 31 | IGCM_sys_TestDir ${R_EXE} |
---|
[67] | 32 | [ $? != 0 ] && IGCM_debug_Exit "IGCM_sys_TestDirArchive" |
---|
[2] | 33 | IGCM_sys_TestDir ${SUBMIT_DIR} |
---|
[67] | 34 | [ $? != 0 ] && IGCM_debug_Exit "IGCM_sys_TestDirArchive" |
---|
[2] | 35 | |
---|
[144] | 36 | if ( $DEBUG_debug ) ; then |
---|
| 37 | echo "Keep trace of inital SUBMIT_DIR : " |
---|
| 38 | ls -lta ${SUBMIT_DIR} |
---|
| 39 | fi |
---|
| 40 | |
---|
[2] | 41 | #================================== |
---|
| 42 | |
---|
| 43 | typeset option auxprint CompatibilityTag |
---|
| 44 | # Read libIGCM compatibility version in config.card |
---|
| 45 | IGCM_card_DefineVariableFromOption ${SUBMIT_DIR}/config.card Compatibility libIGCM |
---|
| 46 | eval CompatibilityTag=${config_Compatibility_libIGCM} > /dev/null 2>&1 |
---|
| 47 | |
---|
| 48 | if [ ! "${CompatibilityTag}" = "${libIGCM_CurrentTag}" ] ; then |
---|
| 49 | IGCM_debug_Exit "config.card is not compatible with libIGCM version ${libIGCM_CurrentTag} see libIGCM FAQ http://wiki.ipsl.jussieu.fr/wiki_ipsl/IGCMG/libIGCM/DocUtilisateur/FAQ ." |
---|
| 50 | fi |
---|
| 51 | |
---|
| 52 | #================================== |
---|
| 53 | IGCM_card_DefineArrayFromSection ${SUBMIT_DIR}/config.card UserChoices |
---|
| 54 | |
---|
| 55 | for option in ${config_UserChoices[*]} ; do |
---|
| 56 | IGCM_card_DefineVariableFromOption ${SUBMIT_DIR}/config.card UserChoices ${option} |
---|
| 57 | done |
---|
| 58 | |
---|
| 59 | IGCM_debug_Print 1 "DefineArrayFromOption : config_UserChoices" |
---|
| 60 | IGCM_debug_PrintVariables 3 config_UserChoices_JobName |
---|
[144] | 61 | if [ 3 -le ${Verbosity} ] ; then |
---|
| 62 | echo "--------------Debug3-->" "config_UserChoices_LongName=" |
---|
| 63 | echo "--------------Debug3-->" \"${config_UserChoices_LongName}\" |
---|
| 64 | fi |
---|
[2] | 65 | IGCM_debug_PrintVariables 3 config_UserChoices_TagName |
---|
| 66 | IGCM_debug_PrintVariables 3 config_UserChoices_CalendarType |
---|
| 67 | IGCM_debug_PrintVariables 3 config_UserChoices_DateBegin |
---|
| 68 | IGCM_debug_PrintVariables 3 config_UserChoices_DateEnd |
---|
| 69 | IGCM_debug_PrintVariables 3 config_UserChoices_PeriodLength |
---|
| 70 | |
---|
| 71 | #================================== |
---|
| 72 | |
---|
| 73 | IGCM_card_DefineArrayFromSection ${SUBMIT_DIR}/config.card ListOfComponents |
---|
| 74 | |
---|
| 75 | echo |
---|
| 76 | IGCM_debug_Print 1 "DefineArrayFromSection : ListOfComponents" |
---|
| 77 | IGCM_debug_Print 3 ${config_ListOfComponents[*]} |
---|
| 78 | echo |
---|
| 79 | |
---|
| 80 | NbComponents=${#config_ListOfComponents[*]} |
---|
| 81 | |
---|
| 82 | #================================== |
---|
| 83 | # Define principal executable |
---|
| 84 | |
---|
| 85 | IGCM_card_DefineArrayFromSection ${SUBMIT_DIR}/config.card Executable |
---|
| 86 | IGCM_card_DefineVariableFromOption ${SUBMIT_DIR}/config.card Executable Name |
---|
| 87 | |
---|
| 88 | #================================== |
---|
| 89 | # Define Outputs Name |
---|
| 90 | IGCM_debug_Print 1 "Define Script_Output_Prefix and Exe_Output" |
---|
| 91 | eval Script_Output_Prefix=${config_UserChoices_Script_Output_Prefix:='Script_Output'} |
---|
| 92 | IGCM_debug_Print 3 "Script_Output_Prefix = ${Script_Output_Prefix}" |
---|
| 93 | eval Exe_Output=out_${config_Executable_Name} |
---|
| 94 | IGCM_debug_Print 3 "Exe_Output = ${Exe_Output}" |
---|
| 95 | |
---|
| 96 | #================================== |
---|
| 97 | |
---|
| 98 | #===================================================================# |
---|
| 99 | # Prepare variables available for ${COMP}.card and ${COMP}.driver # |
---|
| 100 | # But available to any son functions # |
---|
| 101 | #===================================================================# |
---|
| 102 | |
---|
| 103 | # Convert yyyy-mm-dd date to gregorian yyyymmdd |
---|
| 104 | DateBegin=$( IGCM_date_ConvertFormatToGregorian ${config_UserChoices_DateBegin} ) |
---|
| 105 | DateEnd=$( IGCM_date_ConvertFormatToGregorian ${config_UserChoices_DateEnd} ) |
---|
| 106 | |
---|
| 107 | # Period Length In Days between DateBegin and DateEnd |
---|
| 108 | (( ExperienceLengthInDays=$( IGCM_date_DaysBetweenGregorianDate ${DateEnd} ${DateBegin} ) + 1 )) |
---|
| 109 | if [ ${ExperienceLengthInDays} -lt 0 ] ; then |
---|
| 110 | IGCM_debug_Print 1 "Problem with dates in config.card : ${DateEnd} < ${DateBegin} ! You must check that." |
---|
| 111 | IGCM_debug_Exit "IGCM_config_Initialize" " Wrong Dates." |
---|
| 112 | IGCM_debug_Verif_Exit |
---|
| 113 | fi |
---|
| 114 | |
---|
| 115 | # Day and Year of Initial State (Given in julian format) |
---|
[146] | 116 | InitDay=$(( $( IGCM_date_ConvertGregorianDateToJulian $DateBegin ) % 1000 )) |
---|
| 117 | InitYear=$(( $( IGCM_date_ConvertGregorianDateToJulian $DateBegin ) / 1000 )) |
---|
[2] | 118 | |
---|
| 119 | #================================== |
---|
| 120 | # Restarts : Gerneral rule or local for each component ? |
---|
| 121 | IGCM_card_DefineArrayFromSection ${SUBMIT_DIR}/config.card Restarts |
---|
| 122 | |
---|
| 123 | echo |
---|
| 124 | IGCM_debug_Print 1 "DefineArrayFromOption : config_Restarts" |
---|
| 125 | |
---|
| 126 | for option in ${config_Restarts[*]} ; do |
---|
| 127 | IGCM_card_DefineVariableFromOption ${SUBMIT_DIR}/config.card Restarts ${option} |
---|
| 128 | eval auxprint=\${config_Restarts_${option}} |
---|
| 129 | IGCM_debug_Print 3 "${option} : ${auxprint}" |
---|
| 130 | done |
---|
| 131 | |
---|
| 132 | #================================================================# |
---|
| 133 | # Test and Prepare directories # |
---|
| 134 | #================================================================# |
---|
| 135 | |
---|
| 136 | # ==> 4 kinds of input files : |
---|
| 137 | # 1) R_INIT : Initial State Files (Etat0, carteveg) |
---|
| 138 | # 2) R_BC : Boundary Conditions (Forcages, lai) |
---|
| 139 | # 3) Parameters files (allready define through ${SUBMIT_DIR}) |
---|
| 140 | # 4) Restarts files (allready define in IGCM_config_Initialize) |
---|
| 141 | |
---|
| 142 | # Here we offer the possibility to redefine R_INIT, R_BC |
---|
| 143 | # and PeriodNb through config.card |
---|
| 144 | R_INIT=${config_UserChoices_R_INIT:=${R_IN}/INIT} |
---|
| 145 | echo |
---|
| 146 | IGCM_debug_Print 1 "(Re)Define R_INIT, R_BC and PeriodNb" |
---|
| 147 | IGCM_debug_Print 3 "R_INIT=${R_INIT}" |
---|
| 148 | R_BC=${config_UserChoices_R_BC:=${R_IN}/BC} |
---|
| 149 | IGCM_debug_Print 3 "R_BC=${R_BC}" |
---|
| 150 | PeriodNb=${config_UserChoices_PeriodNb:=${PeriodNb}} |
---|
| 151 | IGCM_debug_Print 3 "Loop in main Job with ${PeriodNb} period(s)" |
---|
| 152 | |
---|
| 153 | # Test Archive input/output. |
---|
| 154 | IGCM_sys_TestDirArchive ${ARCHIVE} |
---|
[67] | 155 | [ $? != 0 ] && IGCM_debug_Exit "IGCM_sys_TestDirArchive" |
---|
[2] | 156 | IGCM_sys_TestDirArchive ${R_INIT} |
---|
[67] | 157 | [ $? != 0 ] && IGCM_debug_Exit "IGCM_sys_TestDirArchive" |
---|
[2] | 158 | IGCM_sys_TestDirArchive ${R_BC} |
---|
[67] | 159 | [ $? != 0 ] && IGCM_debug_Exit "IGCM_sys_TestDirArchive" |
---|
[2] | 160 | |
---|
| 161 | #==================================================== |
---|
| 162 | #R_SAVE : Job output directory |
---|
[263] | 163 | if ( [ ! X${config_UserChoices_SpaceName} = X ] && [ ! X${config_UserChoices_ExperimentName} = X ] ) ; then |
---|
| 164 | FreeName=$( echo ${config_UserChoices_JobName} | sed 's/.*_//' ) |
---|
| 165 | R_SAVE=${R_OUT}/${config_UserChoices_TagName}/${config_UserChoices_SpaceName}/${config_UserChoices_ExperimentName}/${FreeName} |
---|
| 166 | R_DODS=${config_UserChoices_TagName}/${config_UserChoices_SpaceName}/${config_UserChoices_ExperimentName}/${FreeName} |
---|
| 167 | else |
---|
| 168 | R_SAVE=${R_OUT}/${config_UserChoices_TagName}/${config_UserChoices_JobName} |
---|
| 169 | R_DODS=${config_UserChoices_TagName}/${config_UserChoices_JobName} |
---|
| 170 | fi |
---|
| 171 | echo MAF $R_SAVE $R_DODS |
---|
[2] | 172 | |
---|
| 173 | if [ ! -f ${SUBMIT_DIR}/run.card ]; then |
---|
| 174 | IGCM_sys_MkdirArchive ${R_SAVE} |
---|
| 175 | else |
---|
| 176 | #Test state of run in run.card |
---|
| 177 | IGCM_card_DefineVariableFromOption ${SUBMIT_DIR}/run.card Configuration PeriodState |
---|
| 178 | if ( [ ${run_Configuration_PeriodState} != "Start" ] && [ ${run_Configuration_PeriodState} != "Running" ] && [ ${run_Configuration_PeriodState} != "OnQueue" ] && [ ${run_Configuration_PeriodState} != "Continue" ] ) ; then |
---|
| 179 | echo |
---|
| 180 | IGCM_debug_Print 1 "!!!! IGCM_config_Initialize Error PeriodState : " ${run_Configuration_PeriodState} "!!!!!!!!!!" |
---|
| 181 | echo |
---|
| 182 | IGCM_debug_Exit "IGCM_config_Initialize Error PeriodState : " ${run_Configuration_PeriodState} |
---|
| 183 | IGCM_debug_Verif_Exit |
---|
| 184 | fi |
---|
| 185 | fi |
---|
| 186 | IGCM_sys_TestDirArchive ${R_SAVE} |
---|
[67] | 187 | [ $? != 0 ] && IGCM_debug_Exit "IGCM_sys_TestDirArchive" |
---|
[2] | 188 | |
---|
[146] | 189 | #================================== |
---|
| 190 | # Post : |
---|
| 191 | IGCM_card_DefineArrayFromSection ${SUBMIT_DIR}/config.card Post |
---|
| 192 | |
---|
| 193 | echo |
---|
| 194 | IGCM_debug_Print 1 "DefineArrayFromOption : config_Post" |
---|
| 195 | |
---|
| 196 | for option in ${config_Post[*]} ; do |
---|
| 197 | IGCM_card_DefineVariableFromOption ${SUBMIT_DIR}/config.card Post ${option} |
---|
| 198 | eval auxprint=\${config_Post_${option}} |
---|
| 199 | IGCM_debug_Print 3 "${option} : ${auxprint}" |
---|
| 200 | done |
---|
| 201 | |
---|
[166] | 202 | #==================================================== |
---|
[146] | 203 | # Define REBUILD_DIR : where we store files needing rebuild process |
---|
| 204 | if [ X${config_Post_RebuildFromArchive} = Xtrue ] ; then |
---|
| 205 | REBUILD_DIR=${R_SAVE}/TMP |
---|
| 206 | IGCM_sys_MkdirArchive ${REBUILD_DIR} |
---|
| 207 | else |
---|
[157] | 208 | REBUILD_DIR=${BIG_DIR}/${config_UserChoices_TagName}/${config_UserChoices_JobName} |
---|
| 209 | IGCM_sys_MkdirWork ${REBUILD_DIR} |
---|
[146] | 210 | fi |
---|
| 211 | |
---|
[2] | 212 | #==================================================== |
---|
[128] | 213 | # Experience type : DEB(ug), DEV(elopment), RUN |
---|
| 214 | if [ X${JobType} != XRUN ] ; then |
---|
| 215 | echo |
---|
| 216 | echo "====================================================" |
---|
| 217 | echo "libIGCM JOB is NOT in RUN type mode." |
---|
| 218 | echo "!! OUTPUT files will NOT be PROTECTED !!" |
---|
| 219 | echo "Be carefull : you can ERASE the result of this job !" |
---|
| 220 | |
---|
| 221 | case ${JobType} in |
---|
| 222 | DEB) |
---|
[166] | 223 | echo "DEBUG mode : activation of 'set -vx' mode." |
---|
| 224 | echo "DEBUG mode : no protection for output files." |
---|
[196] | 225 | echo "DEBUG mode : if active force asynchronous rebuild frequency to PeriodLength frequency." |
---|
[166] | 226 | ;; |
---|
[128] | 227 | DEV) |
---|
| 228 | echo "DEVelopment mode : no protection for output files." |
---|
[196] | 229 | echo "DEVelopment mode : if active force asynchronous rebuild frequency to PeriodLength frequency." |
---|
[128] | 230 | ;; |
---|
[166] | 231 | esac |
---|
| 232 | |
---|
| 233 | if [ X${config_Post_RebuildFrequency} != XNONE ] ; then |
---|
[183] | 234 | if [ X${config_Post_RebuildFrequency} != X${config_UserChoices_PeriodLength} ] ; then |
---|
| 235 | echo "------------" |
---|
| 236 | echo "WARNING : Job is NOT in RUN mode then we will force REBUILD Frequency" |
---|
| 237 | echo " to PeriodLength : ${config_UserChoices_PeriodLength}" |
---|
| 238 | echo "------------" |
---|
| 239 | config_Post_RebuildFrequency=${config_UserChoices_PeriodLength} |
---|
| 240 | fi |
---|
[166] | 241 | fi |
---|
[128] | 242 | echo "====================================================" |
---|
| 243 | echo |
---|
| 244 | fi |
---|
| 245 | |
---|
[166] | 246 | #==================================================== |
---|
| 247 | #R_OUT_KSH : Storage place for job output |
---|
| 248 | #R_OUT_EXE : Storage place for binary used during simulation |
---|
| 249 | R_OUT_KSH=${R_SAVE}/Out |
---|
| 250 | R_OUT_EXE=${R_SAVE}/Exe |
---|
| 251 | |
---|
[2] | 252 | IGCM_debug_PopStack "IGCM_config_Initialize" |
---|
| 253 | } |
---|
| 254 | |
---|
| 255 | #=================================== |
---|
[118] | 256 | function IGCM_config_Analyse_PeriodLength |
---|
| 257 | { |
---|
| 258 | IGCM_debug_PushStack "IGCM_config_Analyse_PeriodLength" |
---|
| 259 | |
---|
[124] | 260 | typeset i |
---|
| 261 | |
---|
[118] | 262 | # Determine number of day(s) in PeriodLength : |
---|
| 263 | case ${config_UserChoices_PeriodLength} in |
---|
| 264 | *Y|*y) |
---|
[128] | 265 | PeriodLengthInYears=$( echo ${config_UserChoices_PeriodLength} | sed -e 's/[yY]//' ) |
---|
[118] | 266 | IGCM_debug_Print 1 "Number of years for PeriodLength : ${PeriodLengthInYears}" |
---|
| 267 | PeriodLengthInDays=0 |
---|
| 268 | i=0 |
---|
| 269 | until [ $i -ge $PeriodLengthInYears ] ; do |
---|
| 270 | (( PeriodLengthInDays = PeriodLengthInDays + $( IGCM_date_DaysInYear $(( year + i )) ) )) |
---|
| 271 | (( i=i+1 )) |
---|
| 272 | done |
---|
| 273 | ;; |
---|
| 274 | *M|*m) |
---|
[128] | 275 | PeriodLengthInMonths=$( echo ${config_UserChoices_PeriodLength} | sed -e 's/[mM]//' ) |
---|
[118] | 276 | IGCM_debug_Print 1 "Number of months for PeriodLength : ${PeriodLengthInMonths}" |
---|
| 277 | PeriodLengthInDays=0 |
---|
| 278 | i=0 |
---|
| 279 | until [ $i -ge $PeriodLengthInMonths ] ; do |
---|
| 280 | if [ $(( month + i )) -lt 13 ] ; then |
---|
| 281 | (( PeriodLengthInDays = PeriodLengthInDays + $( IGCM_date_DaysInMonth $year $(( month + i )) ) )) |
---|
| 282 | else |
---|
| 283 | (( PeriodLengthInDays = PeriodLengthInDays + $( IGCM_date_DaysInMonth $year $(( month + i - 12 )) ) )) |
---|
| 284 | fi |
---|
| 285 | (( i=i+1 )) |
---|
| 286 | done |
---|
| 287 | ;; |
---|
| 288 | *D|*d) |
---|
[128] | 289 | PeriodLengthInMonths=0 |
---|
| 290 | PeriodLengthInDays=$( echo ${config_UserChoices_PeriodLength} | sed -e 's/[dD]//' );; |
---|
[118] | 291 | *) |
---|
| 292 | IGCM_debug_Exit "IGCM_config_Analyse_PeriodLength " ${config_UserChoices_PeriodLength} " invalid period length : choose in *Y, *M, *D." |
---|
| 293 | IGCM_debug_Verif_Exit ;; |
---|
| 294 | esac |
---|
| 295 | |
---|
| 296 | IGCM_debug_PopStack "IGCM_config_Analyse_PeriodLength" |
---|
| 297 | |
---|
| 298 | } |
---|
| 299 | |
---|
| 300 | #=================================== |
---|
[2] | 301 | function IGCM_config_PeriodStart |
---|
| 302 | { |
---|
| 303 | IGCM_debug_PushStack "IGCM_config_PeriodStart" |
---|
| 304 | |
---|
| 305 | echo |
---|
| 306 | IGCM_debug_Print 1 "IGCM_config_PeriodStart :" |
---|
| 307 | echo |
---|
| 308 | |
---|
| 309 | if [ ! -r ${SUBMIT_DIR}/run.card ]; then |
---|
| 310 | |
---|
| 311 | #================================================# |
---|
| 312 | # The file run.card doesn't exist # |
---|
| 313 | #================================================# |
---|
| 314 | |
---|
| 315 | eval FirstInitialize=true |
---|
| 316 | |
---|
| 317 | #copy initial run.card |
---|
| 318 | IGCM_sys_Cp ${SUBMIT_DIR}/run.card.init ${SUBMIT_DIR}/run.card |
---|
| 319 | |
---|
| 320 | IGCM_date_GetYearMonth $DateBegin year month |
---|
[230] | 321 | year_m1=$(( year - 1 )) |
---|
| 322 | year_p1=$(( year + 1 )) |
---|
[124] | 323 | IGCM_config_Analyse_PeriodLength |
---|
[2] | 324 | |
---|
| 325 | eval PeriodDateBegin=${DateBegin} > /dev/null 2>&1 |
---|
[146] | 326 | PeriodDateEnd=$( IGCM_date_AddDaysToGregorianDate ${DateBegin} $(( ${PeriodLengthInDays} - 1 )) ) |
---|
[2] | 327 | eval CumulPeriod=1 > /dev/null 2>&1 |
---|
| 328 | |
---|
| 329 | #=================================================# |
---|
| 330 | # Creation and write updated run.card # |
---|
| 331 | #=================================================# |
---|
| 332 | |
---|
| 333 | #Correct run.card Configuration for this period |
---|
| 334 | IGCM_card_WriteOption ${SUBMIT_DIR}/run.card Configuration PeriodDateBegin ${PeriodDateBegin} |
---|
| 335 | IGCM_card_WriteOption ${SUBMIT_DIR}/run.card Configuration PeriodDateEnd ${PeriodDateEnd} |
---|
| 336 | IGCM_card_WriteOption ${SUBMIT_DIR}/run.card Configuration CumulPeriod ${CumulPeriod} |
---|
| 337 | IGCM_card_WriteOption ${SUBMIT_DIR}/run.card Configuration PeriodState "Running" |
---|
| 338 | |
---|
| 339 | else |
---|
| 340 | #================================================# |
---|
| 341 | # The file run.card allready exist # |
---|
| 342 | #================================================# |
---|
| 343 | |
---|
| 344 | eval FirstInitialize=false |
---|
| 345 | |
---|
| 346 | #Test state of run in run.card |
---|
| 347 | IGCM_card_DefineVariableFromOption ${SUBMIT_DIR}/run.card Configuration PeriodState |
---|
| 348 | if ( [ ${run_Configuration_PeriodState} != "Running" ] && [ ${run_Configuration_PeriodState} != "OnQueue" ] && [ ${run_Configuration_PeriodState} != "Continue" ] ) ; then |
---|
| 349 | echo |
---|
| 350 | IGCM_debug_Print 1 "!!!!!! IGCM_config_PeriodStart Error PeriodState : " ${run_Configuration_PeriodState} "!!!!!!!!!!" |
---|
| 351 | echo |
---|
| 352 | IGCM_debug_Exit "IGCM_config_PeriodStart Error PeriodState : " ${run_Configuration_PeriodState} |
---|
| 353 | IGCM_debug_Verif_Exit |
---|
| 354 | fi |
---|
| 355 | |
---|
| 356 | #===================================# |
---|
| 357 | # Read updated run.card # |
---|
| 358 | #===================================# |
---|
| 359 | |
---|
| 360 | IGCM_card_DefineVariableFromOption ${SUBMIT_DIR}/run.card Configuration OldPrefix |
---|
| 361 | IGCM_card_DefineVariableFromOption ${SUBMIT_DIR}/run.card Configuration PeriodDateBegin |
---|
| 362 | IGCM_card_DefineVariableFromOption ${SUBMIT_DIR}/run.card Configuration PeriodDateEnd |
---|
| 363 | IGCM_card_DefineVariableFromOption ${SUBMIT_DIR}/run.card Configuration CumulPeriod |
---|
| 364 | |
---|
| 365 | PeriodDateBegin=$( IGCM_date_ConvertFormatToGregorian ${run_Configuration_PeriodDateBegin} ) |
---|
| 366 | PeriodDateEnd=$( IGCM_date_ConvertFormatToGregorian ${run_Configuration_PeriodDateEnd} ) |
---|
| 367 | eval CumulPeriod="${run_Configuration_CumulPeriod}" > /dev/null 2>&1 |
---|
| 368 | |
---|
| 369 | if [ ${Period} = 1 ]; then |
---|
| 370 | # save last Job output |
---|
[224] | 371 | typeset LastPeriod iLastPeriod Last_Script_Output_Name |
---|
[2] | 372 | (( LastPeriod=CumulPeriod-PeriodNb )) |
---|
[224] | 373 | iLastPeriod=$( printf "%06d" ${LastPeriod} ) |
---|
| 374 | Last_Script_Output_Name="${Script_Output_Prefix}_${config_UserChoices_JobName}.${iLastPeriod}" |
---|
| 375 | Last_run_card="run.card.${iLastPeriod}" |
---|
[2] | 376 | #eval ls -l ${SUBMIT_DIR}/${Last_Script_Output_Name} |
---|
| 377 | #eval IGCM_sys_Put_Out ${SUBMIT_DIR}/${Last_Script_Output_Name} ${R_OUT_KSH}/${Last_Script_Output_Name} > /dev/null 2>&1 |
---|
| 378 | IGCM_debug_Print 1 "Try to save previous ksh job output" |
---|
| 379 | IGCM_sys_Cd ${SUBMIT_DIR}/ |
---|
[227] | 380 | IGCM_sys_Put_Out ${Last_Script_Output_Name} ${R_OUT_KSH}/${Last_Script_Output_Name}.$$ rw |
---|
| 381 | IGCM_sys_Put_Out ${SUBMIT_DIR}/run.card ${R_OUT_KSH}/${Last_run_card}.$$ rw |
---|
[2] | 382 | IGCM_sys_Cd ${RUN_DIR} |
---|
| 383 | else |
---|
| 384 | unset FileToBeDeleted |
---|
| 385 | fi |
---|
| 386 | |
---|
| 387 | IGCM_date_GetYearMonth $PeriodDateBegin year month |
---|
[230] | 388 | year_m1=$(( year - 1 )) |
---|
| 389 | year_p1=$(( year + 1 )) |
---|
[124] | 390 | IGCM_config_Analyse_PeriodLength |
---|
[2] | 391 | |
---|
| 392 | IGCM_card_WriteOption ${SUBMIT_DIR}/run.card Configuration PeriodState "Running" |
---|
| 393 | |
---|
| 394 | fi |
---|
| 395 | OldPrefix=${config_UserChoices_JobName}_${PeriodDateEnd} |
---|
| 396 | |
---|
| 397 | #===================================================================# |
---|
| 398 | # Prepare variables available for ${COMP}.card and ${COMP}.driver # |
---|
| 399 | # But available to any son functions # |
---|
| 400 | #===================================================================# |
---|
| 401 | |
---|
| 402 | # Period Length In Days between DateBegin and DateCurrent (at end of period == PeriodDateEnd !) |
---|
| 403 | (( SimulationLengthInDays = $( IGCM_date_DaysBetweenGregorianDate ${PeriodDateEnd} ${DateBegin} ) + 1 )) |
---|
| 404 | |
---|
| 405 | # Debug Print : |
---|
| 406 | IGCM_debug_Print 1 "IGCM_config_PeriodStart : Before Execution" |
---|
| 407 | IGCM_debug_Print 3 "Year of simulation : ${year}" |
---|
| 408 | IGCM_debug_Print 3 "Month of simulation : ${month}" |
---|
| 409 | IGCM_debug_Print 3 "PeriodLengthInDays : ${PeriodLengthInDays}" |
---|
| 410 | IGCM_debug_Print 3 "PeriodDateBegin : ${PeriodDateBegin}" |
---|
| 411 | IGCM_debug_Print 3 "PeriodDateEnd : ${PeriodDateEnd}" |
---|
| 412 | IGCM_debug_Print 3 "SimulationLengthInDays : ${SimulationLengthInDays}" |
---|
| 413 | IGCM_debug_Print 3 "ExperienceLengthInDays : ${ExperienceLengthInDays}" |
---|
| 414 | |
---|
| 415 | #================================================================# |
---|
| 416 | # Prepare variables available for comp_finalyze # |
---|
| 417 | #================================================================# |
---|
| 418 | |
---|
| 419 | # Period for save files |
---|
| 420 | eval DatesPeriod=${PeriodDateBegin}_${PeriodDateEnd} > /dev/null 2>&1 |
---|
| 421 | |
---|
| 422 | # Prefix for save files of this period |
---|
| 423 | eval PREFIX=${config_UserChoices_JobName}_${DatesPeriod} > /dev/null 2>&1 |
---|
| 424 | |
---|
| 425 | # List of files that will be deleted in RUN_DIR after run |
---|
[52] | 426 | [ -f stack ] && FileToBeDeleted[0]="stack" |
---|
[2] | 427 | |
---|
| 428 | # Test if the same run as already been saved : |
---|
[128] | 429 | if [ X${JobType} = XRUN ] ; then |
---|
| 430 | if [ ${DRYRUN} -le 0 ] ; then |
---|
| 431 | if ( IGCM_sys_TestFileArchive ${R_OUT_KSH}/${PREFIX}_${Exe_Output} ) ; then |
---|
| 432 | IGCM_debug_Exit "IGCM_config_PeriodStart" "RErun an old job." |
---|
| 433 | IGCM_debug_Print 1 "Because of readonly permissions, you can't RErun a job when saved files" |
---|
| 434 | IGCM_debug_Print 1 " are still in the ARCHIVE directory. You must deleted those files, or " |
---|
| 435 | IGCM_debug_Print 1 " the whole ${R_SAVE} tree." |
---|
| 436 | IGCM_debug_Verif_Exit |
---|
| 437 | fi |
---|
| 438 | fi |
---|
| 439 | else |
---|
[2] | 440 | if ( IGCM_sys_TestFileArchive ${R_OUT_KSH}/${PREFIX}_${Exe_Output} ) ; then |
---|
[128] | 441 | IGCM_debug_Print 1 "IGCM_config_PeriodStart" "RErun an old job. DEBUG of DEV mode." |
---|
[2] | 442 | fi |
---|
| 443 | fi |
---|
[128] | 444 | |
---|
[2] | 445 | IGCM_debug_PopStack "IGCM_config_PeriodStart" |
---|
| 446 | } |
---|
| 447 | |
---|
| 448 | #=================================== |
---|
| 449 | function IGCM_config_PeriodEnd |
---|
| 450 | { |
---|
| 451 | IGCM_debug_PushStack "IGCM_config_PeriodEnd" |
---|
| 452 | |
---|
| 453 | echo |
---|
| 454 | IGCM_debug_Print 1 "IGCM_config_PeriodEnd :" |
---|
| 455 | echo |
---|
| 456 | |
---|
| 457 | #==================================# |
---|
| 458 | # Save Job output # |
---|
| 459 | #==================================# |
---|
| 460 | IGCM_sys_Put_Out ${Exe_Output} ${R_OUT_KSH}/${PREFIX}_${Exe_Output} |
---|
| 461 | eval FileToBeDeleted[${#FileToBeDeleted[@]}]="${Exe_Output}" |
---|
| 462 | |
---|
[227] | 463 | IGCM_sys_Put_Out ${SUBMIT_DIR}/run.card ${R_OUT_KSH}/run.card rw |
---|
[224] | 464 | |
---|
[2] | 465 | typeset LS_comp LS_bin ExeDate ExeCpuLog ExeSize NextExeSize LastCompExeSize |
---|
| 466 | typeset comp i |
---|
| 467 | typeset ExeNameIn ExeNameOut |
---|
| 468 | |
---|
| 469 | #==================================# |
---|
| 470 | # Get last Exe Size # |
---|
| 471 | #==================================# |
---|
| 472 | |
---|
| 473 | (( i=0 )) |
---|
| 474 | if ( ${FirstInitialize} ) ; then |
---|
| 475 | run_Log_LastExeSize="" |
---|
| 476 | for comp in ${config_ListOfComponents[*]} ; do |
---|
| 477 | run_Log_LastExeSize[$i]=0 |
---|
| 478 | (( i=i+1 )) |
---|
| 479 | done |
---|
| 480 | else |
---|
| 481 | IGCM_card_DefineArrayFromOption ${SUBMIT_DIR}/run.card Log LastExeSize |
---|
| 482 | fi |
---|
| 483 | |
---|
| 484 | #==================================# |
---|
| 485 | # And Build ExeDate # |
---|
| 486 | #==================================# |
---|
| 487 | |
---|
| 488 | # ExeDate = ATM_Jun_12_09:34-SRF_Jun_12_09:34-OCE_Jun_12_09:34-ICE_Jun_12_09:34-CPL_Jun_12_09:33 |
---|
[57] | 489 | # Would be nice to have next line but no way to format ls output (need to ls -l --time-style "+%Y-%m-%dT%H:%M") |
---|
| 490 | # ExeDate = ATM_2009-06-12T09:34+SRF_2009-06-12T09:34+OCE_2009-06-12T09:34+ICE_2009-06-12T09:34+CPL_2009-06-12T09:34 |
---|
[2] | 491 | ExeDate="" |
---|
| 492 | NextExeSize="( " |
---|
| 493 | (( i=0 )) |
---|
| 494 | |
---|
| 495 | for comp in ${config_ListOfComponents[*]} ; do |
---|
| 496 | |
---|
| 497 | IGCM_debug_Print 1 ${comp} |
---|
| 498 | |
---|
| 499 | eval ExeNameIn=\${config_Executable_${comp}[0]} |
---|
| 500 | eval ExeNameOut=\${config_Executable_${comp}[1]} |
---|
[124] | 501 | # Only if we really have an executable for the component : |
---|
[2] | 502 | if [ X${ExeNameIn} = X\"\" ] ; then |
---|
| 503 | # If there is no exe file for this component |
---|
| 504 | (( ExeSize=0 )) |
---|
| 505 | else |
---|
| 506 | eval LS_bin=${R_EXE}/${ExeNameIn} |
---|
| 507 | IGCM_sys_FileSize ${LS_bin} ExeSize |
---|
| 508 | |
---|
[57] | 509 | set +A LS_comp -- $( LC_TIME=en_US ls -l ${LS_bin} ) |
---|
[2] | 510 | if [ X${ExeDate} = X ] ; then |
---|
| 511 | # First component exe date |
---|
| 512 | ExeDate=${comp}_${LS_comp[5]}_${LS_comp[6]} |
---|
| 513 | else |
---|
| 514 | ExeDate=${ExeDate}-${comp}_${LS_comp[5]}_${LS_comp[6]} |
---|
| 515 | fi |
---|
| 516 | ExeDate=${ExeDate}_${LS_comp[7]} |
---|
| 517 | fi |
---|
| 518 | |
---|
| 519 | if [ ${i} -eq 0 ] ; then |
---|
| 520 | # First component |
---|
| 521 | NextExeSize="( "${ExeSize} |
---|
| 522 | else |
---|
| 523 | NextExeSize=${NextExeSize}", "${ExeSize} |
---|
| 524 | fi |
---|
| 525 | eval LastCompExeSize=${run_Log_LastExeSize[$i]} |
---|
| 526 | (( i=i+1 )) |
---|
| 527 | |
---|
[151] | 528 | if [ ${ExeSize} -ne ${LastCompExeSize} ] ; then |
---|
[2] | 529 | if ( ${FirstInitialize} ) ; then |
---|
| 530 | IGCM_debug_Print 1 "Put first ${ExeNameIn} in ${R_OUT_EXE} !" |
---|
| 531 | else |
---|
| 532 | IGCM_debug_Print 1 "${ExeNameIn} has changed in ${R_EXE} !" |
---|
[151] | 533 | eval FileToBeDeleted[${#FileToBeDeleted[@]}]=${ExeNameOut} |
---|
[2] | 534 | fi |
---|
[227] | 535 | eval IGCM_sys_Put_Out ${ExeNameOut} ${R_OUT_EXE}/${PREFIX}_${ExeNameIn} rw |
---|
[2] | 536 | fi |
---|
| 537 | done |
---|
| 538 | |
---|
| 539 | if [ ${DRYRUN} -le 1 ] ; then |
---|
| 540 | typeset ExeCpuLog |
---|
| 541 | tail -1500 ${Exe_Output} > ${Exe_Output}_tail.txt |
---|
[164] | 542 | ExeCpuLog=$( gawk -f ${libIGCM}/libIGCM_sys/IGCM_add_out.awk ${Exe_Output}_tail.txt ) |
---|
[2] | 543 | RET=$? |
---|
[57] | 544 | if [ $RET -eq 0 ] ; then |
---|
| 545 | # ExeCpuLog variable contents 5 fields |
---|
[92] | 546 | echo "${CumulPeriod} ${PeriodDateBegin} ${PeriodDateEnd} ${ExeCpuLog} ${ExeDate}" | \ |
---|
[109] | 547 | gawk '{printf("# %11d | %15s | %15s | %19s | %19s | %15.5f | %15.5f | %15.5f | %s\n", \ |
---|
[57] | 548 | $1,$2,$3,$4,$5,$6,$7,$8,$9)}' >> ${SUBMIT_DIR}/run.card |
---|
[2] | 549 | fi |
---|
| 550 | eval FileToBeDeleted[${#FileToBeDeleted[@]}]="${Exe_Output}_tail.txt" |
---|
| 551 | fi |
---|
| 552 | |
---|
| 553 | NextExeSize=${NextExeSize}" )" |
---|
| 554 | IGCM_card_WriteOption ${SUBMIT_DIR}/run.card Log LastExeSize "${NextExeSize}" |
---|
| 555 | |
---|
| 556 | # All was right ? no ? then we stop. |
---|
| 557 | IGCM_debug_Verif_Exit |
---|
| 558 | |
---|
| 559 | # If all was OK, we can delete all files not necessary for next Job |
---|
[92] | 560 | IGCM_debug_Print 1 "Files that will be deleted before next period-run : " |
---|
[2] | 561 | |
---|
| 562 | if [ ${DRYRUN} -le 2 ] ; then |
---|
[139] | 563 | for f in ${FileToBeDeleted[@]} ; do [ -f ${f} ] && ls -la $f ; [ -f ${f} ] && rm -f $f ; done |
---|
[2] | 564 | else |
---|
| 565 | echo ${FileToBeDeleted[@]} |
---|
| 566 | fi |
---|
| 567 | |
---|
| 568 | #=================================================# |
---|
[119] | 569 | # Modification of libIGCM behaviour # |
---|
| 570 | #=================================================# |
---|
| 571 | |
---|
[146] | 572 | # To use this function, one must copy libIGCM.card from ${libIGCM} directory |
---|
[119] | 573 | # and put it in ${SUBMIT_DIR} directory. Ater modifications of ${SUBMIT_DIR}/libIGCM.card, |
---|
[146] | 574 | # variables define inside [UserChanges] will be modified for next Period of libIGCM main loop. |
---|
[119] | 575 | if [ -f ${SUBMIT_DIR}/libIGCM.card ] ; then |
---|
| 576 | echo |
---|
| 577 | echo "########################################################################" |
---|
| 578 | echo "!!! Modification of libIGCM behaviour !!!" |
---|
| 579 | echo |
---|
| 580 | |
---|
| 581 | IGCM_debug_Print 1 "DefineArrayFromOption : libIGCM_UserChanges in libIGCM.card" |
---|
| 582 | IGCM_card_DefineArrayFromSection ${SUBMIT_DIR}/libIGCM.card UserChanges |
---|
| 583 | IGCM_debug_Print 2 "libIGCM_UserChanges" ${libIGCM_UserChanges[*]} |
---|
| 584 | |
---|
| 585 | # Special treatments for libIGCM internals |
---|
| 586 | for option in ${libIGCM_UserChanges[*]} ; do |
---|
| 587 | IGCM_card_DefineVariableFromOption ${SUBMIT_DIR}/libIGCM.card UserChanges ${option} |
---|
| 588 | |
---|
| 589 | echo "We will change : ${option}." |
---|
| 590 | eval echo "Previous value : " \${${option}} |
---|
| 591 | eval echo "Change to : " \${libIGCM_UserChanges_${option}} |
---|
| 592 | |
---|
| 593 | eval ${option}=\${libIGCM_UserChanges_${option}} |
---|
| 594 | |
---|
| 595 | case ${option} in |
---|
| 596 | config_UserChoices_DateEnd) |
---|
| 597 | IGCM_debug_PrintVariables 3 config_UserChoices_DateEnd |
---|
| 598 | DateEnd=$( IGCM_date_ConvertFormatToGregorian ${config_UserChoices_DateEnd} ) |
---|
| 599 | |
---|
| 600 | # Period Length In Days between DateBegin and DateEnd |
---|
| 601 | (( ExperienceLengthInDays=$( IGCM_date_DaysBetweenGregorianDate ${DateEnd} ${DateBegin} ) + 1 )) |
---|
| 602 | if [ ${ExperienceLengthInDays} -lt 0 ] ; then |
---|
| 603 | IGCM_debug_Print 1 "Problem with dates in libIGCM.card : ${DateEnd} < ${DateBegin} ! You must check that." |
---|
| 604 | IGCM_debug_Exit "IGCM_PeriodEnd" " Wrong Dates." |
---|
| 605 | IGCM_debug_Verif_Exit |
---|
| 606 | fi |
---|
| 607 | ;; |
---|
| 608 | config_UserChoices_PeriodLength) |
---|
| 609 | ;; |
---|
| 610 | PeriodNb) |
---|
| 611 | IGCM_debug_Print 3 "Loop in main Job with ${PeriodNb} period(s)" |
---|
| 612 | ;; |
---|
| 613 | config_Post_RebuildFrequency) |
---|
| 614 | IGCM_debug_Print 3 "Change config_Post_RebuildFrequency=${config_Post_RebuildFrequency} : IGCM_post_Configure" |
---|
| 615 | IGCM_post_Configure |
---|
| 616 | ;; |
---|
| 617 | config_Post_TimeSeriesFrequency) |
---|
| 618 | IGCM_debug_Print 3 "Change config_Post_TimeSeriesFrequency = ${config_Post_TimeSeriesFrequency} : IGCM_post_Initialize" |
---|
[121] | 619 | IGCM_post_Configure |
---|
[119] | 620 | ;; |
---|
| 621 | config_Post_SeasonalFrequency) |
---|
| 622 | IGCM_debug_Print 3 "Change config_Post_SeasonalFrequency = ${config_Post_SeasonalFrequency} : IGCM_post_Initialize" |
---|
[121] | 623 | IGCM_post_Configure |
---|
[119] | 624 | ;; |
---|
| 625 | esac |
---|
| 626 | done |
---|
| 627 | |
---|
| 628 | echo |
---|
| 629 | echo "########################################################################" |
---|
| 630 | echo |
---|
| 631 | fi |
---|
| 632 | |
---|
| 633 | #=================================================# |
---|
[2] | 634 | # Determine next computed period # |
---|
| 635 | #=================================================# |
---|
| 636 | |
---|
| 637 | PeriodDateBegin=$( IGCM_date_AddDaysToGregorianDate ${PeriodDateEnd} 1 ) |
---|
| 638 | IGCM_date_GetYearMonth $PeriodDateBegin year month |
---|
[230] | 639 | year_m1=$(( year - 1 )) |
---|
| 640 | year_p1=$(( year + 1 )) |
---|
[124] | 641 | IGCM_config_Analyse_PeriodLength |
---|
[146] | 642 | PeriodDateEnd=$( IGCM_date_AddDaysToGregorianDate ${PeriodDateBegin} $(( ${PeriodLengthInDays} - 1 )) ) |
---|
[2] | 643 | |
---|
| 644 | # Debug Print : |
---|
| 645 | echo |
---|
| 646 | IGCM_debug_Print 1 "IGCM_config_PeriodEnd : Preparing Next Execution" |
---|
| 647 | IGCM_debug_Print 3 "PeriodDateBegin : ${PeriodDateBegin}" |
---|
| 648 | IGCM_debug_Print 3 "PeriodDateEnd : ${PeriodDateEnd}" |
---|
| 649 | IGCM_debug_Print 3 "PeriodLengthInDays : ${PeriodLengthInDays}" |
---|
| 650 | |
---|
| 651 | PeriodDateBegin=$( IGCM_date_ConvertFormatToHuman ${PeriodDateBegin} ) |
---|
| 652 | PeriodDateEnd=$( IGCM_date_ConvertFormatToHuman ${PeriodDateEnd} ) |
---|
| 653 | |
---|
| 654 | (( CumulPeriod = CumulPeriod + 1 )) |
---|
| 655 | |
---|
| 656 | # Debug Print : |
---|
| 657 | echo |
---|
| 658 | IGCM_debug_Print 3 "PeriodDateBegin Human : ${PeriodDateBegin}" |
---|
| 659 | IGCM_debug_Print 3 "PeriodDateEnd Human : ${PeriodDateEnd}" |
---|
| 660 | IGCM_debug_Print 3 "CumulPeriod : ${CumulPeriod}" |
---|
| 661 | |
---|
| 662 | #=================================================# |
---|
| 663 | # Write updated run.card # |
---|
| 664 | #=================================================# |
---|
| 665 | |
---|
| 666 | IGCM_card_WriteOption ${SUBMIT_DIR}/run.card Configuration OldPrefix ${OldPrefix} |
---|
| 667 | IGCM_card_WriteOption ${SUBMIT_DIR}/run.card Configuration PeriodDateBegin ${PeriodDateBegin} |
---|
| 668 | IGCM_card_WriteOption ${SUBMIT_DIR}/run.card Configuration PeriodDateEnd ${PeriodDateEnd} |
---|
| 669 | IGCM_card_WriteOption ${SUBMIT_DIR}/run.card Configuration CumulPeriod ${CumulPeriod} |
---|
| 670 | |
---|
| 671 | IGCM_debug_PopStack "IGCM_config_PeriodEnd" |
---|
| 672 | } |
---|
| 673 | |
---|
| 674 | #=================================== |
---|
| 675 | function IGCM_config_Finalize |
---|
| 676 | { |
---|
| 677 | IGCM_debug_PushStack "IGCM_config_Finalize" |
---|
| 678 | |
---|
| 679 | echo |
---|
| 680 | IGCM_debug_Print 1 "IGCM_config_Finalize :" |
---|
| 681 | echo |
---|
| 682 | |
---|
| 683 | if [ ${SimulationLengthInDays} -ge ${ExperienceLengthInDays} ] ; then |
---|
| 684 | |
---|
| 685 | #==========================# |
---|
| 686 | # End of entire simulation # |
---|
| 687 | #==========================# |
---|
| 688 | |
---|
[154] | 689 | # Mail notification |
---|
| 690 | IGCM_sys_SendMail |
---|
[2] | 691 | |
---|
[154] | 692 | # |
---|
[2] | 693 | IGCM_card_WriteOption ${SUBMIT_DIR}/run.card Configuration PeriodState "Completed" |
---|
| 694 | IGCM_debug_Print 1 "Normal End of computation." |
---|
| 695 | if ( $DEBUG_debug ) ; then |
---|
| 696 | echo |
---|
| 697 | IGCM_debug_Print 1 "Your files on ${R_OUT} :" |
---|
| 698 | IGCM_sys_Tree ${R_SAVE} |
---|
| 699 | fi |
---|
[154] | 700 | |
---|
[2] | 701 | else |
---|
| 702 | |
---|
| 703 | #=================# |
---|
| 704 | # Submit next job # |
---|
| 705 | #=================# |
---|
| 706 | |
---|
| 707 | IGCM_card_WriteOption ${SUBMIT_DIR}/run.card Configuration PeriodState "OnQueue" |
---|
| 708 | |
---|
| 709 | # Name of next Ksh Script output : |
---|
[57] | 710 | eval Script_Output="${Script_Output_Prefix}_${config_UserChoices_JobName}.$( printf "%06d" ${CumulPeriod} )" |
---|
[2] | 711 | |
---|
| 712 | IGCM_debug_Print 1 "Submit next job" |
---|
[154] | 713 | # SUBMIT NEXT JOB |
---|
[2] | 714 | IGCM_sys_Cd ${SUBMIT_DIR} |
---|
| 715 | IGCM_sys_Qsub ${SUBMIT_DIR}/Job_${config_UserChoices_JobName} |
---|
| 716 | fi |
---|
| 717 | |
---|
[154] | 718 | # Supress Non Deleted Boundary files |
---|
| 719 | if [ ${DRYRUN} -le 2 ] ; then |
---|
| 720 | IGCM_comp_DelFixeBoundaryFiles |
---|
| 721 | ls -la |
---|
| 722 | fi |
---|
| 723 | |
---|
| 724 | # Clean ${RUN_DIR}=${RUN_DIR_PATH}/${config_UserChoices_TagName}/${config_UserChoices_JobName} |
---|
| 725 | # Only for production run (No clean up in DEV or DEB mode) |
---|
[187] | 726 | [ X${JobType} = XRUN ] && IGCM_sys_Rm -rf ${RUN_DIR} |
---|
[154] | 727 | |
---|
[2] | 728 | IGCM_debug_PopStack "IGCM_config_Finalize" |
---|
| 729 | } |
---|
| 730 | |
---|
| 731 | #=================================== |
---|