From cf5b787562bab268f5daab56b91bff2326338df0 Mon Sep 17 00:00:00 2001 From: Chris Tessum Date: Fri, 20 Oct 2017 16:55:03 -0700 Subject: [PATCH] Prepare to release v1.3 --- CHANGELOG.md | 3 ++- Gopkg.lock | 16 ++++++++-------- README.md | 15 +++++++++------ RELEASE.md | 6 ++++-- inmap/build.sh | 2 +- inmap/testdata/testSR.ncf | Bin 54764 -> 54764 bytes 6 files changed, 24 insertions(+), 18 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4b4dc3215..ad117330f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,4 @@ -# Release 1.3.0 (?) +# Release 1.3.0 (2017-10-20) * Removed vendored libraries * A log file containing information about each model run is now automatically created * Added a GEOS-Chem preprocessor @@ -9,6 +9,7 @@ * Added ug/s option for emissions units * Added a command for using an SR matrix to make concentration predictions * Allowed the use of population-specific mortality rates +* Changed dependency manager to dep (https://github.com/golang/dep) # Release 1.2.1 (2016-11-15) * Changed the time step calculation algorithm to work with larger grid cell sizes diff --git a/Gopkg.lock b/Gopkg.lock index d4c734a4c..021e22d04 100644 --- a/Gopkg.lock +++ b/Gopkg.lock @@ -59,7 +59,7 @@ branch = "master" name = "github.com/ctessum/aep" packages = ["."] - revision = "f316bca0a11f4a3ab46972f2fcd558f5ac8a6c0f" + revision = "d18865b4e31e431785455a7fce7ac806fdca5e95" [[projects]] branch = "master" @@ -83,7 +83,7 @@ branch = "master" name = "github.com/ctessum/requestcache" packages = ["."] - revision = "08d6ed8801c5f1da3265a1c79f4b864db7221bd0" + revision = "27453c71baf7105b62ec8cd9f668a5486500ccce" [[projects]] branch = "master" @@ -125,7 +125,7 @@ branch = "master" name = "github.com/jonas-p/go-shp" packages = ["."] - revision = "50c815e9c51049f19f9bc27462f4fafa6dffb82d" + revision = "5b9c3047ce59fcfe1a7c6e66d606a348ca04be08" [[projects]] branch = "master" @@ -149,7 +149,7 @@ branch = "master" name = "github.com/spf13/cobra" packages = [".","doc"] - revision = "b78744579491c1ceeaaa3b40205e56b0591b93a3" + revision = "7b2c5ac9fc04fc5efafb60700713d4fa609b777b" [[projects]] name = "github.com/spf13/pflag" @@ -161,25 +161,25 @@ branch = "master" name = "golang.org/x/image" packages = ["draw","font","math/f64","math/fixed","tiff","tiff/lzw"] - revision = "e20db36d77bd0cb36cea8fe49d5c37d82d21591f" + revision = "f7e31b4ea2e3413ab91b4e7d2dc83e5f8d19a44c" [[projects]] branch = "master" name = "golang.org/x/net" packages = ["context"] - revision = "8351a756f30f1297fe94bbf4b767ec589c6ea6d0" + revision = "cd69bc3fc700721b709c3a59e16e24c67b58f6ff" [[projects]] branch = "master" name = "gonum.org/v1/gonum" packages = ["blas","blas/blas64","blas/gonum","floats","internal/asm/c128","internal/asm/f32","internal/asm/f64","internal/math32","lapack","lapack/gonum","lapack/lapack64","mat"] - revision = "f818f8f7a9e59de54e475b747a3dc9c86ed141f1" + revision = "ce73cefcda434183888c40895ea2fa306203906a" [[projects]] branch = "master" name = "gonum.org/v1/plot" packages = [".","palette","plotter","plotutil","tools/bezier","vg","vg/draw","vg/fonts","vg/vgeps","vg/vgimg","vg/vgpdf","vg/vgsvg"] - revision = "3469efe6bdc8ee9a270fcecfbd6c499150b18540" + revision = "50336e281717e5f1685e3c611828dfb42c82cf66" [[projects]] branch = "v2" diff --git a/README.md b/README.md index b1d7be38f..bdee14313 100644 --- a/README.md +++ b/README.md @@ -2,9 +2,11 @@ [![Build Status](https://travis-ci.org/spatialmodel/inmap.svg?branch=master)](https://travis-ci.org/spatialmodel/inmap) [![Coverage Status](https://coveralls.io/repos/github/spatialmodel/inmap/badge.svg?branch=master)](https://coveralls.io/github/spatialmodel/inmap?branch=master) [![GoDoc](http://godoc.org/github.com/spatialmodel/inmap?status.svg)](http://godoc.org/github.com/spatialmodel/inmap) [![Go Report Card](https://goreportcard.com/badge/github.com/spatialmodel/inmap)](https://goreportcard.com/report/github.com/spatialmodel/inmap) +_Note: This is the documentation for InMAP version 1.3. Documentation for other versions is available [here](https://github.com/spatialmodel/inmap/releases)._ + ## About InMAP -InMAP is a multi-scale emissions-to-health impact model for fine particulate matter (PM2.5) 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 WRF/Chem 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 PM2.5 with high spatial resolution while minimizing computational expense. +InMAP is a multi-scale emissions-to-health impact model for fine particulate matter (PM2.5) 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 PM2.5 with high spatial resolution while minimizing computational expense. ![alt tag](fig1.png?raw=true) 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. @@ -18,7 +20,7 @@ Go to [releases](https://github.com/spatialmodel/inmap/releases) to download the You can also compile InMAP from its source code. It should work on most types of computers. Refer [here](http://golang.org/doc/install#requirements) for a list of theoretically supported systems. Instructions follow: -1. Install the [Go compiler](http://golang.org/doc/install). Make sure you install the correct version (64 bit) for your system. Also make sure to set the [`$GOPATH`](http://golang.org/doc/code.html#GOPATH) environment variable to a *different directory* than where the Go compiler is installed. It may be useful to go through one of the tutorials to make sure the compiler is correctly installed. +1. Install the [Go compiler](http://golang.org/doc/install). 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. 2. Make sure your `$PATH` environment variable includes the directories `$GOROOT/bin` and `$GOPATH/bin`. On Linux or Macintosh systems, this can be done using the command `export PATH=$PATH:$GOROOT/bin:$GOPATH/bin`. On Windows systems, you can follow [these](http://www.computerhope.com/issues/ch000549.htm) directions. @@ -42,17 +44,18 @@ You can also compile InMAP from its source code. It should work on most types of 3. Create an emissions scenario or use one of the evaluation emissions datasets available in the `evaldata_vX.X.X.zip` files on the [InMAP release page](https://github.com/spatialmodel/inmap/releases). Emissions files should be in [shapefile](http://en.wikipedia.org/wiki/Shapefile) format where the attribute columns correspond to the names of emitted pollutants. Refer [here](http://godoc.org/github.com/spatialmodel/inmap#pkg-variables) (the `EmisNames` variable) for acceptable pollutant names. 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. -1. Make a copy of the [configuration file template](eval/nei2005Config.toml) and edit it so that the `VariableGridData` variable points to the location where you downloaded the general corresponding input data file to, `EmissionsShapefiles` points to the location(s) of the emissions files, and the `OutputFile` variable points to the desired location for the output file. Path names can be shortened by setting the `$evaldata` environment variable, or `$evaldata` can be replaced in the configuration file with the location of the downloaded files. Refer to the source code documentation ([here](https://godoc.org/github.com/spatialmodel/inmap/inmap/cmd#ConfigData)) for information about other configuration options. The configuration file is a text file in [TOML](https://github.com/toml-lang/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. +1. Make a copy of the [configuration file template](eval/nei2005Config.toml) and edit it if desired, keeping in mind that you will either need to set the `evaldata` environment 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 directory `OutputFile` is to go in exists. Refer to the source code documentation ([here](https://godoc.org/github.com/spatialmodel/inmap/inmaputil#ConfigData)) for information about other configuration options. The configuration file is a text file in [TOML](https://github.com/toml-lang/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. 2. Run the program: inmapXXX run steady --config=/path/to/configfile.toml where `inmapXXX` is replaced with the executable file that you [downloaded](https://github.com/spatialmodel/inmap/releases). For some systems you may need to type `./inmapXXX` instead. If you compiled the program from source, the command will just be `inmap` for Linux or Mac systems and `inmap.exe` for Windows systems. - The above command runs the model in the most typical mode. For alternative run modes and other command options refer [here](inmap/cmd/doc/inmap.md). + The above command runs the model in the most typical mode. For alternative run modes and other command options refer [here](inmap/doc/inmap.md). + +3. View the program output. The output files are in [shapefile](http://en.wikipedia.org/wiki/Shapefile) format which can be viewed in most GIS programs. One free GIS program is [QGIS](http://www.qgis.org/). By default, the InMAP only outputs ground-level, but this can be changed using the configuration file. -3. View the program output. The output files are in [shapefile](http://en.wikipedia.org/wiki/Shapefile) format which can be viewed in most GIS programs. One free GIS program is [QGIS](http://www.qgis.org/). By default, the InMAP only outputs results from layer zero, but this can be changed using the configuration file. - Output variables are specified as `OutputVariables` in 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. + Output variables are specified as `OutputVariables` in 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 be `WindSpeed = "WindSpeed"`. If double `WindSpeed` is desired as an output variable, an acceptable entry in the configuration file would be `DoubleWind = "WindSpeed*2"`. A user-defined variable such as `DoubleWind` can then appear in an separate expression, e.g. `ExpTwoWind = "exp(DoubleWind)"` where the `DoubleWind` is exponentiated. Note that expressions can include functions such as `exp()`. For more information on the available functions refer to the source code documentation ([here](https://godoc.org/github.com/spatialmodel/inmap#InMAP.Results)). diff --git a/RELEASE.md b/RELEASE.md index 399f11ac0..3357a3a10 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -2,9 +2,11 @@ This file contains a checklist for steps to take to release a new version of InMAP. -1. Update vendored packages using `govendor fetch`. +1. Update vendored packages using `dep ensure -update`. -1. Update the version number in `framework.go` and in `inmap/build.sh`, and the `year` variable in `inmap/cmd/root.go`. +1. Update the version number in `framework.go` and in `inmap/build.sh`, and the `year` variable in `internal/cmd/cmd.go`. + +1. Update the version number in `README.md`. Make sure the README and other documentation is up to date. 1. If the input data format has changed since the last release, change the `DataVersion` and/or `VarGridDataVersion` variables in `framework.go` and regenerate the input data with the new version number. diff --git a/inmap/build.sh b/inmap/build.sh index 87d1c05e1..0bef97c9e 100644 --- a/inmap/build.sh +++ b/inmap/build.sh @@ -2,7 +2,7 @@ # This script compiles InMAP for different systems. -version=1.2.1 +version=1.3 env GOOS=linux GOARCH=amd64 go build -v mv inmap inmap${version}linux-amd64 diff --git a/inmap/testdata/testSR.ncf b/inmap/testdata/testSR.ncf index 19b255883ff724445b9616dba38f9a3058137b5b..646c0b4e922ff5ade55cabd098a99954a81915e6 100644 GIT binary patch delta 984 zcmYLGQAk^77&V_a@g}+IwQ6fybvLfCGLjd&R)-tQQpFW6HlU7@>SDAwr%77w>}{K9 zs-d=6?!x5YCbmO`Ar@~D{FRQ5xlkA>E^~WuqYtw6VGm`y10Tllaep?(-u{p8ob#P? zervVZS}p$gcif|I=|nAtig)N_9?ilI`Nn2m>`TijM-$X-V!yPXE=brY(J2%~^rhR>lZWg~K$9kMs$zr&EVLd?)1Zo=N24Lms87&{ z1koO+SQM8Ooi206p?T80Fq|nGH6XZCq+57ec9(9bIH*ie(nR*SMkxuBD^3$p>`NI+ z=kcss$6uA@n68Y`9RvBp8Jf1Rr)XrTn5!FhXG|X69*9N;MldP8il+LvXhy;ddx{Xn zGl%Y+&2t2`UN6Egj+3}q;=l)WKAQ95Qng0&2KMD6_+AdveG3Qfglj?NaN*sz_4o1I z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