Re: [netcdf-java] Gridded data in the same coordinate system

  • To: Antonio Rodriges <antonio.rrz@xxxxxxxxx>
  • Subject: Re: [netcdf-java] Gridded data in the same coordinate system
  • From: "Schmunk, Robert B. (GISS-611.0)[TRINNOVIM, LLC]" <robert.b.schmunk@xxxxxxxx>
  • Date: Wed, 5 Nov 2014 22:32:03 +0000

If you require that the latitude dimension of the data be ordered in the 
opposite direction from what you prefer, then once you have extracted the 2D 
Array from the Variable, use the Array.flip method on that dimension index to 
create a new Array with the data ordered the way you want.


On Nov 5, 2014, at 3:56 PM, Antonio Rodriges <antonio.rrz@xxxxxxxxx> wrote:

> Hello,
> Different NetCDF files have different ordering of latitude/longitude
> coordinates.
> For example, one file may have latitude dimension containing
> coordinates starting from -90 degrees latittude spanning to +90 deg
> latitude. The other file may have latitude coordinates starting from
> +90 spanning to -90 (reverse order).
> Is there a built-in way in NetCDF-Java to read a 2 dimesional variable
> (dimensions - latitude and longitude) so that to obtain the resulting
> 2D array with values sorted in the fixed manner regardless of the
> ordering of values in lat/lon dimensions? Or if not, is there a way to
> transform the resulting array to a desired ordering of values?

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

  • 2014 messages navigation, sorted by:
    1. Thread
    2. Subject
    3. Author
    4. Date
    5. ↑ Table Of Contents
  • Search the netcdf-java archives: