类 NCUtil


  • public class NCUtil
    extends Object
    作者:
    Yaqiang Wang
    • 构造器概要

      构造器 
      构造器 说明
      NCUtil()  
    • 方法概要

      所有方法 静态方法 具体方法 
      修饰符和类型 方法 说明
      static org.meteoinfo.ndarray.Array arrayUnPack​(org.meteoinfo.ndarray.Array a, Variable variable)
      Unpack an array
      static ucar.ma2.Array convertArray​(org.meteoinfo.ndarray.Array array)
      Convert meteothink array to netcdf array
      static org.meteoinfo.ndarray.Array convertArray​(ucar.ma2.Array ncArray)
      Convert netcdf array to meteothink array
      static ucar.nc2.Attribute convertAttribute​(Attribute attr)
      Convert meoteoinfo attribute to netcdf attribute
      static Attribute convertAttribute​(ucar.nc2.Attribute ncAttr)
      Convert netcdf attribute to meteothink attribute
      static ucar.ma2.DataType convertDataType​(org.meteoinfo.ndarray.DataType dataType)
      Convert meteothink data type to netcdf data type
      static org.meteoinfo.ndarray.DataType convertDataType​(ucar.ma2.DataType ncDataType)
      Convert netcdf data type to meteothink data type
      static Dimension convertDimension​(ucar.nc2.Dimension ncDim)
      Convert from netcdf dimension to meteothink dimension
      static List<Dimension> convertDimensions​(List<ucar.nc2.Dimension> ncDims)
      Convert netcdf dimensions to meteothink dimensions
      static org.meteoinfo.ndarray.Section convertSection​(ucar.ma2.Section ncSection)
      Convert netcdf section to meteothink section
      static Variable convertVariable​(ucar.nc2.Variable ncVar)
      Convert netcdf variable to meteothink variable
      static double getMissingValue​(Variable var)
      Get missing value from variable
      static double[] getPackData​(Variable var)
      Get pack data from variable
      static double[] getPackData​(ucar.nc2.Variable var)
      Get pack data from variable
      static org.meteoinfo.ndarray.Array readSequence​(ucar.ma2.ArrayObject parentArray, String memberName, int index)
      Read data array from an ucar ArrayObject with ArraySequence elements
      static org.meteoinfo.ndarray.Array readSequence​(ucar.ma2.ArrayStructure parentArray, String memberName)
      Read data array from an ucar ArraySequence
      static org.meteoinfo.ndarray.Array readSequenceRecord​(ucar.ma2.ArrayObject parentArray, String memberName, int index)
      Read data array from an ucar ArrayObject with ArraySequence elements
      static org.meteoinfo.ndarray.Array readSequenceRecord​(ucar.ma2.ArrayObject parentArray, String memberName, int index, double missingValue)
      Read data array from an ucar ArrayObject with ArraySequence elements
    • 构造器详细资料

      • NCUtil

        public NCUtil()
    • 方法详细资料

      • convertDataType

        public static org.meteoinfo.ndarray.DataType convertDataType​(ucar.ma2.DataType ncDataType)
        Convert netcdf data type to meteothink data type
        参数:
        ncDataType - Netcdf data type
        返回:
        MeteoThink data type
      • convertDataType

        public static ucar.ma2.DataType convertDataType​(org.meteoinfo.ndarray.DataType dataType)
        Convert meteothink data type to netcdf data type
        参数:
        dataType - MeteoThink data type
        返回:
        Netcdf data type
      • convertArray

        public static org.meteoinfo.ndarray.Array convertArray​(ucar.ma2.Array ncArray)
        Convert netcdf array to meteothink array
        参数:
        ncArray - Netcdf array
        返回:
        MeteoThink array
      • convertArray

        public static ucar.ma2.Array convertArray​(org.meteoinfo.ndarray.Array array)
        Convert meteothink array to netcdf array
        参数:
        array - MeteoThink array
        返回:
        Netcdf array
      • convertDimension

        public static Dimension convertDimension​(ucar.nc2.Dimension ncDim)
        Convert from netcdf dimension to meteothink dimension
        参数:
        ncDim - Netcdf dimension
        返回:
        MeteoThink dimension
      • convertDimensions

        public static List<Dimension> convertDimensions​(List<ucar.nc2.Dimension> ncDims)
        Convert netcdf dimensions to meteothink dimensions
        参数:
        ncDims - Netcdf dimensions
        返回:
        MeteoThink dimensions
      • convertAttribute

        public static Attribute convertAttribute​(ucar.nc2.Attribute ncAttr)
        Convert netcdf attribute to meteothink attribute
        参数:
        ncAttr - Netcdf attribute
        返回:
        MeteoThink attribute
      • convertAttribute

        public static ucar.nc2.Attribute convertAttribute​(Attribute attr)
        Convert meoteoinfo attribute to netcdf attribute
        参数:
        attr - Attribute
        返回:
        MeteoInfo attribute
      • convertVariable

        public static Variable convertVariable​(ucar.nc2.Variable ncVar)
        Convert netcdf variable to meteothink variable
        参数:
        ncVar - Netcdf variable
        返回:
        MeteoThink variable
      • convertSection

        public static org.meteoinfo.ndarray.Section convertSection​(ucar.ma2.Section ncSection)
        Convert netcdf section to meteothink section
        参数:
        ncSection - Netcdf section
        返回:
        Meteothink section
      • getPackData

        public static double[] getPackData​(ucar.nc2.Variable var)
        Get pack data from variable
        参数:
        var - The variable
        返回:
        Pack data
      • getPackData

        public static double[] getPackData​(Variable var)
        Get pack data from variable
        参数:
        var - The variable
        返回:
        Pack data
      • getMissingValue

        public static double getMissingValue​(Variable var)
        Get missing value from variable
        参数:
        var - The variable
        返回:
        Missing value
      • readSequence

        public static org.meteoinfo.ndarray.Array readSequence​(ucar.ma2.ArrayStructure parentArray,
                                                               String memberName)
                                                        throws IOException
        Read data array from an ucar ArraySequence
        参数:
        parentArray - The ucar ArraySequence
        memberName - Member name
        返回:
        Read data array
        抛出:
        IOException
      • readSequenceRecord

        public static org.meteoinfo.ndarray.Array readSequenceRecord​(ucar.ma2.ArrayObject parentArray,
                                                                     String memberName,
                                                                     int index,
                                                                     double missingValue)
                                                              throws IOException
        Read data array from an ucar ArrayObject with ArraySequence elements
        参数:
        parentArray - The ucar ArrayObject with ArraySequence elements
        memberName - Member name
        index - Record index
        missingValue - Missing value
        返回:
        Read data array
        抛出:
        IOException
      • readSequenceRecord

        public static org.meteoinfo.ndarray.Array readSequenceRecord​(ucar.ma2.ArrayObject parentArray,
                                                                     String memberName,
                                                                     int index)
                                                              throws IOException
        Read data array from an ucar ArrayObject with ArraySequence elements
        参数:
        parentArray - The ucar ArrayObject with ArraySequence elements
        memberName - Member name
        index - Record index
        missingValue - Missing value
        返回:
        Read data array
        抛出:
        IOException
      • readSequence

        public static org.meteoinfo.ndarray.Array readSequence​(ucar.ma2.ArrayObject parentArray,
                                                               String memberName,
                                                               int index)
                                                        throws IOException
        Read data array from an ucar ArrayObject with ArraySequence elements
        参数:
        parentArray - The ucar ArrayObject with ArraySequence elements
        memberName - Member name
        index - Sequence index
        返回:
        Read data array
        抛出:
        IOException
      • arrayUnPack

        public static org.meteoinfo.ndarray.Array arrayUnPack​(org.meteoinfo.ndarray.Array a,
                                                              Variable variable)
        Unpack an array
        参数:
        a - The array
        variable - The variable including packing parameters
        返回:
        Unpacked data