Releases: natcap/invest
3.10.0
This minor release includes the following fixes and features:
-
General
- Add a
--language
argument to the command-line interface, which
will translate model names, specs, and validation messages. - Accept a
language
query parameter at the UI server endpoints,
which will translate model names, specs, and validation
messages. - Added
invest serve
entry-point to the CLI. This launches a
Flask app and server on the localhost, to support the workbench. - Major updates to each model's
ARGS_SPEC
(and some related
validation) to facilitate re-use & display in the Workbench and
User's Guide. - Standardized and de-duplicated text in
ARGS_SPEC
about
and
name
strings. - Update to FontAwesome 5 icons in the QT interface.
- In response to the deprecation of
setup.py
-based commands in
Python 3.10, the recommended way to build python distributions
ofnatcap.invest
is now with thebuild
package, and
installation should be done viapip
. TheREADME
has been
updated to reflect this change, and this should only be
noticeable for those installingnatcap.invest
from source. - A bug has been fixed in
make install
so that now the current
version ofnatcap.invest
is built and installed. The former
(buggy) version ofmake install
would install whatever the
latest version was in yourdist
folder. - Updating the
taskgraph
requirement to0.11.0
to resolve an
issue where modifying a file within a roughly 2-second window
would fooltaskgraph
into believing that the file had not been
modified. - Fixed a bug where some input rasters with NaN nodata values
would go undetected as nodata and yield unexpected behavior.
- Add a
-
Annual Water Yield
- Renamed the Windows start menu shortcut from "Water Yield" to
"Annual Water Yield".
- Renamed the Windows start menu shortcut from "Water Yield" to
-
Coastal Vulnerability
- Fixed bug where shore points were created on interior landmass
holes (i.e. lakes). - Added feature to accept raster (in addition to vector) habitat
layers. - Changed one intermediate output (geomorphology) from SHP to
GPKG. - Fixed bug where output vectors had coordinates with an
unnecessary z-dimension. Output vectors now have 2D geometry.
- Fixed bug where shore points were created on interior landmass
-
Crop Pollination
- Renamed the Windows start menu shortcut from "Pollination" to
"Crop Pollination".
- Renamed the Windows start menu shortcut from "Pollination" to
-
Fisheries and Fisheries HST
- The Fisheries models were deprecated due to lack of use, lack of
scientific support staff, and maintenance costs.
- The Fisheries models were deprecated due to lack of use, lack of
-
Finfish
- The Finfish model was deprecated due to lack of use, lack of
scientific support staff, and maintenance costs.
- The Finfish model was deprecated due to lack of use, lack of
-
Habitat Quality
- Changed how Habitat Rarity outputs are calculated to be less
confusing. Values now represent a 0 to 1 index where before
there could be negative values. Now values of 0 indicate
current/future LULC not represented in baseline LULC; values 0
to 0.5 indicate more abundance in current/future LULC and
therefore less rarity; values of 0.5 indicate same abundance
between baseline and current/future LULC; values 0.5 to 1
indicate less abundance in current/future LULC and therefore
higher rarity.
- Changed how Habitat Rarity outputs are calculated to be less
-
NDR
- Added a new raster to the model's workspace,
intermediate_outputs/what_drains_to_stream[suffix].tif
. This
raster has pixel values of 1 where DEM pixels flow to an
identified stream, and 0 where they do not.
- Added a new raster to the model's workspace,
-
Scenario Generator
- Changed an args key from
replacment_lucode
to
replacement_lucode
.
- Changed an args key from
-
Scenic Quality
- Simplify the
valuation_function
arg options. The options are
now:linear
,logarithmic
,exponential
. The names displayed
in the UI dropdown will stay the same as before. Datastacks or
scripts will need to be updated to use the new option values. - Renamed the model title from "Unobstructed Views: Scenic Quality
Provision" to "Scenic Quality".
- Simplify the
-
SDR
- Added a new raster to the model's workspace,
intermediate_outputs/what_drains_to_stream[suffix].tif
. This
raster has pixel values of 1 where DEM pixels flow to an
identified stream, and 0 where they do not.
- Added a new raster to the model's workspace,
-
Urban Flood Risk:
- Fixed broken documentation link in the user interface.
-
Urban Stormwater Retention:
- First release of this model.
-
Visitation: Recreation and Tourism
- Renamed the Windows start menu shortcut from "Recreation" to
"Visitation: Recreation and Tourism".
- Renamed the Windows start menu shortcut from "Recreation" to
-
Wave Energy
- Rename the
analysis_area_path
arg toanalysis_area
, since it
is not a path but an option string. - Simplify the
analysis_area
arg options. The options are now:
westcoast
,eastcoast
,northsea4
,northsea10
,
australia
,global
. The names displayed in the UI dropdown
will stay the same as before. Datastacks and scripts will need
to be updated to use the new option values.
- Rename the
-
Wind Energy
- No model inputs or outputs are measured in "millions of"
currency units any more. Specifically: - The
mw_coef_ac
andmw_coef_dc
values in the Global Wind
Energy Parameters table were in millions of currency units per
MW; now they should be provided in currency units per MW. - The
infield_cable_cost
,cable_coef_ac
, andcable_coef_dc
values in the Global Wind Energy Parameters table were in
millions of currency units per km; now they should be provided
in currency units per km. - The
turbine_cost
value in the Turbine Parameters table was in
millions of currency units; now it should be provided in
currency units. - The
foundation_cost
parameter was in millions of currency
units; now it should be provided in currency units. - The NPV output, formerly
npv_US_millions.tif
, is now
npv.tif
. It is now in currency units, not millions of currency
units.
- No model inputs or outputs are measured in "millions of"
3.9.2
3.9.2
This bugfix release includes the following fixes and features:
-
General:
- Improving our binary build by including a data file needed for
thecharset-normalizer
python package. This eliminates a
warning that was printed to stdout on Windows. - The Annual Water Yield model name is now standardized throughout
InVEST. This model has been known in different contexts as
Hydropower, Hydropower Water Yield, or Annual Water Yield. This
name was chosen to emphasize that the model can be used for
purposes other than hydropower (though the valuation component
is hydropower-specific) and to highlight its difference from the
Seasonal Water Yield model. The corresponding python module,
formerlynatcap.invest.hydropower.hydropower_water_yield
, is
nownatcap.invest.annual_water_yield
. - Minor changes to some other models' display names.
- Update and expand on the instructions in the API docs for
installing thenatcap.invest
package. - The InVEST binaries on Windows now no longer inspect the
%PATH%
when looking for GDAL DLLs. This fixes an issue where
InVEST would not launch on computers where the%PATH%
either
contained other environment variables or was malformed. - JSON sample data parameter sets are now included in the complete
sample data archives.
- Improving our binary build by including a data file needed for
-
Seasonal Water Yield
- Fixed a bug in validation where providing the monthly alpha
table would cause a "Spatial file <monthly alpha table>
has no projection" error. The montly alpha table was mistakenly
being validated as a spatial file.
- Fixed a bug in validation where providing the monthly alpha
-
Crop Production Regression
- Corrected a misspelled column name. The fertilization rate table
column must now be namedphosphorus_rate
, not
phosphorous_rate
.
- Corrected a misspelled column name. The fertilization rate table
-
Habitat Quality
- Fixed a bug where optional input Allow Accessibility to Threats
could not be passed as an empty string argument. Now handles
falsey values.
- Fixed a bug where optional input Allow Accessibility to Threats
-
Urban Flood Risk
- Fixed a bug where lucodes present in the LULC raster but missing
from the biophysical table would either raise a cryptic
IndexError or silently apply invalid curve numbers. Now a
helpful ValueError is raised.
- Fixed a bug where lucodes present in the LULC raster but missing
3.9.1
This bugfix release includes the following fixes and features:
-
General:
- Added error-handling for when
pandas
fails to decode a
non-utf8 encoded CSV. - Moved the sample data JSON files out of the root sample_data
folder and into their respective model folders. - Updated documentation on installing InVEST from source.
- Restructured API reference docs and removed outdated and
redundant pages. - Include logger name in the logging format. This is helpful for
the cython modules, which can't log module, function, or line
number info. - Fixed a bug in makefile that prevented
make env
from working
properly. - Fixed an issue with the InVEST application launching on Mac OS X
11 "Big Sur". When launching the InVEST.app
bundle, the
environment variableQT_MAC_WANTS_LAYER
is defined. If running
InVEST through python, this environment variable may need to be
defined by hand like so:
QT_MAC_WANTS_LAYER=1 python -m natcap.invest
. A warning will
be raised if this environment variable is not present on mac. - Fixing an issue on Mac OS X where saving the InVEST application
to a filepath containing spaces would prevent the application
from launching. - Fixed an issue on Mac OS when certain models would loop
indefinitely and never complete. This was addressed by bumping
thetaskgraph
requirement version to0.10.3
- Allow Windows users to install for all users or current user.
This allows non-admin users to install InVEST locally. - Fixed a bug where saving a datastack parameter set with relative
paths would not convert Windows separators to linux style. - Provide a better validation error message when an overview
'.ovr' file is input instead of a valid raster. - Removed internal references to
TaskGraph
copy_duplicate_artifact
calls in anticipation from that
feature being removed fromTaskGraph
. User facing changes
include slightly faster initial runtimes for the Coastal
Vulnerability, Coastal Blue Carbon, SDR, DelineateIt, and
Seasonal Water Yield models. These models will no longer attempt
to copy intermediate artifacts that could have been computed by
previous runs. - Validation now returns a more helpful message when a spatial
input has no projection defined. - Updated to pygeoprocessing 2.3.2
- Added support for GDAL 3.3.1 and above
- Added some logging to
natcap.invest.utils._log_gdal_errors
to
aid in debugging some hard-to-reproduce GDAL logging errors that
occasionally cause InVEST models to crash. If GDAL calls
_log_gdal_errors
with an incorrect set of arguments, this is
now logged.
- Added error-handling for when
-
Carbon
- Fixed a bug where, if rate change and discount rate were set to
0, the valuation results were in$/year rather than $ , too small
by a factor oflulc_fut_year - lulc_cur_year
. - Improved UI to indicate that Calendar Year inputs are only
required for valuation, not also for sequestration. - Increasing the precision of
numpy.sum
from Float32 to Float64
when aggregating raster values for the HTML report.
- Fixed a bug where, if rate change and discount rate were set to
-
DelineateIt:
- The DelineateIt UI has been updated so that the point-snapping
options will always be interactive. - DelineateIt's point-snapping routine has been updated to snap
MULTIPOINT
geometries with 1 component point as well as
primitivePOINT
geometries. All other geometric types will not
be snapped. When a geometry cannot be snapped, a log message is
now recorded with the feature ID, the geometry type and the
number of component geometries. Features with empty geometries
are now also skipped.
- The DelineateIt UI has been updated so that the point-snapping
-
Fisheries Habitat Scenario Tool
- Fixed divide-by-zero bug that was causing a RuntimeWarning in
the logs. This bug did not affect the output.
- Fixed divide-by-zero bug that was causing a RuntimeWarning in
-
HRA
- Fixed bugs that allowed zeros in DQ & Weight columns of criteria
table to raise DivideByZero errors.
- Fixed bugs that allowed zeros in DQ & Weight columns of criteria
-
NDR
- Fixed a bug that allowed SDR to be calculated in areas that
don't drain to any stream. Now all outputs that depend on
distance to stream (d_dn
,dist_to_channel
,ic
,ndr_n
,
ndr_p
,sub_ndr_n
,sub_ndr_p
,n_export
,p_export
) are
only defined for pixels that drain to a stream. They have nodata
everywhere else.
- Fixed a bug that allowed SDR to be calculated in areas that
-
Pollination
- Updated so that the
total_pollinator_abundance_[season].tif
outputs are always created. Before, they weren't created if a
farm vector was not supplied, even though they are independent.
- Updated so that the
-
Recreation
- Fixed some incorrectly formatted log and error messages
-
Seasonal Water Yield
- Fixed a bug where
qf.tif
outputs weren't properly masking
nodata values and could show negative numbers.
- Fixed a bug where
-
SDR
- Fixed a bug in validation that did not warn against different
coordinate systems (all SDR inputs must share a common
coordinate system). - Fixed a bug that was incorrectly using a factor of 0.0986 rather
than 0.0896. This would have a minor effect on end-user results. - Changed how SDR thresholds its L factor to allow direct
thresholding rather than based off of upstream area. Exposed
this parameter asl_max
in theargs
input and in the user
interface. - Fixed a bug that allowed SDR to be calculated in areas that
don't drain to any stream. Now all outputs that depend on
distance to stream (d_dn
,d_dn_bare
,ic
,ic_bare
,
sdr
,sdr_bare
,e_prime
,sed_retention
,
sed_retention_index
,sed_deposition
,sed_export
) are only
defined for pixels that drain to a stream. They have nodata
everywhere else.
- Fixed a bug in validation that did not warn against different
-
Urban Flood Risk
- Fixed a bug where a String
Type
column in the infrastructure
vector would cause the aggregation step of the model to crash,
even with the correct integer value in the column.
- Fixed a bug where a String
-
Wind Energy
- Raising ValueError when AOI does not intersect Wind Data points.
InVEST 3.9.0
3.9.0
This minor release includes the following fixes and features:
-
General
-
Deprecating GDAL 2 and adding support for GDAL 3.
-
Adding function in utils.py to handle InVEST coordindate
transformations. -
Making InVEST compatible with Pygeoprocessing 2.0 by updating:
convolve_2d()
keywordignore_nodata
to
ignore_nodata_and_edges
.get_raster_info()
/get_vector_info()
keyword
projection
toprojection_wkt
.
-
Improve consistency and context for error messages related to
raster reclassification across models by using
utils.reclassify_raster
. -
Fixed bug that was causing a TypeError when certain input
rasters had an undefined nodata value. Undefined nodata values
should now work everywhere. -
Include logging in python script generated from "Save to python
script..." in the "Development" menu. Now logging messages from
the model execution will show up when you run the script. -
InVEST is now a 64-bit binary built against Python 3.7.
-
Adding Python 3.8 support for InVEST testing.
-
Add warning message to installer for 32-bit computers about
installing 64-bit software. -
Stop running validation extra times when model inputs autofill,
saving a small but noticeable amount of time in launching a
model. -
The number of files included in the python source distribution
has been reduced to just those needed to install the python
package and run tests. -
Code-sign the macOS distribution, and switch to a DMG
distribution format. -
No longer include the HTML docs or HISTORY.rst in the macOS
distribution. -
Bumped the
shapely
requirements to>=1.7.1
to address a
library import issue on Mac OS Big Sur. -
Fixing model local documentation links for Windows and Mac
binaries. -
The InVEST binary builds now launch on Mac OS 11 "Big Sur". This
was addressed by defining theQT_MAC_WANTS_LAYER
environment
variable. -
Fixed the alphabetical ordering of Windows Start Menu shortcuts.
-
-
Annual Water Yield
- Fixing bug that limited
rsupply
result whenwyield_mn
or
consump_mn
was 0.
- Fixing bug that limited
-
Coastal Blue Carbon
- Refactor of Coastal Blue Carbon that implements TaskGraph for
task management across the model and fixes a wide range of
issues with the model that were returning incorrect results in
all cases. - Corrected an issue with the model where available memory would
be exhausted on a large number of timesteps. - In addition to the
execute
entrypoint, another entrypoint,
execute_transition_analysis
has been added that allows access
to the transition analysis timeseries loop at a lower level.
This will enable users comfortable with python to provide
spatially-explicit maps of accumulation rates, half lives and
other parameters that can only be provided via tables to
execute
. - Snapshot years and rasters, including the baseline year/raster,
are now all provided via a table mapping snapshot years to the
path to a raster on disk. The baseline year is the earliest year
of these. - The model's "initial" and "lulc lookup" and "transient" tables
have been combined into a single "biophysical" table, indexed by
LULC code/LULC class name, that includes all of the columns from
all of these former tables. - The "analysis year" is now a required input that must be >=
the final snapshot year in the snapshots CSV. - Litter can now accumulate at an annual rate if desired.
- The model now produces many more files, which allows for greater
flexibility in post-processing of model outputs.
- Refactor of Coastal Blue Carbon that implements TaskGraph for
-
Coastal Vulnerability
- 'shore_points_missing_geomorphology.gpkg' output file name
now includes the suffix if any, and its one layer now is renamed
from 'missing_geomorphology' to be the same as the file name
(including suffix). - Fixed a memory bug that occurred during shore point
interpolation when dealing with very large landmass vectors.
- 'shore_points_missing_geomorphology.gpkg' output file name
-
Delineateit
- The layer in the 'preprocessed_geometries.gpkg' output is
renamed from 'verified_geometries' to be the same as the file
name (including suffix). - The layer in the 'snapped_outlets.gpkg' output is renamed from
'snapped' to be the same as the file name (including suffix). - The layer in the 'watersheds.gpkg' output has been renamed from
'watersheds' to match the name of the vector file (including the
suffix). - Added pour point detection option as an alternative to providing
an outlet features vector.
- The layer in the 'preprocessed_geometries.gpkg' output is
-
Finfish
- Fixed a bug where the suffix input was not being used for output
paths.
- Fixed a bug where the suffix input was not being used for output
-
Forest Carbon Edge Effect
- Fixed a broken link to the local User's Guide
- Fixed bug that was causing overflow errors to appear in the logs
when running with the sample data. - Mask out nodata areas of the carbon map output. Now there should
be no output data outside of the input LULC rasater area.
-
GLOBIO
- Fixing a bug with how the
msa
results were masked and operated
on that could cause bad results in themsa
outputs.
- Fixing a bug with how the
-
Habitat Quality
- Refactor of Habitat Quality that implements TaskGraph
- Threat files are now indicated in the Threat Table csv input
under required columns:BASE_PATH
,CUR_PATH
,FUT_PATH
. - Threat and Sensitivity column names are now case-insensitive.
- Sensitivity threat columns now match threat names from Threat
Table exactly, without the need for "L". "L" prefix is
deprecated. - Threat raster input folder has been removed.
- Validation enhancements that check whether threat raster paths
are valid. - HQ update to User's Guide.
- Changing sample data to reflect Threat Table csv input changes
and bumping revision. - More comprehensive testing for Habitat Quality and validation.
- Checking if Threat raster values are between 0 and 1 range,
raising ValueError if not. No longer snapping values less than 0
to 0 and greater than 1 to 1. - Fixing bug that was setting Threat raster values to 1 even if
they were floats between 0 and 1. - Updating how threats are decayed across distance. Before, nodata
edges were ignored causing values on the edges to maintain a
higher threat value. Now, the decay does not ignore those nodata
edges causing values on the edges to decay more quickly. The
area of study should have adequate boundaries to account for
these edge effects. - Update default half saturation value for sample data to 0.05
from 0.1.
-
Seasonal Water Yield
- Fixed a bug where precip or eto rasters of
GDT_Float64
with
values greater than 32-bit would overflow to-inf
.
- Fixed a bug where precip or eto rasters of
-
SDR
- Fixing an issue where the LS factor should be capped to an
upstream area of 333^2 m^2. In previous versions the LS factor
was erroneously capped to "333" leading to high export spikes in
some pixels. - Fixed an issue where sediment deposition progress logging was
not progressing linearly. - Fixed a task dependency bug that in rare cases could cause
failure.
- Fixing an issue where the LS factor should be capped to an
-
Urban Cooling
- Split energy savings valuation and work productivity valuation
into separate UI options.
- Split energy savings valuation and work productivity valuation
-
Urban Flood Risk
- Changed output field names
aff.bld
andserv.blt
toaff_bld
andserv_blt
respectively to fix an issue where ArcGIS would
not display properly.
- Changed output field names
3.8.9
3.8.8
3.8.8 (2020-09-04)
- Coastal Vulnerability
- Improved handling of invalid AOI geometries to avoid crashing and instead
fix the geometry when possible and skip it otherwise. - Added validation check that shows a warning if the SLR vector is not
a point or multipoint geometry.
- Improved handling of invalid AOI geometries to avoid crashing and instead
- Urban Cooling
- Energy units are now (correctly) expressed in kWh. They were previously
(incorrectly) expressed in kW. - Energy savings calculations now require that consumption is in units of
kWh/degree C/m^2 for each building class. - Fixing an issue where blank values of the Cooling Coefficient weights
(shade, albedo, ETI) would raise an error. Now, a default value for the
coefficient is assumed if any single value is left blank.
- Energy units are now (correctly) expressed in kWh. They were previously
- HRA
- Raise ValueError if habitat or stressor inputs are not projected.
- Make sample data rating filepaths work on Mac. If not on Windows and a rating
filepath isn't found, try replacing all backslashes with forward slashes.
- Seasonal Water Yield
- Updated output file name from aggregated_results.shp to aggregated_results_swy.shp
for consistency with NDR and SDR
- Updated output file name from aggregated_results.shp to aggregated_results_swy.shp
- Datastack
- Saved datastack archives now use helpful identifying names for spatial input folders
- Validation
- Fixed bug that caused fields activated by a checkbox to make validation fail,
even when the checkbox was unchecked.
- Fixed bug that caused fields activated by a checkbox to make validation fail,
- General
- Input table column headers are now insensitive to leading/trailing whitespace in
most places. - Modified the script that produces a conda environment file from InVEST's python
requirements file so that it includes theconda-forge
channel in the file
itself.
- Input table column headers are now insensitive to leading/trailing whitespace in
- Recreation
- Validate values in the type column of predictor tables early in execution. Raise
a ValueError if a type value isn't valid (leading/trailing whitespace is okay).
- Validate values in the type column of predictor tables early in execution. Raise
- Validation
- Set a 5-second timeout on validation functions that access a file. This will raise
a warning and prevent validation from slowing down the UI too much.
- Set a 5-second timeout on validation functions that access a file. This will raise
3.8.7
This bugfix release includes the following fixes and features:
-
General
- Fixed an issue where some users would be unable to launch InVEST
binaries on Windows. This crash was due to a configuration issue
inPySide2==5.15.0
that will be fixed in a future release of
PySide2.
- Fixed an issue where some users would be unable to launch InVEST
-
GLOBIO
- Fix a bug that mishandled combining infrastructure data when
only one infrastructure data was present.
- Fix a bug that mishandled combining infrastructure data when
-
Urban Flood Risk
- The output vector
flood_risk_service.shp
now includes a field,
flood_vol
that is the sum of the modeled flood volume (from
Q_m3.tif
) within the AOI. - Fieldnames in
flood_risk_service.shp
have been updated to more
closely match the variables they match as documented in the
User's Guide chapter. Specifically,serv_bld
is nowserv.blt
andaff_bld
is nowaff.bld
. Q_mm.tif
has been moved from the intermediate directory into
the workspace.- Fixed a bug in the flood volume (
Q_m3.tif
) calculations that
was producing incorrect values in all cases.
- The output vector
3.8.6
3.8.5
This bugfix release includes the following fixes and features:
-
General
- Fix bug in
utils.build_lookup_from_csv
that was allowingkey_field
to be non unique and overwriting values. - Fix bug in
utils.build_lookup_from_csv
where trailing commas caused returned values to be malformed. - Add optional argument
column_list
toutils.build_lookup_from_csv
that takes a list of column names and only returns those in the dictionary. - Remove
warn_if_missing
argument fromutils.build_lookup_from_csv
and warning by default.
- Fix bug in
-
Urban Flood Risk Mitigation
- Fixed an issue where the output vector
flood_risk_service.shp
would only be created when the built infrastructure vector was provided. Now, theflood_risk_service.shp
vector is always created, but the fields created differ depending on whether the built infrastructure input is present during the model run. - Fixed an issue where the model would crash if an infrastructure geometry were invalid or absent. Such features are now skipped.
- Fixed an issue where the output vector
-
Scenic Quality
- Fixing an issue in Scenic Quality where the creation of the weighted sum of visibility rasters could cause "Too Many Open Files" errors and/or
MemoryError
when the model is run with many viewpoints. - Progress logging has been added to several loops that may take a longer time when the model is run with thousands of points at a time.
- A major part of the model's execution was optimized for speed, particularly when the model is run with many, many points.
- Fixing an issue in Scenic Quality where the creation of the weighted sum of visibility rasters could cause "Too Many Open Files" errors and/or
-
SDR:
- Removed the unused parameter
args['target_pixel_size']
from the SDRexecute
docstring.
- Removed the unused parameter
3.8.4
This bugfix release includes the following fixes and features:
-
General:
- Advanced the
Taskgraph
version requirement to fix a bug where workspace directories created by InVEST versions <=3.8.0 could not be re-used by more recent InVEST versions.
- Advanced the
-
NDR:
- The Start Menu shortcut on Windows and launcher label on Mac now have consistent labels for NDR: "NDR: Nutrient Delivery Ratio".
-
SDR:
- The Start Menu shortcut on Windows and launcher label on Mac now have consistent labels for SDR: "SDR: Sediment Delivery Ratio".