hnetcdf-0.5.0.0: Haskell NetCDF library

Safe HaskellSafe
LanguageHaskell98

Data.NetCDF.Metadata

Description

NetCDF file metadata handling: when a NetCDF file is opened, metadata defining the dimensions, variables and attributes in the file are read all at once to create a value of type NcInfo.

Synopsis

Documentation

type Name = String Source #

Names for dimensions, variables, attributes.

data NcDim Source #

Information about a dimension: name, number of entries and whether unlimited.

Constructors

NcDim 
Instances
Show NcDim Source # 
Instance details

Defined in Data.NetCDF.Metadata

Methods

showsPrec :: Int -> NcDim -> ShowS #

show :: NcDim -> String #

showList :: [NcDim] -> ShowS #

data NcAttr Source #

Attribute value.

Instances
Eq NcAttr Source # 
Instance details

Defined in Data.NetCDF.Metadata

Methods

(==) :: NcAttr -> NcAttr -> Bool #

(/=) :: NcAttr -> NcAttr -> Bool #

Show NcAttr Source # 
Instance details

Defined in Data.NetCDF.Metadata

class ToNcAttr a where Source #

Methods

toAttr :: a -> NcAttr Source #

Instances
ToNcAttrHelp a => ToNcAttr a Source # 
Instance details

Defined in Data.NetCDF.Metadata

Methods

toAttr :: a -> NcAttr Source #

ToNcAttrHelp a => ToNcAttr [a] Source # 
Instance details

Defined in Data.NetCDF.Metadata

Methods

toAttr :: [a] -> NcAttr Source #

class FromNcAttr a where Source #

Conversion from attribute values to Haskell types.

Methods

fromAttr :: NcAttr -> Maybe a Source #

Instances
FromNcAttr Char Source # 
Instance details

Defined in Data.NetCDF.Metadata

FromNcAttr Word8 Source # 
Instance details

Defined in Data.NetCDF.Metadata

FromNcAttr CShort Source # 
Instance details

Defined in Data.NetCDF.Metadata

FromNcAttr CInt Source # 
Instance details

Defined in Data.NetCDF.Metadata

FromNcAttr CFloat Source # 
Instance details

Defined in Data.NetCDF.Metadata

FromNcAttr CDouble Source # 
Instance details

Defined in Data.NetCDF.Metadata

FromNcAttr [Char] Source # 
Instance details

Defined in Data.NetCDF.Metadata

Methods

fromAttr :: NcAttr -> Maybe [Char] Source #

FromNcAttr [Word8] Source # 
Instance details

Defined in Data.NetCDF.Metadata

FromNcAttr [CShort] Source # 
Instance details

Defined in Data.NetCDF.Metadata

FromNcAttr [CInt] Source # 
Instance details

Defined in Data.NetCDF.Metadata

Methods

fromAttr :: NcAttr -> Maybe [CInt] Source #

FromNcAttr [CFloat] Source # 
Instance details

Defined in Data.NetCDF.Metadata

FromNcAttr [CDouble] Source # 
Instance details

Defined in Data.NetCDF.Metadata

data NcVar Source #

Information about a variable: name, type, dimensions and attributes.

Constructors

NcVar 
Instances
Show NcVar Source # 
Instance details

Defined in Data.NetCDF.Metadata

Methods

showsPrec :: Int -> NcVar -> ShowS #

show :: NcVar -> String #

showList :: [NcVar] -> ShowS #

data NcInfo a Source #

Metadata information for a whole NetCDF file.

Constructors

NcInfo 

Fields

Instances
Show (NcInfo a) Source # 
Instance details

Defined in Data.NetCDF.Metadata

Methods

showsPrec :: Int -> NcInfo a -> ShowS #

show :: NcInfo a -> String #

showList :: [NcInfo a] -> ShowS #

data NcRead Source #

Type tags for NcInfo values.

ncDim :: NcInfo a -> Name -> Maybe NcDim Source #

Extract dimension metadata by name.

ncAttr :: NcInfo a -> Name -> Maybe NcAttr Source #

Extract a global attribute by name.

ncVar :: NcInfo a -> Name -> Maybe NcVar Source #

Extract variable metadata by name.

ncVarAttr :: NcVar -> Name -> Maybe NcAttr Source #

Extract an attribute for a given variable by name.

emptyNcInfo :: FilePath -> NcInfo NcWrite Source #

Empty NcInfo value to build on.

addNcDim :: NcDim -> NcInfo NcWrite -> NcInfo NcWrite Source #

Add a new dimension to an NcInfo value.

addNcVar :: NcVar -> NcInfo NcWrite -> NcInfo NcWrite Source #

Add a new variable to an NcInfo value.

addNcAttr :: Name -> NcAttr -> NcInfo NcWrite -> NcInfo NcWrite Source #

Add a new global attribute to an NcInfo value.

addNcVarAttr :: Name -> NcAttr -> NcVar -> NcVar Source #

Add a new attribute to an NcVar value.

(#) :: a -> (a -> b) -> b infixl 8 Source #

Handy postfix function application.