Sparse Matrix Operator Kernel Emissions SMOKE Modeling System

43
1 __________________________________________________________________________SMOKE Basics North Carolina Supercomputing Center__________________________Environmental Programs MCNC Sparse Matrix Operator Kernel Emissions SMOKE Modeling System version 1.3 TRAINING http://envpro.ncsc.org/products/smoke

description

Sparse Matrix Operator Kernel Emissions SMOKE Modeling System. version 1.3 TRAINING http://envpro.ncsc.org/products/smoke. Training Overview. Emissions processing basics SMOKE basics SMOKE scripts SMOKE programs and options. Overview lab SMOKE inventory lab SMOKE monthly lab - PowerPoint PPT Presentation

Transcript of Sparse Matrix Operator Kernel Emissions SMOKE Modeling System

Page 1: Sparse Matrix Operator Kernel Emissions  SMOKE Modeling System

1

__________________________________________________________________________SMOKE Basics

North Carolina Supercomputing Center__________________________Environmental ProgramsMCNC

Sparse Matrix Operator Kernel Emissions SMOKE Modeling System

version 1.3

TRAINING

http://envpro.ncsc.org/products/smoke

Page 2: Sparse Matrix Operator Kernel Emissions  SMOKE Modeling System

2

__________________________________________________________________________SMOKE Basics

North Carolina Supercomputing Center__________________________Environmental ProgramsMCNC

Training Overview

Emissions processing basics

SMOKE basics SMOKE scripts SMOKE programs

and options

Overview lab SMOKE inventory lab SMOKE monthly lab SMOKE daily lab Quality assurance lab SMOKE problem

solving

Page 3: Sparse Matrix Operator Kernel Emissions  SMOKE Modeling System

3

__________________________________________________________________________SMOKE Basics

North Carolina Supercomputing Center__________________________Environmental ProgramsMCNC

About This Training

Specific to UNIX Run SMOKE from scripts

Page 4: Sparse Matrix Operator Kernel Emissions  SMOKE Modeling System

4

__________________________________________________________________________SMOKE Basics

North Carolina Supercomputing Center__________________________Environmental ProgramsMCNC

Emissions Data Processing

Source categories Definitions Area emissions processing Point emissions processing Mobile emissions processing Biogenic emissions processing Merging Quality assurance

Page 5: Sparse Matrix Operator Kernel Emissions  SMOKE Modeling System

5

__________________________________________________________________________SMOKE Basics

North Carolina Supercomputing Center__________________________Environmental ProgramsMCNC

Source Categories (1)

Area source characteristics– Country, state, county– Source category code (SCC)

Point source characteristics– Country, state, county, and…– Facility, stack, device, process (EMS-95)

OR– Plant, stack, point, segment, SCC (NET/IDA or EPS)

Page 6: Sparse Matrix Operator Kernel Emissions  SMOKE Modeling System

6

__________________________________________________________________________SMOKE Basics

North Carolina Supercomputing Center__________________________Environmental ProgramsMCNC

Source Categories (2)

Mobile source characteristics– Country, state, county– Road type (e.g., rural interstate, urban local)– Vehicle type (e.g., light duty gasoline vehicles)– Link ID (optional)

Biogenic source characteristics– Country, state, county– Landuse type

OR– Grid cell– Landuse type

Page 7: Sparse Matrix Operator Kernel Emissions  SMOKE Modeling System

7

__________________________________________________________________________SMOKE Basics

North Carolina Supercomputing Center__________________________Environmental ProgramsMCNC

Definitions (1)

Inventory pollutant: A compound or group of compounds defined for record keeping and regulatory purposes (e.g. CO, NOx, VOC, PM10)

Species: A compound or group of compounds defined as part of the estimation of air chemistry in an air quality model (e.g., CO, NO, NO2, PAR, ECC)

Chemical mechanism: A set of chemical species and their interactions used to represent air chemistry (e.g., CB-IV, RADM, SAPRAC)

Page 8: Sparse Matrix Operator Kernel Emissions  SMOKE Modeling System

8

__________________________________________________________________________SMOKE Basics

North Carolina Supercomputing Center__________________________Environmental ProgramsMCNC

Definitions (2)

Map projection: The mathematical representation of the spherical surface of the earth in 2-d

