Modis

pansat.products.satellite.modis

This module define the MODIS product class, which is used to represent all MODIS products.

class pansat.products.satellite.modis.MODISProduct(product_name)

Base class for MODIS product.

__init__(product_name)
__str__()

The full product name.

_get_provider()

Find a provider that provides the product.

property default_destination

The default destination for CloudSat product is MODIS/<product_name>>

download(start_time, end_time, destination=None, provider=None)

Download data product for given time range.

Parameters:
  • start_time (datetime) – datetime object defining the start date of the time range.

  • end_time (datetime) – datetime object defining the end date of the of the time range.

  • destination (str or pathlib.Path) – The destination where to store the output data.

filename_to_date(filename)

Extract timestamp from filename.

Parameters:

filename (str) – Filename of a MODIS product.

Returns:

datetime object representing the timestamp of the

filename.

matches(filename)

Determines whether a given filename matches the pattern used for the product.

Parameters:

filename (str) – The filename

Returns:

True if the filename matches the product, False otherwise.

open(filename)

Open file as xarray dataset.

Parameters:

filename (pathlib.Path or str) – The MODIS file to open.