Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
17 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 13 additions & 14 deletions .github/workflows/build-sphinx.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,23 +15,22 @@ jobs:
SLACK_API_TOKEN: ${{ secrets.SLACK_SW_INVEST_UG_WEBHOOK }}

steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6
with:
fetch-depth: 0 # so that setuptools_scm can get the right version string.

- name: Set up python
uses: actions/setup-python@v5
with:
python-version: "3.10"

- name: Setup with Micromamba
uses: mamba-org/setup-micromamba@v1
- name: Setup build environment with Micromamba
uses: mamba-org/setup-micromamba@v3
with:
environment-file: environment.yml
environment-name: env
condarc: |
channels:
- conda-forge
init-shell: bash

- name: install python requirements
run: pip install -r requirements.txt --no-build-isolation

- name: Build sphinx docs
run: make html
Expand All @@ -47,34 +46,34 @@ jobs:

- name: Authenticate GCP
if: github.event_name != 'pull_request'
uses: google-github-actions/auth@v2
uses: google-github-actions/auth@v3
with:
credentials_json: ${{ secrets.GCP_SERVICE_ACC_KEY }}

- name: Set up GCP
if: github.event_name != 'pull_request'
uses: google-github-actions/setup-gcloud@v2
uses: google-github-actions/setup-gcloud@v3

- name: Upload to release bucket
if: ${{ github.event_name != 'pull_request' && github.ref == 'refs/heads/main' }}
run: |
BUCKET=gs://releases.naturalcapitalproject.org/invest-userguide/latest
gsutil -m rsync -dr build/html $BUCKET
gcloud storage rsync -r --delete-unmatched-destination-objects build/html $BUCKET
# Cache appears to be reset each time we upload a new blob.
# Re-set the cache here to allow UG editors to immediately view
# changes to the rendered HTML.
gsutil -m setmeta -r -h "Cache-control:no-store" $BUCKET
gcloud storage objects update $BUCKET/** --cache-control="no-store" --recursive

- name: Upload to dev builds bucket
if: ${{ github.event_name != 'pull_request' && github.ref != 'refs/heads/main' }}
run: |
FORKUSER=$(basename $(dirname $(git remote get-url origin)))
BUCKET=natcap-dev-build-artifacts/invest-userguide/$FORKUSER/latest
gsutil -m rsync -dr build/html gs://$BUCKET
gcloud storage rsync -r --delete-unmatched-destination-objects build/html gs://$BUCKET
# Cache appears to be reset each time we upload a new blob.
# Re-set the cache here to allow UG editors to immediately view
# changes to the rendered HTML.
gsutil -m setmeta -r -h "Cache-control:no-store" gs://$BUCKET
gcloud storage objects update $BUCKET/** --cache-control="no-store" --recursive
python .github/workflows/post_url_to_slack.py https://storage.googleapis.com/$BUCKET/en/index.html

- name: Save UG artifacts
Expand Down
17 changes: 13 additions & 4 deletions environment.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,22 @@
# These are the natcap.invest build dependencies.
# It is common for the UG build to need to build
# natcap.invest from source. Other dependencies
# for the UG are in requirements.txt
channels:
- conda-forge
# set nodefaults to remove the default channels
# this is needed to keep memory use below RTD limit due to conda bug:
# https://github.com/conda/conda/issues/5003
- nodefaults
dependencies:
- python=3.10
- python=3.13
- pip
- gdal>=3.4.2,<3.6.0
- gdal>=3.4.2
- pygeoprocessing
- pip:
- -r requirements.txt

- setuptools>=64
- wheel
- setuptools_scm>=8.0
- cython>=3.0.0
- babel
- numpy>=2
3 changes: 1 addition & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
git-lfs
natcap.invest
pint
setuptools_scm
sphinx
sphinx-reredirects
sphinx-intl
pyyaml
pygeoprocessing
natcap.invest
2 changes: 2 additions & 0 deletions source/en/annual_water_yield.rst
Original file line number Diff line number Diff line change
Expand Up @@ -241,6 +241,8 @@ The resolution of the output rasters will be the same as the resolution of the L

* **Parameter log**: Each time the model is run, a text (.txt) file will be created in the Workspace. The file will list the parameter values and output messages for that run and will be named according to the service, the date and time. When contacting NatCap about errors in a model run, please include the parameter log.

* **annual_water_yield_report_[Suffix].html:** A summary of a model run, including visualizations of key outputs, tables of calculated results, and information about model inputs. The report can be accessed in the Workbench or opened with any web browser. For an example, see the `Sample Annual Water Yield Report <https://storage.googleapis.com/releases.naturalcapitalproject.org/invest-reports/latest/annual_water_yield_report_gura.html>`_, generated by running the AWY model with the AWY sample data.

* Outputs in the *per_pixel* folder can be useful for intermediate calculations but should **NOT** be interpreted at the pixel level, as model assumptions are based on processes understood at the subwatershed scale.

* **output\\per_pixel\\fractp_[Suffix].tif** (fraction): Estimated actual evapotranspiration fraction of precipitation per pixel (Actual Evapotranspiration / Precipitation). It is the mean fraction of precipitation that actually evapotranspires at the pixel level.
Expand Down
4 changes: 3 additions & 1 deletion source/en/carbonstorage.rst
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,9 @@ Interpreting Results

* **c_change_bas_alt_[Suffix].tif**: Raster showing the difference in carbon stored between the alternate landscape and the baseline landscape. The values are in metric tons per hectare. In this map some values may be negative and some positive. Positive values indicate sequestered carbon, negative values indicate carbon that was lost.

* **npv_alt_[Suffix].tif**/:** Raster showing the economic value of carbon sequestered between the baseline and the alternate landscape dates. The units are in currency per hectare.
* **npv_alt_[Suffix].tif**: Raster showing the economic value of carbon sequestered between the baseline and the alternate landscape dates. The units are in currency per hectare.

* **raster_values_summary_[Suffix].csv**: CSV summarizing the total values, units, and filenames of the output rasters.

* **[Workspace]\\intermediate_outputs** folder:

Expand Down
76 changes: 43 additions & 33 deletions source/en/urban_cooling_model.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
.. _ucm:

*************
Urban Cooling
Urban Cooling
*************

Summary
Expand Down Expand Up @@ -253,38 +253,48 @@ Data Needs
Interpreting Results
====================

* hm_[Suffix].tif: The calculated HMI.
* uhi_results_[Suffix].shp: A copy of the input vector "Area of Interest" with the following additional fields:
* "avg_cc" - Average CC value (-).
* "avg_tmp_v" - Average temperature value (degC).
* "avg_tmp_an" - Average temperature anomaly (degC).
* "avd_eng_cn" - (optional) Avoided energy consumption (kWh or $ if optional energy ``cost`` input column was provided in the Energy Consumption Table).
* "avg_wbgt_v" - (optional) Average WBGT (degC).
* "avg_ltls_v" - (optional) Light work productivity loss (%).
* "avg_hvls_v" - (optional) Heavy work productivity loss (%).
* buildings_with_stats_[Suffix].shp: A copy of the input vector "Building Footprints" with the following additional fields:
* "energy_sav" - Energy savings value (kWh or currency if optional energy ``cost`` input column was provided in the Energy Consumption Table). Savings are relative to a theoretical scenario where the city contains NO natural areas nor green spaces; where CC = 0 for all LULC classes.
* "mean_t_air" - Average temperature value in building (degC).

The intermediate folder contains additional model outputs:

* albedo_[Suffix].tif: Raster of albedo.
* area_kernel_[Suffix].tif: Area kernel for green area convolution.
* cc_[Suffix].tif: Raster of CC values.
* cc_masked_green_areas_[Suffix].tif: Raster of CC values masked by non-green areas.
* cc_ref_aoi_stats.pickle: Pickled zonal statistics for CC raster within the AOI.
* eti_[Suffix].tif: Raster of actual evapotranspiration (reference evapotranspiration times crop coefficient "Kc").
* green_area_sum_[Suffix].tif: Raster of total area of green space within a search distance around each pixel.
* kc_[Suffix].tif: Raster of crop coefficients.
* lulc_[Suffix].tif: Raster of land use/land cover aligned to the intersection of the AOI, ET0, and LULC.
* ref_eto_[Suffix].tif: Raster of reference evapotranspiration, reprojected and aligned to the intersection of the AOI, ET0, and LULC.
* reprojected_aoi_[Suffix].shp: The user-defined Area of Interest, reprojected to the Spatial Reference of the LULC.
* reprojected_buildings_[Suffix].shp: The user-defined buildings vector, reprojected to the Spatial Reference of the LULC.
* shade_[Suffix].tif: Raster of shade.
* T_air_[Suffix].tif: Raster of estimated air temperature values.
* t_air_aoi_stats.pickle: Pickled zonal statistics for air temperature within the AOI.
* T_air_nomix_[Suffix].tif: Raster of estimated air temperature values prior to air mixing (i.e. before applying the moving average algorithm).
* wbgt_[Suffix].tif: Raster of the calculated WBGT.
* **InVEST-urban_cooling_model-log-....txt**: This is the logfile produced during every run of InVEST. It details the input parameters that were used for the run, and it logs all errors that may have occurred. If posting a question about a model run to community.naturalcapitalalliance.org, be sure to attach this logfile to your post!
* **urban_cooling_model_report_[Suffix].html:** A summary of a model run, including visualizations of key outputs, tables of calculated results, and information about model inputs. The report can be accessed in the Workbench or opened with any web browser. For an example, see the `Sample Urban Cooling Report <https://storage.googleapis.com/releases.naturalcapitalproject.org/invest-reports/latest/urban_cooling_model_report.html>`_, generated by running the Urban Cooling Model with the Urban Cooling Model sample data.
* **T_air_[Suffix].tif**: Raster of estimated air temperature values.
* **hm_[Suffix].tif**: The calculated HMI.
* **cc_[Suffix].tif**: Raster of CC values.
* **uhi_results_[Suffix].shp**: A copy of the input vector "Area of Interest" with the following additional fields:
* **avg_cc**: Average CC value (unitless).
* **avg_tmp_v**: Average temperature value (degC).
* **avg_tmp_an**: Average temperature anomaly (degC).
* **avd_eng_cn** (optional): Avoided energy consumption (kWh or currency if optional energy ``cost`` input column was provided in the Energy Consumption Table).
* **avg_wbgt_v** (optional): Average WBGT (degC).
* **avg_ltls_v** (optional): Light work productivity loss (%).
* **avg_hvls_v** (optional): Heavy work productivity loss (%).
* **buildings_with_stats_[Suffix].shp**: A copy of the input vector "Building Footprints" with the following additional fields:
* **energy_sav**: Energy savings value (kWh or currency if optional energy ``cost`` input column was provided in the Energy Consumption Table). Savings are relative to a theoretical scenario where the city contains NO natural areas nor green spaces; where CC = 0 for all LULC classes.
* **mean_t_air**: Average temperature value in building (degC).

The ``intermediate`` folder contains additional model outputs:

* **albedo_[Suffix].tif**: Raster of albedo.
* **area_kernel_[Suffix].tif**: Area kernel for green area convolution.
* **building_intensity_[Suffix].tif**: Map of building intensity.
* **cc_masked_green_areas_[Suffix].tif**: Raster of CC values masked by non-green areas.
* **cc_park_[Suffix].tif**: Map of cooling capacity decayed by proximity to greenspace.
* **cc_ref_aoi_stats.pickle**: Pickled zonal statistics for CC raster within the AOI.
* **eti_[Suffix].tif**: Raster of evapotranspiration index (reference evapotranspiration (ETo) times crop coefficient (Kc) divided by ETmax).
* **green_area_sum_[Suffix].tif**: Raster of total area of green space within a search distance around each pixel.
* **green_area_[Suffix].tif**: Map of green area.
* **heavy_loss_stats.pickle**: Pickled zonal statistics for heavy work loss.
* **heavy_work_loss_percent_[Suffix].tif**: Map of percent work productivity loss for heavy work.
* **kc_[Suffix].tif**: Raster of crop coefficients.
* **light_loss_stats.pickle**: Pickled zonal statistics for light work loss.
* **light_work_loss_percent_[Suffix].tif**: Map of percent work productivity loss for light work.
* **lulc_[Suffix].tif**: Raster of land use/land cover aligned to the intersection of the AOI, ET0, and LULC.
* **ref_eto_[Suffix].tif**: Raster of reference evapotranspiration, reprojected and aligned to the intersection of the AOI, ET0, and LULC.
* **reprojected_aoi_[Suffix].shp**: The user-defined Area of Interest, reprojected to the Spatial Reference of the LULC.
* **reprojected_buildings_[Suffix].shp**: The user-defined buildings vector, reprojected to the Spatial Reference of the LULC.
* **shade_[Suffix].tif**: Raster of shade.
* **t_air_aoi_stats.pickle**: Pickled zonal statistics for air temperature within the AOI.
* **T_air_nomix_[Suffix].tif**: Raster of estimated air temperature values prior to air mixing (i.e. before applying the moving average algorithm).
* **wbgt_stats.pickle**: Pickled zonal statistics for WBGT.
* **wbgt_[Suffix].tif**: Raster of the calculated WBGT.