Model grid: A 2-d grid based on a map projection, defined by starting coordinates, number of grid cells in each direction, and the physical size of the grid cells

Model layers: Vertical spatial divisions defined by an air quality model because the atmosphere has varied characteristics in the vertical direction

Page 9: Sparse Matrix Operator Kernel Emissions  SMOKE Modeling System

9

__________________________________________________________________________SMOKE Basics

North Carolina Supercomputing Center__________________________Environmental ProgramsMCNC

Western 36-km cell domain for training:

Page 10: Sparse Matrix Operator Kernel Emissions  SMOKE Modeling System

10

__________________________________________________________________________SMOKE Basics

North Carolina Supercomputing Center__________________________Environmental ProgramsMCNC

Definitions (3)

Profile data: Factors used for disaggregating emissions data as is done during chemical speciation or temporal allocation

Cross-reference: A dataset used for matching sources in the emissions inventory with profile data based on the source characteristics

Gridding surrogate: A dataset developed from data at a finer resolution than the emissions, used to spatially allocate the emissions to the grid cells (e.g., population, housing, agricultural regions)

Page 11: Sparse Matrix Operator Kernel Emissions  SMOKE Modeling System

11

__________________________________________________________________________SMOKE Basics

North Carolina Supercomputing Center__________________________Environmental ProgramsMCNC

Definitions (4)

Plume rise: The rising of the exhaust from point sources due to the velocity and temperature of the exhaust gases

Elevated source: A point source in which emissions are higher than the first model layer because of plume rise

Plume-in-grid: A special treatment of elevated sources by which the plume rise is modeled with extra detail by the air quality model

Page 12: Sparse Matrix Operator Kernel Emissions  SMOKE Modeling System

12

__________________________________________________________________________SMOKE Basics

North Carolina Supercomputing Center__________________________Environmental ProgramsMCNC

Definitions (5)

Spatial allocation:Convert the source spatial extent to the grid cell resolution needed by the air quality model

Chemical speciation:Convert the inventory pollutant data to the chemical species needed by the air quality model

Temporal allocation:Convert the inventory temporal resolution to the hourly temporal resolution needed by the air quality model

Page 13: Sparse Matrix Operator Kernel Emissions  SMOKE Modeling System

13

__________________________________________________________________________SMOKE Basics

North Carolina Supercomputing Center__________________________Environmental ProgramsMCNC

Area Emissions Processing

Import data Spatial allocation

– Allocation of county emissions into grid cells using spatial surrogate

Chemical speciation Temporal allocation Approach also applied to “mobile” sources:

road dust and non-road mobile sources

Page 14: Sparse Matrix Operator Kernel Emissions  SMOKE Modeling System

14

__________________________________________________________________________SMOKE Basics

North Carolina Supercomputing Center__________________________Environmental ProgramsMCNC

Point Emissions Processing

Import, chemical speciation, temporal, plus... All emissions for a source in single grid cell Use day-specific and hour-specific inventory data Determine elevated sources and plume-in-grid

(PinG) sources Special processing and output for elevated and

PinG sources– Create 3-d emissions file + optional PinG emissions files

OR– Create special elevated (PinG optional) + 2-d emissions file– Meteorology based

Page 15: Sparse Matrix Operator Kernel Emissions  SMOKE Modeling System

15

__________________________________________________________________________SMOKE Basics

North Carolina Supercomputing Center__________________________Environmental ProgramsMCNC

Mobile Emissions Processing (1)

Import, chemical speciation, temporal, plus... Possibly start with vehicle miles traveled (VMT)

instead of emissions Create emission factors based on meteorology

– Emission factors model such as MOBILE5– Gridded hourly or average meteorology– Emissions = Emission factor VMT

Spatial allocation may include link sources

Page 16: Sparse Matrix Operator Kernel Emissions  SMOKE Modeling System

16

__________________________________________________________________________SMOKE Basics

North Carolina Supercomputing Center__________________________Environmental ProgramsMCNC

Mobile Emissions Processing (2)

Emission factors typically depend on emissions process (e.g., exhaust, evaporative, diurnal)

Temporal allocation and speciation may depend on emissions process

Approach only for on-road mobile sources

