PIO reader variable subsetting functionality - #420
Merged
Conversation
…eck and related unit tests.
…ciated unit test.
…ed to the correct size.
…test error message, flip errmsg/errcode, and add variable declarations.
…nal 'count' size checks.
…to easily work with PIO).
jimmielin
requested changes
Sep 9, 2025
jimmielin
approved these changes
Sep 12, 2025
peverwhee
approved these changes
Oct 2, 2025
peverwhee
left a comment
Collaborator
There was a problem hiding this comment.
Looks good, and I confirmed it works as expected for the solar irradiance data in CAM-SIMA
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
If there are new failures (compared to the
test/existing-test-failures.txtfile),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: