Changeset 1483 for trunk


Ignore:
Timestamp:
05/10/19 12:26:40 (5 years ago)
Author:
jgipsl
Message:

Ticket #344 : Added same section as in the end of AA_clean_PeriodLength to reset counter to 000001 for Script_Output in main job.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/libIGCM/AA_purge_simulation

    r1437 r1483  
    140140      IGCM_debug_sendAMQP_Purge  
    141141      echo "done." 
     142 
     143      # Add reset of counter for Script_Output in the main Job 
     144      Script_Output_Prefix=${config_UserChoices_Script_Output_Prefix:='Script_Output'} 
     145      Script_Output_Job=${Script_Output_Prefix}_${config_UserChoices_JobName} 
     146      Script_Output=${Script_Output_Prefix}_${config_UserChoices_JobName}.000001 
     147 
     148      echo -e "\033[1;32mDo you want to change the number in Script_Output? (${Script_Output} into Job) ?" 
     149      echo -n -e " Your answer (y/n) : \033[m" 
     150      read reponse 
     151      case ${reponse} in 
     152           
     153          oui|OUI|o|y|yes|YES) 
     154              cp ${SUBMIT_DIR}/Job_${config_UserChoices_JobName} ${SUBMIT_DIR}/Job_${config_UserChoices_JobName}_SAVED_$$ 
     155              sed -e"s/${Script_Output_Job}.[0-9][0-9][0-9][0-9][0-9][0-9]/${Script_Output}/"  ${SUBMIT_DIR}/Job_${config_UserChoices_JobName}_SAVED_$$  >${SUBMIT_DIR}/Job_${config_UserChoices_JobName} 
     156              echo "Job : Job_${config_UserChoices_JobName} modified." 
     157              echo "Old job saved here : Job_${config_UserChoices_JobName}_SAVED_$$" 
     158              ;; 
     159          non|NON|n|no|NO) 
     160              echo "Nothing done in Job_${config_UserChoices_JobName} !" 
     161              ;; 
     162      esac 
     163 
    142164    fi 
    143165    ;; 
Note: See TracChangeset for help on using the changeset viewer.