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 Fabien, I apologize for not getting to your support ticket sooner. Are you still having trouble to accomplish what you want to do? Looking at your example, I think there is a better way. We have a tutorial page that describes what you are doing: http://www.unidata.ucar.edu/software/thredds/v4.3/netcdf-java/tutorial/NetcdfFile.html (if you are using version 4.3) http://www.unidata.ucar.edu/software/thredds/current/netcdf-java/tutorial/NetcdfFile.html (if you are using version 4.5) Scroll down to the section titled "Reading Data from a Variable", which I believe describes what you want to do. Regards, Lansing Madry Unidata Boulder, Colorado > Full Name: VALENTIN Fabien > Email Address: address@hidden > Organization: BRLi > Package Version: > Operating System: > Hardware: > Description of problem: > > Hello, > > I have a .nc file and i want to split this file for a given time. > > > I have a Var (time,lat,long) > > I am using read with Range to split my variable. > For instance i need to keep only the last time. > > ranges.add(new Range(743,743)); > ranges.add(new Range(0,varShape[1]-1)); > ranges.add(new Range(0,varShape[2]-1)); > > I write this data to a new file and i have a problem with the result my new > file doesn't match the old at the same time and i don't know why . > > Thanks for your help. > > > > Ticket Details =================== Ticket ID: UYD-670064 Department: Support netCDF Java Priority: Critical Status: Open