Skip to content

Conversation

@wpbonelli
Copy link
Contributor

@wpbonelli wpbonelli commented Jun 26, 2024

PRT requires particle release points (except for z via LOCAL_Z) specified in the model coordinate system, and also reports pathlines in the model coordinate system. This PR enables input coordinate transformations with keyword options for the particle release point package.

With this change, points may be specified as

  • model coordinates (default, as before)
  • local cell coordinates scaled to the unit interval with LOCAL_XY and/or LOCAL_Z — only structured grids
  • offsets from the cell center, no rescaling, via LOCAL_XY_OFFSET — structured or unstructured grids
  • global coordinates via dev option DEV_GLOBAL_XY — transform release points to model coordinates using grid georeference information

Checklist of items for pull request

  • Added new test or modified an existing test
  • Formatted new and modified Fortran source files with fprettify
  • Added doxygen comments to new and modified procedures
  • Updated definition files
  • Updated develop.tex with a plain-language description of the bug fix, change, feature; required for changes that may affect users
  • Updated input and output guide
  • Removed checklist items not relevant to this pull request

@wpbonelli
Copy link
Contributor Author

wpbonelli commented Jun 26, 2024

@langevin-usgs this is generally according to our outline with the main difference being MODEL_XY and conditioning the release point transform on grid offset/rotation, probably good to chat again switched to DEV_GLOBAL_XY as discussed offline and updated description above.

@wpbonelli wpbonelli force-pushed the prt-local branch 3 times, most recently from f7b8c52 to 0cb9b66 Compare June 28, 2024 03:16
@wpbonelli wpbonelli marked this pull request as ready for review June 28, 2024 12:08
@wpbonelli
Copy link
Contributor Author

This should be ready for a look when @aprovost-usgs is back

Copy link
Contributor

@christianlangevin christianlangevin left a comment

Choose a reason for hiding this comment

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

I know there may be more on work on this, but just wanted to mention one comment about the release notes. I'm good with whatever you and @aprovost-usgs decide on the coordinate options.

@wpbonelli wpbonelli marked this pull request as draft July 9, 2024 12:00
wpbonelli added a commit that referenced this pull request Nov 11, 2024
…#2055)

Carved out of #1901 for tidiness. Split TrackDataModule into TrackFileModule and TrackControlModule. Also clean up some comments, and pass fmi down into cell/subcell tracking methods (not always needed, but best to be consistent).
@wpbonelli wpbonelli force-pushed the prt-local branch 2 times, most recently from 16ad318 to 7318671 Compare November 11, 2024 21:25
@wpbonelli wpbonelli marked this pull request as ready for review November 12, 2024 03:01
jdhughes-dev pushed a commit to jdhughes-dev/modflow6 that referenced this pull request Nov 12, 2024
…MODFLOW-ORG#2055)

Carved out of MODFLOW-ORG#1901 for tidiness. Split TrackDataModule into TrackFileModule and TrackControlModule. Also clean up some comments, and pass fmi down into cell/subcell tracking methods (not always needed, but best to be consistent).
@wpbonelli wpbonelli modified the milestones: 6.6.0, 6.7.0 Nov 20, 2024
wpbonelli added a commit that referenced this pull request Jul 30, 2025
While it's on the user to provide both release coordinates and cell IDs, for some time we have checked at release time that release coordinates fall within the specified cell. Alternative ways to specify release points are in the works in #1901 e.g. local coordinates, which would remove the redundancy, but so long as release points are in global coordinates and we don't do cell identification ourselves, the coordinate checks are a performance bottleneck when particle count is high.

Add a COORDINATE_CHECK_METHOD option to allow opting out. Checks on (by default) with eager, trust me I know what I'm doing mode with none.

Later, consider adding a lazy mode where validation happens at tracking time, this might save some time if we can reuse terms of other calculations for the checks, but contradicts "fail early" philosophy so should probably not become default. Need to test and get some performance numbers.

If in future we did start computing cell IDs (e.g. with something fast like the celltree algorithm) this option could just be ignored when cell IDs are not provided by the user. So one could decide whether to do it in preprocessing or let PRT handle it.
@wpbonelli wpbonelli marked this pull request as draft August 15, 2025 01:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants