This archive contains answers to questions sent to Unidata support through mid-2025. Note that the archive is no longer being updated. We provide the archive for reference; many of the answers presented here remain technically correct, even if somewhat outdated. For the most up-to-date information on the use of NSF Unidata software and data services, please consult the Software Documentation first.
Hi Adrian, The behavior you're seeing is correct; I think you may just misunderstand how to use the Variable.read(int[] origin, int[] shape) method. [1] The shape parameter specifies how big the RETURNED array should be, i.e. how big a chunk of data you want to read. In your case, if you only want a single cell, you should use: new int[] { 1, 1, 1 } Hope that helps, Christian [1] http://www.unidata.ucar.edu/software/thredds/current/netcdf-java/javadoc/ucar/nc2/Variable.html#read-int:A-int:A- Ticket Details =================== Ticket ID: YWD-757002 Department: Support netCDF Java Priority: Normal Status: Closed =================== NOTE: All email exchanges with Unidata User Support are recorded in the Unidata inquiry tracking system and then made publicly available through the web. If you do not want to have your interactions made available in this way, you must let us know in each email you send to us.