Re: non conventional missing value type problem/ 2

From: Will Hobbs <Will.Hobbs_at_nyahnyahspammersnyahnyah>
Date: Sat Nov 02 2013 - 16:30:14 MDT

Sam

NCL only recognises a few finite strings for the latitude coord arrays 'long_name' and 'units' attributes; valid values are listed in the error messages which you copied into your email.

You should be able to easily fix the problem by changing these attributes before plotting, thus:

latitude@long_name = "latitude"
latitude@units = "degrees_north"

Will

From: "Sam McClatchie (NOAA Federal)" <sam.mcclatchie@noaa.gov<mailto:sam.mcclatchie@noaa.gov>>
Reply-To: "sam.mcclatchie@noaa.gov<mailto:sam.mcclatchie@noaa.gov>" <sam.mcclatchie@noaa.gov<mailto:sam.mcclatchie@noaa.gov>>
Date: Sunday, 3 November 2013 8:59 AM
To: NCL maillist <ncl-talk@ucar.edu<mailto:ncl-talk@ucar.edu>>
Subject: non conventional missing value type problem/ 2

I am working with a netcdf of global drifter data <
http://www.aoml.noaa.gov/phod/dac/dac_meanvel.php>
that appears to have a non-conventional missing value.

Changing
 setfileoption ("nc", "/MissingToFillValue/", False) ; turn off
to
 setfileoption ("nc", "MissingToFillValue", False) ; turn off
allowed me to run my code and turn up the fact that the coordinate units for the netcdf file are also non-conventional.
Error returned on run:

Variable: Latitude
Type: double
Total Size: 2536 bytes
            317 values
Number of Dimensions: 1
Dimensions and sizes: [Lat | 317]
Coordinates:
            Lat: [ -73.. 85]
Number Of Attributes: 4
  long_name : Latitude (negative = south)
  units : degrees
  valid_min : -73
  valid_max : 85
(0) check_for_y_lat_coord: Warning: Data either does not contain a valid latitude coordinate array or doesn't contain one at all.
(0) A valid latitude coordinate array should have a 'units' attribute equal to one of the following values:
(0) 'degrees_north' 'degrees-north' 'degree_north' 'degrees north' 'degrees_N' 'Degrees_north' 'degree_N' 'degreeN' 'degreesN' 'deg north'
(0) check_for_lon_coord: Warning: Data either does not contain a valid longitude coordinate array or doesn't contain one at all.
(0) A valid longitude coordinate array should have a 'units' attribute equal to one of the following values:
(0) 'degrees_east' 'degrees-east' 'degree_east' 'degrees east' 'degrees_E' 'Degrees_east' 'degree_E' 'degreeE' 'degreesE' 'deg east'

It looks like I need to reassign the coordinate variable units as well as the missing value, and write them to the file. No need to reply if this is a correct solution.

Thanks and Best Fishes

Sam

--
Sam McClatchie,
Supervisory oceanographer, Fisheries oceanography
Southwest Fisheries Science Center, NOAA,
8901 La Jolla Shores Dr.
La Jolla, CA 92037-1509, U.S.A.
Office: 858 546 7083, Cellular:  858 752 8495
Research home page<http://www.fishocean.info>
[cid:part3.05090203.05030709@noaa.gov]


_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk

ATT00001.png
Received on Sat Nov 2 16:30:28 2013

This archive was generated by hypermail 2.1.8 : Mon Nov 11 2013 - 09:45:33 MST