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 Chris, > I have since been informed that subsetting using NcML is probably not very > useful for my application and that I should pursue direct subsetting via > the query url. Along this line I have encountered another problem that > I was hoping you could help me with. > > I am attempting to create a local nc file which is a subset of data on the > motherload server. Specifically, my data url is: > > http://motherlode.ucar.edu:8080/thredds/dodsC/modelsNc/NCEP/OCEAN/Global_5x2p5deg/OCEAN_Global_5x2p5deg_20070828_1200.nc?lat[0:1:19],lon[0:1:39],u_sfc[0:1:0][0:1:19][0:1:39],v_sfc[0:1:0][0:1:19][0:1:39] > > This URL works just fine both in the toolsUI as well as in my application > (very basic right now). The problem arrises when I go to write the file > to a local nc file. I am receiving an InvalidRangeException error which > I dont quite understand. Im not manipulating or changing the data in > any way, though I am testing the NetcdfFile object to ensure that there > is information there. The code (everything thats being called) and error > are attached: The problem is that the URL above is an OPeNDAP dataset URL so you are getting back an OPeNDAP encoding of the data rather than a netCDF file. If you go to the catalog that lists the above dataset: http://motherlode.ucar.edu:8080/thredds/catalog/modelsNc/NCEP/OCEAN/Global_5x2p5deg/catalog.html and click down to a dataset, you will see that the dataset is accessible through OPeNDAP, WCS, and as an HTTP download. Which means you can get the entire dataset using the HTTP download or you can access subsets of the dataset if you have a WCS client. If you start at our top level catalog (http://motherlode.ucar.edu:8080/thredds/catalog.html), you can browse down to some of our other model data and see another type of access called the netCDF Subset Service (ncSS). That is a simpler interface for accessing dataset subsets that might be of interest to you. Here's the catalog for a model collection that is available with ncSS: http://motherlode.ucar.edu:8080/thredds/catalog/fmrc/NCEP/GFS/Alaska_191km/files/catalog.html If you are interested in the OCEAN data and the ncSS, I can check into why that combination isn't available. Hope this helps. Let me know if you have other questions. Ethan Ticket Details =================== Ticket ID: ZTS-930267 Department: Support netCDF Java Priority: Normal Status: Open