cmaqsatproc.readers.viirs package¶
Module contents¶
- class cmaqsatproc.readers.viirs.AERDB_L2_VIIRS_SNPP[source]¶
Bases:
L2_VIIRS_SNPP
valid = Aerosol_Optical_Thickness_550_Land_Ocean_Best_Estimate not None
pixel corners are based on interpolated lat/lon
- classmethod cmaq_process(qf, satl3f)[source]¶
Process CMAQ as though it were observed by VIIRS, which is simply based on the overpass time.
- Parameters:
qf (xarray.Dataset) – CMAQ file that has composition (e.g., NH3)
satl3f (xarray.Dataset) – Output from to_level3, paths_to_level3, or cmr_to_level3 with as_dataset=True (the default).
- Returns:
overf – An overpass file with satellite-like CMAQ.
- Return type:
xr.DataArray
- classmethod cmr_links(method='opendap', **kwargs)[source]¶
Thin wrapper around L2_VIIRS_SNPP.cmr_links with concept_id set to C2600303218-LAADS.
- Parameters:
method (str) – ‘opendap’, ‘download’, or ‘s3’.
- Returns:
links – List of links for download or OpenDAP or s3
- Return type:
list
- classmethod prep_dataset(ds, bbox=None, isvalid=2, path=None)[source]¶
Applies spatial subset based on Latitude and Longitude, also interpolates pixel centers to corners and applies valid flags:
AOT_QA_Flag_Land >= isvalid, or
AOT_QA_Flag_Ocean >= isvalid
and ~AOT_550_Land_Ocean_Best_Estimate.isnull()
where AOT = Aerosol_Optical_Thickness
- Parameters:
ds (xarray.Dataset) – Satellite dataset
bbox (iterable) – swlon, swlat, nelon, nelat in decimal degrees East and North
isvalid (float) – Value greater than or equal to 2 are valid.
path (str) – Unused.
- Returns:
ds
- Return type:
xarray.Dataset
- class cmaqsatproc.readers.viirs.AERDT_L2_VIIRS_SNPP[source]¶
Bases:
L2_VIIRS_SNPP
valid = Land_Ocean_Quality_Flag > isvalid (default 2)
pixel corners are based on interpolated lat/lon
- classmethod cmaq_process(qf, l3)[source]¶
Process CMAQ as though it were observed by VIIRS, which is simply based on the overpass time.
- Parameters:
qf (xarray.Dataset) – CMAQ file that has composition (e.g., NH3)
l3 (xarray.Dataset) – Output from to_level3, paths_to_level3, or cmr_to_level3 with as_dataset=True (the default).
- Returns:
overf – An overpass file with satellite-like CMAQ.
- Return type:
xr.DataArray
- classmethod cmr_links(method='opendap', **kwargs)[source]¶
Thin wrapper around L2_VIIRS_SNPP.cmr_links with concept_id set to C1688453112-LAADS.
- Parameters:
method (str) – ‘opendap’, ‘download’, or ‘s3’.
- Returns:
links – List of links for download or OpenDAP or s3
- Return type:
list
- classmethod prep_dataset(ds, bbox=None, isvalid=2, path=None)[source]¶
Applies spatial subset based on Latitude and Longitude, also interpolates pixel centers to corners and applies valid flags:
Land_Ocean_Quality_Flag >= isvalid
~Optical_Depth_Land_And_Ocean.isnull()
- Parameters:
ds (xarray.Dataset) – Satellite dataset
bbox (iterable) – swlon, swlat, nelon, nelat in decimal degrees East and North
isvalid (float) – Value greater than or equal to 2 are valid.
path (str) – Unused.
- Returns:
ds
- Return type:
xarray.Dataset
- class cmaqsatproc.readers.viirs.L2_VIIRS_SNPP[source]¶
Bases:
satellite
VIIRS SNPP * valid = Land_Ocean_Quality_Flag > isvalid (default 2) * pixel corners are based on interpolated lat/lon
- classmethod cmr_links(method='opendap', **kwds)[source]¶
Reimplemenation of satellite.cmr_links to account for html links in VIIRS OpenDAP links in the CMR.
- Parameters:
method (str) – ‘opendap’, ‘download’, or ‘s3’.
- Returns:
links – List of links for download or OpenDAP or s3
- Return type:
list
- classmethod open_dataset(path, bbox=None, isvalid=2, **kwargs)[source]¶
Open a local or remote path as a VIIRS satellite processor.
- Parameters:
path (str) – Path to a L2_VIIRS_SNPP OpenDAP-style file
bbox (iterable) – swlon, swlat, nelon, nelat in decimal degrees East and North
isvalid (float) – Minimum value of flag for valid date (flag>=isvalid)
kwargs (mappable) – Passed to xarray.open_dataset
- Returns:
sat – Satellite processing instance
- Return type: