Inmap
InMAP reduced-form air quality model for fine particulate matter (PM2.5)
Install / Use
/learn @spatialmodel/InmapREADME
(In)tervention (M)odel for (A)ir (P)ollution
Note: This is the documentation for InMAP v1.10.0-beta.1. Documentation for other versions is available here.
Visit the InMAP website at https://inmap.run!
About InMAP
InMAP is a multi-scale emissions-to-health impact model for fine particulate matter (PM<sub>2.5</sub>) that mechanistically evaluates air quality and health benefits of perturbations to baseline emissions. A main simplification of InMAP compared to a comprehensive chemical transport model is that it does so on an annual-average basis rather than the highly time-resolved performance of a full CTM. The model incorporates annual-average parameters (e.g. transport, deposition, and reaction rates) from the a chemical transport model. Grid-cell size varies as shown in Figure 1, ranging from smaller grid cells in urban areas to larger grid cells in rural areas. This variable resolution grid is used to simulate population exposures to PM<sub>2.5</sub> with high spatial resolution while minimizing computational expense.
Figure 1: InMAP spatial discretization of the model domain into variable resolution grid cells. Left panel: full domain; right panel: a small section of the domain centered on the city of Los Angeles.
Getting InMAP
Go to releases to download the most recent release for your type of computer. For Mac systems, download the file with "darwin" in the name. You will need both the executable program and the input data ("evaldata_vX.X.X.zip"). All of the versions of the program are labeled "amd64" to denote that they are for 64-bit processors (i.e., all relatively recent notebook and desktop computers). It doesn't matter whether your computer processor is made by AMD or another brand, it should work either way.
Compiling from source
You can also compile InMAP from its source code. The instructions here are specific to Linux or Mac computers; other systems should work with minor changes to the commands below. Refer here for a list of theoretically supported systems.
-
Install the Go compiler, version 1.11 or higher. Make sure you install the correct version (64 bit) for your system. It may be useful to go through one of the tutorials to make sure the compiler is correctly installed.
-
Install the git version control program, if it is are not already installed.
-
Download and install the main program:
git clone https://github.com/spatialmodel/inmap.git # Download the code. cd inmap # Move into the InMAP directory GO111MODULE=on go build ./cmd/inmap # Compile the InMAP executable.There should now be a file named
inmaporinmap.exein the current dirctory. This is the inmap executable file. It can be copied or moved to any directory of your choosing and run as described below in "Running InMAP". -
Optional: run the tests:
cd /path/to/inmap # Move to the directory where InMAP is downloaded, # if you are not already there. GO111MODULE=on go test ./... -short
Running InMAP
-
Make sure that you have downloaded the InMAP input data files:
evaldata_vX.X.X.zipfrom the InMAP release page, where X.X.X corresponds to a version number. The data files may need to be downloaded from a separate link included in the release information rather than directly from the release page. -
Create an emissions scenario or use one of the evaluation emissions datasets available in the
evaldata_vX.X.X.zipfiles on the InMAP release page. Emissions files should be in shapefile format where the attribute columns correspond to the names of emitted pollutants. The acceptable pollutant names areVOC,NOx,NH3,SOx, andPM2_5. Emissions units can be specified in the configuration file (discussed below) and can be short tons per year, kilograms per year, or micrograms per second. The model can handle multiple input emissions files, and emissions can be either elevated or ground level. Files with elevated emissions need to have attribute columns labeled "height", "diam", "temp", and "velocity" containing stack information in units of m, m, K, and m/s, respectively. Emissions will be allocated from the geometries in the shape file to the InMAP computational grid. -
Make a copy of the configuration file template and edit it if desired, keeping in mind that you will either need to set the
evaldataenvironment variable to the directory you downloaded the evaluation data to, or replace all instances of${evaldata}in the configuration file with the path to that directory. You must also ensure that the directoryOutputFileis to go in exists. Refer to the documentation here for information about other configuration options. The configuration file is a text file in TOML format, and any changes made to the file will need to conform to that format or the model will not run correctly and will produce an error. -
Run the program:
inmapXXX run steady --config=/path/to/configfile.tomlwhere
inmapXXXis replaced with the executable file that you downloaded. For some systems you may need to type./inmapXXXinstead. If you compiled the program from source, the command will just beinmapfor Linux or Mac systems andinmap.exefor Windows systems.The above command runs the model in the most typical mode. For alternative run modes and other command options refer here.
-
View the program output. The output files are in shapefile format which can be viewed in most GIS programs. One free GIS program is QGIS. By default, the InMAP only outputs ground-level, but this can be changed using the configuration file.
Output variables are specified as
OutputVariablesin the configuration file. Each output variable is defined in the configuration file by its name and an expression that can be used to calculate it (in the form VariableName = "Expression"). Output variable names can be chosen by the user, but their corresponding expressions must consist of variables that are understood by InMAP. Note that output variable names should have a length of 10 characters or less because there is a limit on the allowed length of shapefile field names.In the case of a variable that is built into the model, e.g.
WindSpeed, an acceptable entry in the configuration file would beWindSpeed = "WindSpeed". If doubleWindSpeedis desired as an output variable, an acceptable entry in the configuration file would beDoubleWind = "WindSpeed*2". A user-defined variable such asDoubleWindcan then appear in an separate expression, e.g.ExpTwoWind = "exp(DoubleWind)"where theDoubleWindis exponentiated. Note that expressions can include functions such asexp(). For more information on the available functions refer to the source code documentation (here).Output variable expressions are, by default, evaluated within each grid cell. By surrounding an expression with braces ({...}), InMAP can instead perform summary calculations (evaluating the expression across all grid cells). InMAP has a built-in function
sum()that can be used for such grid level calculations. For example, an expression for a variableNPctWNoLat, representing the percentage of the total US population that is Non-Latino White, would beNPctWNoLat = "{sum(WhiteNoLat) / sum(TotalPop)}". Only the part of the expression inside of the braces is evaluated at the grid level.NPctWNoLatcould then be used as a variable in expressions evaluated at the grid cell level, e.g,WhNoLatDiff = "PctWhNoLat - NPctWNoLat", representing the difference between the percentage of the population of each grid cell that is white and the percentage of the total US population that is white.There is a complete list of built-in variables here. Some examples include:
- Pollutant concentrations in units of μg m<sup>-3</sup>:
- VOC (
VOC)- NO<sub>x</sub> (
NOx) - NH<sub>3</sub> (
NH3) - SO<sub>x</sub> (
SOx) - Total PM<sub>2.5</sub> (
TotalPM25; The sum of all PM<sub>2.5</sub> components) - Primary PM<sub>2.5</sub> (
PrimaryPM25) - Particulate sulfate (
pSO4) - Particulate nitrate (
pNO3) - Particulate ammonium (
pNH4) - Secondary organic aerosol (
SOA)
- NO<sub>x</sub> (
- VOC (
- Populations of different demographic subgroups are in units of people per grid cell. The included populations may vary depending on input data, but in the default dataset as of this writing the groups included are:
- total population (
TotalPop) - people identifying as Asian (
Asian), Black (Black), Latino (Latino), Native American or American Indian (Native), and Non-Latino White (WhiteNoLat).
- total population (
- Mortality rates for the total population and/or different demographic subgroups, which can be used to perform health impact calculations, are in
- Pollutant concentrations in units of μg m<sup>-3</sup>:
Related Skills
node-connect
338.7kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
83.6kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
338.7kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
commit-push-pr
83.6kCommit, push, and open a PR
