Skip to content

Conversation

cbegeman
Copy link
Collaborator

Surface values sent to the coupler are not actually extrapolated from zMid to zTop as described. This PR changes the description of these variables in the registry to make that more clear.

Surface values sent to the coupler are not actually extrapolated from zMid to zTop as described
@cbegeman cbegeman requested a review from alicebarthel June 25, 2025 21:01
@cbegeman cbegeman added the documentation Improvements or additions to documentation label Jun 25, 2025
@cbegeman
Copy link
Collaborator Author

@alicebarthel Do you want to give this a quick look to just confirm that my understanding of the code is correct? The only place I see these variables being assigned is here:

https://github.com/E3SM-Project/E3SM/blob/36f2208586ad996f01d14c0d16d74720d5b5bc6f/components/mpas-ocean/src/shared/mpas_ocn_diagnostics.F#L423

The surface velocity is populated in time integration schemes and also doesn't include extrapolation.

@cbegeman
Copy link
Collaborator Author

Thanks, @erinethomas, for bringing this to my attention.

@alicebarthel
Copy link
Collaborator

@cbegeman I agree with your assessment.
I think this code block and documentation was "forward-looking" rather than the actual implementation. Is it worth modifying the in-line comment to clarify?

@alicebarthel
Copy link
Collaborator

alicebarthel commented Jun 30, 2025

My current understanding: tracersSurfaceValue is the top-layer value, while tracersSurfaceLayerValue does the vertical averaging; normalVelocitySurfaceLayer is based on minLevelEdgeBot(iEdge) but the avgSurfaceVelocityZon/Mer are cell-centered and thus use minLevelCell. I agree with the new documentation.
@cbegeman Could you point me to the normal --> zonal velocity change code? I suppose it is layer-based and thus uses the zero velocities if/when minLevelCell != minLevelEdgeBot(iEdge) but it'd be nice to confirm.

@cbegeman
Copy link
Collaborator Author

@cbegeman Could you point me to the normal --> zonal velocity change code? I suppose it is layer-based and thus uses the zero velocities if/when minLevelCell != minLevelEdgeBot(iEdge) but it'd be nice to confirm.

@alicebarthel Yes, my interpretation of the reconstruction is that it is layer-based and uses zero velocities when minLevelCell != minLevelEdgeBot(iEdge). It doesn't have information about boundary edges or minLevelEdge* as far as I am aware.

The reconstruction code:
https://github.com/E3SM-Project/E3SM/blob/577298b47614355df9d56e307cdd87b3ea32001b/components/mpas-framework/src/operators/mpas_vector_reconstruction.F#L261-L288

And here's the place where surfaceVelocity is assigned:
https://github.com/E3SM-Project/E3SM/blob/577298b47614355df9d56e307cdd87b3ea32001b/components/mpas-ocean/src/mode_forward/mpas_ocn_time_integration_split_ab2.F#L2872-L2875

@cbegeman
Copy link
Collaborator Author

Closed in favor of E3SM-Project#7472

@cbegeman cbegeman closed this Jun 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants