icepyx.Query

class icepyx.Query(product=None, spatial_extent=None, date_range=None, start_time=None, end_time=None, version=None, cycles=None, tracks=None, auth=None, **kwargs)

Query and get ICESat-2 data

ICESat-2 Data object to query, obtain, and perform basic operations on available ICESat-2 data products using temporal and spatial input parameters. Allows the easy input and formatting of search parameters to match the NASA NSIDC DAAC and (development goal-not yet implemented) conversion to multiple data types. Expands the superclass GenQuery.

See the doc page for GenQuery for details on temporal and spatial input parameters.

Parameters:
productstring

ICESat-2 data product ID, also known as “short name” (e.g. ATL03). Available data products can be found at: https://nsidc.org/data/icesat-2/data-sets

versionstring, default most recent version

Product version, given as a 3 digit string. If no version is given, the current version is used. Example: “006”

cyclesstring or a list of strings, default all available orbital cycles

Product cycle, given as a 2 digit string. If no cycle is given, all available cycles are used. Example: “04”

tracksstring or a list of strings, default all available reference ground tracks (RGTs)

Product track, given as a 4 digit string. If no track is given, all available reference ground tracks are used. Example: “0594”

authearthaccess.auth.Auth, default None

An earthaccess authentication object. Available as an argument so an existing earthaccess.auth.Auth object can be used for authentication. If not given, a new auth object will be created whenever authentication is needed.

Returns:
query object

See also

GenQuery

Examples

Initializing Query with a bounding box.

>>> reg_a_bbox = [-55, 68, -48, 71]
>>> reg_a_dates = ['2019-02-20','2019-02-28']
>>> reg_a = Query('ATL06', reg_a_bbox, reg_a_dates)
>>> print(reg_a)
Product ATL06 v006
('bounding_box', [-55.0, 68.0, -48.0, 71.0])
Date range ['2019-02-20', '2019-02-28']

Initializing Query with a list of polygon vertex coordinate pairs.

>>> reg_a_poly = [(-55, 68), (-55, 71), (-48, 71), (-48, 68), (-55, 68)]
>>> reg_a_dates = ['2019-02-20','2019-02-28']
>>> reg_a = Query('ATL06', reg_a_poly, reg_a_dates)
>>> reg_a.spatial_extent
('polygon', [-55.0, 68.0, -55.0, 71.0, -48.0, 71.0, -48.0, 68.0, -55.0, 68.0])

Initializing Query with a geospatial polygon file.

>>> aoi = str(Path('./doc/source/example_notebooks/supporting_files/simple_test_poly.gpkg').resolve())
>>> reg_a_dates = ['2019-02-22','2019-02-28']
>>> reg_a = Query('ATL06', aoi, reg_a_dates)
>>> print(reg_a)
Product ATL06 v006
('polygon', [-55.0, 68.0, -55.0, 71.0, -48.0, 71.0, -48.0, 68.0, -55.0, 68.0])
Date range ['2019-02-22', '2019-02-28']
__init__(product=None, spatial_extent=None, date_range=None, start_time=None, end_time=None, version=None, cycles=None, tracks=None, auth=None, **kwargs)

Methods

__init__([product, spatial_extent, ...])

avail_granules([ids, cycles, tracks, cloud])

Obtain information about the available granules for the query object's parameters.

download_granules(path[, verbose, subset, ...])

Downloads the data ordered using order_granules.

earthdata_login([uid, email, s3token])

Authenticate with NASA Earthdata to enable data ordering and download.

latest_version()

A reference function to is2ref.latest_version.

order_granules([verbose, subset, email])

Place an order for the available granules for the query object.

product_all_info()

Display all metadata about the product of interest (the collection).

product_summary_info()

Display a summary of selected metadata for the specified version of the product of interest (the collection).

show_custom_options([dictview])

Display customization/subsetting options available for this product.

subsetparams(**kwargs)

Display the subsetting key:value pairs that will be submitted.

visualize_elevation()

Visualize elevation requested from OpenAltimetry API using datashader based on cycles https://holoviz.org/tutorial/Large_Data.html

visualize_spatial_extent()

Creates a map displaying the input spatial extent

Attributes

CMRparams

Display the CMR key:value pairs that will be submitted.

auth

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

cycles

Return the unique ICESat-2 orbital cycle.

dataset

Legacy property included to provide depracation warning.

dates

Return an array showing the date range of the query object.

end_time

Return the end time specified for the end date.

granules

Return the granules object, which provides the underlying funtionality for searching, ordering, and downloading granules for the specified product.

order_vars

Return the order variables object.

product

Return the short name product ID string associated with the query object.

product_version

Return the product version of the data object.

reqparams

Display the required key:value pairs that will be submitted.

s3login_credentials

A dictionary which stores login credentials for AWS s3 access.

session

Earthaccess session object for connecting to Earthdata resources.

spatial

Return the spatial object, which provides the underlying functionality for validating and formatting geospatial objects.

spatial_extent

Return an array showing the spatial extent of the query object. Spatial extent is returned as an input type (which depends on how you initially entered your spatial data) followed by the geometry data. Bounding box data is [lower-left-longitude, lower-left-latitute, ... upper-right-longitude, upper-right-latitude]. Polygon data is [longitude1, latitude1, longitude2, latitude2, ... longitude_n,latitude_n, longitude1,latitude1].

start_time

Return the start time specified for the start date.

temporal

Return the Temporal object containing date/time range information for the query object.

tracks

Return the unique ICESat-2 Reference Ground Tracks