Changeset 912 in lmdz_wrf for trunk/tools
- Timestamp:
- Jun 20, 2016, 1:41:24 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tools/model_graphics.bash
r908 r912 68 68 # msg: message to write ('!' for spaces, '#' for end of line) 69 69 # FileName: name of the file to remove in case of error 70 comdexit= $170 comdexit=`expr $1 + 0` 71 71 ref=$2 72 72 msg=$3 … … 75 75 if test ${comdexit} -ne 0; then 76 76 echo "ERROR -- error -- ERROR -- error" 77 echo " "${ref}": "$(echo ${msg} | tr '!' ' ' | tr ' #' '\n')" !!"77 echo " "${ref}": "$(echo ${msg} | tr '!' ' ' | tr '\#' '\n')" !!" 78 78 rm ${FileName} >& /dev/null 79 79 exit … … 205 205 ifS=`printf "%0${Ntotfiles}d" ${ifile}` 206 206 207 # Computing variable 207 # Computing variable 208 # Changing file head when it is a pressure-interpolated variable 208 209 if test ${vark} == 'pinterp'; then 209 210 fhead=${headerf}p … … 351 352 cd ${odir} 352 353 353 filen=${CFvarn}_${headerf}_${vark}.nc 354 if test ${vark} == 'pinterp'; then 355 fhead=${headerf}p 356 else 357 fhead=${headerf} 358 fi 359 filen=${CFvarn}_${fhead}_${vark}.nc 354 360 if ${scratch}; then rm ${filen} >& /dev/null; fi 355 361 … … 394 400 'pinterp') 395 401 vals=${plevels}',1,1' 396 python $pyHOME/nc_var.py -o pinterp -f ${cfiles} -S ${vals} -v ${CFvarn} 402 echo "python $pyHOME/nc_var.py -o pinterp -f ${cfiles} -S ${vals} -v ${CFvarn}" 403 pyout=`python $pyHOME/nc_var.py -o pinterp -f ${cfiles} -S ${vals} \ 404 -v ${CFvarn}` 405 pyn=$? 406 Spyout=`echo ${pyout} | tr '\n' '#' | tr ' ' '!'` 407 ferrmsg ${pyn} ${fname} "python!'pinterp'!failed#"${Spyout} 408 cp pinterp.nc ${filen} 409 410 # adding CF lon,lat,time in WRF files 411 if test ${headerf:0:3} = 'wrf'; then 412 WRF_toCF ${filen} ${vdnx} ${vdny} 413 fi 397 414 ;; 398 415 # temporal mean values … … 731 748 732 749 if test ! ${vark} = 'diff'; then 733 compute_statistics ${iwdir} ${CFv}_${fileh}.nc ${owdir} ${cvar} \ 750 if test ${vark} = 'pinterp'; then 751 fhead=${fileh}'p' 752 else 753 fhead=${fileh} 754 fi 755 compute_statistics ${iwdir} ${CFv}_${fhead}.nc ${owdir} ${cvar} \ 734 756 ${moddims} ${modvdims} ${scratch} 735 757 isc=`expr ${isc} + 1`
Note: See TracChangeset
for help on using the changeset viewer.