Re: ncl-talk nan in dataset

From: donna Cote <d-cote_at_nyahnyahspammersnyahnyah>
Date: Mon Oct 10 2011 - 20:17:20 MDT

Gerry, the documentation on netCDF files mentions two attributes, once
called _FillValue (single underscore) and missing_value. For instance:

ncl 1> t=f->sea_water_potential_temperature
ncl 2> printVarSummary(t)

Variable: t
Type: float
Total Size: 911806632 bytes
             227951658 values
Number of Dimensions: 4
Dimensions and sizes: [time | 99] x [zlev | 22] x [latitude | 261] x
[longitude | 401]
Coordinates:
             time: [734776.5..734874.5]
             zlev: [ 0..3500]
             latitude: [18..31]
             longitude: [-98..-78]
Number Of Attributes: 4
   name : sea_water_potential_temperature

   long_name : potential temperature
   units : deg C
   missing_value : -9999
ncl 3>

shows me that an integer "missing_value" has been assigned to a float
variable. Doing this, for the variables needed, might work:
  ;;; explicitly assign _FillValue
  t@_FillValue = 1.0*t@missing_value
  delete(t@missing_value)

-Donna

On 10/10/11 6:31 PM, ncl-talk-request@ucar.edu wrote:
> Date: Mon, 10 Oct 2011 17:57:52 -0500
> From: Gerald Creager<gerry.creager@tamu.edu>
> Subject: nan in dataset
> To:"ncl-talk@ucar.edu" <ncl-talk@ucar.edu>
> Message-ID:<4E937870.4070005@tamu.edu>
> Content-Type: text/plain; charset=ISO-8859-1; format=flowed
>
> Looks like a dataset I'm working with is malformed, with a
> 'missing_value' but no __MissingValue provided.. In fact, none of the
> variables have a "normal" __MissingValue and I get some ugly warmings
> such as:
> warning:NetOpenFile: MissingToFillValue option set True, but
> missing_value attribute and data variable
> (sea_floor_depth_below_sea_level) types differ: not adding virtual
> _FillValue attribute
>
> I'm considering adding model8Ssh@_MissingValue=-9999 to see if this
> resolves the problem but somehow, with this dataset, one never knows.
>
> Short form, I'm not getting any indication that the values are going to
> plot and I'm stuck again.
>
> Thanks, Gerry
> -- Gerry Creager -- gerry.creager@tamu.edu Texas Mesonet -- AATLT, Texas
> A&M University Cell: 979.229.5301 Office: 979.458.4020 FAX: 979.862.3983
> Office: 7607 Eastmark Drive, Suite 112, College Station, TX 77840
_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Mon Oct 10 20:17:32 2011

This archive was generated by hypermail 2.1.8 : Wed Oct 12 2011 - 15:59:45 MDT