Changeset 1383 for trunk/libIGCM


Ignore:
Timestamp:
03/06/17 17:36:43 (7 years ago)
Author:
mafoipsl
Message:

In AA_clean_PeriodLength, add the possibility to change Script_Output in Job. Ask a question and do it.

File:
1 moved

Legend:

Unmodified
Added
Removed
  • trunk/libIGCM/AA_clean_PeriodLength

    r1382 r1383  
    220220        ;; 
    221221    esac 
     222  else 
     223    # if not first period 
     224    Script_Output_Prefix=${config_UserChoices_Script_Output_Prefix:='Script_Output'} 
     225    Script_Output_Job=${Script_Output_Prefix}_${config_UserChoices_JobName} 
     226    Script_Output=${Script_Output_Prefix}_${config_UserChoices_JobName}.$( printf "%06d" ${run_Configuration_CumulPeriod} ) 
     227 
     228    echo -e "\033[1;32mDo you want to change the number in Script_Output? (${Script_Output} into Job) ?" 
     229    echo -n -e " Your answer (y/n) : \033[m" 
     230    read reponse 
     231    case ${reponse} in 
     232 
     233      oui|OUI|o|y|yes|YES) 
     234        cp ${SUBMIT_DIR}/Job_${config_UserChoices_JobName} ${SUBMIT_DIR}/Job_${config_UserChoices_JobName}_SAVED_$$ 
     235        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} 
     236        echo "Job : Job_${config_UserChoices_JobName} modified." 
     237        echo "Old job saved here : Job_${config_UserChoices_JobName}_SAVED_$$" 
     238        ;; 
     239      non|NON|n|no|NO) 
     240        echo "Nothing done in Job_${config_UserChoices_JobName} !" 
     241        ;; 
     242    esac 
     243 
    222244  fi 
    223245fi 
Note: See TracChangeset for help on using the changeset viewer.