[gradsusr] GrADS and wgrib2 temperatures in disagreement

Stephen McMillan smcmillan at planalytics.com
Tue Aug 25 12:39:36 EDT 2020


Ivan,

I am not familiar enough with wgrib2 to answer your question regarding
wgrib2 interpolation.  Perhaps another user can chime in on that.  Perhaps
doing the "gr2stn" interpolation in GrADS will yield useful results for
you.  Good luck.

Stephen

On Tue, Aug 25, 2020 at 12:27 PM Ivan Toman <ivtoman at inet.hr> wrote:

> Hello,
>
> No the 273.15 is not factor because I use same conversion in both methods
> and also difference is not constant.
>
> My lat/lon points do not correspond to the exact grid point locations.
> However, I am aware that GrADS will select nearest grid point, but, doesn't
> wgrib2 also do the same? Do you think that wgrib2 (and tslist output) does
> interpolation automatically?
>
> My wgrib2 method is this:
>
> wgrib2 $gribfile -rpn "273:-" -match "(TMP:2 m)" -lola "$lon:1:1"
> "$lat:1:1" grid.grb grib >/dev/null
>
> wgrib2 grid.grb -csv grid.csv >/dev/null
>
> where $lon and $lat are exactly same figures as are used in GrADS script.
>
> Thank you for your idea of interpolation with gr2stn, I will try it and
> see what do I get in that case.
>
> Ivan
>
>
>
> On 8/24/20 3:14 PM, Stephen McMillan wrote:
>
> Ivan,
>
> In addition to Brian's response, which would account for a difference of
> 0.15 deg only, please consider this...
>
> You said nothing about your grid data resolution so, in the example you
> provided, did you set the lat and lon to a precise grid point or to a point
> in between grid points?  When setting lat or lon, GrADS will automatically
> set to the nearest grid point, which may be different than what you
> intended.
>
> Have you considered interpolating instead to your desired point?  E.g.,
> using gr2stn or lterp.  Here's an example using gr2stn:
>
> 'd gr2stn(tmp2m-273.15,16.034,45.822)'
>
> Stephen Mc
>
> On Sun, Aug 23, 2020 at 6:08 AM Ivan Toman <ivtoman at inet.hr> wrote:
>
>> Hello dear GrADS users,
>>
>> I have a problem. If I extract 2m temperature for a single lat/lon point
>> using GrADS, it is in slight disagreement compared to same record
>> obtained from grib2 file using wgrib2.
>>
>> The difference is usually around 1C but can be larger from time to time.
>> I'm almost 100% sure I did not overlook anything obvious like selecting
>> different time or diffrent lat/lon coordinates, but I leave something
>> like that as a theoretical possibility if there is no better
>> explanation. Below is an example how I extract temperatures using GrADS.
>> Grib2 is WRF file, Lambert projection, and ctl/idx files are created
>> using latest g2ctl and gribmap utilities. I note this because it might
>> be that projection gets somehow skewed and that GrADS takes data from
>> incorrect positions. Is that possible at all?
>>
>> It seems very important to add that wgrib2 method is in exact agreement
>> to the tslist output from WRF, so for now I take that one as "correct"
>> one and GrADS figures as "incorrect".
>>
>> Simple extraction method in GrADS:
>>
>> 'set lat 45.822'
>> 'set lon 16.034'
>> 'set string 1 bl 3 0'
>> 'set t 13'
>> 'd tmp2m-273'
>> ans = sublin(result,2)
>> temp = subwrd(ans,4)
>>
>>
>> Is this difference normal/expected? If it is, what's the reason for
>> that? If not, is there anything else where I could search for user error?
>>
>> Thank you,
>>
>> Best regards,
>>
>> Ivan Toman
>>
>>
>>
>> _______________________________________________
>> gradsusr mailing list
>> gradsusr at gradsusr.org
>> http://gradsusr.org/mailman/listinfo/gradsusr
>>
>
> ***************************************************
>
> The information contained in this e-mail message
>
> is intended only for the use of the recipient(s)
>
> named above and may contain information that is
>
> privileged, confidential, and/or proprietary.
>
> If you are not the intended recipient, you may not
>
> review, copy or distribute this message. If you have
>
> received this communication in error, please notify
>
> the sender immediately by e-mail, and delete the original message.
>
> ***************************************************
>
>
> _______________________________________________
> gradsusr mailing listgradsusr at gradsusr.orghttp://gradsusr.org/mailman/listinfo/gradsusr
>
> _______________________________________________
> gradsusr mailing list
> gradsusr at gradsusr.org
> http://gradsusr.org/mailman/listinfo/gradsusr
>

-- 
***************************************************The information 
contained in this e-mail message is intended only for the use of the 
recipient(s) named above and may contain information that is privileged, 
confidential, and/or proprietary. If you are not the intended recipient, 
you may notreview, copy or distribute this message. If you havereceived 
this communication in error, please notify the sender immediately by 
e-mail, and delete the original 
message.***************************************************
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://gradsusr.org/pipermail/gradsusr/attachments/20200825/8f6b63b6/attachment-0001.html>


More information about the gradsusr mailing list