esmf-org / esmf

The Earth System Modeling Framework (ESMF) is a suite of software tools for developing high-performance, multi-component Earth science modeling applications.
https://earthsystemmodeling.org/
Other
156 stars 75 forks source link

Fix FieldGet() index space info arguments to work for all staggers #231

Closed theurich closed 6 months ago

theurich commented 6 months ago

The asynchronous write component under NEPTUNE uses ESMF_Field objects on ESMF_STAGGERLOC_CORNER for the output options that require regridding. I noticed that the index space info returned by ESMF_FieldGet(), e.g. elementCount, etc. were incorrect under this situation. Looking at the code I found that it seems it was coded only to work for ESMF_STAGGERLOC_CENTER when using Grid, and nodedistrid when using Mesh. This PR attempts to fix this problem, and should support all cases generally by simply using the DistGrid of the underlying Array.

theurich commented 6 months ago

@oehmke - thinking about this fix again, it might actually be something for the 8.6.1 patch? What do you think?

oehmke commented 6 months ago

Yep, since we’re moving to a new snapshot anyways, it makes sense to me to include this. I’m still surprised that we haven’t run into this before now…

Do you want to move it to the patch or shall I?

On Mar 28, 2024, at 3:51 PM, Gerhard Theurich @.***> wrote:

@oehmke https://github.com/oehmke - thinking about this fix again, it might actually be something for the 8.6.1 patch? What do you think?

— Reply to this email directly, view it on GitHub https://github.com/esmf-org/esmf/pull/231#issuecomment-2026195373, or unsubscribe https://github.com/notifications/unsubscribe-auth/AE6A7U2PR2KWRPV333JRPW3Y2SGHDAVCNFSM6AAAAABERFC7N6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAMRWGE4TKMZXGM. You are receiving this because you were mentioned.

theurich commented 6 months ago

Let me change this PR to go into patch/8.6.1, and then I will merge. It will eventually end up in develop via my feature/neptune-async branch where I am collecting any fixes needed for one of the NRL projects.

theurich commented 6 months ago

Well, I had myself confused... I thought I was basing this branch off of v8.6.0, but instead this is off of develop. Better to just bring it into develop then and cherry-pick into patch/8.6.1. It will be going in now...

oehmke commented 6 months ago

Sounds good. Let’s remember to merge your neptune branch before 8.7 to get all of that good stuff into the next release… :-)

On Mar 28, 2024, at 4:13 PM, Gerhard Theurich @.***> wrote:

Let me change this PR to go into patch/8.6.1, and then I will merge. It will eventually end up in develop via my feature/neptune-async branch where I am collecting any fixes needed for one of the NRL projects.

— Reply to this email directly, view it on GitHub https://github.com/esmf-org/esmf/pull/231#issuecomment-2026224184, or unsubscribe https://github.com/notifications/unsubscribe-auth/AE6A7U2UORWVKVBETCF2XSLY2SIXNAVCNFSM6AAAAABERFC7N6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAMRWGIZDIMJYGQ. You are receiving this because you were mentioned.