-
Notifications
You must be signed in to change notification settings - Fork 39
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
Cryo 84: Refactor tutorials to use earthaccess and xarray #91
base: main
Are you sure you want to change the base?
Conversation
Check out this pull request on See visual diffs & provide feedback on Jupyter Notebooks. Powered by ReviewNB |
👈 Launch a binder notebook on this branch for commit 1715ba0 I will automatically update this comment whenever this PR is modified |
View / edit / reply to this conversation on ReviewNB flamingbear commented on 2025-01-07T16:28:07Z
I actually think this is HDF5 and not xarray.
|
View / edit / reply to this conversation on ReviewNB flamingbear commented on 2025-01-07T16:28:08Z Line #1. dt = xr.open_datatree(filelist[0], phony_dims='sort') In my notebook I don't need phony_dims keyword, but I might have a different env, and not using h5netcdf. I hope that doesn't really change how the datatrees behave. |
View / edit / reply to this conversation on ReviewNB flamingbear commented on 2025-01-07T16:28:08Z
dt["Soil_Moisture_Retrieval_Data_AM"].ds = \ dt["Soil_Moisture_Retrieval_Data_AM"].ds.rename( { 'phony_dim_0': 'y', 'phony_dim_1': 'x', 'phony_dim_2': 'igbp_class' }
|
View / edit / reply to this conversation on ReviewNB flamingbear commented on 2025-01-07T16:28:09Z Of course I just said that you didn't need to do update but I don't actually see the Dimensions in the root doing it my way. And I just verified that behavior. It's probably a bug. So if you want the dims recognized I think you'll have to use the update function. |
@andypbarrett Unfortunately I think you are doing it properly for the moment, but this looks like the right direction. If I get a chance I'll see if I can create a stripped down example and file a bug on the repo. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh. One last thing. I noticed the versions for smap in the download data notebooks were 008 and I couldn't get any data without bumping them to 009.
This PR updates the SMAP tutorials to use earthaccess and xarray
Methods are included to load SMAP L3 data into
xarray.DataTree
and add coordinates.