earth2studio.data
.JPSS#
- class earth2studio.data.JPSS(satellite='noaa-20', product_type='I', max_workers=24, cache=True, verbose=True, async_timeout=600)[source]#
JPSS VIIRS data source for NOAA-20, NOAA-21, and Suomi-NPP supporting both SDR (L1) and EDR (L2) products.
- Parameters:
satellite (str, optional) – One of {“noaa-20”, “noaa-21”, “snpp”}. Default “noaa-20”.
product_type (str, optional) – Product type: “I” for imagery bands (375m), “M” for moderate bands (750m), or “L2” for Level 2 EDR products (750m). Default “I”.
max_workers (int, optional) – Maximum concurrent fetch tasks. Default 24.
cache (bool, optional) – Cache downloaded files under a deterministic hash. Default True.
verbose (bool, optional) – Show progress bars. Default True.
async_timeout (int, optional) – Timeout for async operations in seconds. Default 600.
Note
The returned data automatically includes ‘_lat’ and ‘_lon’ variables containing latitude and longitude coordinates for each pixel. These are appended to the last two dimensions of the data arrays variables as ‘_lat’ and ‘_lon’ variables.
For EDR (L2) products, not all products are available but generally include: - Land Surface Temperature, Surface Albedo, Snow Cover - Surface Reflectance, Active Fire Detection - Cloud properties (mask, phase, height, optical thickness) - Aerosol detection and Volcanic ash products
- __call__(time, variable)[source]#
Function to get data
- Parameters:
time (datetime | list[datetime] | TimeArray) – Timestamps to return data for (UTC).
variable (str | list[str] | VariableArray) – String, list of strings or array of strings that refer to variables to return. Must be in the JPSS lexicon.
- Returns:
Data array containing the requested JPSS data
- Return type:
xr.DataArray
- async fetch(time, variable)[source]#
Async function to get data
- Parameters:
time (datetime | list[datetime] | TimeArray) – Timestamps to return data for (UTC).
variable (str | list[str] | VariableArray) – String, list of strings or array of strings that refer to variables to return. Must be in the JPSS lexicon.
- Returns:
Data array containing the requested JPSS data
- Return type:
xr.DataArray
- classmethod available(time, variable, satellite='noaa-20', product_type='I')[source]#
Checks if given date time is avaliable in JPSS
- Parameters:
time (datetime | np.datetime64) – Date time to access
variable (str) – Variable to check
satellite (str, optional) – Satellite to check
product_type (str, optional) – Product type to check
- Returns:
If date time is avaiable
- Return type:
bool