simplechem

package
v1.9.6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 28, 2022 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Overview

Package simplechem contains a simplified atmospheric chemistry mechanism.

Index

Constants

View Source
const (

	// Chemical mass conversions [ratios]
	NOxToN = mwN / mwNOx
	NtoNO3 = mwNO3 / mwN
	SOxToS = mwS / mwSO2
	StoSO4 = mwSO4 / mwS
	NH3ToN = mwN / mwNH3
	NtoNH4 = mwNH4 / mwN
)

physical constants

Variables

This section is empty.

Functions

This section is empty.

Types

type Mechanism

type Mechanism struct{}

Mechanism fulfils the github.com/spatialmodel/inmap.Mechanism interface.

func (Mechanism) AddEmisFlux

func (m Mechanism) AddEmisFlux(c *inmap.Cell, name string, val float64) error

AddEmisFlux adds emissions flux to Cell c based on the given pollutant name and amount in units of μg/s. The units of the resulting flux are μg/m3/s.

func (Mechanism) Chemistry

func (m Mechanism) Chemistry() inmap.CellManipulator

Chemistry returns a function that calculates the secondary formation of PM2.5. It explicitly calculates formation of particulate sulfate from gaseous and aqueous SO2. It partitions organic matter ("gOrg" and "pOrg"), the nitrogen in nitrate ("gNO and pNO"), and the nitrogen in ammonia ("gNH" and "pNH) between gaseous and particulate phase based on the spatially explicit partioning present in the baseline data. The function arguments represent the array indices of each chemical species.

func (Mechanism) DryDep

func (m Mechanism) DryDep(name string) (inmap.CellManipulator, error)

DryDep returns a dry deposition function of the type indicated by name that is compatible with this chemical mechanism. Currently, the only valid option is "simple".

func (Mechanism) Len

func (m Mechanism) Len() int

Len returns the number of chemical species in this mechanism (9).

func (Mechanism) Species

func (m Mechanism) Species() []string

Species returns the names of the emission and concentration pollutant species that are used by this chemical mechanism.

func (Mechanism) Units

func (m Mechanism) Units(variable string) (string, error)

Units returns the units of the given variable, or an error if the variable name is invalid.

func (Mechanism) Value

func (m Mechanism) Value(c *inmap.Cell, variable string) (float64, error)

Value returns the concentration or emissions value of the given variable in the given Cell. It returns an error if given an invalid variable name.

func (Mechanism) WetDep

func (m Mechanism) WetDep(name string) (inmap.CellManipulator, error)

WetDep returns a dry deposition function of the type indicated by name that is compatible with this chemical mechanism. Currently, the only valid option is "emep".

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL