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

Date aware examples #325

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

Date aware examples #325

wants to merge 4 commits into from

Conversation

jwallwork23
Copy link
Contributor

A short PR to make the Tohoku example date-aware. I also noticed that the North Sea example wasn't set up properly for testing: a shorter t_end value was set but unused.

stephankramer
stephankramer previously approved these changes Feb 29, 2024
Copy link
Contributor

@stephankramer stephankramer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Other than that looks fine. Sorry this seems to have sat there a while - not sure you were still intending to merge

start_date = model_options.pop("start_date", default_start_date)
end_date = model_options.pop("end_date", default_end_date)
dt = 3600.0
t_export = 3600.0
t_end = (end_date - start_date).total_seconds()
if os.getenv("THETIS_REGRESSION_TEST") is not None:
t_end = 5 * t_export
end_date = datetime.datetime(2022, 1, 1, 0, 5, tzinfo=sim_tz)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's 5 minutes past midnight, no? but the timestep is in hours?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good spot! Fixed in 1b07342.

@jwallwork23
Copy link
Contributor Author

[Merged in master to fix conflicts.]

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.

2 participants