Changeset 993 in lmdz_wrf


Ignore:
Timestamp:
Aug 9, 2016, 5:24:31 PM (9 years ago)
Author:
lfita
Message:

Adding common projection

Location:
trunk/tools
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • TabularUnified trunk/tools/model_graphics.bash

    r977 r993  
    220220  word=$2
    221221
     222  if test $# -ne 2; then
     223    echo ${errmsg}
     224    echo "  "$fname}": wrong number of arguments !!"
     225    echo "    2 are required and "$#" are given!"
     226    echo "    passed: "$0
     227    exit
     228  fi
     229
     230
    222231  Lstring=`expr length ${string}`
    223232  Lword=`expr length ${word}`
    224233 
     234  if test ${Lstring} -lt 1; then
     235    echo ${errmsg}
     236    echo "  "$fname}": wrong string '"${string}"' !!"
     237    exit
     238  fi
     239
     240  if test ${Lword} -lt 1; then
     241    echo ${errmsg}
     242    echo "  "$fname}": wrong word '"${word}"' !!"
     243    exit
     244  fi
     245
    225246  Lfinalstring=`expr ${Lstring} - ${Lword}`
    226247
     
    12371258  fname='draw_plot'
    12381259
    1239   set -x
    1240 
    12411260  plot=$1
    12421261  odir=$2
     
    12481267    if test ${additional} = 'diff'; then
    12491268      specvarplot=${diffspecificvarplot}
    1250     fi
    1251     specvarplot=${specificvarplot}
     1269    else
     1270      specvarplot=${specificvarplot}
     1271    fi
    12521272  fi
    12531273
     
    13421362      specific=false
    13431363#      if $(isInlist ${specvarplot} ${varn}); then
    1344       if test $(index_string ${specvarplot} ${vn}) -ne -1; then
    1345         vals=`list_filter ${specvarplot} ${vn}`
    1346         kvals=`list_filter ${specvarplot} ${kind}`
     1364      if test $(index_string ${specvarplot} ${varn}) -ne -1; then
     1365        vals=`list_filter ${specvarplot} ${varn}`
     1366        kvals=`list_filter ${vals} ${kind}`
    13471367        Lkvals=`expr length ${kvals}'0'`
    13481368        if test ${Lkvals} -gt 1; then
     
    13551375            colorbar=`echo ${fkvals} | tr '|' ' ' | awk '{print $6}'`
    13561376            cntformat=`echo ${fkvals} | tr '|' ' ' | awk '{print $7}'`
    1357             colorcnt=`echo ${fkvals} | tr '|' ' ' | awk '{print $8}'`
     1377            colorcnt=`echo ${fkvals} | tr '|' ' ' | awk '{print $8}' | tr ':' ' ' | awk '{print $1}'`
    13581378          fi
    13591379        fi
     
    16191639differences=true
    16201640
    1621 combosfile=${HOMEpy}/diagnostics.inf
     1641combosfile=${pyHOME}/diagnostics.inf
    16221642
    16231643####### ###### ##### #### ### ## #
     
    16491669  esac 
    16501670
    1651   modinf=`$pyHOME/nc_var.py -o model_characteristics -f None -S ${mod} | \
     1671  modinf=`${pyHOME}/nc_var.py -o model_characteristics -f None -S ${mod} | \
    16521672    grep singleline | awk '{print $2}'`
    16531673  ferrmsg $? $main "python!'model_characteristics'!failed"
     
    18241844    vdiffs=`echo ${vardiff} | tr ':' ' '`
    18251845    ivd=1
     1846    echo "      Computing diff statistics ..."
    18261847    for vdiff in ${vdiffs}; do
    18271848      echo ${vdiff}" ..."
     
    18321853        vn=`echo ${vdiff} | tr '|' ' ' | awk '{print $1}'`
    18331854        ops='None'
    1834       fi 
    1835       fileh=`echo ${varcompute} | tr ';' '\n' | grep ${vdiff} | tr '|' ' ' | awk '{print $3}'`
     1855      fi
     1856      #Modify in case of combo
     1857      if test $(expr index ${ops} '@') -eq 0; then
     1858        fileh=`echo ${varcompute} | tr ';' '\n' | grep ${vdiff} | tr '|' ' ' |       \
     1859          awk '{print $3}'`
     1860      else
     1861        set -x
     1862        Lcombo=`expr length ${vn}';'${ops}'|combo|'`
     1863        Lvarcompute=`expr length ${varcompute}`
     1864        indcombo=`index_string ${varcompute} ${vn}';'${ops}'|combo|'`
     1865        Lindcombo=`expr ${Lvarcompute} - ${indcombo}`
     1866
     1867        fileh=`echo ${varcompute:${indcombo}:${Lindcombo}} | tr ';' '\n' |           \
     1868          head -n 2  | tail -n 1 | tr '|' ' ' | awk '{print $3}'`
     1869        if test $(index_string ${ops} pinterp) -ne -1; then fileh=${fileh}'p_pinterp'; fi
     1870      fi
    18361871
    18371872      owdir=${ofold}/${mod}/${difexp1}-${difexp2}
     
    18441879      if ${filescratch}; then rm ${owdir}/${filen} >& /dev/null; fi
    18451880      if test ! -f ${owdir}/${filen}; then
     1881        set -x
    18461882        dfile1=${ofold}/${mod}/${difexp1}/${filen}
    18471883        dfile2=${ofold}/${mod}/${difexp2}/${filen}
     
    18491885        dfiles='add|'${dfile1}'|'${vn}',sub|'${dfile2}'|'${vn}
    18501886        dims='time|pres|lat|lon@'${dfiles}
     1887        Lfileh=`expr length ${fileh}`
     1888        Lfileh1=`expr ${Lfileh} - 1`
    18511889        echo "python ${pyHOME}/nc_var.py -S ${dims} -o compute_opersvarsfiles -v ${vn}"
    18521890        pyout=`python ${pyHOME}/nc_var.py -S ${dims} -o compute_opersvarsfiles -v ${vn}`
     
    18581896      fi
    18591897
    1860       echo "      Computing diff statistics ..."
    1861 
    18621898      cfdims='lon:lat:pres:time'
    18631899      cfvdims='lon:lat:pres:time'
    18641900      cdiffvn=`echo ${filen} | tr '_' ' ' | awk '{print $1}'`
    1865       cdiffh=`echo ${filen} | tr '_' ' ' | awk '{print $2}' | tr '.' ' ' | awk '{print $1}'`
     1901      cdiffh=`echo ${filen} | tr '_' ' ' | awk '{print $2}' | tr '.' ' ' |           \
     1902        awk '{print $1}'`
    18661903
    18671904      cdiffvar=${cdiffvn}'|'${ops}'|'${cdiffh}'|None|None'
    18681905
    1869       compute_statistics ${owdir} ${filen} ${owdir} ${cdiffvar} ${cfdims} ${cfvdims} \
    1870         ${filescratch}
    1871 
    1872       # Computing combos
    1873       if test $(expr index ${ops} '@') -ne -1; then
     1906      if test $(expr index ${ops} '@') -eq 0; then
     1907        compute_statistics ${owdir} ${filen} ${owdir} ${cdiffvar} ${cfdims}          \
     1908          ${cfvdims} ${filescratch}
     1909      else
     1910        # Computing combos
    18741911        echo "      Computing combos: "${ops}
    1875         combs=`echo ${ops} | tr ';' ' ' | awk '{print $2}' | tr '@' ' '`
    1876         ifile=${cdiffvn}_${fhead}
     1912        combs=`echo ${ops} | tr '@' ' '`
     1913        ifile=${cdiffvn}_${fileh}
    18771914        for comb in ${combs}; do
    18781915          combcvar=${cdiffvn}'|'${comb}'|'${cdiffh}'|None|None'
     
    18981935# Diff plotting
    18991936##
    1900     set -x
    1901 
    19021937    echo "  "${main}": Plotting diff figures ..."
    19031938    if ${figscratch}; then rm diffplotsdraw.inf; fi
     
    19631998          dvals='T:Time,Z:bottom_top,Y:south_north,X:west_east'
    19641999          dimnames='T:Time,Z:bottom_top,Y:south_north,X:west_east'
    1965           python ${HOMEpy}/vertical_interpolation.py                            \
     2000          python ${pyHOME}/vertical_interpolation.py                            \
    19662001            -f ${ofold}/${exp}/${filensfc} -o WRFp -i ${plevels} -k 'lin'            \
    19672002            -v WRFt,U,V,WRFrh,WRFght -d ${dimnames} -D T:Times,Z:ZNU,Y:XLAT,X:XLONG
     
    19692004            echo ${errormsg}
    19702005            echo "  python failed!"
    1971             echo "  python ${HOMEpy}/vertical_interpolation.py"                            \
     2006            echo "  python ${pyHOME}/vertical_interpolation.py"                            \
    19722007            "-f ${ofold}/${exp}/${filensfc} -o WRFp -i ${plevels} -k 'lin'"            \
    19732008            "-v WRFt,U,V,WRFrh,WRFght -d ${dimnames} -D T:Times,Z:ZNU,Y:XLAT,X:XLONG"
     
    19842019          fileworig=${filensfc}
    19852020          cp ${ifoldsfc}/${exp}/${fileworig} ${ifoldsfc}/${exp}/${filensfc}
    1986           python ${HOMEpy}/nc_var.py -o WRF_CFxtime_creation -f ${ifoldsfc}/${exp}/${filensfc} \
     2021          python ${pyHOME}/nc_var.py -o WRF_CFxtime_creation -f ${ifoldsfc}/${exp}/${filensfc} \
    19872022            -S 19491201000000,hours -v time
    1988           python ${HOMEpy}/nc_var.py -o WRF_CFlonlat_creation -f ${ifoldsfc}/${exp}/${filensfc}\
     2023          python ${pyHOME}/nc_var.py -o WRF_CFlonlat_creation -f ${ifoldsfc}/${exp}/${filensfc}\
    19892024            -S longitude,latitude -v XLONG,XLAT
    19902025        fi
     
    20052040            echo "    var:"${var}
    20062041            varn=`echo ${var} | tr '_' ' ' | awk '{print $2}'`
    2007             combo=`python ${HOMEpy}/diagnostics.py -f ${combosfile} -d variable_combo -v ${varn}\
     2042            combo=`python ${pyHOME}/diagnostics.py -f ${combosfile} -d variable_combo -v ${varn}\
    20082043              | grep COMBO | awk '{print $2}'`
    20092044            if test ${combo} = 'ERROR'; then
     
    20192054            ivar=`expr ${ivar} + 1`
    20202055          done
    2021           python ${HOMEpy}/diagnostics.py -d ${values} -f ${ifoldsfc}/${exp}/${filensfc} -v \
     2056          python ${pyHOME}/diagnostics.py -d ${values} -f ${ifoldsfc}/${exp}/${filensfc} -v \
    20222057            ${varcombos}
    20232058          if test $? -ne 0; then
    20242059            echo ${errormsg}
    20252060            echo "  python failed!!"
    2026             echo python ${HOMEpy}/diagnostics.py -d ${values} -f ${ifoldsfc}/${exp}/${filensfc}\
     2061            echo python ${pyHOME}/diagnostics.py -d ${values} -f ${ifoldsfc}/${exp}/${filensfc}\
    20272062              -v ${varcombos}
    20282063            exit
    20292064          fi
    2030           python ${HOMEpy}/nc_var.py -o WRF_CFxtime_creation -f diagnostics.nc                 \
     2065          python ${pyHOME}/nc_var.py -o WRF_CFxtime_creation -f diagnostics.nc                 \
    20312066            -S 19491201000000,hours -v time
    2032            python ${HOMEpy}/nc_var.py -o WRF_CFlonlat_creation -f diagnostics.nc               \
     2067           python ${pyHOME}/nc_var.py -o WRF_CFlonlat_creation -f diagnostics.nc               \
    20332068            -S longitude,latitude -v XLONG,XLAT
    20342069          mv diagnostics.nc ${ifolddiag}/${exp}
     
    20492084        echo "    var: "${varn}
    20502085        var=`echo ${varn} | tr '|' ' ' | awk '{print $2}'`
    2051         varval=`python ${HOMEpy}/drawing.py -o variable_values -S ${var} | grep all_values | awk '{print $3}'`
     2086        varval=`python ${pyHOME}/drawing.py -o variable_values -S ${var} | grep all_values | awk '{print $3}'`
    20522087        varname=`echo ${varval} | tr ',' ' ' | awk '{print $1}'`
    20532088
     
    20582093        if test ${vark} = 'mean'; then
    20592094          vals='time:-1|z:-1|y:-1|x:-1,time:x,mean,pressure:lat'
    2060           python ${HOMEpy}/nc_var.py -o file_oper_alongdims -S ${vals} -f ${file} -v ${var}
     2095          python ${pyHOME}/nc_var.py -o file_oper_alongdims -S ${vals} -f ${file} -v ${var}
    20612096          pyexec=$?
    20622097          if test ${pyexec} -ne 0; then
    20632098            echo ${errormsg}
    20642099            echo "  "${main}": python fai1ls!"
    2065             echo "python ${HOMEpy}/nc_var.py -o file_oper_alongdims -S ${vals} -f ${file} -v ${var}"
     2100            echo "python ${pyHOME}/nc_var.py -o file_oper_alongdims -S ${vals} -f ${file} -v ${var}"
    20662101            exit
    20672102          else
     
    20772112          if test ${var} = 'ACRAINTOT'; then
    20782113            files='add|'${file}'|RAINC,add|'${file}'|RAINNC'
    2079             python ${HOMEpy}/nc_var.py -S 'time|XLAT|XLONG@'${files} -o compute_opersvarsfiles \
     2114            python ${pyHOME}/nc_var.py -S 'time|XLAT|XLONG@'${files} -o compute_opersvarsfiles \
    20802115              -v ${var}
    20812116            mv opersvarsfiles_${var}.nc ${ofold}/${exp}
     
    20832118          elif test ${var} = 'RAINTOT'; then
    20842119            dims='Time@time,bottom_top@ZNU,south_north@XLAT,west_east@XLONG'
    2085             python ${HOMEpy}/diagnostics.py -d ${dims} -v 'RAINTOT|RAINC@RAINNC@time' -f ${file}
     2120            python ${pyHOME}/diagnostics.py -d ${dims} -v 'RAINTOT|RAINC@RAINNC@time' -f ${file}
    20862121            mv diagnostics.nc ${ofold}/${exp}/diagnostics_${varname}.nc
    20872122            file=${ofold}/${exp}/diagnostics_${varname}.nc
     
    20952130              var=${cl}
    20962131              echo "    var: "${var}
    2097               python ${HOMEpy}/nc_var.py -o file_oper_alongdims -S ${vals} -f ${file} -v ${cl}
     2132              python ${pyHOME}/nc_var.py -o file_oper_alongdims -S ${vals} -f ${file} -v ${cl}
    20982133              pyexec=$?
    20992134              if test ${pyexec} -ne 0; then
    21002135                echo ${errormsg}
    21012136                echo "  "${main}": python fails!"
    2102                 echo python ${HOMEpy}/nc_var.py -o file_oper_alongdims -S ${vals} -f ${file} -v ${cl}
     2137                echo python ${pyHOME}/nc_var.py -o file_oper_alongdims -S ${vals} -f ${file} -v ${cl}
    21032138                exit
    21042139              fi
     
    21062141              vals='Time:-1|south_north:-1|west_east:-1,Time,mean,XLONG:XLAT'
    21072142              dims='Time@time,bottom_top@ZNU,south_north@XLAT,west_east@XLONG'
    2108               python ${HOMEpy}/nc_var.py -o file_oper_alongdims -S ${vals} -f ${file} -v ${cl}
     2143              python ${pyHOME}/nc_var.py -o file_oper_alongdims -S ${vals} -f ${file} -v ${cl}
    21092144              pyexec=$?
    21102145              if test ${pyexec} -ne 0; then
     
    21202155          elif test ${var} = 'WRFbils' && test ! -f ${ofold}/${exp}/diagnostics_${varname}.nc; then
    21212156            dims='Time@time,south_north@XLAT,west_east@XLONG'
    2122             python ${HOMEpy}/diagnostics.py -d ${dims} -v 'WRFbils|HFX@LH' -f ${file}
     2157            python ${pyHOME}/diagnostics.py -d ${dims} -v 'WRFbils|HFX@LH' -f ${file}
    21232158            mv diagnostics.nc ${ofold}/${exp}/diagnostics_${varname}.nc
    21242159            file=${ofold}/${exp}/diagnostics_${varname}.nc
     
    21262161          elif test ${var} = 'WRFprw' && test ! -f ${ofold}/${exp}/diagnostics_${varname}.nc; then
    21272162            dims='Time@time,bottom_top@ZNU,south_north@XLAT,west_east@XLONG'
    2128             python ${HOMEpy}/diagnostics.py -d ${dims} -v 'WRFprw|WRFdens@QVAPOR' -f ${file}
     2163            python ${pyHOME}/diagnostics.py -d ${dims} -v 'WRFprw|WRFdens@QVAPOR' -f ${file}
    21292164            mv diagnostics.nc ${ofold}/${exp}/diagnostics_${varname}.nc
    21302165            file=${ofold}/${exp}/diagnostics_${varname}.nc
     
    21322167          elif test ${var} = 'WRFrhs' && test ! -f ${ofold}/${exp}/diagnostics_${varname}.nc; then
    21332168            dims='Time@time,bottom_top@ZNU,south_north@XLAT,west_east@XLONG'
    2134             python ${HOMEpy}/diagnostics.py -d ${dims} -v 'WRFrhs|PSFC@T2@Q2' -f ${file}
     2169            python ${pyHOME}/diagnostics.py -d ${dims} -v 'WRFrhs|PSFC@T2@Q2' -f ${file}
    21352170            mv diagnostics.nc ${ofold}/${exp}/diagnostics_${varname}.nc
    21362171            file=${ofold}/${exp}/diagnostics_${varname}.nc
     
    21462181          fi
    21472182          if test ! -f ${ofold}/${exp}/${varname}${oper}.nc; then
    2148             python ${HOMEpy}/nc_var.py -o file_oper_alongdims -S ${vals} -f ${file} -v ${var}
     2183            python ${pyHOME}/nc_var.py -o file_oper_alongdims -S ${vals} -f ${file} -v ${var}
    21492184            pyexec=$?
    21502185            if test ${pyexec} -ne 0; then
     
    21672202              vals='Time:-1|south_north:-1|west_east:-1,Time,mean,XLONG:XLAT'
    21682203              dims='Time@time,bottom_top@ZNU,south_north@XLAT,west_east@XLONG'
    2169               python ${HOMEpy}/nc_var.py -o file_oper_alongdims -S ${vals} -f ${file} -v ${cld}
     2204              python ${pyHOME}/nc_var.py -o file_oper_alongdims -S ${vals} -f ${file} -v ${cld}
    21702205              pyexec=$?
    21712206              if test ${pyexec} -ne 0; then
     
    21812216            vals='Time:-1|south_north:-1|west_east:-1,Time,mean,XLONG:XLAT'
    21822217            dims='Time@time,bottom_top@ZNU,south_north@XLAT,west_east@XLONG'
    2183             python ${HOMEpy}/nc_var.py -o file_oper_alongdims -S ${vals} -f ${file} -v ${var}
     2218            python ${pyHOME}/nc_var.py -o file_oper_alongdims -S ${vals} -f ${file} -v ${var}
    21842219            pyexec=$?
    21852220            if test ${pyexec} -ne 0; then
     
    22172252      dims='bottom_top@bottom_top,south_north@south_north,west_east@west_east'
    22182253      if test ! -f ${ofold}/${exp}/${var}t-lonmean.nc; then
    2219         python ${HOMEpy}/nc_var.py -o file_oper_alongdims -S ${vals} -f ${tmean} -v ${var}
     2254        python ${pyHOME}/nc_var.py -o file_oper_alongdims -S ${vals} -f ${tmean} -v ${var}
    22202255        pyexec=$?
    22212256        if test ${pyexec} -ne 0; then
     
    22572292      cntvar=`echo ${gpair} | tr '@' ' ' | awk '{print $2}'`
    22582293      echo "  couple: "${shdvar}'-'${cntvar}
    2259       shdvals=`python ${HOMEpy}/drawing.py -o variable_values -S ${shdvar} | grep all_values | awk '{print $3}'`
    2260       cntvals=`python ${HOMEpy}/drawing.py -o variable_values -S ${cntvar} | grep all_values | awk '{print $3}'`
     2294      shdvals=`python ${pyHOME}/drawing.py -o variable_values -S ${shdvar} | grep all_values | awk '{print $3}'`
     2295      cntvals=`python ${pyHOME}/drawing.py -o variable_values -S ${cntvar} | grep all_values | awk '{print $3}'`
    22612296      files=${ofold}'/'${exp}'/'${shdvar}'mean.nc,'${ofold}'/'${exp}'/'${cntvar}'mean.nc'
    22622297
     
    23502385      if test ${vark} = 'sfc' || test ${vark} = 'diag' &&
    23512386       ! $(isin_list ${coup2D} ${gpair}); then
    2352         python ${HOMEpy}/drawing.py -f ${files} -o draw_2D_shad_cont_time -S ${graphvals} -v   \
     2387        python ${pyHOME}/drawing.py -f ${files} -o draw_2D_shad_cont_time -S ${graphvals} -v   \
    23532388          ${shdstdn}'mean,'${cntstdn}'mean'
    23542389        pyexc=$?
    23552390      else
    2356         python ${HOMEpy}/drawing.py -f ${files} -o draw_2D_shad_cont -S ${graphvals} -v        \
     2391        python ${pyHOME}/drawing.py -f ${files} -o draw_2D_shad_cont -S ${graphvals} -v        \
    23572392          ${shdstdn}'mean,'${cntstdn}'mean'
    23582393        pyexc=$?
     
    23762411        echo '  '${shdstdn}'mean,'${cntstdn}'mean'
    23772412
    2378         python ${HOMEpy}/drawing.py -f ${files} -o draw_2D_shad_cont -S ${graphvals} -v        \
     2413        python ${pyHOME}/drawing.py -f ${files} -o draw_2D_shad_cont -S ${graphvals} -v        \
    23792414          ${shdstdn}'mean,'${cntstdn}'mean'
    23802415        pyexc=$?
     
    24082443      var=`ncdump -h ${tmean} | grep float | grep mean | tr '(' ' ' | awk '{print $2}'`
    24092444      if test ! ${var} = 'cltmean'; then
    2410         shdvals=`python ${HOMEpy}/drawing.py -o variable_values -S ${var} |          \
     2445        shdvals=`python ${pyHOME}/drawing.py -o variable_values -S ${var} |          \
    24112446          grep all_values | awk '{print $3}'`
    24122447        cbar=`echo ${shdvals} | tr ',' ' ' | awk '{print $7}'`
     
    24272462#        vals=${vals}'None:None:true'
    24282463#        dims='south_north@XLAT,west_east@XLONG'
    2429         python ${HOMEpy}/nc_var.py -o WRF_CFlonlat_creation -S longitude,latitude    \
     2464        python ${pyHOME}/nc_var.py -o WRF_CFlonlat_creation -S longitude,latitude    \
    24302465          -f ${tmean} -v XLONG,XLAT
    24312466        vals=${var}':longitude|-1,latitude|-1:longitude:latitude:'${cbar}':'${xtrms}':monthly|mean:pdf:'
    24322467        vals=${vals}'None:None:true'
    24332468        dims='south_north@latitude,west_east@longitude'
    2434         python ${HOMEpy}/drawing.py -o draw_2D_shad -S ${vals} -f ${tmean} -v ${var}
     2469        python ${pyHOME}/drawing.py -o draw_2D_shad -S ${vals} -f ${tmean} -v ${var}
    24352470        pyexec=$?
    24362471        if test ${pyexec} -ne 0; then
     
    24572492  for exp in ${exps}; do
    24582493    file=${ofold}/${exp}/vertical_interpolation_WRFp.nc
    2459 #    python ${HOMEpy}/nc_var.py -o WRF_CFlonlat_creation -S longitude,latitude        \
     2494#    python ${pyHOME}/nc_var.py -o WRF_CFlonlat_creation -S longitude,latitude        \
    24602495#     -f ${file} -v lon,lat
    24612496## ALREADY done!
    2462 #    python ${HOMEpy}/nc_var.py -o valmod -S lowthres@oper,0.,sumc,360. -f ${file}    \
     2497#    python ${pyHOME}/nc_var.py -o valmod -S lowthres@oper,0.,sumc,360. -f ${file}    \
    24632498#       -v lon
    24642499    if test ${exp} = 'AR40'; then labexp='wlmdza'
     
    24682503      echo "  pt: "${pt}
    24692504      vals='x:15|y:'${pt}'|time:23'
    2470       lonval=`python ${HOMEpy}/nc_var.py -o varout -f ${file} -S ${vals} -v lon |    \
     2505      lonval=`python ${pyHOME}/nc_var.py -o varout -f ${file} -S ${vals} -v lon |    \
    24712506        awk '{print $2}'`
    2472       latval=`python ${HOMEpy}/nc_var.py -o varout -f ${file} -S ${vals} -v lat |    \
     2507      latval=`python ${pyHOME}/nc_var.py -o varout -f ${file} -S ${vals} -v lat |    \
    24732508        awk '{print $2}'`
    2474       tval=`python ${HOMEpy}/nc_var.py -o varout -f ${file} -S ${vals} -v time |     \
     2509      tval=`python ${pyHOME}/nc_var.py -o varout -f ${file} -S ${vals} -v time |     \
    24752510        awk '{print $2}'`
    24762511      for var in ${vars}; do
    24772512        echo "    var: "${var}
    24782513
    2479         shdvals=`python ${HOMEpy}/drawing.py -o variable_values -S ${var} |          \
     2514        shdvals=`python ${pyHOME}/drawing.py -o variable_values -S ${var} |          \
    24802515          grep all_values | awk '{print $3}'`
    24812516        cbar=`echo ${shdvals} | tr ',' ' ' | awk '{print $7}'`
     
    24942529        vals=${vals}${xtrms}':'${labexp}'|vertical|longitudinal|section|('${latval}
    24952530        vals=${vals}'$^{\circ}$):pdf:flip@y:None:true'
    2496         python ${HOMEpy}/drawing.py -o draw_2D_shad -S ${vals} -f ${file} -v ${var}
     2531        python ${pyHOME}/drawing.py -o draw_2D_shad -S ${vals} -f ${file} -v ${var}
    24972532        pyexec=$?
    24982533        if test ${pyexec} -ne 0; then
     
    25212556        graphvals=${graphvals}'flip@y:None'
    25222557
    2523         python ${HOMEpy}/drawing.py -o draw_2D_shad_cont -S ${graphvals}             \
     2558        python ${pyHOME}/drawing.py -o draw_2D_shad_cont -S ${graphvals}             \
    25242559          -f ${file},${file} -v ${var},${var}
    25252560        pyexec=$?
     
    25662601          values='pressure|lat@add|'${ofold}'/'${exp1}'/'${var}${fileorigd}'|'${var}'mean,'
    25672602          values=${values}'sub|'${ofold}'/'${exp2}'/'${var}${fileorigd}'|'${var}'mean'
    2568           python ${HOMEpy}/nc_var.py -o compute_opersvarsfiles -S ${values} -v ${var}
     2603          python ${pyHOME}/nc_var.py -o compute_opersvarsfiles -S ${values} -v ${var}
    25692604          pyexec=$?
    25702605          if test ${pyexec} -ne 0; then
     
    25772612          values='longitude|latitude@add|'${ofold}'/'${exp1}'/'${var}${fileorigd}'|'${var}'mean,'
    25782613          values=${values}'sub|'${ofold}'/'${exp2}'/'${var}${fileorigd}'|'${var}'mean'
    2579           python ${HOMEpy}/nc_var.py -o compute_opersvarsfiles -S ${values} -v ${var}
     2614          python ${pyHOME}/nc_var.py -o compute_opersvarsfiles -S ${values} -v ${var}
    25802615          pyexec=$?
    25812616          if test ${pyexec} -ne 0; then
     
    25972632        echo "  couple: "${shdvar}'-'${cntvar}
    25982633
    2599         shdvals=`python ${HOMEpy}/drawing.py -o variable_values -S ${shdvar} | grep all_values | awk '{print $3}'`
    2600         cntvals=`python ${HOMEpy}/drawing.py -o variable_values -S ${cntvar} | grep all_values | awk '{print $3}'`
     2634        shdvals=`python ${pyHOME}/drawing.py -o variable_values -S ${shdvar} | grep all_values | awk '{print $3}'`
     2635        cntvals=`python ${pyHOME}/drawing.py -o variable_values -S ${cntvar} | grep all_values | awk '{print $3}'`
    26012636        files=${ofold}'/'${shdvar}'_diff.nc,'${ofold}'/'${cntvar}'_diff.nc'
    26022637
     
    26322667        graphvals=${graphvals}${shdstdn}'|&|'${cntstdn}':pdf:flip@y:None'
    26332668
    2634         python ${HOMEpy}/drawing.py -o draw_2D_shad_cont -S ${graphvals}             \
     2669        python ${pyHOME}/drawing.py -o draw_2D_shad_cont -S ${graphvals}             \
    26352670          -f ${files} -v ${shdvar},${cntvar}
    26362671        pyexec=$?
     
    26482683      for var in ${vars}; do
    26492684        echo "  "${var}
    2650         vals=`python ${HOMEpy}/drawing.py -o variable_values -S ${var} | grep all_values | awk '{print $3}'`
     2685        vals=`python ${pyHOME}/drawing.py -o variable_values -S ${var} | grep all_values | awk '{print $3}'`
    26512686        file=${ofold}/${var}_diff.nc
    26522687
     
    26632698        vals=${vals}${xtrms}':'${exp1}'-'${exp2}'|meridional|monthly|average|differences:'
    26642699        vals=${vals}'pdf:None:None:true'
    2665         python ${HOMEpy}/drawing.py -o draw_2D_shad -S ${vals} -f ${file} -v ${var}
     2700        python ${pyHOME}/drawing.py -o draw_2D_shad -S ${vals} -f ${file} -v ${var}
    26662701        pyexec=$?
    26672702        if test ${pyexec} -ne 0; then
  • TabularUnified trunk/tools/model_graphics_template.dat

    r977 r993  
    1616
    1717# python HOME
    18 HOMEpy = ${HOME}/etudes/WRF_LMDZ/svn/LMDZ_WRF/tools
     18pyHOME = /home/lluis/etudes/WRF_LMDZ/svn/LMDZ_WRF/tools
     19# cdo HOME
     20cdoHOME = /home/lluis/bin/gcc_cdo/1.6.4rc6/bin/cdo
    1921
    2022# Srcatch: should be any previous work removed and start from the scratch?
    21 scratch = false
     23scratch = true
    2224
    2325# Scratch files: should be any files previous work removed and start from the scratch?
     
    3436
    3537# Debug
    36 debug=false
     38debug = true
    3739
    3840# Folder with the files
     
    8587#vartmean = tas:uas:vas:ps:pr:pracc:rsds:prw:evspsbl:hfss:hfls:hurs:huss:zmla:hufs:wakes:lwakeh:stherm:zmaxth:clt:cll:clm:clh:prc:prls:bils:wss
    8688#varxmean = ta:ua:va:hur:hurs:tas:wss:ps
    87 #vardiff = tas|last:tas|xmean:tas|tmean
    8889#varpinterp = ta:ua:va:hur:ws:hus
    8990#varcombo = ta;pinterp@last@xmean:ua;pinterp@last@xmean:va;pinterp@last@xmean:hur;pinterp@last@xmean:ws;pinterp@turb@xmean:hus;pinterp@turb@xmean
     
    9596varcombo = ta;pinterp@last@xmean:ua;pinterp@last@xmean:va;pinterp@last@xmean:hur;pinterp@last@xmean:ws;pinterp@turb@xmean:hus;pinterp@turb@xmean
    9697
    97 vardiff = tas|last:tas|xmean:tas|tmean:wss|last:wss|xmean:wss|tmean
     98vardiff = tas|last:tas|xmean:tas|tmean:wss|last:wss|xmean:wss|tmean:ua|pinterp@last@xmean:va|pinterp@last@xmean
    9899
    99100# Operations which attach 'mean' at the end of the variable name
    100 varmeanname='Lmean:lmean:tmean:xmean:ymean'
     101varmeanname=Lmean:lmean:tmean:xmean:ymean
    101102
    102103# Pressure levels
     
    106107plevels = 100000.:97500.:95000.:92500.:90000.:85000.:80000.:75000.:70000.:65000.:60000.:55000.:50000.:45000.:40000.:35000.:30000.:25000.:20000.:15000.:10000.:5000.:2500.:1000.:500.:250.
    107108
     109# Common projection
     110#   File with the information of the projection to be used for inter-model differences
     111#   File obtained from 'cdo griddes'
     112commonproj = WaqualCommon.griddes
    108113
    109114# Kind of plots
     
    119124#drawplots = shadcont2Dsfc:shadconthovmsfc:sahdcont2Dzsec
    120125drawplots = shadcont2Dzsec
    121 drawdiffplots = shadcont2Dsfc
     126drawdiffplots = shadcont2Dsfc:shadconthovmsfc:sahdcont2Dzsec
    122127
    123128# Figures which can be made directly without another model/experiment output
     
    126131pltshadcont2Dsfc = huss|tmean#tas|tmean:vas|tmean#uas|tmean:ps|tmean#wss|tmean:pr|tmean#rsds|tmean:prw|tmean#clt|tmean:hfls|tmean#hfss|tmean:evspsbl|tmean#bils|tmean:zmaxth|tmean#stherm|tmean:wakeh|tmean#wakes|tmean:zmaxth|tmean#stherm|tmean:prls|tmean#prc|tmean:clt|tmean#cll|tmean:clm|tmean#clh|tmean:hurs|tmean#zmla|tmean:huss|last#tas|last:vas|last#uas|last:ps|last#wss|tmean:pr|last#rsds|last:prw|last#clt|last:hfls|last#hfss|last:evspsbl|last#bils|last:zmaxth|last#stherm|last:wakeh|last#wakes|last:zmaxth|last#stherm|last:prls|last#prc|last:clt|last#cll|last:clm|last#clh|last:hurs|last#zmla|last
    127132pltshadconthovmsfc = hurs|xmean#tas|xmean:wss|xmean#ps|xmean
    128 pltshadcont2Dzsec=ua|pinterp@last@xmean#va|pinterp@last@xmean:hur|pinterp@last@xmean#ta|pinterp@last@xmean:ws|pinterp@turb@xmean#hus|pinterp@turb@xmean
     133pltshadcont2Dzsec = ua|pinterp@last@xmean#va|pinterp@last@xmean:hur|pinterp@last@xmean#ta|pinterp@last@xmean:ws|pinterp@turb@xmean#hus|pinterp@turb@xmean
    129134
    130 pltdiffshadcont2Dsfc = tas|tmean#wss|tmean:tas|last#wss|last
     135pltdiffshadcont2Dsfc = tas|tmean#wss|tmean:wss|last#tas|last
     136pltdiffshadconthovmsfc = wss|xmean#tas|xmean
     137pltdiffshadcont2Dzsec = ua|pinterp@last@xmean#va|pinterp@last@xmean
    131138
    132139# Specific variable-statistisc graphic parameters (if no value is given, they will be retrieved from 'variables_values.dat')
     
    142149#        [colorcnt]: color for the countor lines
    143150specificvarplot = cll|last|shadcont2Dsfc|0.|1.|gist_gray|%g|black:clh|last|shadcont2Dsfc|0.|1.|gist_gray|%g|black:husturbmean|pinterp@turb@xmean|shadcont2Dzsec|0.|1.e-6|Blues|%g|black
    144 diffspecificvarplot = tas|tmean|shadcont2Dsfc|-20.|20.seismic|%g|black:wss|tmean|shadcont2Dsfc|-30.|30.|seismic|%g|black:tas|last|shadcont2Dsfc|-20.|20.seismic|%g|black:wss|last|shadcont2Dsfc|-30.|30.|seismic|%g|black
     151diffspecificvarplot = tas|tmean|shadcont2Dsfc|-20.|20.|seismic|%g|black:wss|tmean|shadcont2Dsfc|-30.|30.|seismic|%g|black:tas|last|shadcont2Dsfc|-20.|20.|seismic|%g|black:wss|last|shadcont2Dsfc|-30.|30.|seismic|%g|black
    145152
    146153# Figures output kind
Note: See TracChangeset for help on using the changeset viewer.