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

Re: UTM projected data



Hi Robert:


On 2/3/2014 8:26 PM, Schmunk, Robert B. (GISS-611.0)[TRINNOVIM, LLC] wrote:

John,

I have a Panoply user at USGS who is working with data on a UTM grid.
Although this projected grid is not in CF, I noticed that you do
indicate it's availablity in netCDF-Java with some example CDL on the
page at
https://www.unidata.ucar.edu/software/thredds/current/netcdf-java/reference/StandardCoordinateTransforms.html

 However, I am having trouble actually implementing the UTM grid
handler in NJ.

If I have a variable which uses a grid_mapping and the mapping
variable has attribute grid_mapping_name =
"universal_transverse_mercator" per the following

float tmin(time=1, y=547, x=592); :long_name = "minimum
temperature"; :units = "degrees_Celsius"; :_FillValue = 1.0E20f; //
float :grid_mapping = "UTM_Projection";

char UTM_Projection; :grid_mapping_name =
"universal_transverse_mercator"; :utm_zone_number = 10;
:semi_major_axis = 6378137.0f; :inverse_flattening = 298.257f;

then when I query the tmin VariableDS for its CoordinateSystem and
call getProjection on the coordinate system, it returns a null rather
than, as I would have hoped, a
ucar.unidata.geoloc.projection.UtmProjection.

Are you seeing an error message? presumably the UTM projection is
failing, but not sure why. can you send me an example file?

look at the code in

  ucar.nc2.dataset.transform.UTM

to see how we handle the attributes. Maybe my docs need updating?



Okay, I put that aside and opted to directly construct a
UtmProjection object. In this case, I ran into the problem that the
example CDL on the StandardCoordinateTransforms.html page mentioned
above uses a semi-major axis with units of km. However, I found that
I had to feed UtmProjection a value with units of meters in order for
it to work. This seems borne out by the default semi-major axis found
in EarthEllipsoid being in meters, as well as Appendix F of the CF
convention stating that a semi_major_axis attribute should have units
of meters.

i think you are right


The user also asked, and I too am not sure of, how to handle the UTM
zone number. The sample CDL on the StandardCoordinateTransforms.html
page shows an attribute that is an integer value. Does this mean that
a zone in the southern hemisphere should be indicated by a negative
number?

yes, thats my understanding

If not, then how should it be indicated? If a negative number
is the way to indicate the southern hemisphere, then why does the
UtmProjection constructor require a boolean isNorth?

probably predated my realizing zone number wass sufficient, not sure.


Thanks for any help/guidance,

rbs





-- Robert B. Schmunk Webmaster / Senior Systems Programmer NASA
Goddard Institute for Space Studies 2880 Broadway, New York, NY
10025