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

Allow inverse (negative timestep) or instantaneous (0 timestep) models #49

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

dorchard
Copy link

@dorchard dorchard commented Nov 20, 2024

This PR allows two new classes of model:

  • those which are temporally 'inverse', i.e., where the end time is before the start time and the time step is negative
  • those which are 'instantaneous', i.e., the time step is 0 and the start and end time as the same (otherwise there is an infinite number of steps).

This PR generalises the tests that (previously) checked that the current time is <= the start and <= the end (now it can be the opposite if the time step is negative, or it can be the same if the time step is 0- this is redundandtly broken into its own case but for clarity). Similarly it generalises the tests checking the relationship between the start and end.

This has been tested on pymt_hydrotrend.

(see discussion here: https://github.com/orgs/csdms/discussions/26)

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

Successfully merging this pull request may close these issues.

1 participant