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.
<aggregation dimName="ocean_time" type="joinExisting"> <netcdf location="http://omglnx1.meas.ncsu.edu:8080/thredds/dodsC/models/GOMTOX/2008/avg/avg_gom_0036.nc" coordValue=" 4724233380 4724278140 "/> </aggregation> does not restrict to the first 2 indices of the time dimension. So the real bug is here: float u(ocean_time=2, s_rho=36, eta_u=254, xi_u=223); where it looks like it did what you wanted. I will have to see if I can fix that. This sort of seems seems to work, though its not a general solution: <?xml version="1.0" encoding="UTF-8"?> <netcdf xmlns="http://www.unidata.ucar.edu/namespaces/netcdf/ncml-2.2" location="http://omglnx1.meas.ncsu.edu:8080/thredds/dodsC/models/GOMTOX/2008/avg/avg_gom_0036.nc" > <dimension name="ocean_time" length="2"/> </netcdf> the result i got had 3 times, im not sure why. > John & Co, > > I'm not sure this is the problem. Each record in these files is about > 80MB, and although that aggregation has 351 time records, I'm only > trying to read two time records with the NcML. > > If I try instead to access a OpenDAP URL for the same model that has > only three time steps (with a total file size is 183MB), I get the > same error: > > <?xml version="1.0" encoding="UTF-8"?> > <netcdf xmlns="http://www.unidata.ucar.edu/namespaces/netcdf/ncml-2.2"> > <aggregation dimName="ocean_time" type="joinExisting"> > <netcdf > location="http://omglnx1.meas.ncsu.edu:8080/thredds/dodsC/models/GOMTOX/2008/avg/avg_gom_0036.nc" > coordValue=" 4724233380 4724278140 "/> > </aggregation> > </netcdf> > > As I mentioned on the phone yesterday, I was looking for an > alternative way to extract just a few time records from a remote file > as NetCDF on my desktop. > > Thanks, > Rich > > On Tue, Apr 14, 2009 at 6:45 PM, Unidata netCDF Java Support > <address@hidden> wrote: > > the problem is that the 3D vars in that file are > 2 Gbytes, eg > > > > float v(ocean_time=351, s_rho=36, eta_v=253, xi_v=224); > > > > So you need to use the large format, and i think theres currently not a way > > to specify that on on that interface. Ill have to add that. > > > > but are you sure you want to write a file that big? > > > >> NJ Folks, > >> > >> I've created a NcML file that ToolsUI-4.0.jar reads just fine, but > >> when I try to convert to NetCDF, I get this error: > >> > >> C:\RPS\java\jar>java -Xmx1024m -classpath toolsUI-4.0.jar > >> ucar.nc2.dataset.NetcdfDataset -in test.ncml -out foo.nc > >> > >> Read from test.ncml write to foo.nc > >> Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException > >> at java.lang.System.arraycopy(Native Method) > >> at ucar.ma2.Array.arraycopy(Array.java:286) > >> at > >> ucar.nc2.ncml.AggregationOuterDimension.read(AggregationOuterDimension.java:314) > >> at ucar.nc2.dataset.VariableDS._read(VariableDS.java:466) > >> at ucar.nc2.Variable.read(Variable.java:790) > >> at ucar.nc2.FileWriter.copyAll(FileWriter.java:294) > >> at ucar.nc2.FileWriter.copyVarData(FileWriter.java:250) > >> at ucar.nc2.FileWriter.writeToFile(FileWriter.java:207) > >> at ucar.nc2.dataset.NetcdfDataset.main(NetcdfDataset.java:1486) > >> > >> The NcML file I'm trying to convert looks like this: > >> > >> <?xml version="1.0" encoding="UTF-8"?> > >> <netcdf xmlns="http://www.unidata.ucar.edu/namespaces/netcdf/ncml-2.2"> > >> <aggregation dimName="ocean_time" type="joinExisting"> > >> <netcdf > >> location="http://omglnx1.meas.ncsu.edu:8080/thredds/dodsC/gomtox/2005/avg" > >> coordValue=" 4613955180 4613999940"/> > >> </aggregation> > >> </netcdf> > >> > >> -- > >> Dr. Richard P. Signell (508) 457-2229 > >> USGS, 384 Woods Hole Rd. > >> Woods Hole, MA 02543-1598 > >> > >> > > > > > > Ticket Details > > =================== > > Ticket ID: VRE-280309 > > Department: Support netCDF Java > > Priority: Normal > > Status: Open > > > > > > > > -- > Dr. Richard P. Signell (508) 457-2229 > USGS, 384 Woods Hole Rd. > Woods Hole, MA 02543-1598 > > Ticket Details =================== Ticket ID: VRE-280309 Department: Support netCDF Java Priority: Normal Status: Open