Page 17: Sparse Matrix Operator Kernel Emissions  SMOKE Modeling System

17

__________________________________________________________________________SMOKE Basics

North Carolina Supercomputing Center__________________________Environmental ProgramsMCNC

Biogenic Emissions Processing

Typically created by BEIS2 emissions model About 120 landuse types Landuse types have emission factors which are

adjusted by gridded temperature and solar radiation

Winter and summer emission factors If landuse is county total, then use gridding

surrogate

Page 18: Sparse Matrix Operator Kernel Emissions  SMOKE Modeling System

18

__________________________________________________________________________SMOKE Basics

North Carolina Supercomputing Center__________________________Environmental ProgramsMCNC

Merging and Formatting

Combining steps taken for a given source category to create model-ready formatted files (e.g., combine import, gridding, speciation, temporal allocation steps)

Combine multiple source categories into a single data set (e.g., combine area, biogenics, mobile, and point)

Output correct units, species, time steps, grid projection, and file format for the air quality model of interest

Page 19: Sparse Matrix Operator Kernel Emissions  SMOKE Modeling System

19

__________________________________________________________________________SMOKE Basics

North Carolina Supercomputing Center__________________________Environmental ProgramsMCNC

Quality Assurance

Compare emissions totals from emissions processor with inventory totals– By state, county, SCC, combinations, other

Compare emissions totals at each stage of the processing

Ensure input file formats are correct Ensure no significant errors or warnings in

processing Compare emissions among states and counties Compare emission ratios to ambient

measurement ratios

Page 20: Sparse Matrix Operator Kernel Emissions  SMOKE Modeling System

20

__________________________________________________________________________SMOKE Basics

North Carolina Supercomputing Center__________________________Environmental ProgramsMCNC

SMOKE Basics

Capabilities Programs Dataflows Concepts Shared details of programs Assigns file Environment variables for naming files and

directories

Page 21: Sparse Matrix Operator Kernel Emissions  SMOKE Modeling System

21

__________________________________________________________________________SMOKE Basics

North Carolina Supercomputing Center__________________________Environmental ProgramsMCNC

CapabilitesData Import

Formats– EMS-95: area, mobile (fixed-column or not), point, and hour-

specific point– IDA: area, mobile, and point– EPS2: (AFS/AMS): area, point, and period-specific point– BEIS and BEIS2: county and gridded landuse– Gridded I/O API data as area source

User-selected pollutants– 16-character pollutant name limit– Maximum numbers allowed depends on source category

• Area: 19• Mobile: 54• Point: 15

Page 22: Sparse Matrix Operator Kernel Emissions  SMOKE Modeling System

22

__________________________________________________________________________SMOKE Basics

North Carolina Supercomputing Center__________________________Environmental ProgramsMCNC

CapabilitesSpatial Allocation

Input coordinates: Lat-lon or UTM Output projections: Lat-lon, Lambert, UTM Any number and size of cells Area: apply gridding surrogates or map grid

cells for pre-gridded data Biogenic: import gridded or county landuse Mobile: apply gridding surrogates or map link

sources to grid Point: assign point location to grid cell

Page 23: Sparse Matrix Operator Kernel Emissions  SMOKE Modeling System

23

__________________________________________________________________________SMOKE Basics

North Carolina Supercomputing Center__________________________Environmental ProgramsMCNC

CapabilitesChemical Speciation

User-selected species (up to 120) CB-IV and RADM mechanisms installed by default Particulate splits 16-character species name limit SMOKE outputs all species in profile file that

match inventory pollutants Both mole-based and mass-based speciation

matrices

Page 24: Sparse Matrix Operator Kernel Emissions  SMOKE Modeling System

24

__________________________________________________________________________SMOKE Basics

North Carolina Supercomputing Center__________________________Environmental ProgramsMCNC

CapabilitesTemporal Allocation

Supports monthly, weekly, and diurnal profiles – Different diurnal permitted for each day of the week

Can use ozone-season or annual-average inventory data from IDA inventory

Point sources can use day- and hour-specific data Biogenic based on gridded meteorology Mobile emission factors can be based on gridded

temperature (to be used with VMT) Automatic accounting for holidays

Page 25: Sparse Matrix Operator Kernel Emissions  SMOKE Modeling System

