Skip to content

Feature/mpp/update_domains#27

Merged
fmalatino merged 12 commits intomainfrom
feature/mpp
Apr 16, 2025
Merged

Feature/mpp/update_domains#27
fmalatino merged 12 commits intomainfrom
feature/mpp

Conversation

@fmalatino
Copy link
Copy Markdown
Owner

@fmalatino fmalatino commented Mar 30, 2025

Description
This PR brings in the update_domains method from cFMS.

How Has This Been Tested?
Tested using Python port of existing unit test in cFMS, test_update_domains

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • Any dependent changes have been merged and published in downstream modules
  • New check tests, if applicable, are included

@mlee03
Copy link
Copy Markdown
Collaborator

mlee03 commented Apr 11, 2025

Is this PR a draft because it was waiting for cFMS?

@fmalatino
Copy link
Copy Markdown
Owner Author

Is this PR a draft because it was waiting for cFMS?

Yes. Once 26 is merged in cFMS I will update this one and open it for review.

@fmalatino fmalatino marked this pull request as ready for review April 15, 2025 13:50
Comment thread tests/py_mpp/test_update_domains.py Outdated
@pytest.mark.parallel
def test_update_domains():

NX = 8
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

These don't need to be capitalized. They were capitalized in cFMS because they wre defined as macros.

Comment thread tests/py_mpp/test_update_domains.py Outdated
)

if mpp.pe() == 0:
assert idata[ix][iy] == answers[0][ix][iy]
Copy link
Copy Markdown
Collaborator

@mlee03 mlee03 Apr 15, 2025

Choose a reason for hiding this comment

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

I am not following this assert here. is it only checking for rank 0,.. for a value of ix and iy? It should check for all ranks and for alll array elements

@fmalatino fmalatino requested a review from mlee03 April 15, 2025 19:05
Comment thread tests/py_mpp/test_update_domains.py Outdated
nhalo=nhalo,
)

for ix in range(xsize_d):
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

np.all()

Comment thread tests/py_mpp/test_update_domains.py Outdated

for ix in range(xsize_d):
for iy in range(ysize_d):
if mpp.pe() == 0:
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

you need to test for all pe's

@fmalatino fmalatino requested a review from mlee03 April 16, 2025 00:33
@fmalatino fmalatino merged commit ab67ad0 into main Apr 16, 2025
1 check passed
mlee03 pushed a commit to mlee03/pyFMS_old that referenced this pull request Apr 21, 2025
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.

2 participants