strange values ​​extracted with grads

All other topics about postprocessing model data (GrADS and other software), about other numerical weather prediction software (including WRF-NMM and WRF-ARW discussion unrelated to UEMS/WRF EMS), and general meteorology talk go in this forum.
dominic
Posts: 336
Joined: Thu Jun 14, 2012 7:19 am

strange values ​​extracted with grads

Post by dominic » Wed Jan 01, 2014 7:35 pm

hello everyone, a bit of time strange things happen to me with grads, I honestly do not know if they are the latest versions of wrf-ems or grads is ... exclude the latter as both grads who opengrads extract the same value.

The problem occurs for values ​​of precipitation and snow and hail. Virtually performing grads with a plot of precipitation total grads run correctly finding all the rain and doing the sums right.

The problem happens when I go to extract the values ​​of txt with grads ... in fact I appear in precipitation type values ​​2.37653e-05, or 0.0265565, then unpacked, in fact if I'm going to make the amount of rainfall in 24 hours on grads shell I appears a sum of several millimeters, while in txt file values ​​are unpacked.


What can it be?
Last edited by dominic on Wed Jan 01, 2014 9:56 pm, edited 1 time in total.

Antonix
Posts: 260
Joined: Fri Oct 16, 2009 8:53 am

Re: strange values ​​extracted with grads

Post by Antonix » Wed Jan 01, 2014 9:10 pm

Google traslate is a very "bad" choice :D ;)
what model are you referring to??
I had a similar problem with NMM.
in the latest versions of WRFEMS
the parameter of "precipitation" hourly has changed.
What you use?

dominic
Posts: 336
Joined: Thu Jun 14, 2012 7:19 am

Re: strange values ​​extracted with grads

Post by dominic » Wed Jan 01, 2014 9:54 pm

Antonix wrote:Google traslate is a very "bad" choice :D ;)
what model are you referring to??
I had a similar problem with NMM.
in the latest versions of WRFEMS
the parameter of "precipitation" hourly has changed.
What you use?

hello Antonix, google helps a lot: D


Basically I have this problem with both ARW that Nmm, use the latest version of wrfems, but I can assure you that even the penultimate released in October gives me this kind of problems. In fact it happens that on the map are plotted rainfall (correctly), while even in the extraction values ​​are specified as equivalent to 0


there is a possible solution to the problem?

dominic
Posts: 336
Joined: Thu Jun 14, 2012 7:19 am

Re: strange values ​​extracted with grads

Post by dominic » Wed Jan 01, 2014 9:58 pm

as regards the parameter I use ACPCPaccsfc for precipitation and ASNOWaccsfc for snow, however, in the plotting parameters that work well (graphical maps)

just a problem of data extraction :/

meteoadriatic
Posts: 1588
Joined: Wed Aug 19, 2009 10:05 am

Re: strange values ​​extracted with grads

Post by meteoadriatic » Thu Jan 02, 2014 9:29 am

It would help if you post your both scripts (one that works correctly and one that doesn't).

dominic
Posts: 336
Joined: Thu Jun 14, 2012 7:19 am

Re: strange values ​​extracted with grads

Post by dominic » Thu Jan 02, 2014 9:54 am

hello ivan


I extract the data for grads use scripts created by users of this forum.

This: viewtopic.php?f=11&t=611

Code: Select all

    * open WRF output, change according to your set-up
    'open /WRFV3/wrfems/lastrun/wrf.ctl'

    * initialize variables, this creates a new time series file
    * with the first line containing a header
    outfile = 'wrf_timeseries.txt'
    code=write(''outfile,'sourcerundt;locationid;tau;t2m;dpt2m;rh2m;u10m;v10m;mslp;t850;rh850;t700;hgt700;hgt1000;dswrf;apcp;tcdc;vissfc;gustsfc')

    * append a time series to a file, one line for each location
    rc=savedata(52.15,4.42,1)

    'quit'

    * Savedata: function to save data for a specific location (lat lon)
    * locationid is a custom integer number for identifying the location, which you can use with a database
    function savedata(locationlat,locationlon,locationid)
    'set t 1'
    'q time'
    _inittime = subwrd(result, 3)
    day = substr(_inittime, 4, 9)
    tm = substr(_inittime, 1, 2)

    * Set time
    'set lat ' locationlat
    'set lon ' locationlon

    outfile = 'wrf_timeseries.txt'

    'q dims'

    * start tau
    * we start at t=2 (t+1) because of the precipitation fields
    p = 2

    'set gxout stat'

    'set z 1'

    * loop through taus to t+72 (t=73)
    while ( p <= 73)
       'set t 'p''
     
       'd tmp2m-273.15'
       regel = sublin(result,9)
       res_t2m=subwrd(regel,4)

       'd dpt2m-273.15'
       regel = sublin(result,9)
       res_dpt2m=subwrd(regel,4)

       'd rh2m'
       regel = sublin(result,9)
       res_rh2m=subwrd(regel,4)

       'd ugrd10m'
       regel = sublin(result,9)
       res_windu=subwrd(regel,4)

       'd vgrd10m'
       regel = sublin(result,9)
       res_windv=subwrd(regel,4)

       'd prmslmsl/100'
       regel = sublin(result,9)
       res_slp=subwrd(regel,4)

       'd tmpprs(lev=850)-273.15'
       regel = sublin(result,9)
       res_t850=subwrd(regel,4)

       'd rhprs(lev=850)'
       regel = sublin(result,9)
       res_rh850=subwrd(regel,4)

       'd tmpprs(lev=750)-273.15'
       regel = sublin(result,9)
       res_t700=subwrd(regel,4)

       'd hgtprs(lev=700)'
       regel = sublin(result,9)
       res_hgt700=subwrd(regel,4)

       'd hgtprs(lev=1000)'
       regel = sublin(result,9)
       res_hgt1000=subwrd(regel,4)

       'd DSWRFsfc'
       regel = sublin(result,9)
       res_dswrf=subwrd(regel,4)

       'd apcpsfc'
       regel = sublin(result,9)
       res_apcp=subwrd(regel,4)

       'd VISsfc'
       regel = sublin(result,9)
       res_vissfc=subwrd(regel,4)

       'd GUST10m'
       regel = sublin(result,9)
       res_gustsfc=subwrd(regel,4)

       'd TCDCclm'
       regel = sublin(result,9)
       res_tcdc=subwrd(regel,4)
       code=write(''outfile,day''tm';'locationid';'p';'res_t2m';'res_dpt2m';'res_rh2m';'res_windu';'res_windv';'res_slp';'res_t850';'res_rh850';'res_t700';'res_hgt700';'res_hgt1000';'res_dswrf';'res_apcp';'res_tcdc';'res_vissfc';'res_gustsfc'',append)
       
       p = p + 1
    endwhile

    return rc

Practically the same values ​​are extracted by using this other script you created Cory

viewtopic.php?f=6&t=299

Code: Select all

    #!/bin/tcsh
    cd /usr1/wrfems/runs/[domain name]/emsprd/grads
    wgrib2 *.grb2 -match ":TMP:2 m above ground" -rpn "273.15:-:9:*:5:/:32:+" -colon , -vt -print 2MTEMP -lon -98.470468 29.533113 > out.txt
    sed -i 's/[^,]*,//' out.txt
    sed -i 's/lon=261.506072,//' out.txt
    sed -i 's/lat=29.546945,//' out.txt
    sed -i 's/val=//g' out.txt
    sed -i 's/vt=//g' out.txt

They always come out strange data, and in many cases such as yesterday ARW is that NMM (extracted data) gave 0 millimeters of rain per hour, in fact I noticed that snow was reported in the plains, when they were 15 degrees. The plot chart with grads instead is correct

It will be a bug in the WRF EMS 3.4?

dominic
Posts: 336
Joined: Thu Jun 14, 2012 7:19 am

Re: strange values ​​extracted with grads

Post by dominic » Thu Jan 02, 2014 9:59 am

This is an example output of 10.00 today on 00Z data NMM core

02JAN201400|City|10|4.35563|3.98019|5.17299|3.61062|97.4246|100|5.94132e-06|0|0|7.52384|11.1869|349.934|2.7446|1014.58|378.014|893.754|1250.59|28.1846|

100 = cloud cover %
5.94132e-06 = rain in 1 hour
0 = snow in 1 hour
0 = gradines in 1 hour

here this data 5.94132e-06 is really busted,
Last edited by dominic on Thu Jan 02, 2014 10:01 am, edited 1 time in total.

meteoadriatic
Posts: 1588
Joined: Wed Aug 19, 2009 10:05 am

Re: strange values ​​extracted with grads

Post by meteoadriatic » Thu Jan 02, 2014 10:00 am

Which one of these scripts gives correct results and which one doesn't? However, I don't see in second script any statment that gives precipitation amount?

dominic
Posts: 336
Joined: Thu Jun 14, 2012 7:19 am

Re: strange values ​​extracted with grads

Post by dominic » Thu Jan 02, 2014 10:05 am

later do a run with ARW and insert the output.

It must be said that if I go directly to the shell and grads do:
set lat ---
set lon ---
d ACPCPaccsfc


in the shell of grads display the output correctly, the problem is only in the extraction. I tried to install the version of wrf ems October, but nothing yesterday on many areas have fallen several millimeters while in the txt files were displayed only data example: 0.03656986.

I do not know what to say o_O

dominic
Posts: 336
Joined: Thu Jun 14, 2012 7:19 am

Re: strange values ​​extracted with grads

Post by dominic » Thu Jan 02, 2014 10:08 am

ivan place after a run of 13.00 nmm and arw about 9km north Italy is coming to atlantic pertubation, so it will be helpful to understand where is the error. to soon

Post Reply