25

__________________________________________________________________________SMOKE Basics

North Carolina Supercomputing Center__________________________Environmental ProgramsMCNC

CapabilitiesGrowth and Control

SMOKE imports growth factors to create a growth matrix

Growth matrix is applied to the inventory SMOKE imports control factors to create several

control matrices Control matrices are applied during the final

merge or to the inventory Multiplicative, additive, and reactivity controls

Page 26: Sparse Matrix Operator Kernel Emissions  SMOKE Modeling System

26

__________________________________________________________________________SMOKE Basics

North Carolina Supercomputing Center__________________________Environmental ProgramsMCNC

CapabilitesBiogenic Source Processing

Released version supports BEIS2 science with 120 landuse types

SMOKE-BEIS3 is being released with SMOKE v1.4 BELD3 data has 230 landuse types New emission factors for all 230 landuse types Modified light attenuation algorithm for calculating

ISOP emissions Supports CB-IV and RADM2 mechanisms NOx and VOC

Page 27: Sparse Matrix Operator Kernel Emissions  SMOKE Modeling System

27

__________________________________________________________________________SMOKE Basics

North Carolina Supercomputing Center__________________________Environmental ProgramsMCNC

CapabilitesMobile Source Processing

Can import VMT, other activity data, or emissions Can optionally import gridded emissions Can drive MOBILE5b for large regions based on

gridded temperature Can use different speeds at different hours Temperature used can be at ground, layer-1, or

1.5 meters Can run VMT for CO, NOx, VOC, SO2, NH3, PM10,

and PM2.5, and toxics Can customize road types and vehicle types

Page 28: Sparse Matrix Operator Kernel Emissions  SMOKE Modeling System

28

__________________________________________________________________________SMOKE Basics

North Carolina Supercomputing Center__________________________Environmental ProgramsMCNC

CapabilitiesPoint Source Processing

Day-specific and hour-specific data permitted by pollutant

Customizes source definition based on inventory type (EMS-95, IDA/NET, EPS)

Options for elevated sources:– UAM-style with separate emissions file; AQM computes plume

rise– All sources potentially elevated - SMOKE computes plume rise– Major/Minor sources - SMOKE computes plume rise for major

sources– PinG sources - SMOKE outputs special file to support PinG for

CMAQ and MAQSIP– Output for UAM-style elevated emissions

Page 29: Sparse Matrix Operator Kernel Emissions  SMOKE Modeling System

29

__________________________________________________________________________SMOKE Basics

North Carolina Supercomputing Center__________________________Environmental ProgramsMCNC

CapabilitiesQuality Assurance

Smkreport program SMKMerge program optionally outputs state and

county total emissions– Mass speciation matrix is used– Can specify units for output

Can compare totals from different merges:– Inventory-grid– Hourly-grid– Inventory-species-grid

Built in file format and file quality checks PAVE comparisons

Page 30: Sparse Matrix Operator Kernel Emissions  SMOKE Modeling System

30

__________________________________________________________________________SMOKE Basics

North Carolina Supercomputing Center__________________________Environmental ProgramsMCNC

SMOKE Programs

SMKINVEN

SPCMAT

GRDMAT

TEMPORAL

SMKMERGE

CNTLMAT

GRWINVEN

PREMOBL

MEMISFAC

M

LAYPOINT

P

RAWBIO

BTMPBIO

B

B

M

P

Biogenic only

Mobile only

Point only

ELEVPOINT

P

MRGGRID

SMKREPORT

SMK2EMIS

MBSETUP

M

Page 31: Sparse Matrix Operator Kernel Emissions  SMOKE Modeling System

31

__________________________________________________________________________SMOKE Basics

North Carolina Supercomputing Center__________________________Environmental ProgramsMCNC

SMOKE Dataflows (1)

BiogenicProcessing

MobileProcessing

AreaProcessing

PointProcessing

Land useData

MeteorologyData

EmissionsInventories

HourlyEmissions

Matrices

Hourly LayerFractions

MergeProcessing

Model-ReadyEmissions

EmissionsReports

Page 32: Sparse Matrix Operator Kernel Emissions  SMOKE Modeling System

32

__________________________________________________________________________SMOKE Basics

