[gradsusr] Trying to plot values (grid? ascii?) of weasdsfc onto map.
Christopher Gilroy
chris.gilroy at gmail.com
Mon Sep 28 10:14:21 EDT 2015
Update:
I have no idea if this is right in terms of making a 6-hr time-stepped
total snow accumulation map but this is what ended up producing results
similar to other 10:1 snow accum plots on other sites.
'define snow =
sum(maskout(weasdsfc-weasdsfc(t-1),weasdsfc-weasdsfc(t-1)),t=2,t='%i%')'
'd const((snow), 0, -u)'
That appears to discard the negative numbers replacing them with 0, at
least from my little bit of testing so far. BTW, is there anyway to
increase GrADS memory buffer or something? It's kinda blah having to regrid
a gxout grid to 1 in order to plot things without GrADS crashing.
My only concern left at this point is... unless weasdsfc auto-incorporates
a 10:1 ratio, how the heck is my plot outputting almost, if not, identical
results to other 6-hr snow accum maps that plot 10:1 ratio?
On Sat, Sep 26, 2015 at 1:33 PM, Christopher Gilroy <chris.gilroy at gmail.com>
wrote:
> Hey Jeff, I'm basically just trying to plot total snow accumulation. The
> formula, if im not mistaken is how you would want it done in terms of
> giving you a total snowfall amount. So realistically hr 0 is expected to be
> blank. hr 6 would show snowfall accum between 0-6, hr 12 would then show
> snowfall accum between 0-12, hr 18 would be 0-18, etc. Of course well then
> be coupling this with a 10:1 or 15:1 ratio.
> On Sep 26, 2015 11:06 AM, "Jeff Duda" <jeffduda319 at gmail.com> wrote:
>
>> I'm pretty sure the white areas (with no numbers plotted) are being set
>> to missing because the mask expression is negative there. Plot
>> weasdsfc-weasdsfc(t-1) alone. I bet you'll see negative numbers there.
>> Seems reasonable that means snow melted so that there is less snow than
>> there was the time step before. Is weasdsfc the only snow variable you
>> have? Memory tells me that the standard GFS data also have a categorical
>> precip type array as well as a snow ratio estimation, so you can couple
>> that with apcpsfc to get an estimation of snow precipitation if that's what
>> you're looking for.
>>
>> Jeff Duda
>>
>> On Fri, Sep 25, 2015 at 11:55 PM, Christopher Gilroy <
>> chris.gilroy at gmail.com> wrote:
>>
>>> Hey guys, I'm kinda getting there, but I've run into another problem,
>>> and I have no idea at all what's causing this. But when I use 'd weasdsfc'
>>> everything is colored. When I do (the "right" way to do 6-hr snow accum?):
>>> 'd sum(maskout(weasdsfc-weasdsfc(t-1),weasdsfc-weasdsfc(t-1)),t=2,t='%i%')'
>>> I get the attached image output.
>>>
>>> Any guesses? :-/
>>>
>>> Note: This is a super-zoomed in area of Alaska, since I was debugging
>>> and thinking maybe grads was hitting a memory limit or something, but it
>>> happens regardless and I know it's related to that expression. :-/
>>>
>>> http://i.imgur.com/CKAfnIy.png
>>>
>>> On Fri, Sep 25, 2015 at 10:56 AM, Jennifer Adams <jma at cola.iges.org>
>>> wrote:
>>>
>>>> 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
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> _______________________________________________
>>>> 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
>>>
>>>
>>
>>
>> --
>> Jeff Duda
>> Graduate research assistant
>> University of Oklahoma School of Meteorology
>> Center for Analysis and Prediction of Storms
>>
>> _______________________________________________
>> gradsusr mailing list
>> gradsusr at gradsusr.org
>> http://gradsusr.org/mailman/listinfo/gradsusr
>>
>>
--
-Chris A. Gilroy
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://gradsusr.org/pipermail/gradsusr/attachments/20150928/3e1db84e/attachment.html
More information about the gradsusr
mailing list