SlideRuleEarth / sliderule-python

SlideRule Earth Example Notebooks: On-demand, cloud-based processing of satellite mission data (NASA ICESat-2, GEDI, ArcticDEM/REMA, HLS)
https://slideruleearth.io/rtd/
BSD 3-Clause "New" or "Revised" License
41 stars 21 forks source link

Problem when saving NetCDF files #75

Closed slhowardESR closed 2 years ago

slhowardESR commented 2 years ago

I have been having problems trying to save a file to netCDF.

Saving to h5 files works fine.

However, when I try to save same dataframe in a netcdf file I get this error:

dist_err

I can just delete distance and it works:

dist_works

Anyway - I can make things work, but wanted to pass this along.

jpswinski commented 2 years ago

@slhowardESR Thanks for catching this bug and reporting it. I see the same thing in my setup. It looks like a field was added to the atl06 record returned from the server, but we didn't update the io module code to reflect it.

I have a fix in my local branch, and the next release (hopefully late next week), will have the fix in it. I'll let you know as soon as it is released so you can do an update.

jpswinski commented 2 years ago

Ran the following code snippet and verified it worked:

from sliderule import icesat2, ipysliderule, io
SRwidgets = ipysliderule.widgets()
parmsyp = {}
version = icesat2.get_version()
parmsyp['version'] = version['icesat2']['version']
parmsyp['commit'] = version['icesat2']['commit']
io.to_file(atl06_sr, SRwidgets.file, format=SRwidgets.format, driver='pytables', parameters=parmsyp, verbose=True)
jpswinski commented 2 years ago

@slhowardESR Please update your sliderule client and things should work now.

cd sliderule-python
git pull
python setup.py install