Changeset 915 in lmdz_wrf for trunk/tools
- Timestamp:
- Jun 20, 2016, 8:08:32 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tools/model_graphics.bash
r912 r915 144 144 Spyout=`echo ${pyout} | tr '\n' '#' | tr ' ' '!'` 145 145 ferrmsgF ${pyn} ${fname} "python!'varaddattr'!'units'!failed#"${Spyout} ${wrff} 146 fi 147 done 148 } 149 150 function cleaning_varsfile() { 151 # Function to keep only a list of variables from a file 152 # filen= file to clean 153 # keepvars= ':' separated list of variables to keep 154 fname='cleaning_varsfile' 155 156 filen=$1 157 keepvars=$2 158 159 fvars=`${pyHOME}/nc_var.py -o ivars -f ${filen} | grep allvars | tr '=' ' ' | \ 160 awk '{print $3}'` 161 fvs=`echo ${fvars} | tr ':' ' '` 162 163 for fv in ${fvs}; do 164 if ! $(isInlist ${keepvars} ${fv}); then 165 pyout=`python ${pyHOME}/nc_var.py -o varrm -v ${fv} -f ${filen}` 166 pyn=$? 167 Spyout=`echo ${pyout} | tr '\n' '#' | tr ' ' '!'` 168 ferrmsg ${pyn} ${fname} "python!'varrm'!'${fv}'!failed#"${Spyout} 146 169 fi 147 170 done … … 220 243 221 244 if test ! -f ${filen} && test ! -f ${odir}/${CFvarn}_${fhead}.nc; then 222 if test ! ${modvar} = 'None'; then 245 # Since model direct values are retrieved from `variables_valules.dat' which was initially coincived 246 # as a way to only give variable attributes, range and color bars, if a variable has a diagnostic 247 # way to be computed, the later one will be preferred 248 249 if test ! ${modvar} = 'None' && test ${diagvar} = 'None'; then 223 250 # model variable 224 251 values=${modvar}',0,-1,-1' … … 251 278 idiagv=`expr ${idiagv} + 1` 252 279 done 253 254 280 pyout=`python ${pyHOME}/diagnostics.py -f ${cf} -d ${dims} -v ${diagn}'|'${diagc}` 255 281 pyn=$? … … 276 302 fi 277 303 fi 278 279 304 280 305 ifile=`expr ${ifile} + 1` … … 463 488 esac 464 489 fi 490 491 cleaning_varsfile ${filen} ${CFvarn}':lon:lat:pres:time' 465 492 # exit 466 493 # LLUIS
Note: See TracChangeset
for help on using the changeset viewer.