类 NCUtil
- java.lang.Object
-
- org.meteoinfo.data.meteodata.netcdf.NCUtil
-
public class NCUtil extends Object
- 作者:
- Yaqiang Wang
-
-
构造器概要
构造器 构造器 说明 NCUtil()
-
方法概要
所有方法 静态方法 具体方法 修饰符和类型 方法 说明 static org.meteoinfo.ndarray.ArrayarrayUnPack(org.meteoinfo.ndarray.Array a, Variable variable)Unpack an arraystatic ucar.ma2.ArrayconvertArray(org.meteoinfo.ndarray.Array array)Convert meteothink array to netcdf arraystatic org.meteoinfo.ndarray.ArrayconvertArray(ucar.ma2.Array ncArray)Convert netcdf array to meteothink arraystatic ucar.nc2.AttributeconvertAttribute(Attribute attr)Convert meoteoinfo attribute to netcdf attributestatic AttributeconvertAttribute(ucar.nc2.Attribute ncAttr)Convert netcdf attribute to meteothink attributestatic ucar.ma2.DataTypeconvertDataType(org.meteoinfo.ndarray.DataType dataType)Convert meteothink data type to netcdf data typestatic org.meteoinfo.ndarray.DataTypeconvertDataType(ucar.ma2.DataType ncDataType)Convert netcdf data type to meteothink data typestatic DimensionconvertDimension(ucar.nc2.Dimension ncDim)Convert from netcdf dimension to meteothink dimensionstatic List<Dimension>convertDimensions(List<ucar.nc2.Dimension> ncDims)Convert netcdf dimensions to meteothink dimensionsstatic org.meteoinfo.ndarray.SectionconvertSection(ucar.ma2.Section ncSection)Convert netcdf section to meteothink sectionstatic VariableconvertVariable(ucar.nc2.Variable ncVar)Convert netcdf variable to meteothink variablestatic doublegetMissingValue(Variable var)Get missing value from variablestatic double[]getPackData(Variable var)Get pack data from variablestatic double[]getPackData(ucar.nc2.Variable var)Get pack data from variablestatic org.meteoinfo.ndarray.ArrayreadSequence(ucar.ma2.ArrayObject parentArray, String memberName, int index)Read data array from an ucar ArrayObject with ArraySequence elementsstatic org.meteoinfo.ndarray.ArrayreadSequence(ucar.ma2.ArrayStructure parentArray, String memberName)Read data array from an ucar ArraySequencestatic org.meteoinfo.ndarray.ArrayreadSequenceRecord(ucar.ma2.ArrayObject parentArray, String memberName, int index)Read data array from an ucar ArrayObject with ArraySequence elementsstatic org.meteoinfo.ndarray.ArrayreadSequenceRecord(ucar.ma2.ArrayObject parentArray, String memberName, int index, double missingValue)Read data array from an ucar ArrayObject with ArraySequence elements
-
-
-
方法详细资料
-
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 IOExceptionRead data array from an ucar ArraySequence- 参数:
parentArray- The ucar ArraySequencememberName- 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 IOExceptionRead data array from an ucar ArrayObject with ArraySequence elements- 参数:
parentArray- The ucar ArrayObject with ArraySequence elementsmemberName- Member nameindex- Record indexmissingValue- Missing value- 返回:
- Read data array
- 抛出:
IOException
-
readSequenceRecord
public static org.meteoinfo.ndarray.Array readSequenceRecord(ucar.ma2.ArrayObject parentArray, String memberName, int index) throws IOExceptionRead data array from an ucar ArrayObject with ArraySequence elements- 参数:
parentArray- The ucar ArrayObject with ArraySequence elementsmemberName- Member nameindex- Record indexmissingValue- Missing value- 返回:
- Read data array
- 抛出:
IOException
-
readSequence
public static org.meteoinfo.ndarray.Array readSequence(ucar.ma2.ArrayObject parentArray, String memberName, int index) throws IOExceptionRead data array from an ucar ArrayObject with ArraySequence elements- 参数:
parentArray- The ucar ArrayObject with ArraySequence elementsmemberName- Member nameindex- 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 arrayvariable- The variable including packing parameters- 返回:
- Unpacked data
-
-