Skip to content

Commit

Permalink
Merge pull request natcap#1550 from dcdenu4/bugfix/1541-swy-qfi-bad-sum
Browse files Browse the repository at this point in the history
Fix a quickflow summation bug in SWY
  • Loading branch information
emlys authored May 21, 2024
2 parents c2446a6 + 557431d commit c9a708c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
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

0 comments on commit c9a708c

Please sign in to comment.