[gradsusr] gradsusr Digest, Vol 88, Issue 30
Brian Bernard
brian.brianbernard at gmail.com
Thu Jun 29 11:22:05 EDT 2017
Stuart,
This is part of my script that I use for plotting temperature at specific
latitude/longitude points:
-----------------------------------------------------------------------------------------------------------------------
'set strsiz 0.08'
'set string 1 c 6'
#'set gxout print'
#'set
# Hamilton
***First query to get x,y from lat/lon:
lon = -79.93
lat = 43.17
'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 t2 = (TMP2m(t='dis_t')-273.15)'
***Query (defval) value of temp at i,j
'q defval t2 'x2' 'y2
t2m = subwrd(result,3)
**Round temperature value:
t2m = math_nint(t2m)
'draw string 'x' 'y' 't2m
#
# London
***First query to get x,y from lat/lon:
lon = -81.15
lat = 43.03
'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 t2 = (TMP2m(t='dis_t')-273.15)'
***Query (defval) value of temp at i,j
'q defval t2 'x2' 'y2
t2m = subwrd(result,3)
**Round temperature value:
t2m = math_nint(t2m)
'draw string 'x' 'y' 't2m
---------------------------------------------------------------------------------------
The point plots should look like the enclosed image.
- Brian Bernard
www.goldenhorseshoewx.ca
On Thu, Jun 29, 2017 at 9:31 AM, <gradsusr-request at gradsusr.org> wrote:
> Send gradsusr mailing list submissions to
> gradsusr at gradsusr.org
>
> To subscribe or unsubscribe via the World Wide Web, visit
> http://gradsusr.org/mailman/listinfo/gradsusr
> or, via email, send a message with subject or body 'help' to
> gradsusr-request at gradsusr.org
>
> You can reach the person managing the list at
> gradsusr-owner at gradsusr.org
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of gradsusr digest..."
>
>
> Today's Topics:
>
> 1. Plotting Values via LAT/LON (CW Weather)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Thu, 29 Jun 2017 14:24:25 +0100
> From: CW Weather <weatherstu at chorleyweather.com>
> Subject: [gradsusr] Plotting Values via LAT/LON
> To: GrADS Users Forum <gradsusr at gradsusr.org>
> Message-ID: <af14690d19f155b98cc392beb21798a2 at chorleyweather.com>
> Content-Type: text/plain; charset="us-ascii"
>
> 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.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.png
>
> ------------------------------
>
> _______________________________________________
> gradsusr mailing list
> gradsusr at gradsusr.org
> http://gradsusr.org/mailman/listinfo/gradsusr
>
>
> End of gradsusr Digest, Vol 88, Issue 30
> ****************************************
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://gradsusr.org/pipermail/gradsusr/attachments/20170629/b5db3ddc/attachment-0001.html
-------------- next part --------------
A non-text attachment was scrubbed...
Name: d01_ontariospring4kmarw_T18_syn.png
Type: image/png
Size: 71846 bytes
Desc: not available
Url : http://gradsusr.org/pipermail/gradsusr/attachments/20170629/b5db3ddc/attachment-0001.png
More information about the gradsusr
mailing list