icepyx.Read

class icepyx.Read(data_source, glob_kwargs={}, out_obj_type=None)

Data object to read ICESat-2 data into the specified formats. Provides flexibility for reading nested hdf5 files into common analysis formats.

Parameters:
  • data_source (string, Path, List) – A string, pathlib.Path object, or list which specifies the files to be read. The string can be either: 1) the path of a single file 2) the path to a directory or 3) a [glob string](https://docs.python.org/3/library/glob.html). The List must be a list of strings, each of which is the path of a single file.

  • glob_kwargs (dict, default {}) – Additional arguments to be passed into the [glob.glob()](https://docs.python.org/3/library/glob.html#glob.glob)function

  • out_obj_type (object, default xarray.Dataset) – The desired format for the data to be read in. Currently, only xarray.Dataset objects (default) are available. Please ask us how to help enable usage of other data objects!

Return type:

read object

Examples

Reading a single file >>> ipx.Read(‘/path/to/data/processed_ATL06_20190226005526_09100205_006_02.h5’) # doctest: +SKIP

Reading all files in a directory >>> ipx.Read(‘/path/to/data/’) # doctest: +SKIP

Reading files that match a particular pattern (here, all .h5 files that start with processed_ATL06_). >>> ipx.Read(‘/path/to/data/processed_ATL06_*.h5’) # doctest: +SKIP

Reading a specific list of files >>> list_of_files = [ … ‘/path/to/data/processed_ATL06_20190226005526_09100205_006_02.h5’, … ‘/path/to/more/data/processed_ATL06_20191202102922_10160505_006_01.h5’, … ] >>> ipx.Read(list_of_files) # doctest: +SKIP

__init__(data_source, glob_kwargs={}, out_obj_type=None)

Methods

__init__(data_source[, glob_kwargs, ...])

load()

Create a single Xarray Dataset containing the data from one or more files and/or ground tracks.

Attributes

auth

Authentication object returned from earthaccess.login() which stores user authentication.

filelist

Return the list of files represented by this Read object.

product

Return the product associated with the Read object.

s3login_credentials

A dictionary which stores login credentials for AWS s3 access.

session

Earthaccess session object for connecting to Earthdata resources.

variables

Return the variables object associated with the data being read in.