Due to the current gap in continued funding from the U.S. National Science Foundation (NSF), the NSF Unidata Program Center has temporarily paused most operations. See NSF Unidata Pause in Most Operations for details.
Hi Chris, I believe you need to do something like: Dimension timedim = ncout.addUnlimitedDimension("time"); See the last example at:http://www.unidata.ucar.edu/software/netcdf-java/tutorial/ NetcdfWriteable.html
Hope that helps, Jeff On May 6, 2008, at 5:30 PM, Christopher.Moore@xxxxxxxx wrote:
I'm trying upgrade to netcdf 2.2.22... I used to create a netcdf file withunlimited time dimension using: Dimension timedim = ncout.addDimension("TIME",-1); but now I try, Dimension londim = ncout.addDimension("LON", isize); Dimension latdim = ncout.addDimension("LAT", jsize);Dimension timedim = ncout.addDimension("TIME", 0, true, true, true);Dimension[] dim3 = new Dimension[] {timedim,latdim,londim}; ncout.addVariable(varName[varNum], float.class, dim3); and I get:java.lang.IllegalArgumentException: Unknown dimension can only be used in 1 dimarray at ucar.nc2.Variable.setDimensions(Variable.java:1137) at ucar.nc2.NetcdfFileWriteable.addVariable(NetcdfFileWriteable.java:335) at ucar.nc2.NetcdfFileWriteable.addVariable(NetcdfFileWriteable.java:279) atgov.noaa.tsunami.cmi.LinCombModule.downloadFile(LinCombModule.java: 325)Any ideas? I can't find a simple example for creating with unlimited dimension... Cheers, Chris _________________________________________________________________ Christopher W. Moore...(206)526-6779...christopher.moore@xxxxxxxx Pacific Marine Environmental Lab....NCTR..............Seattle, WA ----------------------------------------------------------------- _______________________________________________ netcdf-java mailing list netcdf-java@xxxxxxxxxxxxxxxxFor list information or to unsubscribe, visit: http:// www.unidata.ucar.edu/mailing_lists/
netcdf-java
archives: