Skip to content

Modistools

Functionality for downloading MODIS land products subsets.

Fetches data from https://modis.ornl.gov/data/modis_webservice.html using MODISTools as client.

Requires MODISTools. Install with

install.packages("MODISTools")

Use modis_dates(product, lon, lat) to get list of available years.

Extent

Bases: BaseModel

Extent to sample.

Attributes:

Name Type Description
horizontal float

Left right extent to sample in kilometers.

vertical float

Above below extent to sample in kilometers.

ModisSinglePoint

Bases: Dataset

MODIS land products subsets for single point.

Attributes:

Name Type Description
years

timerange. For example years=[2000, 2002] downloads data for three years.

resample

Resample the dataset to a different time resolution. If None, no resampling.

point Tuple[float, float]

provided as a tuple of [longitude, latitude] in WGS84 projection.

product str

A MODIS product. Use modis_products() to get list of available products.

bands conset(str, min_items=1)

MODIS product bands. Use modis_bands(product) to get list of available bands for a product.

extent Extent

By default a single pixel returned. Give custom extend to get more pixels around point as dictionariy of the form {"horizontal": 12, "vertical": 34}

download()

Download the data.

Only downloads if data is not in CONFIG.cache_dir or CONFIG.force_override is TRUE.

load()

Load the dataset from disk into memory.

This may include pre-processing operations as specified by the context, e.g. filter certain variables, remove data points with too many NaNs, reshape data.

ModisMultiplePoints

Bases: Dataset

MODIS land products subsets for multiple points.

Attributes:

Name Type Description
years

timerange. For example years=[2000, 2002] downloads data for three years.

resample

Resample the dataset to a different time resolution. If None, no resampling.

points Union[Sequence[Tuple[float, float]], PointsFromOther]

provided as a list of points like so: [[longitude, latitude], ...] in WGS84projection.

product str

A MODIS product. Use modis_products() to get list of available products.

bands conset(str, min_items=1)

MODIS product bands. Use modis_bands(product) to get list of available bands for a product.

download()

Download the data.

Only downloads if data is not in CONFIG.cache_dir or CONFIG.force_override is TRUE.

load()

Load the dataset from disk into memory.

This may include pre-processing operations as specified by the context, e.g. filter certain variables, remove data points with too many NaNs, reshape data.

modis_products()

List all available products.

modis_bands(product)

List all available bands for a given product.

modis_dates(product, lon, lat)

List all available dates (temporal coverage) for a given product and location.