| Copyright | (C) 2017 Ricky Elrod |
|---|---|
| License | (see project LICENSE file) |
| Maintainer | Ricky Elrod <ricky@elrod.me> |
| Stability | experimental |
| Portability | GeneralizedNewtypeDeriving, ViewPatterns |
| Safe Haskell | None |
| Language | Haskell2010 |
Data.HABSim.Grib2.CSVParse.Types
Description
This module provides types for parsing CSV files generated by wgrib2.
It is used (and re-exported) by CSVParse.
- data Direction
- newtype GribTime = GribTime {}
- data RawGribLine = RawGribLine {}
- newtype UGRDLine = UGRDLine {}
- newtype VGRDLine = VGRDLine {}
- newtype OtherLine = OtherLine {}
- data GribLine
- type Pressure = Int
- type Key = (Longitude, Latitude, Pressure, Direction)
- newtype KeyedGribLine = KeyedGribLine (Key, GribLine)
Documentation
This is used for both the referenceTime and the forecastTime. The
reason it exists is solely so we can create a FromField instance on
UTCTime while avoiding orphan instances.
data RawGribLine #
This is a (mostly-)raw gribline, right after being parsed.
The "mostly-" comes from the fact that we wrap a few things (e.g. the times
into GribTime) and convert pressure into an Int.
Constructors
| RawGribLine | |
Fields
| |
Instances
A single non-UGRD and non-VGRD line.
Constructors
| OtherLine | |
Fields | |
Either a UGRDLine or a VGRDLine. This is so we can parse and ultimately
return a Vector containing both UGRD and VGRD lines. We return a
Vector GribLine (or rather, Cassava does) and we just know that a
GribLine will either be a UGRDLine or a VGRDLine.
If the line is anything else, we return the raw line in OtherGribLine.
Constructors
| UGRDGribLine UGRDLine | |
| VGRDGribLine VGRDLine | |
| OtherGribLine OtherLine |
newtype KeyedGribLine #
Constructors
| KeyedGribLine (Key, GribLine) |
Instances
| Eq KeyedGribLine # | |
| Show KeyedGribLine # | |
| FromRecord KeyedGribLine # | |