North Carolina Supercomputing Center__________________________Environmental ProgramsMCNC

SMOKE Dataflows (2)

SMKINVEN

EmissionsInventories

MeteorologyData

Profiles andX-refs

SMOKEInventory

AQMSpecs

ControlData

CNTLMAT

GRDMAT

SPCMAT

TEMPORALHourly

Emissions

SpeciationMatrix

GriddingMatrix

ControlMatrix

Page 33: Sparse Matrix Operator Kernel Emissions  SMOKE Modeling System

33

__________________________________________________________________________SMOKE Basics

North Carolina Supercomputing Center__________________________Environmental ProgramsMCNC

Other Processing Paradigms

LoadInventory

Growth and Controls

SpeciationTemporalAllocation

GriddingModel Ready

Emissions

LoadInventory

Growth and Controls

Speciation

TemporalAllocation

Gridding

Model ReadyEmissions

Merge

SMOKE Processing Paradigm

Page 34: Sparse Matrix Operator Kernel Emissions  SMOKE Modeling System

34

__________________________________________________________________________SMOKE Basics

North Carolina Supercomputing Center__________________________Environmental ProgramsMCNC

SMOKE for Additional Control StrategiesGrowth and

ControlsModel Ready

EmissionsMerge

GriddingModel Ready

EmissionsMerge

SMOKE for Additional Grids(for non-mobile sources that do not use VMT)

GriddingModel Ready

EmissionsMerge

SMOKE for Additional Grids(for mobile sources that do use VMT)

EmissionFactors

TemporalAllocation

Page 35: Sparse Matrix Operator Kernel Emissions  SMOKE Modeling System

35

__________________________________________________________________________SMOKE Basics

North Carolina Supercomputing Center__________________________Environmental ProgramsMCNC

Shared Details of SMOKE Programs (1)

Sources must be uniquely defined based on SMOKE source characteristics

Sources are sorted in particular order Inventory vectors

Adjustment factors matricesvectors x matrices model-ready emissions

I/O API– Library: SMOKE uses the I/O API library to create intermediate

and output files. The files are NetCDF files, which means that they are binary, direct access, and platform-independent.

– Tools: The I/O API tools can be used to manipulate I/O API files (e.g., extract a “window” from a gridded dataset).

Page 36: Sparse Matrix Operator Kernel Emissions  SMOKE Modeling System

36

__________________________________________________________________________SMOKE Basics

North Carolina Supercomputing Center__________________________Environmental ProgramsMCNC

Shared Details of SMOKE Programs (2)

All programs output log files Most programs process multiple source

categories All programs process only one source category at

a time (Smkmerge and Mrggrid are exceptions) Environment variables are used to name files and

directories “Logical file names”

– Are environment variables– e.g., program uses OUTFILE for its output file

setenv OUTFILE myoutputfile.ncf

Page 37: Sparse Matrix Operator Kernel Emissions  SMOKE Modeling System

37

__________________________________________________________________________SMOKE Basics

North Carolina Supercomputing Center__________________________Environmental ProgramsMCNC

Shared Details of SMOKE Programs (3)

Environment variables also control programs– SMK_SOURCE: Set to A, B, M, or P to control source category– LOGFILE: Set to a file name to record the standard output of

informational, error, and warning messages– PROMPTFLAG: Y/N to control interactive or batch mode– SMK_MAXERROR: Maximum number of errors– SMK_MAXWARNING: Maximum number of warnings

Page 38: Sparse Matrix Operator Kernel Emissions  SMOKE Modeling System

38

__________________________________________________________________________SMOKE Basics

North Carolina Supercomputing Center__________________________Environmental ProgramsMCNC

Assigns File

Purpose: To set directory names and file names for a case

For running SMOKE from the prompt or from scripts, and navigating directories

Three types of environment variables:– Part of file names or directories– Correspond to a particular directory– Correspond to a particular file

To use:> cd $SMKROOT/assigns> source ASSIGNS.train.cb-iv.va12

Page 39: Sparse Matrix Operator Kernel Emissions  SMOKE Modeling System

39

__________________________________________________________________________SMOKE Basics

North Carolina Supercomputing Center__________________________Environmental ProgramsMCNC

Environment Variables Used inFile and Directory Names

