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:
  • product (str) – 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

  • version (str, default most recent version) – Product version, given as a 3 digit string. If no version is given, the current version is used. Example: “007”

  • cycles (str or list[str], default all available orbital cycles) – Product cycle, given as a 2 digit string, or a list of 2-digit strings. If no cycle is given, all available cycles are used. Example: “04”

  • tracks (str or list[str], default all available reference ground tracks (RGTs)) – Product track, given as a 4 digit string, or a list of 4-digit strings. If no track is given, all available reference ground tracks are used. Example: “0594”

  • auth (earthaccess.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.

Return type:

query object

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 v007
('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.

>>> from pathlib import Path
>>> aoi = 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', str(aoi), reg_a_dates)
>>> print(reg_a)
Product ATL06 v007
('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']

See also

GenQuery

__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[, overwrite, subset, ...])

Download the granules for the order, blocking until they are ready if necessary.

latest_version()

A reference function to is2ref.latest_version.

order_granules([subset, skip_preview])

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()

Display customization/subsetting options available for this product.

skip_preview()

Skips preview for current order, if it is in preview state.

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

value pairs that will be submitted.

REQUEST_RETRY_INTERVAL_SECONDS

auth

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

concept_id

cycles

Return the unique ICESat-2 orbital cycle.

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 functionality for searching, ordering, and downloading granules for the specified product.

order_vars

This used to print the list of vasriables for subsetting, Harmony doesn't provide that for IS2 datasets.

product

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

product_version

Return the product version of the data object.

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

variables