Class CdmFeatureWrite


  • public class CdmFeatureWrite
    extends Object
    Provides methods for writing Features to NetCDF files. Currently fairly limited in scope, it contains a single method which will write a GridFeature on a rectilinear lat-lon grid to file.
    Author:
    Guy Griffiths
    • Constructor Detail

      • CdmFeatureWrite

        public CdmFeatureWrite()
    • Method Detail

      • gridFeatureToNetCDF

        public static void gridFeatureToNetCDF​(GridFeature f,
                                               File outFile)
                                        throws IOException,
                                               ucar.ma2.InvalidRangeException
        Writes a GridFeature to file
        Parameters:
        f - The GridFeature to write. Can contain multiple variables.
        outFile - The File to write to.
        Throws:
        IOException - - If there is a problem writing to the file location.
        ucar.ma2.InvalidRangeException - - Usually indicative of a bug...
      • gridFeatureToNetCDF

        public static void gridFeatureToNetCDF​(GridFeature f,
                                               File outFile,
                                               Set<GridCoordinates2D> cellsToMask,
                                               Float fillValue)
                                        throws IOException,
                                               ucar.ma2.InvalidRangeException
        Writes a GridFeature to file, masking out specified (horizontal) grid cells
        Parameters:
        f - The GridFeature to write. Can contain multiple variables.
        outFile - The File to write to.
        Throws:
        IOException - - If there is a problem writing to the file location.
        ucar.ma2.InvalidRangeException - - Usually indicative of a bug...