Name of the inventory, including versionINVEN

Name of the scenario/strategy currently being modeledESCEN

Name of the meteorology scenario being usedMSCEN

Name of the gridGRID

Name of chemical speciation typeSPC

Year of the scenario being simulatedYEAR

Number of days being simulated per program runNDAYS

Starting date of the emissions files and simulationESDATE

DescriptionE.V. Name

Name of the biogenics scenario being usedBSCEN

Name for the inventory output filesINVOP

Name of the inventory input directory (no version)INVID

Starting date of the meteorology filesMSDATE

Number of days in the meteorology fileMDAYS

Page 40: Sparse Matrix Operator Kernel Emissions  SMOKE Modeling System

40

__________________________________________________________________________SMOKE Basics

North Carolina Supercomputing Center__________________________Environmental ProgramsMCNC

Environment Variablesfor Controlling Episode

Start time in output time zone (HHMMSS)G_STTIME

Time step (HHMMSS) - only 10000 will workG_TSTEP

DescriptionE.V. Name

Duration (HHMMSS)G_RUNLEN

Julian start date (YYYYDDD)G_STDATE

Output time zone number (0-23)OUTZONE

Emission factor yearEF_YEAR

Page 41: Sparse Matrix Operator Kernel Emissions  SMOKE Modeling System

41

__________________________________________________________________________SMOKE Basics

North Carolina Supercomputing Center__________________________Environmental ProgramsMCNC

Input Directories

DescriptionE.V. Name Example/ Default Value

SMOKE system main directorySMKROOT $EDSS_ROOT/subsys/smokev1

SMOKE system main directorySMKDAT $EDSS_ROOT/data/smoke

Inventory input directoryINVDIR $SMKDAT/inventory/$INVID

General data directory (e.g., profiles)GE_DAT $SMKDAT/ge_dat

Meteorology data directoryMETDAT $EDSS_ROOT/data/met/$MSCEN *

Area inventory input dataARDAT $INVDIR/area

Biogenic input dataBGDAT $INVDIR/biog

Mobile inventory input dataMBDAT $INVDIR/mobile

Point inventory input dataPTDAT $INVDIR/point

* Meteorology data often varies at the preference of the user. This is controlled by user’s setting their Assigns file

Page 42: Sparse Matrix Operator Kernel Emissions  SMOKE Modeling System

42

__________________________________________________________________________SMOKE Basics

North Carolina Supercomputing Center__________________________Environmental ProgramsMCNC

Output Directories

DescriptionE.V. Name Example/ Default Value

Scenario-specific, time dep output dirSCENARIO $SMKDAT/run_$ESCEN/$ESDATE

Scenario-specific output dirSTATIC $SMKDAT/run_$ESCEN/static

Episode-specific, time dep output dirBASSCN $SMKDAT/run_$INVEN/$ESDATE

Episode-specific output dirBASDIR $SMKDAT/run_$INVEN/static

Final output directoryOUTPUT $SCENARIO/output/$SPC

Reports base directoryREPORTS $SMKDAT/reports

Scenario-specific, time dep reports dirREPSCEN $REPORTS/$ESCEN/$ESDATE

Scenario-specific, reports dirREPSTAT $REPORTS/$ESCEN/static

Inventory, time dependent reports dirREPINVEN $REPORTS/$INVOP/$ESDATE

Inventory reports dirREPINVST $REPORTS/$INVOP/static

Inventory output directoryINVOPD $SMKDAT/inventory/$INVOP

Page 43: Sparse Matrix Operator Kernel Emissions  SMOKE Modeling System

43

__________________________________________________________________________SMOKE Basics

North Carolina Supercomputing Center__________________________Environmental ProgramsMCNC

Benefits of SMOKE

Processing is much faster than other systems Parallel processing paradigm

– Fast multi-grid processing– Fast control strategy processing– Fast multi-chemical mechanism processing– Fast mutiple formats output (for different AQMs)

Minimal redundant data storage for decreased file size Machine-independent binary file formats (IO/API NetCDF) No third party software No grid or inventory size limits Processing for ozone and particulate modeling BEIS-2 with gridded or county land use data Output for CMAQ, MAQSIP, UAM-V, CAMx, modified UAM-

AERO, REMSAD