Changeset 1619 for modipsl/trunk/util/ins_job
- Timestamp:
- 12/15/11 11:34:32 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
modipsl/trunk/util/ins_job
r1618 r1619 110 110 print - "\nWorking with file ${F_CFG}\nin directory ${j}\nfor ${n_f}"; 111 111 112 if [ ! X$( echo ${j} | grep USER_SPEC ) = X ] ; then 113 # Do not treat config.card if it is in sub-directory of USER_SPEC 114 # Continue to next config.card 115 echo "USER_SPEC directory exist in path, do not use this config.card" 116 continue 117 fi 118 119 # Get all variables declared in section UserChoices in config.card 120 IGCM_card_DefineArrayFromSection ${j}'/'${F_CFG} UserChoices 121 # Set default values 122 config_UserChoices_JobClass=mono 123 config_UserChoices_JobNumProcTot=1 124 config_UserChoices_UserSpec="" 125 typeset option 126 for option in ${config_UserChoices[*]} ; do 127 IGCM_card_DefineVariableFromOption ${j}'/'${F_CFG} UserChoices ${option} 128 done 129 112 130 # Add specific treatment for new type of directory structure 113 if [ ! X$( echo ${j} | grep USER_SPEC ) = X ] ; then114 echo "USER_SPEC directory exist in path, do not use this config.card"115 continue116 fi117 118 131 if [ -d ${j}/USER_SPEC ] && [ -d ${j}/GENERAL ] ; then 119 132 echo "This is new configuration structure" 120 IGCM_card_DefineVariableFromOption ${j}'/'${F_CFG} UserChoices JobName121 IGCM_card_DefineVariableFromOption ${j}'/'${F_CFG} UserChoices UserSpec122 133 echo "JobName=${config_UserChoices_JobName}" 123 if [ X${config_UserChoices_UserSpec} = X ] ; then 124 echo "The variable UserSpec must be added in config.card in section UserChoices" 125 echo "UserSpec gives the directory for the .card configurtaion files for the wanted experiement. For exemple UserSpec=IPSLCM5/historical" 126 echo "UserSpec= $Config_UserChoices_UserSpec " 127 continue 134 135 if [ "X${config_UserChoices_UserSpec}" = X ] ; then 136 echo "\nERROR in ${j}/config.card" 137 echo "ins_job stops here" 138 echo "=> The variable UserSpec must be added in config.card in section UserChoices" 139 echo "=> UserSpec gives the directory for the .card configurtaion files for the wanted experiement. For exemple UserSpec=IPSLCM5/historical" 140 exit 4 128 141 else 129 echo "UserSpec= $ Config_UserChoices_UserSpec"142 echo "UserSpec= ${config_UserChoices_UserSpec}" 130 143 fi 131 144 … … 150 163 RESOL_ATM_3D=this_is_a_test_string 151 164 RESOL=this_is_another_test_string 152 IGCM_card_DefineVariableFromOption ${j}'/'${F_CFG} UserChoices JobName153 165 if [ ! X$( echo ${config_UserChoices_JobName} | grep ${RESOL_ATM_3D} ) = X ] ; then 154 166 TRUERESOL=$( find ../ -name ".resol" -exec tail -1 {} \; | awk "-F=" '{print $2}' ) … … 163 175 fi 164 176 165 # Other options are not always needed166 IGCM_card_DefineArrayFromSection ${j}'/'${F_CFG} UserChoices167 # Default values168 config_UserChoices_JobClass=mono169 config_UserChoices_JobNumProcTot=1170 # config.card optionnal values171 typeset option172 for option in ${config_UserChoices[*]} ; do173 IGCM_card_DefineVariableFromOption ${j}'/'${F_CFG} UserChoices ${option}174 done175 177 # File name for Job 176 178 n_f='Job_'${config_UserChoices_JobName};
Note: See TracChangeset
for help on using the changeset viewer.