netcdfjs
    Preparing search index...

    Class NetCDFReader

    Reads a NetCDF v3.x file See specification

    ArrayBuffer or any Typed Array (including Node.js' Buffer from v4) with the data

    Index

    Constructors

    Properties

    buffer: IOBuffer
    header: Header
    toString: (this: NetCDFReader) => string = toString

    Accessors

    • get dimensions(): { name: string; size: number }[]

      Returns { name: string; size: number }[]

      • Array - List of dimensions with: name: String with the name of the dimension size: Number with the size of the dimension
    • get globalAttributes(): Attribute[]

      Returns Attribute[]

      • Array - List of global attributes with: name: String with the name of the attribute type: String with the type of the attribute value: A number or string with the value of the attribute
    • get recordDimension(): {
          id?: number;
          length: number;
          name?: string;
          recordStep?: number;
      }

      Returns { id?: number; length: number; name?: string; recordStep?: number }

      • Metadata for the record dimension length: Number of elements in the record dimension id: Id number in the list of dimensions for the record dimension name: String with the name of the record dimension recordStep: Number with the record variables step size
      • Optionalid?: number
      • length: number

        Length of the record dimension sum of the varSize's of all the record variables.

      • Optionalname?: string
      • OptionalrecordStep?: number
    • get version(): "classic format" | "64-bit offset format"

      Returns "classic format" | "64-bit offset format"

      • Version for the NetCDF format

    Methods

    • Check if an attribute exists

      Parameters

      • attributeName: string

        Name of the attribute to find

      Returns boolean

      boolean

    • Check if a dataVariable exists

      Parameters

      • variableName: string

        Name of the variable to find

      Returns boolean

      boolean

    • Returns the value of an attribute

      Parameters

      • attributeName: string

      Returns string | number | null

      • Value of the attributeName or null
    • Retrieves the data for a given variable

      Parameters

      • variableName: string | Variable

        Name of the variable to search or variable object

      Returns (string | number | number[])[]

      The variable values

    • Returns the value of a variable as a string

      Parameters

      • variableName: string

      Returns string | null

      • Value of the variable as a string or null