TERRA

https://docs.terrascope.be/#/Developers/WebServices/TerraCatalogue/ProductDownload

default_post_processors(product_name, req_vars=['ndvi', 'r0'])

Given a product_name and a list of requested variables, returns a dictionary with a list of functions per variable that should be applied after having collected the data from a server.

Parameters
  • product_name (str) – Name of the product.

  • req_vars (list, optional) – List of variables to be collected, by default [“ndvi”, “r0”].

Returns

Functions per variable that should be applied to the variable.

Return type

dict

default_vars(product_name, req_vars=['ndvi', 'r0'])

Given a product_name and a list of requested variables, returns a dictionary with metadata on which exact layers need to be requested from the server, how they should be renamed, and how their dimensions are defined.

Parameters
  • product_name (str) – Name of the product.

  • req_vars (list, optional) – List of variables to be collected, by default [“ndvi”, “r0”].

Returns

Metadata on which exact layers need to be requested from the server.

Return type

dict

mask_bitwise_qa(ds, var, flags)

Mask PROBAV data using a qa variable.

Parameters
  • ds (xr.Dataset) – Input data.

  • var (str) – Variable in ds to mask.

  • flags (list) – Which flags not to mask.

Returns

Masked dataset.

Return type

xr.Dataset

download(folder, latlim, lonlim, timelim, product_name, req_vars=['ndvi', 'r0'], variables=None, post_processors=None, timedelta=numpy.timedelta64(60, 'h'))

Download MODIS data and store it in a single netCDF file.

Parameters
  • folder (str) – Path to folder in which to store results.

  • latlim (list) – Latitude limits of area of interest.

  • lonlim (list) – Longitude limits of area of interest.

  • timelim (list) – Period for which to prepare data.

  • product_name (str) – Name of the product to download.

  • req_vars (list, optional) – Which variables to download for the selected product, by default [“ndvi”, “r0”].

  • variables (dict, optional) – Metadata on which exact layers need to be requested from the server, by default None.

  • post_processors (dict, optional) – Functions per variable that should be applied to the variable, by default None.

Returns

Downloaded data.

Return type

xr.Dataset