-
Notifications
You must be signed in to change notification settings - Fork 92
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
Indexing fix in multiple python scripts #1287
Merged
Merged
Conversation
This file contains 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
…ation, the code would crash with scalars. The updates should be equivalent to the old code but do not cause errors.
glemieux
added
the
type: tools
This PR adds or updates support tools. No regression testing necessary.
label
Nov 18, 2024
…ython/netcdf libraries, the lack of nc extension has caused the function to crash.
I copied this from FatesPFTIndexSwapper.py, because the code was giving an attribute error.
Apparently this is different between scipy/io/netcdf and netCDF4
Fixing a bug I introduced when I replaced variable retrieval with variables.get. I had forgotten to replace square brackets with parentheses.
mpaiao
changed the title
Indexing fix in FatesPFTIndexSwapper.py
Indexing fix in multiple python scripts
Nov 18, 2024
rgknox
reviewed
Nov 22, 2024
rgknox
reviewed
Nov 22, 2024
These fixes were necessary to get UpdateParamAPI.py working (which calls a few of these routines). UpdateParamAPI.py will be needed to advance our parameter file API changes coming down the line. Lets prioritize this if possible. |
rgknox
approved these changes
Dec 26, 2024
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.
Minor updates on multiple python scripts, for indexing and for using netcdf from scipy.io libraries
Description:
I don't know if this is only happening on my computer, but
FatesPFTIndexSwapper.py
started to issue the following indexing error when it attempted to copy scalars:The suggested change in the code seems to work fine (though I still get the RuntimeWarning message). I made similar updates in a few other scripts. I also updated
ncvarsort.py
to use scipy.Collaborators:
Expectation of Answer Changes:
No change in the FATES code, just the tool.
Checklist
If this is your first time contributing, please read the CONTRIBUTING document.
All checklist items must be checked to enable merging this pull request:
Contributor
Integrator
Documentation
Test Results:
CTSM (or) E3SM (specify which) test hash-tag:
CTSM (or) E3SM (specify which) baseline hash-tag:
FATES baseline hash-tag:
Test Output: