[gradsusr] "constant field = 0" when calculating probabilities

Jennifer M Adams jadams21 at gmu.edu
Sat Aug 20 09:55:01 EDT 2016


Try ‘set datawarn off’. This suppresses the display, but the message “Constant field. Value = 0” still appears in the command window (or in the result variable of your script). —Jennifer


On Aug 10, 2016, at 8:07 AM, dzengiz.tafa at telenet.be<mailto:dzengiz.tafa at telenet.be> wrote:

Hi everybody

I am building a script to calculate the probability that the 10m windspeed wil surpass the 20 m/s mark (>= 9 beafort), using the GEFS with all 20 members including the control.

It looks like this

'set e 1'
'define spd = sqrt(ugrd10m*ugrd10m+vgrd10m*vgrd10m)'
'define wind1 = const( const( maskout( spd, spd - 20), 1), 0.0, -u)'

'set e 2'
'define spd = sqrt(ugrd10m*ugrd10m+vgrd10m*vgrd10m)'
'define wind2 = const( const( maskout( spd, spd - 20), 1), 0.0, -u)'

...

'set e 21'
'define spd = sqrt(ugrd10m*ugrd10m+vgrd10m*vgrd10m)'
'define wind21 = const( const( maskout( spd, spd - 20), 1), 0.0, -u)'

'define windavg = (wind1 + wind2 + ... + wind21)/21'

'define percentage = windavg * 100'

'd percentage'

When there are no members, nor control with data at or above the treshold of 20 m/s the field is constant (zero, 0) throughout the plot.
When plotting such a probability, I always hit that pesky "constant field = 0" message and the plot is filled with a solid red color, while actually it should just show me a map with my color defined at "0%" probability (which is plain white)

The script itsself works because when I lower the treshold, say to 5, I do get a normal plot with the colorscale i have set.

Is there a way to turn off the "constant field = 0" message & the resulting red plot, so the map i programmed can be plotted, even when there are no members or control that reach or surpass the given treshold? Is there another possibility to circumvent this problem or a trick any1 can think of?

I am looking forward to a reply from the grads-community.


Best regards,

Jen

_______________________________________________
gradsusr mailing list
gradsusr at gradsusr.org<mailto:gradsusr at gradsusr.org>
http://gradsusr.org/mailman/listinfo/gradsusr

--
Jennifer Miletta Adams
Center for Ocean-Land-Atmosphere Studies (COLA)
George Mason University



-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://gradsusr.org/pipermail/gradsusr/attachments/20160820/069cf22e/attachment.html 


More information about the gradsusr mailing list