icesat2py / icepyx

Python tools for obtaining and working with ICESat-2 data
https://icepyx.readthedocs.io/en/latest/
BSD 3-Clause "New" or "Revised" License
203 stars 101 forks source link

Update read module coordinate dimension manipulations to use new xarray index #473

Closed JessicaS11 closed 8 months ago

JessicaS11 commented 8 months ago

Since the data read-in module was built, xarray has added explicit indexing, which was causing a warning (read.py:599: UserWarning: rename 'delta_time' to 'photon_idx' does not create an index anymore. Try using swap_dims instead or use set_index after rename to create an indexed coordinate.) to appear during the reader.load() step when coordinate dimensions were manipulated internally. This PR updates that portion of the code to use .swap_dims, greatly simplifying it and removing the warning.

github-actions[bot] commented 8 months ago

Binder :point_left: Launch a binder notebook on this branch for commit 9bcfd09783240866ceca8b5bb38fc0b2c1dca5bb

I will automatically update this comment whenever this PR is modified