-
Notifications
You must be signed in to change notification settings - Fork 80
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
Predefined dynamicmask #350
base: develop
Are you sure you want to change the base?
Predefined dynamicmask #350
Conversation
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.
From looking through the file changes, I see one minor whitespace change that should be reverted. Other than that, I do have more high level design questions... which I will write up as a general comment in the conversation of the PR.
@@ -890,7 +890,7 @@ subroutine f_esmf_regrid(srcField, dstField, routehandle, zeroregion, zrpresent, | |||
|
|||
integer :: localrc | |||
type(ESMF_RouteHandle) :: l_routehandle | |||
|
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.
This whitespace change should be reverted.
@bena-nasa @oehmke @tclune - I reviewed this PR, and I have a very high level design question. Basically I am wondering why optional arg of type |
The idea was that this would be something usable from python, via the C wrappers eventually. Since there is no dynamic masking option for the C interface to regrid that was one issue. The other issue is that right now to create dynamic mask you have to pass a Fortran procedure reference which would not be possible from python. If we were just sticking to the Fortran API only then I agree with your analysis that what I've done here is overkill and what you propose would make more sense. That said, I'm no expert in C so maybe I've overlooked something. |
The way I am thinking about this wrt C and Python interfaces is that we will expose the Does that make sense? Thinking about it some more, we might not even really need the extra |
@theurich I think I understand what you are saying and seems cleaner. I just have to wrap my head around the nuts and bolts. I'll look through the code try to understand how you expose some of these Fortran classes to C, but what would be perhaps the best example of another shallow ESMF class that you expose to the C (and therefore the python) interface that I could look at as an example? Maybe something like the time class? |
@bena-nasa e.g. look at |
So the C API, routes through a C++ layer which is denoted by all the files that are named ESMCI, them from the C++ layer you are calling into the Fortran layer? Is that general pattern? And can you say something about this FTN_X function? |
Yes, that is the general pattern. Files that start with The |
Where is that FTN_X defined out of curiosity? I can't seem to find it. Also I was looking through the developers guide and saw this remark Does this report still exist? |
I was curious, so I dug into some of the usual spots for this kind of thing in ESMF. It’s defined per compiler under <ESMF_DIR>/build_config
… On Feb 18, 2025, at 3:05 PM, Ben Auer ***@***.***> wrote:
bena-nasa
left a comment
(esmf-org/esmf#350)
Where is that FTN_X defined out of curiosity? I can't seem to find it. Also I was looking through the developers guide and saw this remark
"ESMF is written in a combination of C/C++ and Fortran. Techniques used in ESMF for interfacing C/C++ and Fortran codes are described in the ESMF Implementation Report[#!bib:ESMFimplrep!#], which is available via the Users tab on the ESMF website. These techniques, which address issues of memory allocation, passing objects across language boundaries, handling optional arguments, and so on, are general and have been applied to multiple projects."
Does this report still exist?
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you were mentioned.
<#350 (comment)> <https://github.com/notifications/unsubscribe-auth/AE6A7U5QW2G2WC3PTB3QVUD2QOVCRAVCNFSM6AAAAABWICERJGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDMNRXGAZDONRWG4>
bena-nasa
left a comment
(esmf-org/esmf#350)
<#350 (comment)>
Where is that FTN_X defined out of curiosity? I can't seem to find it. Also I was looking through the developers guide and saw this remark
"ESMF is written in a combination of C/C++ and Fortran. Techniques used in ESMF for interfacing C/C++ and Fortran codes are described in the ESMF Implementation Report[#!bib:ESMFimplrep!#], which is available via the Users tab on the ESMF website. These techniques, which address issues of memory allocation, passing objects across language boundaries, handling optional arguments, and so on, are general and have been applied to multiple projects."
Does this report still exist?
—
Reply to this email directly, view it on GitHub <#350 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AE6A7U5QW2G2WC3PTB3QVUD2QOVCRAVCNFSM6AAAAABWICERJGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDMNRXGAZDONRWG4>.
You are receiving this because you were mentioned.
|
Creating PR for discussion of predefined dynamic masking as discussed in last GMAO/ESMF meeting