static public void makeFileVersioned(String location, ucar.nc2.dt.GridDataset gds, List<String> gridList, LatLonRect llbb, CalendarDateRange dateRange, NetcdfFileWriter.Version version) throws IOException, InvalidRangeException { CFGridWriter writer = new CFGridWriter(); writer.makeOrTestSize(location, gds, gridList, llbb, 1, null, dateRange, 1, false, false, version); }
public long makeFile(String location, ucar.nc2.dt.GridDataset gds, List<String> gridList, LatLonRect llbb, int horizStride, Range zRange, CalendarDateRange dateRange, int stride_time, boolean addLatLon) throws IOException, InvalidRangeException { return makeOrTestSize(location, gds, gridList, llbb, horizStride, zRange, dateRange, stride_time, addLatLon, false, NetcdfFileWriter.Version.netcdf3); }
/** * Write a netcdf-3 file from a subset of a grid dataset * * @param location write new file * @param gds from this grid dataset * @param gridList just these grids * @param llbb horiz subset, may be null * @param range time subset, may be null * @throws IOException * @throws InvalidRangeException */ static public void makeFile(String location, ucar.nc2.dt.GridDataset gds, List<String> gridList, LatLonRect llbb, CalendarDateRange range) throws IOException, InvalidRangeException { CFGridWriter writer = new CFGridWriter(); writer.makeFile(location, gds, gridList, llbb, range, false, 1, 1, 1); }
Range timeRange = makeTimeRange(dateRange, timeAxis, stride_time); Range zRangeUse = makeVerticalRange(zRange, vertAxis); addCoordinateAxis(gcs, varNameList, varList, axisList); addCoordinateTransform(gcs, ncd, varNameList, varList); total_size += processTransformationVars(varList, varNameList, ncd, gds, grid, timeRange, zRangeUse, llbb, 1, horizStride, horizStride, axisList); Projection proj = gcs.getProjection(); if ((null != proj) && !(proj instanceof LatLonProjection)) { addLatLon2D(ncd, varList, proj, gcs.getXHorizAxis(), gcs.getYHorizAxis()); addLatLon = false; boolean isLargeFile = isLargeFile(total_size); writeGlobalAttributes(writer, gds, resultBB); fileWriter.addVariable(v); addCFAnnotations(writer, gds, gridList, ncd, axisList, addLatLon);
public long makeFile(String location, ucar.nc2.dt.GridDataset gds, List<String> gridList, LatLonRect llbb, int horizStride, Range zRange, CalendarDateRange dateRange, int stride_time, boolean addLatLon, NetcdfFileWriter.Version version) throws IOException, InvalidRangeException { return makeOrTestSize(location, gds, gridList, llbb, horizStride, zRange, dateRange, stride_time, addLatLon, false, version); }
private void convertProjectionCTV(NetcdfDataset ds, Variable ctv) { Attribute att = ctv.findAttribute(_Coordinate.TransformType); if ((null != att) && att.getStringValue().equals("Projection")) { Attribute east = ctv.findAttribute("false_easting"); Attribute north = ctv.findAttribute("false_northing"); if ((null != east) || (null != north)) { double scalef = AbstractCoordTransBuilder.getFalseEastingScaleFactor(ds, ctv); if (scalef != 1.0) { convertAttribute(ctv, east, scalef); convertAttribute(ctv, north, scalef); } } } }
convertProjectionCTV((NetcdfDataset) gds.getNetcdfFile(), v); ctvList.add(v);
Range timeRange = makeTimeRange(dateRange, timeAxis, stride_time); Range zRangeUse = makeVerticalRange(zRange, vertAxis); addCoordinateAxis(gcs, varNameList, varList, axisList); addCoordinateTransform(gcs, ncd, varNameList, varList); total_size += processTransformationVars(varList, varNameList, ncd, gds, grid, timeRange, zRangeUse, llbb, 1, horizStride, horizStride, axisList); Projection proj = gcs.getProjection(); if ((null != proj) && !(proj instanceof LatLonProjection)) { addLatLon2D(ncd, varList, proj, gcs.getXHorizAxis(), gcs.getYHorizAxis()); addLatLon = false; boolean isLargeFile = isLargeFile(total_size); writeGlobalAttributes(writer, gds, resultBB); fileWriter.addVariable(v); addCFAnnotations(writer, gds, gridList, ncd, axisList, addLatLon);
public long makeFile(String location, ucar.nc2.dt.GridDataset gds, List<String> gridList, ProjectionRect llbb, int horizStride, Range zRange, CalendarDateRange dateRange, int stride_time, boolean addLatLon, NetcdfFileWriter.Version version) throws IOException, InvalidRangeException { return makeOrTestSize(location, gds, gridList, llbb, horizStride, zRange, dateRange, stride_time, addLatLon, false, version); }
/** * Write a netcdf-3 file from a subset of a grid dataset * * @param location write new file * @param gds from this grid dataset * @param gridList just these grids * @param llbb horiz subset, may be null * @param range time subset, may be null * @throws IOException * @throws InvalidRangeException */ static public void makeFile(String location, ucar.nc2.dt.GridDataset gds, List<String> gridList, LatLonRect llbb, CalendarDateRange range) throws IOException, InvalidRangeException { CFGridWriter writer = new CFGridWriter(); writer.makeFile(location, gds, gridList, llbb, range, false, 1, 1, 1); }
private void convertProjectionCTV(NetcdfDataset ds, Variable ctv) { Attribute att = ctv.findAttribute(_Coordinate.TransformType); if ((null != att) && att.getStringValue().equals("Projection")) { Attribute east = ctv.findAttribute("false_easting"); Attribute north = ctv.findAttribute("false_northing"); if ((null != east) || (null != north)) { double scalef = AbstractTransformBuilder.getFalseEastingScaleFactor(ds, ctv); if (scalef != 1.0) { convertAttribute(ctv, east, scalef); convertAttribute(ctv, north, scalef); } } } }
convertProjectionCTV((NetcdfDataset) gds.getNetcdfFile(), v); ctvList.add(v);
Range timeRange = makeTimeRange(dateRange, timeAxis, stride_time); Range zRangeUse = makeVerticalRange(zRange, vertAxis); addCoordinateAxis(gcs, varNameList, varList, axisList); addCoordinateTransform(gcs, ncd, varNameList, varList); total_size += processTransformationVars(varList, varNameList, ncd, gds, grid, timeRange, zRangeUse, y_range, x_range, 1, horizStride, horizStride); Projection proj = gcs.getProjection(); if ((null != proj) && !(proj instanceof LatLonProjection)) { addLatLon2D(ncd, varList, proj, gcs.getXHorizAxis(), gcs.getYHorizAxis()); addLatLon = false; boolean isLargeFile = isLargeFile(total_size); writer.setLargeFile(isLargeFile); writeGlobalAttributes(writer, gds, resultBB); fileWriter.addVariable(v); addCFAnnotations(writer, gds, gridList, ncd, axisList, addLatLon);
public long makeFile(String location, ucar.nc2.dt.GridDataset gds, List<String> gridList, ProjectionRect llbb, int horizStride, Range zRange, CalendarDateRange dateRange, int stride_time, boolean addLatLon, NetcdfFileWriter.Version version) throws IOException, InvalidRangeException { return makeOrTestSize(location, gds, gridList, llbb, horizStride, zRange, dateRange, stride_time, addLatLon, false, version); }
static public void makeFileVersioned(String location, ucar.nc2.dt.GridDataset gds, List<String> gridList, LatLonRect llbb, CalendarDateRange dateRange, NetcdfFileWriter.Version version) throws IOException, InvalidRangeException { CFGridWriter writer = new CFGridWriter(); writer.makeOrTestSize(location, gds, gridList, llbb, 1, null, dateRange, 1, false, false, version); }
public long makeFile(String location, ucar.nc2.dt.GridDataset gds, List<String> gridList, LatLonRect llbb, int horizStride, Range zRange, CalendarDateRange dateRange, int stride_time, boolean addLatLon) throws IOException, InvalidRangeException { return makeOrTestSize(location, gds, gridList, llbb, horizStride, zRange, dateRange, stride_time, addLatLon, false, NetcdfFileWriter.Version.netcdf3); }
Range timeRange = makeTimeRange(dateRange, timeAxis, stride_time); Range zRangeUse = makeVerticalRange(zRange, vertAxis); addCoordinateAxis(gcs, varNameList, varList, axisList); addCoordinateTransform(gcs, ncd, varNameList, varList); total_size += processTransformationVars(varList, varNameList, ncd, gds, grid, timeRange, zRangeUse, y_range, x_range, 1, horizStride, horizStride); Projection proj = gcs.getProjection(); if ((null != proj) && !(proj instanceof LatLonProjection)) { addLatLon2D(ncd, varList, proj, gcs.getXHorizAxis(), gcs.getYHorizAxis()); addLatLon = false; boolean isLargeFile = isLargeFile(total_size); writer.setLargeFile(isLargeFile); if (resultBB != null) writeGlobalAttributes(writer, gds, resultBB); fileWriter.addVariable(v); addCFAnnotations(writer, gds, gridList, ncd, axisList, addLatLon);
public long makeFile(String location, ucar.nc2.dt.GridDataset gds, List<String> gridList, LatLonRect llbb, int horizStride, Range zRange, CalendarDateRange dateRange, int stride_time, boolean addLatLon, NetcdfFileWriter.Version version) throws IOException, InvalidRangeException { return makeOrTestSize(location, gds, gridList, llbb, horizStride, zRange, dateRange, stride_time, addLatLon, false, version); }
public long makeFile(String location, ucar.nc2.dt.GridDataset gds, List<String> gridList, ProjectionRect projRect, int horizStride, Range zRange, CalendarDateRange dateRange, int stride_time, boolean addLatLon) throws IOException, InvalidRangeException { return makeOrTestSize(location, gds, gridList, projRect, horizStride, zRange, dateRange, stride_time, addLatLon, false, NetcdfFileWriter.Version.netcdf3); }
public long makeFile(String location, ucar.nc2.dt.GridDataset gds, List<String> gridList, ProjectionRect projRect, int horizStride, Range zRange, CalendarDateRange dateRange, int stride_time, boolean addLatLon) throws IOException, InvalidRangeException { return makeOrTestSize(location, gds, gridList, projRect, horizStride, zRange, dateRange, stride_time, addLatLon, false, NetcdfFileWriter.Version.netcdf3); }