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

More work on NUOPC cap - DO NOT MERGE YET! #27

Merged
merged 11 commits into from
Jan 26, 2024

Conversation

uturuncoglu
Copy link
Contributor

This Pr aims to update NUOPC cap to support configurations under UFS Coastal Model.

@@ -573,8 +579,17 @@ subroutine SCHISM_StateUpdate1(state, name, farray, kwe, isPtr, rc)

if (intent == ESMF_STATEINTENT_IMPORT) then

do ip = 1, isPtr%numOwnedNodes
farray(isPtr%ownedNodeIds(ip)) = farrayPtr1(ip)
! all nodes that construct the element will get same value
Copy link
Member

Choose a reason for hiding this comment

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

Before accepting this change, we have to consider why we would project node vars onto elems. Shouldn't we rather just make sure that the size of farray is matching with the node / elem based vars and then based on meshloc info not project?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@platipodium I placed if statements to the function to work differently in node vs element. I did not check the node version yet but I'll do. Please wait for my confirmation that node (with ESMf connector) is also working as expected before merging the PR.

Copy link
Member

@platipodium platipodium left a comment

Choose a reason for hiding this comment

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

Please see the individual comments

@uturuncoglu
Copy link
Contributor Author

@platipodium Thanks. I add couple of more things to fix the current. I'll look at your review tomorrow and fix the issues. Thanks again.

Copy link
Member

@josephzhang8 josephzhang8 left a comment

Choose a reason for hiding this comment

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

Thx @uturuncoglu . The changes look fine to me.

On another thread you seemed to imply you made changes to downtream. Shall we update ufs-coastal and redo RT? THx

@platipodium: can u plz review/approve. Thx

@platipodium platipodium marked this pull request as ready for review November 6, 2023 12:37
@uturuncoglu
Copy link
Contributor Author

@platipodium I did changes for your review. The last thing is test the datm+schism configuration with ESMF connectors and also using meshloc node, which is default at this point.

@uturuncoglu uturuncoglu changed the title DRAFT: More work on NUOPC cap - DO NOT MERGE YET! More work on NUOPC cap - DO NOT MERGE YET! Nov 6, 2023
@uturuncoglu
Copy link
Contributor Author

@platipodium I checked the datm+schism case with connector and node based implementation. The model seems working but when I checked the import state I could see following weird patten,

Screenshot 2023-11-06 at 4 23 56 PM

As you can see, there is a region with full of zeros in the import state which also aligns with the decomposition elements. I also checked the model native output using VisIt and probably we have similar issue in there too,

Screenshot 2023-11-06 at 4 32 36 PM

This gets more smooth in the model output once the model progress in time. So, we might need to look at more carefully and if you would like to retain the node based approach, this needs to be fixed in the model side. Maybe this is can be fixed if you apply halo update after receiving ESMF fields (maybe you are already doing it, not sure). I could also try with the code version before we introduce the element based approach to eliminate any missing code to retain both approach but I think this was also exist but not exposed. To that end, Have you ever checked import and export states visually before.

I am not sure but this might not be an issue in CoastalApp since in those configurations uses custom data atmosphere (ATMMESH) in there and it was always providing data with the same resolution of the model and using redist in the connectors. In our case, CDEPS data atmosphere is not in the same resolution with the model and we are using bilinear with NUOPC connectors. Other than this the PR seems good to me. Anyway, let me know how you want to proceed.

@josephzhang8
Copy link
Member

@uturuncoglu I also recalled something similar (not same) to this, when we were playing with node based partitioning. Halo exchange was part of the problem and Robert O.'s solution seemed to solve the issue eventually. Anyway, my guess this is related now to the halo... thx

@uturuncoglu
Copy link
Contributor Author

@josephzhang8 Yes, it seems like that. Just to clarify, the last run that I mentioned is using node based partitioning along with the NUOPC connectors. So, this case must be same with the original code that supports only node based partitioning. Anyway, I'll look at more to find out any part that needs conditional (element vs. node).

@platipodium platipodium merged commit 9fc62b2 into schism-dev:master Jan 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants