podpac.datalib.SMAP

class podpac.datalib.SMAP(**kwargs)[source]

Bases: podpac.datalib.smap.SMAPSessionMixin, podpac.core.compositor.OrderedCompositor

Compositor of all the SMAPDateFolder’s for every available SMAP date. Essentially a compositor of all SMAP data for a particular product.

base_url

Url to nsidc openDAP server

Type

str

date_url_re

Regular expression used to extract all folder dates (or folder names) for the particular SMAP product.

Type

SRE_Pattern

layer_key

Key used to retrieve data from OpenDAP dataset. This specifies the key used to retrieve the data

Type

str

product

SMAP product name

Type

str

Alternative Constructors

from_definition(definition)

Create podpac Node from a dictionary definition.

from_json(s)

Create podpac Node from a JSON definition.

Methods

__init__(**kwargs)

Do not overwrite me

composite(coordinates, data_arrays[, result])

Composites data_arrays in order that they appear.

create_output_array(coords[, data])

Initialize an output data array

eval(coordinates[, output])

Evaluates this nodes using the supplied coordinates.

eval_group(group)

Evaluate the node for each of the coordinates in the group.

find_coordinates()

The coordinates of the data source.

from_url(url)

Create podpac Node from a WMS/WCS request.

get_cache(key[, coordinates])

Get cached data for this node.

get_filename_coordinates_sources([bounds, …])

Returns coordinates solely based on the filenames of the sources.

has_cache(key[, coordinates])

Check for cached data for this node.

init()

Overwrite this method if a node needs to do any additional initialization after the standard initialization.

iteroutputs(coordinates)

Summary

load(path)

Create podpac Node from file.

put_cache(data, key[, coordinates, overwrite])

Cache data for this node.

rem_cache(key[, coordinates, mode])

Clear cached data for this node.

save(path)

Write node to file.

select_sources(coordinates)

Downselect compositor sources based on requested coordinates.

set_credentials([username, password])

Shortcut to podpac.authentication.set_crendentials() using class member self.hostname for the hostname

trait_is_defined(name)

Attributes

attrs

List of node attributes

auth_required

available_dates

base_ref

Summary

base_url

A trait for unicode strings.

cache_ctrl

A trait whose value must be an instance of a specified class.

cache_output

A boolean (True, False) trait.

cache_update

A boolean (True, False) trait.

date_url_re

definition

dtype

A trait which allows any value.

hash

hostname

interpolation

is_source_coordinates_complete

A boolean (True, False) trait.

json

json_pretty

keys

Available layers that are in the OpenDAP dataset

layer_key

A trait for unicode strings.

output

outputs

password

Returns password stored in settings for accessing self.hostname.

product

An enum whose value must be in a given sequence.

product_url

session

shared_coordinates

source_coordinates

sources

style

A trait whose value must be an instance of a specified class.

units

A trait for unicode strings.

username

Returns username stored in settings for accessing self.hostname.

version

An int trait.

Members

__init__(**kwargs)

Do not overwrite me

property available_dates
property base_ref

Summary

Returns

Description

Return type

TYPE

base_url

A trait for unicode strings.

date_url_re = re.compile('[0-9]{4}\\.[0-9]{2}\\.[0-9]{2}')
find_coordinates()[source]

The coordinates of the data source.

Notes

These coordinates are computed, assuming dataset is regular.

get_filename_coordinates_sources(bounds=None, update_cache=False)[source]

Returns coordinates solely based on the filenames of the sources. This function was motivated by the SMAP-Sentinel product, which does not have regularly stored tiles (in space and time).

Parameters
  • bounds (Coordinates, Optional) – Default is None. Return the coordinates based on filenames of the source only within the specified bounds. When not None, the result is not cached.

  • update_cache (bool, optional) – Default is False. The results of this call are automatically cached to disk. This function will try to update the cache if new data arrives. Only set this flag to True to rebuild_auth the entire index locally (which may be needed when version numbers in the filenames change).

Returns

  • Coordinates – Coordinates of all the sources in the product family

  • Container – Container that will generate an array of the SMAPSources pointing to unique OpenDAP urls corresponding to the returned coordinates

Notes

The outputs of this function can be used to find source that overlap spatially or temporally with a subset region specified by the user.

If ‘bounds’ is not specified, the result is cached for faster future access after the first invocation.

This call uses NASA’s Common Metadata Repository (CMR) and requires an internet connection.

property keys

Available layers that are in the OpenDAP dataset

Returns

The list of available keys from the OpenDAP dataset. Any of these keys can be set as self.data_key.

Return type

List

Notes

This function assumes that all of the keys in the available dataset are the same for every file.

layer_key

A trait for unicode strings.

output = None
outputs = None
product

An enum whose value must be in a given sequence.

property shared_coordinates
property source_coordinates
property sources
version

An int trait.