/** * Compute the size of the file without writing * * @param gds the GridDataset * @param gridList the list of variables to be written, or null for all * @param llbb the lat/lon bounding box, or null for all * @param projRect the projection bounding box, or null for all * @param horizStride the x and y stride * @param zRange the z stride * @param dateRange date range, or null for all * @param stride_time the time stride * @param addLatLon add 2D lat/lon coordinates if needed * @return total bytes written * @throws IOException * @throws InvalidRangeException */ static public long makeSizeEstimate(ucar.nc2.dt.GridDataset gds, List<String> gridList, LatLonRect llbb, ProjectionRect projRect, int horizStride, Range zRange, CalendarDateRange dateRange, int stride_time, boolean addLatLon) throws IOException, InvalidRangeException { CFGridWriter2 writer2 = new CFGridWriter2(); return writer2.writeOrTestSize(gds, gridList, llbb, projRect, horizStride, zRange, dateRange, stride_time, addLatLon, true, null); }
/** * Compute the size of the file without writing * * @param gds the GridDataset * @param gridList the list of variables to be written, or null for all * @param llbb the lat/lon bounding box, or null for all * @param projRect the projection bounding box, or null for all * @param horizStride the x and y stride * @param zRange the z stride * @param dateRange date range, or null for all * @param stride_time the time stride * @param addLatLon add 2D lat/lon coordinates if needed * @return total bytes written * @throws IOException * @throws InvalidRangeException */ static public long makeSizeEstimate(ucar.nc2.dt.GridDataset gds, List<String> gridList, LatLonRect llbb, ProjectionRect projRect, int horizStride, Range zRange, CalendarDateRange dateRange, int stride_time, boolean addLatLon) throws IOException, InvalidRangeException { CFGridWriter2 writer2 = new CFGridWriter2(); return writer2.writeOrTestSize(gds, gridList, llbb, projRect, horizStride, zRange, dateRange, stride_time, addLatLon, true, null); }
/** * Write a netcdf/CF file from a GridDataset * * @param gds the GridDataset * @param gridList the list of variables to be written, or null for all * @param llbb the lat/lon bounding box, or null for all * @param projRect the projection bounding box, or null for all * @param horizStride the x and y stride * @param zRange the z stride * @param dateRange date range, or null for all * @param stride_time the time stride * @param addLatLon add 2D lat/lon coordinates if needed * @param writer this does the actual writing * @return total bytes written * @throws IOException * @throws InvalidRangeException */ static public long writeFile(ucar.nc2.dt.GridDataset gds, List<String> gridList, LatLonRect llbb, ProjectionRect projRect, int horizStride, Range zRange, CalendarDateRange dateRange, int stride_time, boolean addLatLon, NetcdfFileWriter writer) throws IOException, InvalidRangeException { CFGridWriter2 writer2 = new CFGridWriter2(); return writer2.writeOrTestSize(gds, gridList, llbb, projRect, horizStride, zRange, dateRange, stride_time, addLatLon, false, writer); }
/** * Write a netcdf/CF file from a GridDataset * * @param gds the GridDataset * @param gridList the list of variables to be written, or null for all * @param llbb the lat/lon bounding box, or null for all * @param projRect the projection bounding box, or null for all * @param horizStride the x and y stride * @param zRange the z stride * @param dateRange date range, or null for all * @param stride_time the time stride * @param addLatLon add 2D lat/lon coordinates if needed * @param writer this does the actual writing * @return total bytes written * @throws IOException * @throws InvalidRangeException */ static public long writeFile(ucar.nc2.dt.GridDataset gds, List<String> gridList, LatLonRect llbb, ProjectionRect projRect, int horizStride, Range zRange, CalendarDateRange dateRange, int stride_time, boolean addLatLon, NetcdfFileWriter writer) throws IOException, InvalidRangeException { CFGridWriter2 writer2 = new CFGridWriter2(); return writer2.writeOrTestSize(gds, gridList, llbb, projRect, horizStride, zRange, dateRange, stride_time, addLatLon, false, writer); }