[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [netcdf-java] Rotated-pole data



The problem is that the rotated lat/lon requires longitudes in the range +/- 180, see

http://www.unidata.ucar.edu/software/netcdf-java/reference/StandardCoordinateTransforms.html#rotated_pole

however, theres a bug (at least in 4.2) thats not handling scale/offset corectly for CoordinateAxis1D, in case you wanted to try to correct in NcML. I am working on a fix for that.

If you can change longitude values directly in the file it should work.

On 5/20/2010 12:23 PM, Jon Blower wrote:
Aha!  I'd done the hard stuff and forgotten the most obvious thing.
Adding the global Conventions attribute seems to get the coordinate
transformation working.  However, I can't seem to read data properly: I
just get missing values.  I know that the data are valid because if I
don't set the Conventions attribute, I can read data fine (but they end
up in the wrong place).  I don't understand why this might be.

I've attached the data file and its NcML wrapper.

Cheers, Jon

-----Original Message-----
From: John Caron [mailto:address@hidden]
Sent: 20 May 2010 17:48
To: Jon Blower
Cc: address@hidden
Subject: Re: [netcdf-java] Rotated-pole data

try adding global attribute

   :Conventions = "CF-1.0"


if that doesnt work, send me the actual file.

On 5/20/2010 10:39 AM, Jon Blower wrote:
Hi,

I have some data in rotated-pole coordinates and I'm struggling to get
NetCDF-Java (latest 4.1 version) to recognise the coordinate system.
I
think I'm following CF except that I'm not providing values for the
true
lon and lat values at each grid point.  I was assuming that if I
provided the grid mapping details that NetCDF-Java might recognise
them
and be able to transform to and from true lat-lon without them (i.e.
this information is redundant).

However, when I load up the file in ToolUI (4.1) the projection (as
revealed under the tabs FeatureTypes->Grids) remains LatLon.

The CDL is at the end of the email.  What am I doing wrong?  Or is it
in
fact compulsory to provide the true lon and lats at each grid point?

Thanks,
Jon

netcdf

file:C:/Godiva2_data/Rotated-pole/Stefano/04203_qwq111.oper00.pp_001.MOP
Su.ncml {
   dimensions:
     Longitude = 360;
     Latitude = 288;
     Surface = 1;
     Time = UNLIMITED;   // (4 currently)
   variables:
     float Longitude(Longitude=360);
       :units = "degrees";
       :long_name = "longitude in rotated-pole grid";
       :standard_name = "grid_longitude";
     float Latitude(Latitude=288);
       :units = "degrees";
       :long_name = "latitude in rotated-pole grid";
       :standard_name = "grid_latitude";
     float Surface(Surface=1);
       :units = "surface";
       :positive = "down";
     float Time(Time=4);
       :units = "days since 2007-07-26 11:00:00";
       :long_name = "time";
     float Dynamic_rainfall_rate(Time=4, Surface=1, Latitude=288,
Longitude=360);
       :units = "kg m-2 s-1";
       :long_name = "LARGE SCALE RAINFALL RATE KG M-2 S-1";
       :title = "LARGE SCALE RAINFALL RATE KG M-2 S-1";
       :source = "UM output";
       :missing_value = -32768.0f; // float
       :_FillValue = -32768.0f; // float
       :grid_mapping = "rotated_pole";
     char rotated_pole;
       :grid_mapping_name = "rotated_latitude_longitude";
       :grid_north_pole_latitude = "37.5";
       :grid_north_pole_longitude = "177.5";

   :History = "Created_by_convert_pp_2_netcdf_at_NCEO";
}

--
Dr Jon Blower
Technical Director, Reading e-Science Centre
Environmental Systems Science Centre
University of Reading
Harry Pitt Building, 3 Earley Gate
Reading RG6 6AL. UK
Tel: +44 (0)118 378 5213
Fax: +44 (0)118 378 6413
address@hidden
http://www.nerc-essc.ac.uk/People/Staff/Blower_J.htm


_______________________________________________
netcdf-java mailing list
address@hidden
For list information or to unsubscribe, visit:
http://www.unidata.ucar.edu/mailing_lists/