Skip to content
Draft
Show file tree
Hide file tree
Changes from 1 commit
Commits
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
4 changes: 2 additions & 2 deletions src/natcap/invest/annual_water_yield.py
Original file line number Diff line number Diff line change
Expand Up @@ -467,6 +467,7 @@
id="demand",
path="intermediate/demand.tif",
about=gettext("Water demand per pixel."),
created_if="demand_table_path",
data_type=float,
units=u.meter ** 3 / u.year
),
Expand All @@ -475,8 +476,7 @@
path="output/per_pixel/wyield.tif",
about=gettext("Estimated water yield per pixel."),
data_type=float,
units=u.millimeter,
created_if="demand_table_path"
units=u.millimeter
),
spec.SingleBandRasterOutput(
id="clipped_lulc",
Expand Down
2 changes: 1 addition & 1 deletion src/natcap/invest/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -477,7 +477,7 @@ def main(user_args=None):
create_logfile=True,
generate_metadata=True,
save_file_registry=True,
check_outputs=False)
check_outputs=True)

if args.subcommand == 'serve':
ui_server.app.run(port=args.port)
Expand Down
3 changes: 2 additions & 1 deletion src/natcap/invest/coastal_vulnerability.py
Original file line number Diff line number Diff line change
Expand Up @@ -665,7 +665,8 @@ def get_vector_colnames(vector_path):
spec.FileOutput(
id="sea_level_rise_pickle",
path="intermediate/sealevelrise/slr.pickle",
about=gettext("Pickled sea level rise data")
about=gettext("Pickled sea level rise data"),
created_if="slr_vector_path"
),
spec.VectorOutput(
id="clipped_projected_landmass",
Expand Down
4 changes: 3 additions & 1 deletion src/natcap/invest/delineateit/delineateit.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@
aliases=(),
module_name=__name__,
input_field_order=[
["workspace_dir", "results_suffix"],
[
"workspace_dir", "results_suffix"],
["dem_path", "detect_pour_points", "outlet_vector_path", "skip_invalid_geometry"],
["snap_points", "flow_threshold", "snap_distance"]
],
Expand Down Expand Up @@ -172,6 +173,7 @@
id="pour_points",
path="pour_points.gpkg",
about=gettext("Points where water flows off the defined area of the map."),
created_if="detect_pour_points",
geometry_types={"POINT"},
fields=[]
),
Expand Down
1 change: 1 addition & 0 deletions src/natcap/invest/forest_carbon_edge_effect.py
Original file line number Diff line number Diff line change
Expand Up @@ -565,6 +565,7 @@ def execute(args):
# close taskgraph
task_graph.close()
task_graph.join()
return file_registry.registry


def combine_carbon_maps(*carbon_maps):
Expand Down
27 changes: 12 additions & 15 deletions src/natcap/invest/habitat_quality.py
Original file line number Diff line number Diff line change
Expand Up @@ -284,14 +284,15 @@
id="new_cover_c",
path="new_cover_c.tif",
about=gettext("Masked current land cover"),
created_if="lulc_bas_path",
data_type=int,
units=None
),
spec.SingleBandRasterOutput(
id="new_cover_f",
path="new_cover_f.tif",
about=gettext("Masked future land cover"),
created_if="lulc_fut_path",
created_if="lulc_bas_path and lulc_fut_path",
data_type=int,
units=None
),
Expand Down Expand Up @@ -451,20 +452,6 @@
data_type=float,
units=None
),
spec.SingleBandRasterOutput(
id="filtered_[THREAT]_aligned",
path="intermediate/filtered_[THREAT]_aligned.tif",
about=gettext("Filtered threat raster"),
data_type=float,
units=None
),
spec.SingleBandRasterOutput(
id="degradation_[THREAT]",
path="intermediate/degradation_[THREAT].tif",
about=gettext("Degradation raster for each threat"),
data_type=float,
units=None
),
spec.SingleBandRasterOutput(
id="habitat_cur",
path="intermediate/habitat_c.tif",
Expand All @@ -476,13 +463,15 @@
id="habitat_fut",
path="intermediate/habitat_f.tif",
about=gettext("Future habitat raster"),
created_if="lulc_fut_path",
data_type=float,
units=None
),
spec.SingleBandRasterOutput(
id="habitat_bas",
path="intermediate/habitat_b.tif",
about=gettext("Baseline habitat raster"),
created_if="lulc_bas_path",
data_type=float,
units=None
),
Expand All @@ -497,13 +486,15 @@
id="[THREAT]_distance_transform_fut",
path="intermediate/[THREAT]_distance_transform_f.tif",
about=gettext("Map of distance to each threat in the future scenario"),
created_if="lulc_fut_path",
data_type=float,
units=None
),
spec.SingleBandRasterOutput(
id="[THREAT]_distance_transform_bas",
path="intermediate/[THREAT]_distance_transform_b.tif",
about=gettext("Map of distance to each threat in the baseline scenario"),
created_if="lulc_bas_path",
data_type=float,
units=None
),
Expand All @@ -518,13 +509,15 @@
id="filtered_[DECAY]_[THREAT]_fut",
path="intermediate/filtered_[DECAY]_[THREAT]_f.tif",
about=gettext("Decayed distance to each threat in the future scenario"),
created_if="lulc_fut_path",
data_type=float,
units=None
),
spec.SingleBandRasterOutput(
id="filtered_[DECAY]_[THREAT]_bas",
path="intermediate/filtered_[DECAY]_[THREAT]_b.tif",
about=gettext("Decayed distance to each threat in the baseline scenario"),
created_if="lulc_bas_path",
data_type=float,
units=None
),
Expand All @@ -539,13 +532,15 @@
id="sens_[THREAT]_fut",
path="intermediate/sens_[THREAT]_f.tif",
about=gettext("Threat sensitivity in the future scenario"),
created_if="lulc_fut_path",
data_type=float,
units=None
),
spec.SingleBandRasterOutput(
id="sens_[THREAT]_bas",
path="intermediate/sens_[THREAT]_b.tif",
about=gettext("Threat sensitivity in the baseline scenario"),
created_if="lulc_bas_path",
data_type=float,
units=None
),
Expand All @@ -560,13 +555,15 @@
id="degradation_[THREAT]_fut",
path="intermediate/degradation_[THREAT]_f.tif",
about=gettext("Degradation for each threat in the future scenario"),
created_if="lulc_fut_path",
data_type=float,
units=None
),
spec.SingleBandRasterOutput(
id="degradation_[THREAT]_bas",
path="intermediate/degradation_[THREAT]_b.tif",
about=gettext("Degradation for each threat in the baseline scenario"),
created_if="lulc_bas_path",
data_type=float,
units=None
),
Expand Down
7 changes: 0 additions & 7 deletions src/natcap/invest/recreation/recmodel_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -441,13 +441,6 @@
"Pickled dictionary mapping FIDs to shapely geometries"
)
),
spec.FileOutput(
id="scenario_[PREDICTOR]",
path="intermediate/scenario/[PREDICTOR].json",
about=gettext(
"aggregated scenario predictor values within each polygon"
)
),
spec.FileOutput(
id="server_version",
path="intermediate/server_version.pickle",
Expand Down
1 change: 1 addition & 0 deletions src/natcap/invest/routedem.py
Original file line number Diff line number Diff line change
Expand Up @@ -289,6 +289,7 @@
id="downslope_distance",
path="downslope_distance.tif",
about=gettext("Flow distance from each pixel to a stream."),
created_if="calculate_downslope_distance",
data_type=float,
units=u.pixel
)
Expand Down
2 changes: 2 additions & 0 deletions src/natcap/invest/scenic_quality/scenic_quality.py
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,7 @@
"This raster layer contains the weighted sum of the valuation"
" rasters created for each point."
),
created_if="do_valuation",
data_type=float,
units=u.none
),
Expand Down Expand Up @@ -239,6 +240,7 @@
" b coefficients. The viewshed’s value is only evaluated for"
" visible pixels."
),
created_if="do_valuation",
data_type=float,
units=u.none
),
Expand Down
11 changes: 2 additions & 9 deletions src/natcap/invest/sdr/sdr.py
Original file line number Diff line number Diff line change
Expand Up @@ -429,15 +429,6 @@
data_type=float,
units=None
),
spec.SingleBandRasterOutput(
id="weighted_avg_aspect",
path="intermediate_outputs/weighted_avg_aspect.tif",
about=gettext(
"Average aspect weighted by flow direction (in eq. (69))"
),
data_type=float,
units=u.none
),
spec.SingleBandRasterOutput(
id="what_drains_to_stream",
path="intermediate_outputs/what_drains_to_stream.tif",
Expand Down Expand Up @@ -477,6 +468,7 @@
"Copy of the input drainage map, clipped to the extent of the"
" other raster inputs and aligned to the DEM."
),
created_if="drainage_path",
data_type=int,
units=None
),
Expand Down Expand Up @@ -539,6 +531,7 @@
"A copy of the aligned drainage map, masked using the mask"
" raster."
),
created_if="drainage_path",
data_type=int,
units=None
),
Expand Down
15 changes: 1 addition & 14 deletions src/natcap/invest/seasonal_water_yield/seasonal_water_yield.py
Original file line number Diff line number Diff line change
Expand Up @@ -362,13 +362,6 @@
data_type=float,
units=u.millimeter
),
spec.SingleBandRasterOutput(
id="l",
path="L.tif",
about=gettext("Map of local recharge values"),
data_type=float,
units=u.millimeter
),
spec.SingleBandRasterOutput(
id="l_sum_avail",
path="L_sum_avail.tif",
Expand Down Expand Up @@ -443,13 +436,6 @@
data_type=float,
units=u.millimeter
),
spec.SingleBandRasterOutput(
id="aetm_[MONTH]",
path="intermediate_outputs/aetm_[MONTH].tif",
about=gettext("Maps of monthly evapotranspiration"),
data_type=float,
units=u.millimeter
),
spec.SingleBandRasterOutput(
id="flow_dir",
path="intermediate_outputs/flow_dir.tif",
Expand Down Expand Up @@ -567,6 +553,7 @@
"Copy of user-defined climate zones raster, aligned and clipped"
" to match the other spatial inputs"
),
created_if="user_defined_climate_zones",
data_type=int,
units=None
),
Expand Down
2 changes: 1 addition & 1 deletion src/natcap/invest/spec.py
Original file line number Diff line number Diff line change
Expand Up @@ -1885,7 +1885,7 @@ def setup(self, args, taskgraph_key='taskgraph_cache'):

def execute(self, args, create_logfile=False, log_level=logging.NOTSET,
generate_metadata=False, save_file_registry=False,
check_outputs=False):
check_outputs=True):
"""Invest model execute function wrapper.

Performs additonal work before and after the execute function runs:
Expand Down
1 change: 1 addition & 0 deletions src/natcap/invest/urban_cooling_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -486,6 +486,7 @@
id="building_intensity",
path="intermediate/building_intensity.tif",
about=gettext("Map of building intensity."),
created_if="cc_method == 'intensity'",
data_type=float,
units=u.none
),
Expand Down
Loading
Loading