[gradsusr] Holes in plot since 2.1.a2.oga.1 on windows, continued
dzengiz.tafa at telenet.be
dzengiz.tafa at telenet.be
Wed Dec 14 07:12:36 EST 2016
Hi all
On the grads user forum I have seen a reply on my question about my plots having holes in them. I haven't got these in my inbox of my mail client so I just thought I'd post further about this in a new post.
To recap What I tried to do... I am creating a freezing temperatures probability using the 20 members of GEFS including the control. Using the advice I got from Jennifer (see below) I could have shortened my script in a way that looks like this
'set e 1 21'
'temp = const( const( maskout( (tmp2m - 273.16), (tmp2m - 273.16) + 0), 0), 1.0, -u)'
'set e 1'
'tempoverlap=ave(temp,e=1,e=21)'
'define freezeprob = 100 * tempoverlap'
'set gxout shaded'
'd freezeprob'
When displaying the result in the 2.1.a2.oga.1 version on Windows I get holes in my plot, like the ones in the following image.
https://postimg.org/image/sed042gzt/
When I try to do the same however on the grads-2.0.2.oga.2 version I do not get these holes in the plot & it's just fine.. I am therefore out of ideas how to get around this issue. Judging by the contours & the colorfil it appears to show values above 100% which should be impossible judging by the formula's used.
Following the advice of Jennifer (see below), I tried to recreate the plot using her advice. Even when not overriding any colors & just using the rainbow preset of Grads I have holes in the plot, so the problem can not reside in any custom color definitions since there are none.
Can anybody try to replicate my erroneous output & better yet point me in the right direction as to where this issue may lie? I am thinking of a(n) (windows?) issue using the maskout function on 2.1.a2.oga.1, since I do not have issues when plotting normal maps I created (standard GFS, not maskout-intensive) & plotting this result on a windows release of the 2.0.2.oga.2 runs fine without the white holes.
As an attachment you'll find the script I use. To run it just provide 2 arguments, the datestamp & the hour.
Like 'freezeprob 20161214 00'. It will provide output for the next 8 timesteps & save the image.
Beneath this follow up you'll find the reply I should have got, readable on the page
http://gradsusr.org/pipermail/gradsusr/2016-December/040496.html
I Hope anybody can help.
Best regards
Dzengiz
-----
What are the commands you are using for this specific display? Are you using ‘set clevs’ and ‘set ccols’ explicitly? What was the complete old version you were using (something more specific than 2.0.xx would be helpful). There was a bug fix in 2.1.0 related to the choice of shade colors based on data values. The code now reflects what’s in the documentation at [ http://cola.gmu.edu/grads/gadoc/colorcontrol.html#override: | http://cola.gmu.edu/grads/gadoc/colorcontrol.html#override: ] Here is example using 6 colors and 5 contour levels that shows how the filled contours (or shaded grids) relate to the data values:
col1: values <= lev1
col2: lev1 < values <= lev2
col3: lev2 < values <= lev3
col4: lev3 < values <= lev4
col5: lev4 < values <= lev5
col6: lev5 < values
This may be related to your problem.
Also, I haven’t tested this bit of code, but you should be able to simplify your script a bit :
‘set e 1 21’
‘temp = const(const(maskout(…etc…etc…..)’
‘set e 1'
‘tempoverlap=ave(temp,e=1,e=21)
—Jennifer
On Dec 12, 2016, at 1:30 PM, [ http://gradsusr.org/mailman/listinfo/gradsusr | dzengiz.tafa at telenet.be ] <mailto: [ http://gradsusr.org/mailman/listinfo/gradsusr | dzengiz.tafa at telenet.be ] > wrote:
Hi all
I have just upgraded to GrADS version 2.1.a2.oga.1 on my windows installation.
So far I am thrilled with the new 2.1 version. Especially with the new graphics output properties. Very good work guys. Keep it up.
I am however having problems with one of my scripts. All my other scripts run just fine. Only the ones where I use a maskout function & plot these results as shaded gives problems, eg. all my probability maps. I have created a script whith applies probablistic functions using the GEFS & it goes like this
'set e 1'
'define temp1 = const( const( maskout( ((tmp2m - 273.16) * -1), ((tmp2m - 273.16) * -1) - 0), 1), 0.0, -u)'
'set e 2'
'define temp2 = const( const( maskout( ((tmp2m - 273.16) * -1), ((tmp2m - 273.16) * -1) - 0), 1), 0.0, -u)'
'set e 3'
'define temp3 = const( const( maskout( ((tmp2m - 273.16) * -1), ((tmp2m - 273.16) * -1) - 0), 1), 0.0, -u)'
'set e 4'
'define temp4 = const( const( maskout( ((tmp2m - 273.16) * -1), ((tmp2m - 273.16) * -1) - 0), 1), 0.0, -u)'
'set e 5'
'define temp5 = const( const( maskout( ((tmp2m - 273.16) * -1), ((tmp2m - 273.16) * -1) - 0), 1), 0.0, -u)'
...
'set e 21'
'define temp21 = const( const( maskout( ((tmp2m - 273.16) * -1), ((tmp2m - 273.16) * -1) - 0), 1), 0.0, -u)'
'define tempoverlap = (temp1 + temp2 + temp3 + temp4 + temp5 + ... + temp21) / 21'
'define freezeprob = 100 * tempoverlap'
When I plot this result in the previous version, the 2.0.xxx It runs just fine. When I try this however on the new 2.1.a2.oga.1, I get holes in my plot and the result seemingly shows values above 100% which should be impossible. Those patches mentioned have the same color as my background color set in grads. [ https://postimg.org/image/4wi6vajs3/ | https://postimg.org/image/4wi6vajs3/ ] When I try to run the exact same script on the 2.0.xx version on windows the plot has no problems at all. Those patches aren't there & the plot is correct.
Does anybody know what might have happened? Is there a bug in the maskout functions since the 2.1.a2.oga.1 on windows because I only have this issue on my probablistic maps which make heavy use of the maskout-function. I'm beginning to think there is an issue with maskout in combination with color shaded graphics output. I havent been able to test this on unix/linux so maybe this could be an issue confined to the windows release only?
I'm curious what the rest of the community thinks or knows about this. Maybe somebody can point me in the right direction?
Best regards
Dzengiz
-------------- next part --------------
A non-text attachment was scrubbed...
Name: freezeprob2.gs
Type: text/x-matlab
Size: 3833 bytes
Desc: not available
Url : http://gradsusr.org/pipermail/gradsusr/attachments/20161214/8aa4c9d6/attachment.bin
More information about the gradsusr
mailing list