Backends
CfGRIB.jl has a flexible backend system built in to allow for multiple ways to represent multidimensional data with named dimensions.
Backends are loaded in dynamically based on what packages the user has available, currently there are two built-in backends, one is based on DimensionalData.jl and the other uses AxisArrays.
Additionally, FileIO.jl integration is prepared for each of the backends so that users utilising FileIO can use its smart load functions which will load the file via CfGRIB.jl when the correct file extension and magic numbers are present.
CfGRIB.ArrayWrapper — TypeSummary
abstract type ArrayWrapper <: CfGRIB.BackendAbstract type for backends which also wrap data types provided by external packages, instead of just providing a 'vanilla' implementation of the data type.
Python's xarray has two fundamental data structures, a DataArray which holds the data for a single multi-dimensional variable and its coordinates, as well as a Dataset which holds multiple DataArrays that (typically) share the same coordinates.
See also
AxisArrayWrapper, DimensionalArrayWrapper
Fields
Constructors
CfGRIB.Backend — TypeSummary
abstract type BackendBackends are wrappers around named array data types, contain information on the dimensions, attributes, and encoding of the data, as well as the datasets themselves.
See also
AxisArrayWrapper, DimensionalArrayWrapper
Fields
Constructors
CfGRIB.AxisArrayWrapper — TypeSummary
struct AxisArrayWrapper <: CfGRIB.ArrayWrapperAxisArrays provides the equivalent of an xarray DataArray, this wrapper adds the functionality of an xarray DataSet by containing multiple AxisArrays.
Object should be created by calling the relevant convert(AxisArrayWrapper, dataset::DataSet) method on a DataSet.
See also
Fields
dimensions::OrderedCollections.OrderedDictDictionary of
DimensionName::String => DimensionLength::Intdatasets::NamedTupleNamed tuple of
DatasetName::Symbol => Dataset::AxisArrayattributes::OrderedCollections.OrderedDictDictionary of
AttributeName::String => AttributeValue::Anyencoding::DictDictionary containing encoding information (usually
source,filter_by_keys, andecode_cf)
Constructors
AxisArrayWrapper(dimensions, datasets, attributes, encoding)CfGRIB.DimensionalArrayWrapper — TypeSummary
struct DimensionalArrayWrapper <: CfGRIB.ArrayWrapperDimensionalData provides the equivalent of an xarray DataArray, this wrapper adds the functionality of an xarray DataSet by containing multiple DimensionalArrays.
Object should be created by calling the relevant convert(DimensionalArrayWrapper, dataset::DataSet) method on a DataSet.
See also
Fields
dimensions::OrderedCollections.OrderedDictDictionary of
DimensionName::String => DimensionLength::Intdatasets::NamedTupleNamed tuple of
DatasetName::Symbol => Dataset::DimensionalArrayattributes::OrderedCollections.OrderedDictDictionary of
AttributeName::String => AttributeValue::Anyencoding::DictDictionary containing encoding information (usually
source,filter_by_keys, andecode_cf)
Constructors
DimensionalArrayWrapper(dimensions, datasets, attributes, encoding)