Appendix: Data Sources and Guidance for Parameter Selection
===========================================================
Expand Down
13 changes: 13 additions & 0 deletions source/en/urban_nature_access.rst
Original file line number Diff line number Diff line change
Expand Up @@ -768,6 +768,19 @@ Data Needs
Interpreting Results
====================

- **InVEST-urban-nature_access-log-….txt:**: Each time the model is run, a
text (.txt) file will be created in the Workspace. The file will list
the parameter values and output messages for that run and will be named
according to the service, the date and time. When contacting NatCap
about errors in a model run, please include the parameter log.

- **urban_nature_access_report.html:** A summary of a model run, including
visualizations of key outputs, tables of calculated results, and
information about model inputs. The report can be accessed in the
Workbench or opened with any web browser. For an example, see the
`Sample Urban Nature Access Report <https://storage.googleapis.com/releases.naturalcapitalproject.org/invest-reports/latest/urban_nature_access_report.html>`_,
generated by running the UNA model with the UNA sample data.

Output Folder
-------------

Expand Down
2 changes: 2 additions & 0 deletions source/es/annual_water_yield.rst
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,8 @@ La resolución de los rásters resultantes será la misma que la del ráster de

* **Registro de parámetros**: Cada vez que se ejecute el modelo se creará un archivo de texto (.txt) en el Espacio de Trabajo. El archivo enumerará los valores de los parámetros y los mensajes resultantes para esa ejecución y se nombrará según el servicio, la fecha y la hora. Cuando se ponga en contacto con NatCap sobre los errores de una ejecución del modelo, incluya el registro de parámetros.

* **annual_water_yield_report_[Suffix].html:** A summary of a model run, including visualizations of key outputs, tables of calculated results, and information about model inputs. The report can be accessed in the Workbench or opened with any web browser. For an example, see the `Sample Annual Water Yield Report <https://storage.googleapis.com/releases.naturalcapitalproject.org/invest-reports/latest/annual_water_yield_report_gura.html>`_, generated by running the AWY model with the AWY sample data.

* Los resultados de la carpeta *per_pixel* pueden ser útiles para cálculos intermedios pero no deben ser interpretados a nivel de píxel, ya que las suposiciones del modelo se basan en procesos entendidos a escala de subcuenca.

* **output\\per_pixel\\fractp_[Suffix].tif** (fracción): Fracción estimada de evapotranspiración real de la precipitación por píxel (Evapotranspiración real / Precipitación). Es la fracción media de precipitación que realmente evapotranspira a nivel de píxel.
Expand Down
4 changes: 3 additions & 1 deletion source/es/carbonstorage.rst
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,9 @@ Interpretación de los resultados

* **c_change_bas_alt_[Suffix].tif**: rásters que muestran la diferencia de carbono almacenado entre el paisaje futuro/REDD y el paisaje actual. Los valores se expresan en toneladas métricas por píxel. En este mapa algunos valores pueden ser negativos y otros positivos. Los valores positivos indican el carbono secuestrado, los negativos indican el carbono que se ha perdido.

* **npv_alt_[Suffix].tif**:** rásters que muestran el valor económico del carbono secuestrado entre las fechas del paisaje actual y el futuro/REDD. Las unidades son en moneda por píxel.
* **npv_alt_[Suffix].tif**: rásters que muestran el valor económico del carbono secuestrado entre las fechas del paisaje actual y el futuro/REDD. Las unidades son en moneda por píxel.

* **raster_values_summary_[Suffix].csv**: CSV summarizing the total values, units, and filenames of the output rasters.

* **[Workspace]\\intermediate_outputs** carpeta:

Expand Down
Loading
Loading