Class CFGridWriter


  • public class CFGridWriter
    extends Object
    Deprecated.
    use CFGridWriter2
    Write 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, ucar.nc2.dt.GridDataset gds, List<String> gridList, ucar.unidata.geoloc.LatLonRect llbb, int horizStride, ucar.ma2.Range zRange, ucar.nc2.time.CalendarDateRange dateRange, int stride_time, boolean addLatLon)
      Deprecated.
       
      long makeFile​(String location, ucar.nc2.dt.GridDataset gds, List<String> gridList, ucar.unidata.geoloc.LatLonRect llbb, int horizStride, ucar.ma2.Range zRange, ucar.nc2.time.CalendarDateRange dateRange, int stride_time, boolean addLatLon, ucar.nc2.NetcdfFileWriter.Version version)
      Deprecated.
       
      static void makeFile​(String location, ucar.nc2.dt.GridDataset gds, List<String> gridList, ucar.unidata.geoloc.LatLonRect llbb, ucar.nc2.time.CalendarDateRange range)
      Deprecated.
      Write a netcdf-3 file from a subset of a grid dataset
      void makeFile​(String location, ucar.nc2.dt.GridDataset gds, List<String> gridList, ucar.unidata.geoloc.LatLonRect llbb, ucar.nc2.time.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, ucar.nc2.dt.GridDataset gds, List<String> gridList, ucar.unidata.geoloc.ProjectionRect projRect, int horizStride, ucar.ma2.Range zRange, ucar.nc2.time.CalendarDateRange dateRange, int stride_time, boolean addLatLon)
      Deprecated.
       
      long makeFile​(String location, ucar.nc2.dt.GridDataset gds, List<String> gridList, ucar.unidata.geoloc.ProjectionRect llbb, int horizStride, ucar.ma2.Range zRange, ucar.nc2.time.CalendarDateRange dateRange, int stride_time, boolean addLatLon, ucar.nc2.NetcdfFileWriter.Version version)
      Deprecated.
       
      static void makeFileVersioned​(String location, ucar.nc2.dt.GridDataset gds, List<String> gridList, ucar.unidata.geoloc.LatLonRect llbb, ucar.nc2.time.CalendarDateRange dateRange, ucar.nc2.NetcdfFileWriter.Version version)
      Deprecated.
       
      long makeGridFileSizeEstimate​(ucar.nc2.dt.GridDataset gds, List<String> gridList, ucar.unidata.geoloc.LatLonRect llbb, int horizStride, ucar.ma2.Range zRange, ucar.nc2.time.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​(ucar.nc2.dt.GridDataset gds, List<String> gridList, ucar.unidata.geoloc.ProjectionRect projBB, int horizStride, ucar.ma2.Range zRange, ucar.nc2.time.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.
    • Constructor Detail

      • CFGridWriter

        public CFGridWriter()
        Deprecated.
    • Method Detail

      • makeFile

        public static void makeFile​(String location,
                                    ucar.nc2.dt.GridDataset gds,
                                    List<String> gridList,
                                    ucar.unidata.geoloc.LatLonRect llbb,
                                    ucar.nc2.time.CalendarDateRange range)
                             throws IOException,
                                    ucar.ma2.InvalidRangeException
        Deprecated.
        Write a netcdf-3 file from a subset of a grid dataset
        Parameters:
        location - write new file
        gds - from this grid dataset
        gridList - just these grids
        llbb - horiz subset, may be null
        range - time subset, may be null
        Throws:
        IOException
        ucar.ma2.InvalidRangeException
      • makeFileVersioned

        public static void makeFileVersioned​(String location,
                                             ucar.nc2.dt.GridDataset gds,
                                             List<String> gridList,
                                             ucar.unidata.geoloc.LatLonRect llbb,
                                             ucar.nc2.time.CalendarDateRange dateRange,
                                             ucar.nc2.NetcdfFileWriter.Version version)
                                      throws IOException,
                                             ucar.ma2.InvalidRangeException
        Deprecated.
        Throws:
        IOException
        ucar.ma2.InvalidRangeException
      • makeGridFileSizeEstimate

        public long makeGridFileSizeEstimate​(ucar.nc2.dt.GridDataset gds,
                                             List<String> gridList,
                                             ucar.unidata.geoloc.LatLonRect llbb,
                                             int horizStride,
                                             ucar.ma2.Range zRange,
                                             ucar.nc2.time.CalendarDateRange dateRange,
                                             int stride_time,
                                             boolean addLatLon)
                                      throws IOException,
                                             ucar.ma2.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 dataset
        gridList - just these grids
        llbb - horiz subset, may be null
        zRange - vertical subset, may be null
        dateRange - time subset, may be null
        stride_time - time may be strided, -1 if want all
        addLatLon - optionally add a lat/lon coordinate (if dataset uses projection coords)
        Returns:
        file size
        Throws:
        IOException
        ucar.ma2.InvalidRangeException
      • makeGridFileSizeEstimate

        public long makeGridFileSizeEstimate​(ucar.nc2.dt.GridDataset gds,
                                             List<String> gridList,
                                             ucar.unidata.geoloc.ProjectionRect projBB,
                                             int horizStride,
                                             ucar.ma2.Range zRange,
                                             ucar.nc2.time.CalendarDateRange dateRange,
                                             int stride_time,
                                             boolean addLatLon)
                                      throws IOException,
                                             ucar.ma2.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 dataset
        gridList - just these grids
        projBB - horiz subset in Projection coords, may be null
        zRange - vertical subset, may be null
        dateRange - time subset, may be null
        stride_time - time may be strided, -1 if want all
        addLatLon - optionally add a lat/lon coordinate (if dataset uses projection coords)
        Returns:
        file size
        Throws:
        IOException
        ucar.ma2.InvalidRangeException
      • makeFile

        public void makeFile​(String location,
                             ucar.nc2.dt.GridDataset gds,
                             List<String> gridList,
                             ucar.unidata.geoloc.LatLonRect llbb,
                             ucar.nc2.time.CalendarDateRange range,
                             boolean addLatLon,
                             int horizStride,
                             int stride_z,
                             int stride_time)
                      throws IOException,
                             ucar.ma2.InvalidRangeException
        Deprecated.
        Write a CF compliant Netcdf-3 file from any gridded dataset.
        Parameters:
        location - write to this location on disk
        gds - A gridded dataset
        gridList - the list of grid names to be written, must not be empty. Full name (not short).
        llbb - optional lat/lon bounding box
        range - optional time range
        addLatLon - should 2D lat/lon variables be added, if its a projection coordinate system?
        horizStride - x,y stride
        stride_z - not implemented yet
        stride_time - not implemented yet
        Throws:
        IOException - if write or read error
        ucar.ma2.InvalidRangeException - if subset is illegal
      • makeFile

        public long makeFile​(String location,
                             ucar.nc2.dt.GridDataset gds,
                             List<String> gridList,
                             ucar.unidata.geoloc.LatLonRect llbb,
                             int horizStride,
                             ucar.ma2.Range zRange,
                             ucar.nc2.time.CalendarDateRange dateRange,
                             int stride_time,
                             boolean addLatLon)
                      throws IOException,
                             ucar.ma2.InvalidRangeException
        Deprecated.
        Throws:
        IOException
        ucar.ma2.InvalidRangeException
      • makeFile

        public long makeFile​(String location,
                             ucar.nc2.dt.GridDataset gds,
                             List<String> gridList,
                             ucar.unidata.geoloc.LatLonRect llbb,
                             int horizStride,
                             ucar.ma2.Range zRange,
                             ucar.nc2.time.CalendarDateRange dateRange,
                             int stride_time,
                             boolean addLatLon,
                             ucar.nc2.NetcdfFileWriter.Version version)
                      throws IOException,
                             ucar.ma2.InvalidRangeException
        Deprecated.
        Throws:
        IOException
        ucar.ma2.InvalidRangeException
      • makeFile

        public long makeFile​(String location,
                             ucar.nc2.dt.GridDataset gds,
                             List<String> gridList,
                             ucar.unidata.geoloc.ProjectionRect projRect,
                             int horizStride,
                             ucar.ma2.Range zRange,
                             ucar.nc2.time.CalendarDateRange dateRange,
                             int stride_time,
                             boolean addLatLon)
                      throws IOException,
                             ucar.ma2.InvalidRangeException
        Deprecated.
        Throws:
        IOException
        ucar.ma2.InvalidRangeException
      • makeFile

        public long makeFile​(String location,
                             ucar.nc2.dt.GridDataset gds,
                             List<String> gridList,
                             ucar.unidata.geoloc.ProjectionRect llbb,
                             int horizStride,
                             ucar.ma2.Range zRange,
                             ucar.nc2.time.CalendarDateRange dateRange,
                             int stride_time,
                             boolean addLatLon,
                             ucar.nc2.NetcdfFileWriter.Version version)
                      throws IOException,
                             ucar.ma2.InvalidRangeException
        Deprecated.
        Throws:
        IOException
        ucar.ma2.InvalidRangeException