Skip to content

Fixes for external grid data read-in method#165

Merged
fmalatino merged 7 commits into
NOAA-GFDL:developfrom
fmalatino:feature/ext_grid
Jul 10, 2025
Merged

Fixes for external grid data read-in method#165
fmalatino merged 7 commits into
NOAA-GFDL:developfrom
fmalatino:feature/ext_grid

Conversation

@fmalatino
Copy link
Copy Markdown
Contributor

Description
This PR introduces fixes to the external grid data read-in method in generation.py. The method previously lacked a halo update and a call to fill_corners_2d.

How Has This Been Tested?
These changes have been tested outside the CI via the test located in Pace at pace/tests/mpi/ext_grid, as well as with a comparison of the output from a c12 baroclinic run using internally generated grid data and the external data.

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

@fmalatino fmalatino marked this pull request as draft June 13, 2025 15:42
@fmalatino fmalatino marked this pull request as ready for review June 13, 2025 18:15
@FlorianDeconinck
Copy link
Copy Markdown
Collaborator

So it looks good to me for a code viewpoint. I still don't really understand why we have to transpose things.

@oelbert / @fmalatino : at the very least we should have a docstring in this file or in a readme that spills out your findings

@fmalatino
Copy link
Copy Markdown
Contributor Author

So it looks good to me for a code viewpoint. I still don't really understand why we have to transpose things.

@oelbert / @fmalatino : at the very least we should have a docstring in this file or in a readme that spills out your findings

@FlorianDeconinck I do not think we need to tranpose things, this is done to match the layout already used by Pace. I can amend this if we are indifferent regarding what the layout should be.

Copy link
Copy Markdown
Collaborator

@FlorianDeconinck FlorianDeconinck left a comment

Choose a reason for hiding this comment

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

I can't judge of the scientific validity of this, since I have no idea what comes in, but code wise is ok

@fmalatino
Copy link
Copy Markdown
Contributor Author

I can't judge of the scientific validity of this, since I have no idea what comes in, but code wise is ok

@FlorianDeconinck these changes only bring in functionality for reading in longitude and latitude values generated by external sources; scientific validity is assumed to be validated within the generator.

@fmalatino fmalatino merged commit bb46c49 into NOAA-GFDL:develop Jul 10, 2025
5 checks passed
@fmalatino fmalatino deleted the feature/ext_grid branch August 26, 2025 17:17
jjuyeonkim pushed a commit to jjuyeonkim/NDSL that referenced this pull request Sep 8, 2025
* Changes needed for external grid data read-in, needed halo update and fill corners call

* Transpose of read in lon/lat arrays

* Removing transpose of data in from_external MetricTerms class method
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