Skip to content

PIO reader variable subsetting functionality - #420

Merged
nusbaume merged 59 commits into
ESCOMP:developmentfrom
nusbaume:pio_reader_subset
Oct 2, 2025
Merged

PIO reader variable subsetting functionality#420
nusbaume merged 59 commits into
ESCOMP:developmentfrom
nusbaume:pio_reader_subset

Conversation

@nusbaume

@nusbaume nusbaume commented Aug 25, 2025

Copy link
Copy Markdown
Collaborator

Tag name (required for release branches):
Originator(s): nusbaume

Description (include the issue title, and the keyword ['closes', 'fixes', 'resolves'] followed by the issue number):

Adds subsetting functionality to the "pio_reader" implementation of the File I/O NetCDF reader class. This includes both the ability to subset a variable via "start" and "count" optional variables, and a series of automatic Fortran unit tests to make sure the code is working as expected.

However, please note that the unit test coverage is not complete (i.e. there are certain array rank/variable type combinations that are not covered), but hopefully this is good enough to at least support what is needed for the current set of CAM-SIMA target applications.

Closes #406

Describe any changes made to build system: N/A

Describe any changes made to the namelist: N/A

List any changes to the defaults for the input datasets (e.g. boundary datasets): N/A

List all files eliminated and why: N/A

List all files added and what they do: N/A

List all existing files that have been modified, and describe the changes:
(Helpful git command: git diff --name-status development...<your_branch_name>)

M src/physics/utils/pio_reader.F90
M test/unit/fortran/src/pio_reader/test_pio_reader.pf

  • Add variable subsetting functionality to the PIO reader object.

If there are new failures (compared to the test/existing-test-failures.txt file),
have them OK'd by the gatekeeper, note them here, and add them to the file.
If there are baseline differences, include the test and the reason for the
diff. What is the nature of the change? Roundoff?

derecho/intel/aux_sima: All pass excluding known test failures (the multitape test).

derecho/gnu/aux_sima: ALL PASS

If this changes climate describe any run(s) done to evaluate the new
climate in enough detail that it(they) could be reproduced:

CAM-SIMA date used for the baseline comparison tests if different than latest:

…test error message, flip errmsg/errcode, and add variable declarations.
@nusbaume nusbaume self-assigned this Aug 25, 2025
@nusbaume nusbaume added the enhancement New feature or request label Aug 25, 2025
@nusbaume nusbaume added testing system Related to SIMA testing and/or test scripts and removed testing system Related to SIMA testing and/or test scripts labels Aug 25, 2025

@jimmielin jimmielin left a comment

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.

Thanks @nusbaume making this really important functionality possible! I have two suggested changes which hopefully are straightforward to fix.

Comment thread src/physics/utils/pio_reader.F90
Comment thread src/physics/utils/pio_reader.F90 Outdated
@nusbaume
nusbaume requested a review from jimmielin September 12, 2025 14:28

@jimmielin jimmielin left a comment

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.

Thanks @nusbaume!

@peverwhee peverwhee left a comment

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.

Looks good, and I confirmed it works as expected for the solar irradiance data in CAM-SIMA

@nusbaume
nusbaume merged commit 2417f36 into ESCOMP:development Oct 2, 2025
12 checks passed
@nusbaume
nusbaume deleted the pio_reader_subset branch October 2, 2025 19:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

Status: Tag

Development

Successfully merging this pull request may close these issues.

3 participants