cmaqsatproc.readers.modis package¶
Submodules¶
cmaqsatproc.readers.modis.modis_readers module¶
Module contents¶
- class cmaqsatproc.readers.modis.MOD04[source]¶
Bases:
satellite
MOD04 (MOD04_3K or MOD04_L2) filters valid pixels and provides weights for destination polygon: * valid = Land_Ocean_Quality_Flag > 1 and value == value * pixel_area = corners from centroids +- delta * weight = intx_fracarea
- classmethod open_dataset(path, bbox=None, **kwargs)[source]¶
Opens dataset and defines valid where the pixel is within bbox, flags are appropriate, and inteprolates pixel centers to corners.
- Parameters:
path (str) – Path to a MOD04 OpenDAP-style file
bbox (iterable) – swlon, swlat, nelon, nelat in decimal degrees East and North
kwargs (mappable) – Passed to xarray.open_dataset
- Returns:
sat – Satellite processing instance
- Return type:
- class cmaqsatproc.readers.modis.MOD04_3K[source]¶
Bases:
MOD04
MOD04_3K filters valid pixels and provides weights for destination polygon: * valid = Land_Ocean_Quality_Flag > 1 and value == value * pixel_area = corners from centroids +- delta * weight = intx_fracarea
- class cmaqsatproc.readers.modis.MOD04_L2[source]¶
Bases:
MOD04
MOD04_L2 filters valid pixels and provides weights for destination polygon: * valid = Land_Ocean_Quality_Flag > 1 and value == value * pixel_area = corners from centroids +- delta * weight = intx_fracarea
- class cmaqsatproc.readers.modis.MODISL3[source]¶
Bases:
satellite
MODISL3 filters valid pixels and provides weights for destination polygon: * valid = Land_Ocean_Quality_Flag > 1 and value == value * pixel_area = corners from centroids +- delta * weight = intx_fracarea
- classmethod open_dataset(path, bbox=None, **kwargs)[source]¶
Opens dataset (remote or local). Defines valid as QualityLevel == 0. Interpolates pixel centers to corners. And adjusts valid to only include pixels in bbox.
- Parameters:
path (str) – Path to a MOD04 OpenDAP-style file
bbox (iterable) – swlon, swlat, nelon, nelat in decimal degrees East and North of 0, 0
kwargs (mappable) – Passed to xarray.open_dataset
- Returns:
sat – Satellite processing instance
- Return type:
- to_dataframe(*varkeys, valid=True, geo=False, default_keys=False)[source]¶
- Parameters:
varkeys (iterable) – Keys to use in the dataframe. Defaults to class._defaultkeys that is class specific
valid (bool) – If true, only return valid pixels.
geo (bool) – Add geometry to output a geopandas.GeoDataFrame
- Returns:
df
- Return type:
pandas.DataFrame or geopandas.GeoDataFrame
- to_level3(*varkeys, grid, griddims=None, weighting='equal', as_dataset=True, verbose=0)[source]¶
- Parameters:
varkeys (iterable) – See to_dataframe
grid (geopandas.GeoDataFrame or xr.Dataset) – Defines the grid used as the L3 destination
griddims (iterable) – Defaults to grid.index.names
weighting (str) – Passed as option to self.add_weights
- Returns:
outputs – Dictionary of outputs by output dimensions
- Return type:
dict