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

Problem adding LinearTrend #675

Closed
OnnoEbbens opened this issue Jan 3, 2024 Discussed in #674 · 0 comments
Closed

Problem adding LinearTrend #675

OnnoEbbens opened this issue Jan 3, 2024 Discussed in #674 · 0 comments

Comments

@OnnoEbbens
Copy link
Member

Discussed in https://github.com/orgs/pastas/discussions/674

Originally posted by AviadAvr January 3, 2024
Hi, and thanks for all your efforts in bringing life into Pastas!

Following the examples provided, I've ran into an issue regarding adding a LinearTrend stressmodel, using the following code:

ml = ps.Model(head)

rch = ps.RechargeModel(meteo.precip, meteo.evap, name='recharge', rfunc=ps.Gamma())
ml.add_stressmodel(rch)

#trend = ps.LinearTrend(start=head.index[0], end=head.index[-1], name='trend')
trend = ps.LinearTrend(start="2020-01-01", end="2021-01-01", name='trend')
ml.add_stressmodel(trend)

ml.solve(solver=ps.LeastSquares(), freq='h', noise=False)

image

Needless to say, the model works fine without adding the LinearTrend (albeit having a poor fit), but breaks whenever I do add the trend.
I'm a bit confused by the error message, as I'm not using the Hantush function, and I don't have any NoneType objects.

  • Not sure if this is related, but printing trend.tmin and trend.tmax shows:
    1677-09-21 00:12:43.145224193 and 2262-04-11 23:47:16.854775807, which don't seem to make much sense, regardless of what I set the 'start' and 'end' parameters to be.

Thanks again,
Avi.

OnnoEbbens added a commit that referenced this issue Jan 4, 2024
Co-authored-by: Davíd Brakenhoff <d.brakenhoff@artesia-water.nl>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

When branches are created from issues, their pull requests are automatically linked.

1 participant