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

feat(prp): support coordinate transformations #1901

Draft
wants to merge 2 commits into
base: develop
Choose a base branch
from

Conversation

wpbonelli
Copy link
Contributor

@wpbonelli wpbonelli commented Jun 26, 2024

Previously PRT required particle release points (except for z via LOCAL_Z) to be specified in the model coordinate system, and reported pathlines in the same coordinate system. This PR enables input and output coordinate transformations with keyword options for the PRP (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

@langevin-usgs langevin-usgs 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.

@@ -27,6 +27,7 @@
\item Previously the PRT model's default behavior was to track particles until termination, as with MODPATH 7 stop time option 2 (extend). Under extended tracking, the program may not halt if particles enter a cycle in the flow system. This PR changes the default to the equivalent of MP7 stop time option 1 (final), terminating at simulation end unless a new Particle Release Point (PRP) package keyword option EXTEND\_TRACKING is provided. This is meant to provide a stronger guarantee that the program halts under default settings.
\item A refactor of the energy storage and transfer (EST) package associated with the GWE model type results in different input requirements that breaks backward compatibility with what was required in version 6.5.0. The PACKAGEDATA block was removed from the EST package input. In its place, the heat capabity of water, the specified density of water, and the latent heat of vaporization are instead given default values that can be overridden by specifying alternative values in the OPTIONS block.
\item The PRT model's cell face flows were improperly combined with boundary flows; for cell faces with active neighbors, the face flow replaced any boundary flows (likely a rare situation because IFLOWFACE is typically applied to faces on the boundary of the active domain). The face flow calculation has been corrected.
\item Previously the PRT model's PRP package required release points to be specified in the model coordinate system (except for the z coordinate via the LOCAL\_Z option). PRT also previously reported pathlines in the model coordinate system. The PRT model now supports coordinate transformations for release point input and pathline output via keyword options for the PRP package, while preserving the existing default model coordinate system. Release point x and y coordinates may now be specified for structured grids with reference to the local rectilinear cell (with coordinates scaled to the unit interval) via the LOCAL\_XY keyword option. The LOCAL\_XY\_OFFSET option, supported for structured or unstructured grids, can be used to locate release point x and y coordinates at an offset from the cell center (with no distance rescaling). A development option DEV\_GLOBAL\_XY is also provided, enabling transformation of release points from (and pathline points to) the global coordinate system for georeferenced grids.
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't think we should include DEV options in the release notes.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

OK, I will remove it. This PR will probably see some updates, @aprovost-usgs had a nice idea to re-interpret LOCAL_XY for vertex grids.

@wpbonelli wpbonelli marked this pull request as draft July 9, 2024 12:00
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.

None yet

2 participants