Package ucar.nc2.write
Class NetcdfCopier
java.lang.Object
ucar.nc2.write.NetcdfCopier
Utility class for copying a NetcdfFile object, or parts of one, to a netcdf-3 or netcdf-4 disk file.
This handles the entire CDM model (groups, etc) if you are writing to netcdf-4.
If copying from an extended model to classic model, Strings are converted to Chars; nested groups are not allowed.
The fileIn may be an NcML file which has a referenced dataset in the location URL, the underlying data (modified by
the NcML) is written to the new file. If the NcML does not have a referenced dataset, then the new file is filled
with
fill values, like ncgen.
Use Nccopy for a command line interface.
Use NetcdfFormatWriter object for a lower level API.
-
Method Summary
Modifier and TypeMethodDescriptionstatic NetcdfCopiercreate(NetcdfFile fileIn, NetcdfFormatWriter.Builder ncwriter) static voidsetDebugFlags(DebugFlags debugFlags) write(CancelTask cancel) Write the input file to the output file.
-
Method Details
-
setDebugFlags
-
create
-
write
Write the input file to the output file.- Parameters:
cancel- allow user to cancel; may be null.- Returns:
- the open output file. User must close it.
- Throws:
IOException
-