Fix units and long names of derived ERA5 variables - #521
Merged
Merged
Conversation
height kept the geopotential attributes, wnd_azimuth the u100 wind component's, and solar_altitude/solar_azimuth inherited latitude's long_name. Set the right units and names; values are unchanged. Closes PyPSA#509
fneum
approved these changes
Oct 3, 2026
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.
Closes #509.
Changes proposed in this Pull Request
Sets the
unitsandlong_nameof the derived ERA5 variables that carried attributes from their inputs:height:m,Height(wasm**2 s**-2,Geopotential)wnd_azimuth:rad,100 metre wind azimuth(was theu100component'sm s**-1)solar_altitude/solar_azimuth:long_namesolar altitude/solar azimuth(waslatitude), set inSolarPositionOnly metadata changes; values are the same. The helpers are shared, so
era5-edhgets the same fix. I left the capitalisation of the otherlong_names (point 4 in the issue) as they are.test/test_era5_attrs.pybuilds small synthetic datasets and checks the attributes, so it needs no download; all three tests fail on master. The other offline tests give the same results as on master (the failures there need network or cutouts).Checklist
doc.environment.yaml,environment_docs.yamlandsetup.py(if applicable).doc/release_notes.rstof the upcoming release is included.