[gradsusr] Trying to plot values (grid? ascii?) of weasdsfc onto map.
Jennifer Adams
jma at cola.iges.org
Fri Sep 25 10:56:31 EDT 2015
Hi, Chris —
Here’s how I think the numbers could be drawn in the sample from WeatherBell.
1. You have a particular grid point in mind, with a specific lat/lon
2. Set lat/lon to a range of values and draw the spatially varying graphic with shaded contours to set up the scaling.
3. Use ‘q w2xy’ to get the position of the lat/lon on the page, GrADS will return something like "X = 2.72222 Y = 5.58333”. Parse these with substr() to retain the x,y positions.
4. Fix lat/lon to the desired coordinates, display the variable, which should just print some text to the screen like “Result value = 0.33”
5. Parse that result to extract the value: val=subwrd(result,4)
6. use ‘draw string’ with the x,y positions and the data value to place the number on top of the shaded contours.
If the numbers are based on station data, then it’s a different ball of wax.
—Jennifer
On Sep 25, 2015, at 9:59 AM, Christopher Gilroy <chris.gilroy at gmail.com> wrote:
> I do want it to draw snowfall amounts, but like in the two images, not "griddy". If you look at, http://blog.chron.com/weather/wp-content/blogs.dir/2579/files/2014/01/gfs_6hr_snow_acc_se_19.png that doesn't appear to be drawing those numbers based on a grid at all. They are all scattered about on the map with no real "grid" structure to them. The only way I know how to "control" the frequency (perhaps "stepping" might be a better word?) of the drawing of values would really be to maskout coupled with re-gridding so it doesn't put a number on every possible area that weasdsfc has a value for is. If that makes sense?
>
> On Fri, Sep 25, 2015 at 9:53 AM, Stephen McMillan <smcmillan at planalytics.com> wrote:
> Hello Chris,
>
> If you don't want to display all the grid values, then you can use 'draw string...' using the coordinates of whatever stations or locations you want displayed on top of the shaded contours. See http://www.iges.org/grads/gadoc/gradcomddrawstring.html
>
> Stephen McMillan
>
> On Fri, Sep 25, 2015 at 8:55 AM, Christopher Gilroy <chris.gilroy at gmail.com> wrote:
> I'm trying to plot something like this: http://i60.tinypic.com/2v9voe0.jpg (WXBell has the same basic setup, http://blog.chron.com/weather/wp-content/blogs.dir/2579/files/2014/01/gfs_6hr_snow_acc_se_19.png) with the inch's plotting on-top of the shaded area but the only way I know how to display "values" like that is with gxout grid, which then makes the numbers plot in grids (obviously) and unless I'm missing something with options I don't see a way to make it output as "loose" as theirs are, instead of literally in a "grid" (square box) format.
>
> I'm currently simply doing:
>
> 'set gxout grid'
> 'set gridln off'
> 'set dignum 1'
> 'set digsiz 0.05'
> 'd re(maskout(weasdsfc, weasdsfc-3), 0.25)'
>
> Which, you can image it will output tons of numbers all over, making it completely illegible. Any clue on how to do something like the above two images?
>
> --
> -Chris A. Gilroy
>
> _______________________________________________
> gradsusr mailing list
> gradsusr at gradsusr.org
> http://gradsusr.org/mailman/listinfo/gradsusr
>
>
>
> _______________________________________________
> gradsusr mailing list
> gradsusr at gradsusr.org
> http://gradsusr.org/mailman/listinfo/gradsusr
>
>
>
>
> --
> -Chris A. Gilroy
> _______________________________________________
> gradsusr mailing list
> gradsusr at gradsusr.org
> http://gradsusr.org/mailman/listinfo/gradsusr
--
Jennifer M. Adams
Center for Ocean-Land-Atmosphere Studies (COLA)
111 Research Hall, Mail Stop 2B3
George Mason University
4400 University Drive
Fairfax, VA 22030
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://gradsusr.org/pipermail/gradsusr/attachments/20150925/7a5a1fab/attachment-0001.html
More information about the gradsusr
mailing list