Documentation
¶
Overview ¶
Package smoke processes emissions inventory file in the SMOKE model format.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Conversion ¶
Conversion applies a convert to the given value
var ( // TonToKilogram converts short tons to kilograms. TonToKilogram Conversion = func(tons float64) float64 { return tons * 907.185 } // TonneToKilogram converts metric tons to kilograms. TonneToKilogram Conversion = func(tons float64) float64 { return tons * 1000 } )
type Country ¶
type Country int
Country represents a country where emissions occur.
const ( USA Country = 0 Canada Country = 1 Mexico Country = 2 Cuba Country = 3 Bahamas Country = 4 Haiti Country = 5 DominicanRepublic Country = 6 Global Country = 7 Unknown Country = -1 )
These are the currently supported countries.
func CountryFromID ¶
CountryFromID returns the country associated with this ID code.
type FF10DailyPoint ¶
type FF10DailyPoint struct {
// contains filtered or unexported fields
}
FF10DailyPoint holds the information contained in a SMOKE FF10 daily point record.
func ParseFF10DailyPoint ¶
func ParseFF10DailyPoint(rec []string, inputConv Conversion) (*FF10DailyPoint, error)
ParseFF10DailyPoint creates a new record from an FF10 daily point record, where inputConv specifies the factor to multiply emissions by to convert total kilograms.
func (FF10DailyPoint) Country ¶
func (a FF10DailyPoint) Country() Country
Country returns the country this record is associated with.
func (FF10DailyPoint) FIPS ¶
func (a FF10DailyPoint) FIPS() FIPS
FIPS returns the FIPS location code associated with this record.
func (FF10DailyPoint) PeriodTotal ¶
PeriodTotal returns the total emissions that occur between the beginning and end time in kilograms.
type FF10Nonpoint ¶
type FF10Nonpoint struct {
// contains filtered or unexported fields
}
FF10Nonpoint holds the information contained in a SMOKE FF10 nonpoint record.
func ParseFF10Nonpoint ¶
func ParseFF10Nonpoint(rec []string, inputConv Conversion) (*FF10Nonpoint, error)
ParseFF10Nonpoint creates a new record from the FF10 nonpoint record rec, where inputConv specifies the factor to multiply emissions by to convert them to kilograms.
func (FF10Nonpoint) Country ¶
func (a FF10Nonpoint) Country() Country
Country returns the country this record is associated with.
func (FF10Nonpoint) FIPS ¶
func (a FF10Nonpoint) FIPS() FIPS
FIPS returns the FIPS location code associated with this record.
func (FF10Nonpoint) PeriodTotal ¶
PeriodTotal returns the total emissions that occur between the beginning and end time in kilograms.
type FF10Point ¶
type FF10Point struct {
// contains filtered or unexported fields
}
FF10Point holds the information contained in a SMOKE FF10 point record.
func ParseFF10Point ¶
func ParseFF10Point(rec []string, inputConv Conversion) (*FF10Point, error)
ParseFF10Point creates a new record from the FF10 point record rec, where inputConv specifies the factor to multiply emissions by to convert them to kilograms.
func (FF10Point) Country ¶
func (a FF10Point) Country() Country
Country returns the country this record is associated with.
func (FF10Point) FIPS ¶
func (a FF10Point) FIPS() FIPS
FIPS returns the FIPS location code associated with this record.
func (FF10Point) PeriodTotal ¶
PeriodTotal returns the total emissions that occur between the beginning and end time in kilograms.
type FIPS ¶
type FIPS [2]uint16
FIPS is a representation of a location's 5-digit FIPS code, where the first 2 digits represent the state and the last 3 digits represent the county. Here, the first integer is the state and the second integer is the county.
type Record ¶
type Record interface { // PeriodTotal returns the total emissions that occur between the beginning // and end time in kilograms. PeriodTotal(begin, end time.Time) float64 // Pollutant returns the name of the pollutant in this record. Pollutant() string // SCC returns the Source Classification code associated with // this record. SCC() SCC // Country returns the country this record is associated with. Country() Country // FIPS returns the FIPS location code associated with this record. FIPS() FIPS }
A Record holds emissions information.
type SCC ¶
type SCC struct {
Tier1, Tier2, Tier3, Tier4 uint16
}
SCC is the US EPA's Source Classification Code: https://www.cmascenter.org/smoke/documentation/3.6.5/html/ch02s03s05.html.
type Scanner ¶
type Scanner interface { // Scan prepares the next record. If there are no more records, // it returns false, otherwise it returns true. Scan() bool // Err returns any errors that occurred while preparing the next record. Err() error // Record returns the most recently prepared record. Record() Record }
A Scanner sequentially processes records.
func ReadInventoryFile ¶
func ReadInventoryFile(f io.Reader, inputConv Conversion) Scanner
ReadInventoryFile returns a Scanner for the contents of the given file, applying the given conversion to convert values to kilograms emitted.
Directories
¶
Path | Synopsis |
---|---|
internal
|
|
util
Package util contains emission-processing utilities.
|
Package util contains emission-processing utilities. |
Package speciate contains functions for disaggregating and re-grouping chemical species.
|
Package speciate contains functions for disaggregating and re-grouping chemical species. |