Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix a quickflow summation bug in SWY #1550

Merged
merged 4 commits into from
May 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
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: 4 additions & 0 deletions HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,10 @@ Unreleased Changes
* Fixed an issue with the precip directory units. Units for these input
rasters are now correctly stated as mm/month.
https://github.com/natcap/invest/issues/1571
* Fixed an issue where the monthly quickflow values were being summed over
a block area and not summed pixelwise. This caused the quickflow
output ``QF.tif`` to have malformed values.
https://github.com/natcap/invest/issues/1541
* Wind Energy
* Fixed a bug where some number inputs were not being properly cast to
``float`` or ``int`` types. If the inputs happened to be passed as
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -901,7 +901,7 @@ def execute(args):
],
dependent_task_list=[
align_task, flow_dir_task, stream_threshold_task,
fill_pit_task, qf_task] + quick_flow_task_list,
fill_pit_task] + quick_flow_task_list,
task_name='calculate local recharge')

# calculate Qb as the sum of local_recharge_avail over the AOI, Eq [9]
Expand Down Expand Up @@ -973,7 +973,7 @@ def execute(args):


# raster_map equation: sum the monthly qfis
def qfi_sum_op(*qf_values): return numpy.sum(qf_values)
def qfi_sum_op(*qf_values): return numpy.sum(qf_values, axis=0)


def _calculate_l_avail(l_path, gamma, target_l_avail_path):
Expand Down
Loading