diff --git a/mfsetup/tdis.py b/mfsetup/tdis.py index 1d6846d4..cfd0dba2 100644 --- a/mfsetup/tdis.py +++ b/mfsetup/tdis.py @@ -770,6 +770,7 @@ def aggregate_xarray_to_stress_period(data, datetime_coords_name='time', start_datetime=None, end_datetime=None, period_stat='mean'): + period_stat = copy.copy(period_stat) if isinstance(start_datetime, pd.Timestamp): start_datetime = start_datetime.strftime('%Y-%m-%d') if isinstance(end_datetime, pd.Timestamp): diff --git a/mfsetup/tests/test_mf6_shellmound.py b/mfsetup/tests/test_mf6_shellmound.py index 5f4e27d6..b91eda30 100644 --- a/mfsetup/tests/test_mf6_shellmound.py +++ b/mfsetup/tests/test_mf6_shellmound.py @@ -579,8 +579,8 @@ def get_period_values(start, end): #assert np.allclose(values, m.rch.recharge.array[0, 0]) # test period 1 avg. for those times - start = m.cfg['rch']['source_data']['recharge']['period_stats'][1][0] - end = m.cfg['rch']['source_data']['recharge']['period_stats'][1][1] + start = m.cfg['rch']['source_data']['recharge']['period_stats'][1][1] + end = m.cfg['rch']['source_data']['recharge']['period_stats'][1][2] values1 = get_period_values(start, end) assert testing.rpd(values1.mean(), m.rch.recharge.array[1, 0].mean()) < 0.01