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

Changes the internal behavior of TimeVaryingInputs23D to use dates rather than seconds since start date #147

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

Conversation

ph-kev
Copy link
Member

@ph-kev ph-kev commented Jan 15, 2025

closes #146 - This commit changes the internal behavior of TimeVaryingInputs23D to use dates rather than seconds since start date. This will make the transition to ITime a little easier since it is easy to convert a ITime to a date.

The behavior of TimeVaryingInputs23D will only differ when dt in milliseconds is an odd number or precision more than one millisecond is required. For the first case, this is because the code computes dt / 2 in _time_range_dt_dt_e. In all other cases, the behavior should be identical as before.

@ph-kev ph-kev changed the title Kp/dates Changes the internal behavior of TimeVaryingInputs23D to use dates rather than seconds since start date Jan 15, 2025
@ph-kev ph-kev force-pushed the kp/dates branch 6 times, most recently from 85f2de7 to fd40236 Compare January 15, 2025 21:13
@ph-kev ph-kev force-pushed the kp/dates branch 3 times, most recently from 799cde3 to 1f95510 Compare January 15, 2025 21:53
@ph-kev ph-kev requested a review from Sbozzolo January 15, 2025 22:17
@ph-kev
Copy link
Member Author

ph-kev commented Jan 16, 2025

I am running the nightly build locally on the main branch and it is stuck after finishing the DataStructures tests. I think it have to do something with NCDatasets.jl?

TimeVaryingInputs.evaluate!(
dest,
itp,
Dates.Millisecond(round(Int64, 1000 * time)) +
Copy link
Member

Choose a reason for hiding this comment

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

Do you need to specify Int64?

Copy link
Member Author

Choose a reason for hiding this comment

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

I don't think so. I just got rid of it.

Copy link
Member

@Sbozzolo Sbozzolo left a comment

Choose a reason for hiding this comment

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

Thank you!

I left just one question on the rounding

TVI23D stands for TimeVaryingInput23D.
TVILPF stands for time varying inputs linear period filling.
Copy link
Member

@Sbozzolo Sbozzolo left a comment

Choose a reason for hiding this comment

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

Thank you!

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.

Change TimeVaryingInputs23D to internally use dates instead of seconds from start date
2 participants