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

Wrong time unit usage in PRP package #2125

Closed
tandreasr opened this issue Jan 3, 2025 · 6 comments
Closed

Wrong time unit usage in PRP package #2125

tandreasr opened this issue Jan 3, 2025 · 6 comments
Assignees
Labels
Milestone

Comments

@tandreasr
Copy link

Hi,
I've got another issue regarding the time units used / expected inside PRP package input / output.
Some entries of the PRP file do ignore the setting made in TDIS.

For example with TDIS entry 'TIME_UNITS days'

The following PRP entries do still seem to use seconds instead:
'BEGIN RELEASETIMES' ... 'END RELEASETIMES'

And the results (CSV as well as binary) do output seconds as well for columns
'TRELEASE' & 'T'

The RELEASE_TIME_FREQUENCY however already uses days.

Best regards
Andreas

@tandreasr tandreasr added the bug label Jan 3, 2025
@wpbonelli
Copy link
Contributor

Hi @tandreasr the PRT model ignores time units and doesn't try to do any conversions — curious what you are seeing to suggest otherwise?

For instance the code implementing RELEASE_TIME_FREQUENCY is just

times = arange( &
        start=DZERO, &
        stop=totalsimtime, &
        step=this%rtfreq)

where rtfreq is the frequency, totalsimtime is the sum of period lengths, assumed to be in whatever unit is specified in TDIS, if any, and arange works more or less like numpy. And release times, tracking times, everything for PRT is assumed to use those same units, if any.

@tandreasr
Copy link
Author

Hi @wpbonelli

It might be the case that I misunderstood the concepts :-)

But when testing one of your testmodels delivered with Modflow6 (ex-gwe-prt) which has 'TIME_UNITS days' and a total simulation time of 1 day (STEADY-STATE),
I tried to specify different 'RELEASETIMES' and noticed, that even specifying 86401 (which would be above 1 day even if interpreted in seconds) did output the very same particle path as a 'RELEASETIMES' time of 0 (with the time shift of 86401).
But after 86400 seconds there shouldn't be any flows available form the GWF model...
Or do you proceed for such cases by indefinitely using the flows calculated for the last timestep?

Regards
Andreas

@wpbonelli
Copy link
Contributor

Hi @tandreasr I see now. This is certainly a bug. Really I think we shouldn't allow releases outside the bounds of tdis, but currently there is no such check..

Or do you proceed for such cases by indefinitely using the flows calculated for the last timestep?

Yes, if the extend_tracking option is on (as in this example model). That's why the particles are tracked as usual, just with the time shift. If you turn that option off you'll see they terminate after some brief nonsensical (backwards..?) behavior.

Thanks for raising this.

@wpbonelli wpbonelli self-assigned this Jan 3, 2025
@wpbonelli wpbonelli added this to the 6.6.1 milestone Jan 3, 2025
@tandreasr
Copy link
Author

Hi @wpbonelli,
you are welcome :-)
Another question concerning time units regarding the very same example model.
As you might see in the attached CSV,
when just specifying the FIRST option in the PERIOD block (without additional RELEASETIMES)
the resulting time unit in the CSV for TRELEASE & T is obviously seconds, but in my opinion should be the one specified in TDIS (days). What do you think?
Thanks you very much for your time and efforts!
Andreas

_csv_and_prp.zip

@wpbonelli
Copy link
Contributor

Hi @tandreasr the time unit in the t and trelease columns is whatever is specified in tdis, in this case it is really days even though the values look large. PRT does no time unit conversions.

image

(from the example notebook)

@tandreasr
Copy link
Author

Hi @wpbonelli,
thanks again for the clarification!
Andreas

wpbonelli added a commit that referenced this issue Jan 6, 2025
Mentioned in the discussion in #2125, skip release times before simulation start, and after simulation end if no extended tracking.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants