NOTICE: This version of the NSF Unidata web site (archive.unidata.ucar.edu) is no longer being updated.
Current content can be found at unidata.ucar.edu.

To learn about what's going on, see About the Archive Site.

Re: [gembud] GDDIAG - MASK FUNCTION BUG?

Hi Evan,

In GDDIAG, try setting the packing variable "GPACK" to "NONE". The default, if "GPACK" is set to <blank> is to use "GRIB/16" packing. I think you may have unconvered a bug in the packing process which is not treating a grid whose points are all set equal to "RMISSD" properly.

--Kevin

______________________________________________________________________
Kevin Tyle, Systems Administrator               **********************
Dept. of Atmospheric & Environmental Sciences   ktyle@xxxxxxxxxxxxxxxx
University at Albany, ES-235                    518-442-4578 (voice)
1400 Washington Avenue                          518-442-5825 (fax)
Albany, NY 12222                                **********************
______________________________________________________________________

On 10/08/2010 12:20 PM, Evan Lowery wrote:

Hello all,

I've found a possible bug (or user error) with GDDIAG and the MASK grid function, but wanted to check with everyone here before sending out an official support request.

Within a GEMPAK grid file (test.grd), I have a temperature field (TEMPA) which needs to be masked to only show values between a certain temperature range (>=80F). I run this process daily, and have never had a problem up until this point. When NO temperatures in TEMPA are >=80F, the MASK function generates an erroneously large number rather than -9999.00 (RMISSD).

Dataset:                                               test.grd

gdlist

GDATTIM=101007/0000F001

GLEVEL=0

GVCORD=NONE

GFUNC=TEMPA

Using GDLIST (tempa.dat) I see that TEMPA:

MINIMUM AND MAXIMUM VALUES     1.03    60.00

Goal: only keep temperatures >=80F

gddiag

GDATTIM=101007/0000F001

GLEVEL=0

GVCORD=NONE

GFUNC=MASK(TEMPA,SGE(TEMPA,80))

GRDNAM=TEMPB

GRDTYP=S

GPACK=

GRDHDR=

PROJ=

GRDAREA=

KXKY=

MAXGRD=

CPYFIL=

ANLYSS=

Using GDLIST (tempb.dat) I see that TEMPB:

MINIMUM AND MAXIMUM VALUES9999999848243207295109594873856.009999999848243207295109594873856.00

I would expect all TEMPB values to be -9999.00 (RMISSD) since no temperatures are greater than 80F, but instead it blows up and returns a very large value.

http://www.unidata.ucar.edu/cgi-bin/gempak/manual/apxB_index

MASK  Masking function        MASK (S1, S2) = RMISSD IF S2 = RMISSD

                                            = S1 otherwise

In this example TEMPA had no values >=80F, but my csh scripts are constantly mining through temperature grids, and "usually" there are values >=80F.

Has anyone ever experienced this type of result? If yes, do you know a work around to get the grid (TEMPB) with all values = -9999.00 (RMISSD) rather than erroneously large values?

Regards,

Evan Lowery


_______________________________________________
gembud mailing list
gembud@xxxxxxxxxxxxxxxx
For list information or to unsubscribe,  visit: 
http://www.unidata.ucar.edu/mailing_lists/
  • 2010 messages navigation, sorted by:
    1. Thread
    2. Subject
    3. Author
    4. Date
    5. ↑ Table Of Contents
  • Search the gembud archives: