Changeset 785 for trunk/libIGCM/AA_SE_Checker
- Timestamp:
- 02/04/13 16:39:38 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/libIGCM/AA_SE_Checker
r731 r785 48 48 49 49 if [ ! -d ${CARD_DIR} ]; then 50 51 50 echo "No ${CARD_DIR}, we stop here" 51 exit 52 52 fi 53 53 … … 109 109 while [ ${an_fin} -le ${an_fin_all} ] ; do 110 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 111 countTotal=0 112 countGood=0 113 countBad=0 114 115 IGCM_debug_Print 1 " DateBegin/End for SE : ${an_deb}_${an_fin} " 116 117 for comp in ${config_ListOfComponents[*]} ; do 118 localcountBad=0 119 # Debug Print 120 IGCM_debug_Print 1 ${comp} 121 # Define component 122 IGCM_card_DefineArrayFromOption ${CARD_DIR}/config.card ListOfComponents ${comp} 123 eval compname=\${config_ListOfComponents_${comp}[0]} > /dev/null 2>&1 124 125 # Read libIGCM compatibility version in ${compname}.card 126 card=${CARD_DIR}/COMP/${compname}.card 127 128 # Read and Build Output File stuff 129 #IGCM_debug_Print 1 "DefineArrayFromOption : ${compname}_OutputFiles ${card}" 130 IGCM_card_DefineArrayFromOption ${card} OutputFiles List 131 ListFilesName=${compname}_OutputFiles_List 132 eval FileName0=\${${ListFilesName}[0]} > /dev/null 2>&1 133 # 134 if [ X${FileName0} != X${NULL_STR} ] ; then 135 # 136 # INITIALISATION 137 # 138 eval NbFiles=\${#${ListFilesName}[@]} > /dev/null 2>&1 139 typeset i=2 140 # 141 until [ $i -gt $NbFiles ]; do 142 # 143 eval flag_post=\${${ListFilesName}[$i]} > /dev/null 2>&1 144 # 145 if [ X${flag_post} != XNONE ] ; then 146 # 147 # Check if seasonal is required for this file 148 # 149 IGCM_card_DefineArrayFromSection ${card} ${flag_post} 150 # 151 # Seasonal case : If option Seasonal is not found (old cards) put SEASONAL ON by default 152 # 153 # variable option allready typeset above 154 for option in $( eval echo \${${compname}_${flag_post}[*]} ) ; do 155 if [ ${option} = Seasonal ] ; then 156 FoundSeasonal=true 157 IGCM_card_DefineVariableFromOption ${card} ${flag_post} Seasonal 158 fi 159 done 160 # 161 if [ ! X${FoundSeasonal} = Xtrue ] ; then 162 eval ${compname}_${flag_post}_Seasonal=ON 163 fi 164 # 165 if [ ! X$( eval echo \${${compname}_${flag_post}_Seasonal} ) = XON ] ; then 166 (( i=i+3 )) 167 continue 168 fi 169 # 170 # CREATE LIST 171 # 172 FILE=$( echo ${flag_post} | awk "-FPost_" '{print $2}' ) 173 # 174 DIRECTORY=${R_SAVE}/${comp}/Analyse/SE 175 # 176 TestedFile=${config_UserChoices_JobName}_SE_${an_deb}_${an_fin}_${FILE}.nc 177 # 178 (( countTotal = countTotal + 1 )) 179 IGCM_sys_TestFileArchive ${DIRECTORY}/${TestedFile} >/dev/null 2>&1 180 if [ ! $? = 0 ] ; then 181 eval set +A LISTE_FILE_${comp}_${an_deb} \$\{LISTE_FILE_${comp}_${an_deb}[*]} ${TestedFile} 182 (( countBad = countBad + 1 )) 183 (( localcountBad = localcountBad + 1 )) 184 else 185 (( countGood = countGood + 1 )) 186 fi 187 fi 188 (( i=i+3 )) # to explore file list 189 done # until [ $i -eq $NbFiles ] 190 fi # [ X${FileName0} != X${NULL_STR} ] 191 192 [ $localcountBad = 0 ] || IGCM_debug_Print 1 "$localcountBad file(s) missing for ${comp} : " $( eval echo \${LISTE_FILE_${comp}_${an_deb}[*]} ) 193 done 194 195 # create_se submit if files don't exist 196 if [ $countGood != $countTotal ] ; then 197 IGCM_debug_Print 2 -e "\033[1;31mSubmit create_se \033[m for period ${an_deb}-${an_fin}" 198 199 listVarEnv="libIGCM,SUBMIT_DIR,POST_DIR,DateBegin,PeriodDateEnd,RebuildFrequency,RESOL_ATM,RESOL_SRF,RESOL_SBG,RESOL_OCE,RESOL_ICE,RESOL_MBG" 200 export libIGCM=${libIGCM} 201 export SUBMIT_DIR=${CARD_DIR} 202 export POST_DIR=${POST_DIR} 203 export DateBegin=${an_deb} 204 export PeriodDateEnd=${an_fin}1231 205 export RebuildFrequency=${RebuildFrequency} 206 export RESOL_ATM=${RESOL_ATM} 207 export RESOL_SRF=${RESOL_SRF} 208 export RESOL_SBG=${RESOL_SBG} 209 export RESOL_OCE=${RESOL_OCE} 210 export RESOL_ICE=${RESOL_ICE} 211 export RESOL_MBG=${RESOL_MBG} 212 export listVarEnv=${listVarEnv} 213 IGCM_sys_MkdirWork ${POST_DIR} 214 IGCM_debug_Verif_Exit_Post 215 Script_Post_Output=create_se.${PeriodDateEnd} 216 IGCM_sys_QsubPost create_se 217 218 echo 219 fi 220 221 (( an_deb = an_deb + freq )) 222 (( an_fin = an_fin + freq )) 223 224 224 done # while
Note: See TracChangeset
for help on using the changeset viewer.