hgrib-0.2.0.0: Unofficial bindings for GRIB API

Copyright(c) Mattias Jakobsson 2015
LicenseGPL-3
Maintainermjakob422@gmail.com
Stabilityunstable
Portabilityportable
Safe HaskellNone
LanguageHaskell2010

Data.Grib.Raw.Context

Contents

Description

The context is a long life configuration object of the grib_api. It is used to define special allocation and free routines or to set special grib_api behaviours and variables.

Most of the documentation herein was copied from the official documentation of grib_api.

Synopsis

The GRIB Context

newtype GribContext Source

The context is a long life configuration object of the grib_api. It is used to define special allocation and free routines or to set special grib_api behaviours and variables.

Constructors

GribContext (Ptr GribContext) 

defaultGribContext :: GribContext Source

A GribContext containing a null pointer which makes the functions receiving it use the default grib context.

gribContextGetDefault :: IO GribContext Source

Get the static default context.

Note that the returned object is different from defaultGribContext, since that is just a null pointer and this is a pointer to the real thing. They should, however, be able to be used interchangeably with all the functions in this package.

gribContextNew :: GribContext -> IO GribContext Source

Create and allocate a new context from a parent context.

gribContextDelete :: GribContext -> IO () Source

Frees the cached definition files of the context.

Control GTS Mode

gribGtsHeaderOn :: GribContext -> IO () Source

Set the gts header mode on. The GTS headers will be preserved.

gribGtsHeaderOff :: GribContext -> IO () Source

Set the gts header mode off. The GTS headers will be deleted.

Control Gribex Mode

gribGribexModeOn :: GribContext -> IO () Source

Set the gribex mode on. Grib files will be compatible with gribex.

gribGribexModeOff :: GribContext -> IO () Source

Set the gribex mode off. Grib files won't be always compatible with gribex.

gribGetGribexMode :: GribContext -> IO Bool Source

Get the gribex mode.

Control Multi-field Support

gribMultiSupportOn :: GribContext -> IO () Source

Turn on support for multiple fields in single grib messages.

gribMultiSupportOff :: GribContext -> IO () Source

Turn off support for multiple fields in single grib messages.

GRIB API Version

gribGetApiVersion :: Int Source

Get the current version of GRIB API as an integer.

The major version is multiplied by 10000, the minor by 100 and then they are summed together with the revision version to form the integer. For example, version 1.13.1 would be 11301.