Christiane, the API is designed to deliver 2D coverages for mapping (hence "GridCoverage2D"). To select a different 2D coverage from a 4D NetCDF file, supply parameters in the second argument to "read". There are several examples in NetCDFReaderTest, such as this one from NetCDFTestOn4Dcoverages(): https://github.com/geotools/geotools/blob/master/modules/plugin/coverage-multidim/netcdf/src/test/java/org/geotools/coverage/io/netcdf/NetCDFReaderTest.java#L299
These unit tests also contain many useful examples of how to obtain metadata on dimensions and variables. Kind regards, Ben. On 11/10/16 11:57, C. Schaefer wrote: > Hi list, > > how can I access the coverages of a NetCDF file with more than one vertical > dimension or time step, e.g. the test-data file "O3-NO2.nc > <http://O3-NO2.nc>"? > (https://github.com/geotools/geotools/tree/71c3cca06462c8ce6678027c043d07aacff64fc2/modules/plugin/coverage-multidim/netcdf/src/test/resources/org/geotools/coverage/io/netcdf/test-data) > > With > GridCoverage2D grid = reader.read("O3", null); > I only get the first time step and the first z layer. But the file contains 2 > time steps and 2 vertical layers. Which syntax is necessary? > > Thanks in advance. > Christiane > > -- > Diese Nachricht wurde von meinem Android Mobiltelefon mit GMX Mail gesendet. > > > > ------------------------------------------------------------------------------ > Check out the vibrant tech community on one of the world's most > engaging tech sites, SlashDot.org! http://sdm.link/slashdot > > > > _______________________________________________ > GeoTools-GT2-Users mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users > -- Ben Caradoc-Davies <[email protected]> Director Transient Software Limited <http://transient.nz/> New Zealand ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, SlashDot.org! http://sdm.link/slashdot _______________________________________________ GeoTools-GT2-Users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users
