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
base: develop
Are you sure you want to change the base?
Conversation
This is the new PR |
Adding a blocker until I can test on Discover. |
base/HorizontalFluxRegridder.F90
Outdated
|
||
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)) |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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 ...
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. |
@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. |
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. |
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 |
Fail harder if hflux does not meet requirements.
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 😄 |
Sigh. OK - hopefully I can work on this at some point this week. |
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 ... |
@bena-nasa Please check my corrected logic for getting grid corners. Thanks. |
See PR #1202 for more details
Description
Related Issue
Motivation and Context
How Has This Been Tested?
Types of changes
Checklist: