Re: missing values from grib variable

From: David Brown <dbrown_at_nyahnyahspammersnyahnyah>
Date: Tue, 5 May 2009 11:36:32 -0600

Hi Oliver and Wolfgang,

NCL always reads the bitmap if it is present in a GRIB record and
assigns the _FillValue value to all elements of the grid that are
masked according to the bitmap. The value assigned for the
_FillValues used to be the default fill value for float data in NCL,
-999.0, but because this value occasionally collided with real data
values, as of 5.1.0 it has been changed to 1e20 for GRIB data.

You are correct, Oliver, that there are some local extensions where
an actual fill value is defined in the GRIB file. In cases where we
are aware of the encoding for any such extension, we try to honor
them as much as possible. I have not yet had a chance to examine
Wolfgang's GRIB file, so I cannot comment on whether it uses some
sort of extension or whether there is another problem.
  -dave

On May 5, 2009, at 12:40 AM, <Oliver.Fuhrer_at_meteoswiss.ch> wrote:

> Wolfgang,
>
> To my knowledge, there is no "standard" way to code a certain value
> as an undef value in a grib1 file. The method used is usually to
> code a bitmap where the data is saved in the file. So, in your
> case, NCL has no way of knowing which values are the undef values.
> Some oroginating centers (for example MeteoSwiss or DWD) have
> implemented their own way of coding undef values and use the local
> section of the grib file format for this purpose. But these are not
> standards. The field you are reading (leaf area index) is probably
> undefined over sea points. So you will either have to read tha land/
> sea mask and mask out sea points in your field, or you will have to
> set _FillValue manually to 0.
>
> Good luck,
> Oli
>
> ________________________________________
>
> Oliver Fuhrer
> Numerical Models
>
> Federal Departement of Home Affairs FDHA
> Federal Office of Meteorology and Climatology MeteoSwiss
>
> Kraehbuehlstrasse 58, P.O. Box 514, CH-8044 Zurich, Switzerland
>
> Tel. +41 44 256 93 59
> Fax +41 44 256 92 78
> oliver.fuhrer_at_meteoswiss.ch
> www.meteoswiss.ch - First-hand information
>
>
>
>> -----Original Message-----
>> From: ncl-talk-bounces_at_ucar.edu
>> [mailto:ncl-talk-bounces_at_ucar.edu] On Behalf Of Wolfgang Langhans
>> Sent: Montag, 4. Mai 2009 21:40
>> To: ncl-talk_at_ucar.edu
>> Subject: missing values from grib variable
>>
>> Hi,
>> I have two questions:
>> 1) I read in a variable from a grib file:
>> LAI_MX=f->LAI_MX_GDS10_SFC(:,:)
>> where f points at the grib file. The command printVarSummary(LAI_MX)
>> shows the attribute _FillValue : -999. There should actually
>> be plenty
>> of missing value entries in this variable, but these have the
>> value zero
>> instead, which is not good. How does it come that wrong missing
>> values
>> are assigned here?
>>
>> 2) Following option 2 for netcdf output on the webpage I export to
>> netcdf format. One variable is simply a dimensionless character and I
>> run into troubles, if I use getvardims:
>>
>> filevardef(fout,
>> "rotated_pole",typeof(rotated_pole),getvardims(rotated_pole))
>>
>> How should I proceed here, when no dimensions need to be assigned to
>> "rotated_pole"?
>>
>> Many thanks,
>> Wolfgang
>>
>> ************************************************
>> Wolfgang Langhans
>>
>> Institute for Atmospheric and Climate Science
>> ETH Zürich
>> Universitätstrasse 16
>> CH-8092 Zürich, Switzerland
>>
>> e-mail: wolfgang.langhans_at_env.ethz.ch
>> phone : +41 44 632 78 18
>> fax : +41 44 632 13 11
>> room : CHN L16.3
>> web : http://www.iac.ethz.ch/people/wolangha
>> ************************************************
>>
>>
>> _______________________________________________
>> ncl-talk mailing list
>> List instructions, subscriber options, unsubscribe:
>> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>>
> _______________________________________________
> ncl-talk mailing list
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk

_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Tue May 05 2009 - 11:36:32 MDT

This archive was generated by hypermail 2.2.0 : Wed May 06 2009 - 16:48:59 MDT