Skip to content

Commit c9a708c

Browse files
authored
Merge pull request #1550 from dcdenu4/bugfix/1541-swy-qfi-bad-sum
Fix a quickflow summation bug in SWY
2 parents c2446a6 + 557431d commit c9a708c

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

HISTORY.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,10 @@ Unreleased Changes
9999
* Fixed an issue with the precip directory units. Units for these input
100100
rasters are now correctly stated as mm/month.
101101
https://github.com/natcap/invest/issues/1571
102+
* Fixed an issue where the monthly quickflow values were being summed over
103+
a block area and not summed pixelwise. This caused the quickflow
104+
output ``QF.tif`` to have malformed values.
105+
https://github.com/natcap/invest/issues/1541
102106
* Wind Energy
103107
* Fixed a bug where some number inputs were not being properly cast to
104108
``float`` or ``int`` types. If the inputs happened to be passed as

src/natcap/invest/seasonal_water_yield/seasonal_water_yield.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -901,7 +901,7 @@ def execute(args):
901901
],
902902
dependent_task_list=[
903903
align_task, flow_dir_task, stream_threshold_task,
904-
fill_pit_task, qf_task] + quick_flow_task_list,
904+
fill_pit_task] + quick_flow_task_list,
905905
task_name='calculate local recharge')
906906

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

974974

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

978978

979979
def _calculate_l_avail(l_path, gamma, target_l_avail_path):

0 commit comments

Comments
 (0)