Changeset 1806
- Timestamp:
- 07/12/12 20:10:19 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
modipsl/branches/newconfig/util/ins_job
r1781 r1806 122 122 print - "\nWorking with file ${F_CFG}\nin directory ${j}\nfor ${n_f}"; 123 123 fi 124 125 # Find out if new structure and set .resol filename 126 if [ -d ${j}/EXPERIMENTS ] && [ -d ${j}/GENERAL ] ; then 127 # New Structure 128 echo "This is new configuration structure" 129 new_struct=yes 130 resolfile=$j/.resol 131 else 132 # Old Structure 133 new_struct=no 134 resolfile=$j/../.resol 135 fi 124 136 125 137 # Get all variables declared in section UserChoices in config.card … … 138 150 # Find the JobName : JobName might contain the variable RESOL_ATM_3D that will be replaced by what is in .resol file 139 151 if [ ! X$( echo ${config_UserChoices_JobName} | grep ${RESOL_ATM_3D} ) = X ] ; then 140 TRUERESOL=$( find ../ -name ".resol" -exec tail -1 {} \; | awk "-F=" '{print $2}' ) 152 TRUERESOL=$( tail -1 $resolfile | awk "-F=" '{print $2}' ) 153 echo TRUERESOL = $TRUERESOL 141 154 JobName=$( echo ${config_UserChoices_JobName} | sed -e "s/${RESOL_ATM_3D}/${TRUERESOL}/" ) 142 155 IGCM_card_WriteOption ${j}'/'${F_CFG} UserChoices JobName ${JobName} 143 156 elif [ ! X$( echo ${config_UserChoices_JobName} | grep ${RESOL} ) = X ] ; then 144 TRUERESOL=$( find ../ -name ".resol" -exec head -1 {} \;)157 TRUERESOL=$( head -1 $resolfile ) 145 158 JobName=$( echo ${config_UserChoices_JobName} | sed -e "s/${RESOL}/${TRUERESOL}/" ) 146 159 IGCM_card_WriteOption ${j}'/'${F_CFG} UserChoices JobName ${JobName} … … 151 164 152 165 # Add specific treatment for new type of directory structure 153 if [ -d ${j}/EXPERIMENTS ] && [ -d ${j}/GENERAL ] ; then 154 echo "This is new configuration structure" 166 if [ ${new_struct} == yes ] ; then 155 167 156 168 if [ "X${config_UserChoices_ExpType}" = X ] ; then
Note: See TracChangeset
for help on using the changeset viewer.