icepyx
icepyx copied to clipboard
reader fails when all beams aren't present in file
As per this excellent error writeup, @tlohde demonstrated that when subsetting is applied during the data ordering process and that removes some beams from a granule, the icepyx reader
module fails.
Please see the discussion at the link above for more information and reach out if you'd like to help us with a bug fix!
Hello team Icepyx,
I am running into the same problem with reader.load(). When I try to load the data use reader.load(), this returns a KeyError: ‘orbit_info’. When running region_a.order_granules(), I also noticed that four granules are missing some data (e.g. ‘Granule 229005537 contained no data within the spatial and/or temporal subset constraints to be processed’).
My intention is to use the ICESat2 ATL06 v05 product to look at elevation change/anomalies over a small region of the East Antarctic Ice Sheet. I want to be able to visualise the data, and then potentially later convert to a geopandas dataframe to work further with it in GIS.
Have you got any suggestions for dealing with this error?
My download query and code for loading the data is:
short_name = 'ATL06'
spatial_extent = "filepath to polygon shapefile"
date_range = ['2020-01-01','2020-02-28']
region_a = ipx.Query(short_name, spatial_extent, date_range)
region_a.earthdata_login(earthdata_uid, email)
region_a.order_vars.append(defaults=True,var_list=['latitude','longitude','h_li'])
region_a.subsetparams(Coverage=region_a.order_vars.wanted)
region_a.order_granules(verbose=True, subset=True, email=True)
region_a.download_granules(path)
path_root = 'filepath to download location'
pattern = "processed_ATL{product:2}_{datetime:%Y%m%d%H%M%S}_{rgt:4}{cycle:2}{orbitsegment:2}_{version:3}_{revision:2}.h5"
reader = ipx.Read(data_source=path_root, product="ATL06", filename_pattern=pattern)
reader.vars.append(var_list=['h_li', 'latitude', 'longitude'])
ds = reader.load()
ds
Thanks for reporting that you're also having this issue, @JennyFArthur (and I noted that you also posted on Discourse). Unfortunately, no one has come forward to work on a bug fix, and I haven't gotten to it yet either. Were you able to try any of the potential near-term solutions suggested in the Discourse thread?