[gradsusr] Plotting Values via LAT/LON

Kathryn Sellwood - NOAA Affiliate kathryn.sellwood at noaa.gov
Thu Jun 29 11:11:42 EDT 2017


your code looks good, I think the problem is that Grads defines longitude
in values from 0 - 360 so "if lon < 0 then lon=lon + 180"

On Thu, Jun 29, 2017 at 9:24 AM, CW Weather <weatherstu at chorleyweather.com>
wrote:

> Hi there,
>
> Im trying to plot t2m temperatures at certain LAT-LON but with no success.
> I have found some code that is used with WRF but isnt working on my grads
> when running GFS data. Can anybody shed more light on this or share some
> code for doing this.
>
>
>
> Code Example:
>
> ***First query to get x,y from lat/lon:
> lon = -0.118092'
> lat = 51.509865'
> 'q w2xy 'lon' 'lat
> x = subwrd(result,3)
> y = subwrd(result,6)
> ***Second query to get temp at i,j rather than x,y:
> 'q w2gr 'lon' 'lat
> x2 = subwrd(result,3)
> y2 = subwrd(result,6)
> 'define t2m = const((tmp2m-273.16),0,-u)'
> ***Query (defval) value of temp at i,j
> 'q defval t2m 'x2' 'y2
> tmp2m = subwrd(result,3)
> **Round temperature value:
> t2m = math_nint(t2m)
> 'draw string 'x' 'y' 't2m
> --
>
> Kind regards,
>
> *Stuart Markham*
>
> *Founder of CW Weather*
>
>
> _______________________________________________
> gradsusr mailing list
> gradsusr at gradsusr.org
> http://gradsusr.org/mailman/listinfo/gradsusr
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://gradsusr.org/pipermail/gradsusr/attachments/20170629/c5772be1/attachment-0001.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 9e849405.png
Type: image/png
Size: 22440 bytes
Desc: not available
Url : http://gradsusr.org/pipermail/gradsusr/attachments/20170629/c5772be1/attachment-0001.png 


More information about the gradsusr mailing list