Changeset 1327 for trunk


Ignore:
Timestamp:
04/15/16 16:05:46 (8 years ago)
Author:
jgipsl
Message:

Added possible dryrun and more comments, see ticket #288

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/libIGCM/AA_SE_Checker

    r1283 r1327  
    6565 
    6666#set -vx 
     67 
     68echo "Hi I'm here to help you check and complete the seasonal average production" 
     69echo -e "\033[1;31mDo you want me to run in dryrun mode just telling what I would submit? Answer no in this case\033[m" 
     70echo -e "\033[1;31mOr do you want me to submit job for real? Answer yes in this case.\033[m" 
     71echo -n " Run for real (y/n) :" 
     72read ActionAnswer 
     73 
     74case ${ActionAnswer} in 
     75oui|OUI|o|y|yes|YES) 
     76  echo "OK. I will submit jobs" 
     77  action=true 
     78  ;; 
     79non|NON|n|no|NO) 
     80  echo "OK. I won't submit any jobs" 
     81  action=false 
     82  ;; 
     83*) 
     84  echo "I did not recognize your answer. I will stop here." 
     85  echo "Please answer: oui|OUI|o|y|yes|YES" 
     86  echo "Or answer: non|NON|n|no|NO" 
     87  exit 
     88  ;; 
     89esac 
    6790 
    6891#================================== 
     
    202225  # create_se submit if files don't exist 
    203226  if [ $countGood != $countTotal ] ; then 
    204     IGCM_debug_Print 2 -e "\033[1;31mSubmit create_se \033[m for period ${an_deb}-${an_fin}" 
    205  
    206     listVarEnv="DEBUG_debug,BigBrother,libIGCM,SUBMIT_DIR,POST_DIR,Script_Post_Output,DateBegin,PeriodDateEnd,RebuildFrequency,RESOL_ATM,RESOL_SRF,RESOL_SBG,RESOL_OCE,RESOL_ICE,RESOL_MBG" 
    207     export DEBUG_debug=${DEBUG_debug} 
    208     export BigBrother=${BigBrother} 
    209     export libIGCM=${libIGCM} 
    210     export SUBMIT_DIR=${CARD_DIR} 
    211     export POST_DIR=${POST_DIR} 
    212     export DateBegin=${an_deb} 
    213     export PeriodDateEnd=${an_fin}1231 
    214     export RebuildFrequency=${RebuildFrequency} 
    215     export RESOL_ATM=${RESOL_ATM} 
    216     export RESOL_SRF=${RESOL_SRF} 
    217     export RESOL_SBG=${RESOL_SBG} 
    218     export RESOL_OCE=${RESOL_OCE} 
    219     export RESOL_ICE=${RESOL_ICE} 
    220     export RESOL_MBG=${RESOL_MBG} 
    221     export listVarEnv=${listVarEnv} 
    222     export Script_Post_Output=create_se.${PeriodDateEnd} 
    223  
    224     IGCM_sys_MkdirWork ${POST_DIR} 
    225     IGCM_debug_Verif_Exit 
    226     IGCM_sys_QsubPost create_se 
    227  
    228     echo 
     227      if [ ${action} = true ] ; then 
     228 
     229          IGCM_debug_Print 2 -e "\033[1;31mSubmit create_se \033[m for period ${an_deb}-${an_fin}" 
     230           
     231          listVarEnv="DEBUG_debug,BigBrother,libIGCM,SUBMIT_DIR,POST_DIR,Script_Post_Output,DateBegin,PeriodDateEnd,RebuildFrequency,RESOL_ATM,RESOL_SRF,RESOL_SBG,RESOL_OCE,RESOL_ICE,RESOL_MBG" 
     232          export DEBUG_debug=${DEBUG_debug} 
     233          export BigBrother=${BigBrother} 
     234          export libIGCM=${libIGCM} 
     235          export SUBMIT_DIR=${CARD_DIR} 
     236          export POST_DIR=${POST_DIR} 
     237          export DateBegin=${an_deb} 
     238          export PeriodDateEnd=${an_fin}1231 
     239          export RebuildFrequency=${RebuildFrequency} 
     240          export RESOL_ATM=${RESOL_ATM} 
     241          export RESOL_SRF=${RESOL_SRF} 
     242          export RESOL_SBG=${RESOL_SBG} 
     243          export RESOL_OCE=${RESOL_OCE} 
     244          export RESOL_ICE=${RESOL_ICE} 
     245          export RESOL_MBG=${RESOL_MBG} 
     246          export listVarEnv=${listVarEnv} 
     247          export Script_Post_Output=create_se.${PeriodDateEnd} 
     248           
     249          IGCM_sys_MkdirWork ${POST_DIR} 
     250          IGCM_debug_Verif_Exit 
     251          IGCM_sys_QsubPost create_se 
     252          echo 
     253      else 
     254          # only dry run 
     255          IGCM_debug_Print 2 -e "\033[1;31mI should NOW Submit create_se \033[m for period ${an_deb}-${an_fin}" 
     256          echo 
     257      fi 
     258  else                 
     259      IGCM_debug_Print 2 -e "\033[1;32mFiles are OK for period ${an_deb}-${an_fin}.\033[m Nothing needs to be done for this period." 
     260      echo 
    229261  fi 
    230262 
Note: See TracChangeset for help on using the changeset viewer.