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

fixes #199 Bugfix/tclune/#199 hflux fix 3rd try #2056

Open
wants to merge 10 commits into
base: develop
Choose a base branch
from

Conversation

tclune
Copy link
Collaborator

@tclune tclune commented Apr 4, 2023

See PR #1202 for more details

Description

Related Issue

Motivation and Context

How Has This Been Tested?

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Trivial change (affects only documentation or cleanup)

Checklist:

  • I have tested this change with a run of GEOSgcm (if non-trivial)
  • I have added one of the required labels (0 diff, 0 diff trivial, 0 diff structural, non 0-diff)
  • I have updated the CHANGELOG.md accordingly following the style of Keep a Changelog

@tclune tclune added 🪲 Bug Something isn't working 0 Diff The changes in this pull request have verified to be zero-diff with the target branch. labels Apr 4, 2023
@tclune tclune requested a review from a team as a code owner April 4, 2023 16:36
@tclune
Copy link
Collaborator Author

tclune commented Apr 4, 2023

@mathomp4 @sdeastham

This is the new PR

@mathomp4 mathomp4 added the 🚫 Contingent - DNA Do Not Approve (DNA). These changes are contingent on other PRs label Apr 4, 2023
@mathomp4
Copy link
Member

mathomp4 commented Apr 4, 2023

Adding a blocker until I can test on Discover.


this%dx_in = distance( &
lons(1:IM_in,1:JM_in), lats(1:IM_in,1:JM_in), &
lons(2:IM_in+1,1:JM_in), lats(2:IM_in+1,1:JM_in))
Copy link
Contributor

Choose a reason for hiding this comment

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

I am not 100% that for the ESMF_STAGGERLOC_CORNER ESMF would return a properly "sized" pointer. I am almost sure that currently coordinate arrays for both center and corner location would have the same shape. If this is the case, this expression would cause out-of-bounds errors

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@bena-nasa What would I need to do to get "all" the corners of the local domain? A halo call?

Copy link
Contributor

Choose a reason for hiding this comment

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

I am even not sure if the corner coordinates are set when making the call to ESMF_CreateCubedSphereGrid. In the older versions of MAPL, we used to "set" the corner coordinates as attributes attached to the grid (I know this was bad)

Copy link
Member

Choose a reason for hiding this comment

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

@tclune Did you resolve this question from @atrayano ?

Copy link
Collaborator

@bena-nasa bena-nasa Jul 19, 2023

Choose a reason for hiding this comment

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

@tclune, to get "all" the corners you do indeed have to do a non-trivial halo operation. Essentially the corners the ESMF grid stores is always missing the top and right edge unless the local domain is indeed on the edge. We have a routine for that, if you search MAPL_GridGetCorners you would see what is involved, it is a halo of the corners then extracting what you need from that.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Apparently I missed this thread when I first suggested GCHP give it a try ...

@mathomp4
Copy link
Member

mathomp4 commented Apr 4, 2023

I have shown this is zero-diff. So I'll unblock. (Though @atrayano has questions, so it'll still block...)

ETA: I mean to say a simple AMIP C24 run is zero-diff in state and history. Not sure if this could be triggered some other way.

@mathomp4 mathomp4 removed the 🚫 Contingent - DNA Do Not Approve (DNA). These changes are contingent on other PRs label Apr 4, 2023
@tclune
Copy link
Collaborator Author

tclune commented May 9, 2023

@lizziel I have added the tiny bit of logic that should now generate a semi-meaningful error if HFlux regridding is requested an the grids/decomposition are incompatible.

Untested. 90% probability it at least compiles.

@stale
Copy link

stale bot commented Jul 9, 2023

This issue has been automatically marked as stale because it has not had recent activity. If there are no updates within 7 days, it will be closed. You can add the "long term" tag to prevent the Stale bot from closing this issue.

@stale stale bot added the ❄️ Stale This issue has been marked stale label Jul 9, 2023
@mathomp4
Copy link
Member

I'm going to mark this longterm until @sdeastham can test and give a yea or nay.

Also, I think only @tclune can fix the conflict in base/MAPL_SphericalGeometry.F90 as it's beyond me!

@mathomp4 mathomp4 added the ⌛ Long Term Long term issues label Jul 10, 2023
@stale stale bot removed the ❄️ Stale This issue has been marked stale label Jul 10, 2023
@mathomp4
Copy link
Member

Well, I can definitely say that if you don't enable this, the model is zero-diff. I did try to enable it but then history exploded which was its way of saying "You don't know what you are doing Matt". A consult with @bena-nasa confirmed that 😄

@tclune
Copy link
Collaborator Author

tclune commented Jul 19, 2023

Sigh. OK - hopefully I can work on this at some point this week.

@tclune
Copy link
Collaborator Author

tclune commented Jul 24, 2023

OK branch "2nd try" had the corner stuff. And had the better error message that @lizziel had requested. So now I'm struggling to remember why there even is a "3rd try" branch??? That's the problem with letting these go on so long. I'll take a look at the diffs, but may well just close this PR and start with the other ...

@tclune tclune closed this Jul 24, 2023
@tclune tclune reopened this Jul 24, 2023
@tclune
Copy link
Collaborator Author

tclune commented Jul 24, 2023

@bena-nasa Please check my corrected logic for getting grid corners. Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0 Diff The changes in this pull request have verified to be zero-diff with the target branch. 🪲 Bug Something isn't working ⌛ Long Term Long term issues
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants