Closed 1kaiser closed 1 year ago
@rwegener2 I can't assign you yet since I just sent your org invite. I believe this issue is resolved, but confirming that would give you a good chance to go through the linked workflow notebook and get a sense for using icepyx to read in data.
mam now i use from colab with the data from earth data cloud
filename_1 = "/content/processed_ATL03_20200531180255_10110706_005_01.h5" #@param {type:"string"}
filename_2 = "/content/processed_ATL03_20200211111433_07140602_005_01.h5" #@param {type:"string"}
tr_1 = "gt1l" #@param ["gt1l", "gt1r", "gt2l", "gt2r", "gt3l", "gt3r"]
tr_2 = "gt1r" #@param ["gt1l", "gt1r", "gt2l", "gt2r", "gt3l", "gt3r"]
################################################################################
def get_height_lat_lon(filename, track_name):
# Open the HDF5 file and extract data
f = h5py.File(filename, 'r')
h_ph_data = f['/'+str(track_name)+'/heights/h_ph']
lat_ph_data = f['/'+str(track_name)+'/heights/lat_ph']
lon_ph_data = f['/'+str(track_name)+'/heights/lon_ph']
return h_ph_data, lat_ph_data, lon_ph_data
################################################################################
h_ph_data1, lat1, lon1 = get_height_lat_lon(filename_1, tr_1)
h_ph_data2, lat2, lon2 = get_height_lat_lon(filename_2, tr_2)
but thank yu for replying 🙏😁🥳✅
I have re-run the linked notebook with icepyx version 0.7.0 and for me it runs fine through the line ds = reader.load()
. The only changes I needed to make to the notebook for it to run through that point are:
root_path
variable to a filepath on my own machinepattern
string (commented by default) to match all three of the downloaded filesMoving to the next line to extract a single profile it seems the variable names have changed. I changed the line profile = ds.sel(spot=1).isel(gran_idx=0)
to profile = ds.sel(profile='profile_1').isel(gran_idx=0)
and the plot then gets rendered nicely.
I suggest we update this line of the docs, but otherwise it appears that this example notebook is running smoothly.
https://github.com/icesat2py/icepyx/blob/atmos/doc/source/example_notebooks/IS2_ATL09_workflow.ipynb