Package ucar.nc2.dt.grid
Class CFGridWriter
- java.lang.Object
-
- ucar.nc2.dt.grid.CFGridWriter
-
public class CFGridWriter extends Object
Deprecated.use CFGridWriter2Write a CF compliant Netcdf-3 or netcdf-4 file (classic mode only) from any gridded dataset. The datasets can optionally be subset by a lat/lon bounding box and/or a time range.
-
-
Constructor Summary
Constructors Constructor Description CFGridWriter()
Deprecated.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description long
makeFile(String location, GridDataset gds, List<String> gridList, LatLonRect llbb, int horizStride, Range zRange, CalendarDateRange dateRange, int stride_time, boolean addLatLon)
Deprecated.long
makeFile(String location, GridDataset gds, List<String> gridList, LatLonRect llbb, int horizStride, Range zRange, CalendarDateRange dateRange, int stride_time, boolean addLatLon, NetcdfFileWriter.Version version)
Deprecated.static void
makeFile(String location, GridDataset gds, List<String> gridList, LatLonRect llbb, CalendarDateRange range)
Deprecated.Write a netcdf-3 file from a subset of a grid datasetvoid
makeFile(String location, GridDataset gds, List<String> gridList, LatLonRect llbb, CalendarDateRange range, boolean addLatLon, int horizStride, int stride_z, int stride_time)
Deprecated.Write a CF compliant Netcdf-3 file from any gridded dataset.long
makeFile(String location, GridDataset gds, List<String> gridList, ProjectionRect projRect, int horizStride, Range zRange, CalendarDateRange dateRange, int stride_time, boolean addLatLon)
Deprecated.long
makeFile(String location, GridDataset gds, List<String> gridList, ProjectionRect llbb, int horizStride, Range zRange, CalendarDateRange dateRange, int stride_time, boolean addLatLon, NetcdfFileWriter.Version version)
Deprecated.static void
makeFileVersioned(String location, GridDataset gds, List<String> gridList, LatLonRect llbb, CalendarDateRange dateRange, NetcdfFileWriter.Version version)
Deprecated.long
makeGridFileSizeEstimate(GridDataset gds, List<String> gridList, LatLonRect llbb, int horizStride, Range zRange, CalendarDateRange dateRange, int stride_time, boolean addLatLon)
Deprecated.Write a netcdf-3 file from a subset of a grid dataset, as long as it doesnt exceed a certain file size.long
makeGridFileSizeEstimate(GridDataset gds, List<String> gridList, ProjectionRect projBB, int horizStride, Range zRange, CalendarDateRange dateRange, int stride_time, boolean addLatLon)
Deprecated.Write a netcdf-3 file from a subset of a grid dataset (projection coordinates), as long as it doesnt exceed a certain file size.
-
-
-
Method Detail
-
makeFile
public static void makeFile(String location, GridDataset gds, List<String> gridList, LatLonRect llbb, CalendarDateRange range) throws IOException, InvalidRangeException
Deprecated.Write a netcdf-3 file from a subset of a grid dataset- Parameters:
location
- write new filegds
- from this grid datasetgridList
- just these gridsllbb
- horiz subset, may be nullrange
- time subset, may be null- Throws:
IOException
InvalidRangeException
-
makeFileVersioned
public static void makeFileVersioned(String location, GridDataset gds, List<String> gridList, LatLonRect llbb, CalendarDateRange dateRange, NetcdfFileWriter.Version version) throws IOException, InvalidRangeException
Deprecated.- Throws:
IOException
InvalidRangeException
-
makeGridFileSizeEstimate
public long makeGridFileSizeEstimate(GridDataset gds, List<String> gridList, LatLonRect llbb, int horizStride, Range zRange, CalendarDateRange dateRange, int stride_time, boolean addLatLon) throws IOException, InvalidRangeException
Deprecated.Write a netcdf-3 file from a subset of a grid dataset, as long as it doesnt exceed a certain file size.- Parameters:
gds
- from this grid datasetgridList
- just these gridsllbb
- horiz subset, may be nullzRange
- vertical subset, may be nulldateRange
- time subset, may be nullstride_time
- time may be strided, -1 if want alladdLatLon
- optionally add a lat/lon coordinate (if dataset uses projection coords)- Returns:
- file size
- Throws:
IOException
InvalidRangeException
-
makeGridFileSizeEstimate
public long makeGridFileSizeEstimate(GridDataset gds, List<String> gridList, ProjectionRect projBB, int horizStride, Range zRange, CalendarDateRange dateRange, int stride_time, boolean addLatLon) throws IOException, InvalidRangeException
Deprecated.Write a netcdf-3 file from a subset of a grid dataset (projection coordinates), as long as it doesnt exceed a certain file size.- Parameters:
gds
- from this grid datasetgridList
- just these gridsprojBB
- horiz subset in Projection coords, may be nullzRange
- vertical subset, may be nulldateRange
- time subset, may be nullstride_time
- time may be strided, -1 if want alladdLatLon
- optionally add a lat/lon coordinate (if dataset uses projection coords)- Returns:
- file size
- Throws:
IOException
InvalidRangeException
-
makeFile
public void makeFile(String location, GridDataset gds, List<String> gridList, LatLonRect llbb, CalendarDateRange range, boolean addLatLon, int horizStride, int stride_z, int stride_time) throws IOException, InvalidRangeException
Deprecated.Write a CF compliant Netcdf-3 file from any gridded dataset.- Parameters:
location
- write to this location on diskgds
- A gridded datasetgridList
- the list of grid names to be written, must not be empty. Full name (not short).llbb
- optional lat/lon bounding boxrange
- optional time rangeaddLatLon
- should 2D lat/lon variables be added, if its a projection coordinate system?horizStride
- x,y stridestride_z
- not implemented yetstride_time
- not implemented yet- Throws:
IOException
- if write or read errorInvalidRangeException
- if subset is illegal
-
makeFile
public long makeFile(String location, GridDataset gds, List<String> gridList, LatLonRect llbb, int horizStride, Range zRange, CalendarDateRange dateRange, int stride_time, boolean addLatLon) throws IOException, InvalidRangeException
Deprecated.- Throws:
IOException
InvalidRangeException
-
makeFile
public long makeFile(String location, GridDataset gds, List<String> gridList, LatLonRect llbb, int horizStride, Range zRange, CalendarDateRange dateRange, int stride_time, boolean addLatLon, NetcdfFileWriter.Version version) throws IOException, InvalidRangeException
Deprecated.- Throws:
IOException
InvalidRangeException
-
makeFile
public long makeFile(String location, GridDataset gds, List<String> gridList, ProjectionRect projRect, int horizStride, Range zRange, CalendarDateRange dateRange, int stride_time, boolean addLatLon) throws IOException, InvalidRangeException
Deprecated.- Throws:
IOException
InvalidRangeException
-
makeFile
public long makeFile(String location, GridDataset gds, List<String> gridList, ProjectionRect llbb, int horizStride, Range zRange, CalendarDateRange dateRange, int stride_time, boolean addLatLon, NetcdfFileWriter.Version version) throws IOException, InvalidRangeException
Deprecated.- Throws:
IOException
InvalidRangeException
-
-