[gradsusr] Plotting Values via LAT/LON

CW Weather weatherstu at chorleyweather.com
Thu Jun 29 09:24:25 EDT 2017


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_
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://gradsusr.org/pipermail/gradsusr/attachments/20170629/ab18760e/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/ab18760e/attachment-0001.png 


More information about the gradsusr mailing list