Skip to content
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

fixing bug, now takes only history attr #416

Merged
merged 3 commits into from
May 23, 2024
Merged

Conversation

Daafip
Copy link
Collaborator

@Daafip Daafip commented May 23, 2024

Copied over reserved variables. Now just takes the wanted variable.

See Unidata/netcdf4-python#1020

@Daafip Daafip marked this pull request as ready for review May 23, 2024 11:23
@Daafip Daafip requested a review from BSchilperoort May 23, 2024 11:30
@BSchilperoort
Copy link
Contributor

Copied over reserved variables

strange how it copies reserved names which it doesn't show :/

>>> ds.attrs
{'history': 'Wed Mar 27 16:11:00 2024: /usr/bin/ncap2 -s time=double(time) -O Caravan/camels.nc Caravan/camels.nc\nMerged together from separate files; All forcing and state variables are derived from ERA5-Land hourly by ECMWF. Streamflow data was taken from the CAMELS (US) dataset by Newman et al. (2014).', 'NCO': 'netCDF Operators version 5.0.6 (Homepage = http://nco.sf.net, Code = http://github.com/nco/nco)'}

Nothing weird here, but I guess there is some stuff hidden?

Copy link
Contributor

@BSchilperoort BSchilperoort left a comment

Choose a reason for hiding this comment

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

Thanks for fixing this. I assume you ran Rolf's notebook successfully after this change? If so feel free to merge after updating the changelog.

@Daafip
Copy link
Collaborator Author

Daafip commented May 23, 2024

I assume you ran Rolf's notebook successfully after this change?

yup https://gist.github.com/Daafip/8fb62aea4abba00c938a0b117a25b9d3

Copy link

sonarcloud bot commented May 23, 2024

@Daafip Daafip merged commit 676d824 into main May 23, 2024
4 checks passed
@Daafip Daafip deleted the fix_bug_caravan_forcing branch May 23, 2024 13:01
@Daafip
Copy link
Collaborator Author

Daafip commented May 23, 2024

Nothing weird here, but I guess there is some stuff hidden?

_NCProperties to be precise, which is a reserved attribute name, so if you pass that to a new dataset it doesn't like it

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.

None yet

2 participants