cmaqsatproc.readers.omi package¶
Module contents¶
- class cmaqsatproc.readers.omi.OMHCHO[source]¶
Bases:
OMIL2
OMHCHO satellite processor. * bbox subsets the nTimes and nTimes_1 dimensions * valid based three conditions
MainDataQualityFlag == 0
(XtrackQualityFlagsExpanded & 1) == 0
AMFCloudFraction <= 0.3
- classmethod cmaq_ak(overf, satl3f)[source]¶
Calculate an averaging kernel (AK) that would process CMAQ as though it were observed by the satellite. In this case, the averaging kernel is the scattering weights divided by the tropospheric air mass factor.
- Parameters:
overf (xarray.Dataset) – Must have PRES variable with LAY dimension that describes the vertical coordinate.
satl3f (xarray.Dataset) – Output from to_level3, paths_to_level3, or cmr_to_level3 with as_dataset=True (the default).
- Returns:
q_ak – Averaging kernel on the CMAQ grid
- Return type:
xr.DataArray
- classmethod cmaq_amf(overf, satl3f, key='FORM_PER_CM2')[source]¶
Calculate an alternative Air Mass Factor (AMF) using satellite scattering weights and the CMAQ vertical profile as a partial column density.
- Parameters:
overf (xarray.Dataset) – Must have PRES variable with LAY dimension that describes the vertical coordinate.
satl3f (xarray.Dataset) – Output from to_level3, paths_to_level3, or cmr_to_level3 with as_dataset=True (the default).
key (str) – Key of the partial column density variable from CMAQ, which must have a LAY dimension that describes teh vertical coordinate.
- Returns:
cmaqamf – Air Mass Factor on the CMAQ grid
- Return type:
xr.DataArray
- classmethod cmaq_process(qf, satl3f, key='FORM')[source]¶
Process CMAQ as though it were observed by OMI and recualculate OMI tropospheric columns with the CMAQ AMF. This process relies
- Parameters:
qf (xarray.Dataset) – CMAQ file that has composition (e.g., FORM), PRES, DENS, and ZF variables with a LAY dimension describing the vertical coordinate.
satl3f (xarray.Dataset) – Output from to_level3, paths_to_level3, or cmr_to_level3 with as_dataset=True (the default).
key (str) – Key for composition data.
- Returns:
overf – An overpass file with satellite-like CMAQ and CMAQ-like satellite.
- Return type:
xr.DataArray
- classmethod cmaq_sw(overf, satl3f)[source]¶
Interpolate satellite scattering weights to CMAQ vertical grid, based on PRES (pressure in Pa).
- Parameters:
overf (xarray.Dataset) – Must have PRES variable with LAY dimension that describes the vertical coordinate.
satl3f (xarray.Dataset) – Output from to_level3, paths_to_level3, or cmr_to_level3 with as_dataset=True (the default).
- Returns:
q_sw – Scattering Weights on the CMAQ grid
- Return type:
xr.DataArray
- classmethod cmr_links(method='opendap', **kwds)[source]¶
Thin wrapper around satellite.cmr_links where concept_id is set to “C1239966779-GES_DISC”.
- Parameters:
method (str) – ‘opendap’, ‘download’, or ‘s3’. ‘s3’ is not supported for OMI at this time.
- Returns:
links – List of links for download or OpenDAP
- Return type:
list
- classmethod open_dataset(path, bbox=None, **kwargs)[source]¶
- Parameters:
path (str) – Path to a OMI 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:
OMI
- class cmaqsatproc.readers.omi.OMIL2[source]¶
Bases:
satellite
Default OMI satellite processor. * bbox subsets the nTimes and nTimes_1 dimensions
- classmethod open_dataset(path, bbox=None, **kwargs)[source]¶
- Parameters:
path (str) – Path to a OMI 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:
- classmethod prep_dataset(ds, bbox=None, path=None)[source]¶
Applies spatial subset based on Latitude and Longitude
- Parameters:
ds (xarray.Dataset) – Satellite dataset
bbox (iterable) – swlon, swlat, nelon, nelat in decimal degrees East and North
path (str) – Unused.
- Returns:
ds
- Return type:
xarray.Dataset
- class cmaqsatproc.readers.omi.OMNO2[source]¶
Bases:
OMIL2
OMNO2 satellite processor. * bbox subsets the nTimes and nTimes_1 dimensions * valid based three conditions
(VcdQualityFlags & 1) == 0
XTrackQualityFlags == 0
CloudFraction <= 0.3
- classmethod cmaq_ak(overf, satl3f)[source]¶
Calculate an averaging kernel (AK) that would process CMAQ as though it were observed by the satellite. In this case, the averaging kernel is the scattering weights divided by the tropospheric air mass factor.
- Parameters:
overf (xarray.Dataset) – Must have PRES variable with LAY dimension that describes the vertical coordinate.
satl3f (xarray.Dataset) – Output from to_level3, paths_to_level3, or cmr_to_level3 with as_dataset=True (the default).
- Returns:
q_ak – Averaging kernel on the CMAQ grid
- Return type:
xr.DataArray
- classmethod cmaq_amf(overf, satl3f, key='NO2_PER_CM2')[source]¶
Calculate an alternative Air Mass Factor (AMF) using satellite scattering weights and the CMAQ vertical profile as a partial column density.
- Parameters:
overf (xarray.Dataset) – Must have PRES variable with LAY dimension that describes the vertical coordinate.
satl3f (xarray.Dataset) – Output from to_level3, paths_to_level3, or cmr_to_level3 with as_dataset=True (the default).
key (str) – Key of the partial column density variable from CMAQ, which must have a LAY dimension that describes teh vertical coordinate.
- Returns:
cmaqamf – Air Mass Factor on the CMAQ grid
- Return type:
xr.DataArray
- classmethod cmaq_process(qf, satl3f, key='NO2')[source]¶
Process CMAQ as though it were observed by OMI and recualculate OMI tropospheric columns with the CMAQ AMF. This process relies
- Parameters:
qf (xarray.Dataset) – CMAQ file that has composition (e.g., NO2), PRES, DENS, and ZF variables with a LAY dimension describing the vertical coordinate.
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 and CMAQ-like satellite.
- Return type:
xr.DataArray
- classmethod cmaq_sw(overf, satl3f)[source]¶
Interpolate satellite scattering weights to CMAQ vertical grid, based on PRES (pressure in Pa).
- Parameters:
overf (xarray.Dataset) – Must have PRES variable with LAY dimension that describes the vertical coordinate.
satl3f (xarray.Dataset) – Output from to_level3, paths_to_level3, or cmr_to_level3 with as_dataset=True (the default).
- Returns:
q_sw – Scattering Weights on the CMAQ grid
- Return type:
xr.DataArray
- classmethod cmr_links(method='opendap', **kwds)[source]¶
Thin wrapper around satellite.cmr_links where concept_id is set to “C1239966842-GES_DISC”.
- Parameters:
method (str) – ‘opendap’, ‘download’, or ‘s3’. ‘s3’ is not supported for OMI at this time.
- Returns:
links – List of links for download or OpenDAP
- Return type:
list
- classmethod open_dataset(path, bbox=None, **kwargs)[source]¶
- Parameters:
path (str) – Path to a OMI 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:
OMINO2
- class cmaqsatproc.readers.omi.OMO3PR[source]¶
Bases:
OMIL2
OMO3PR satellite processor. * bbox subsets the nTimes and nTimes_1 dimensions * valid based three conditions
MainDataQualityFlag == 0
(XtrackQualityFlagsExpanded & 1) == 0
AMFCloudFraction <= 0.3
- classmethod cmr_links(method='opendap', **kwds)[source]¶
Thin wrapper around satellite.cmr_links where concept_id is set to “C1239966827-GES_DISC”.
- Parameters:
method (str) – ‘opendap’, ‘download’, or ‘s3’. ‘s3’ is not supported for OMI at this time.
- Returns:
links – List of links for download or OpenDAP
- Return type:
list
- classmethod open_dataset(path, bbox=None, **kwargs)[source]¶
- Parameters:
path (str) – Path to a OMI 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:
OMI
- class cmaqsatproc.readers.omi.OMPROFOZ[source]¶
Bases:
OMIL2
OMPROFOZ satellite processor. * bbox subsets the nTimes and nTimes_1 dimensions * valid based three conditions
MainDataQualityFlag == 0
(XtrackQualityFlagsExpanded & 1) == 0
AMFCloudFraction <= 0.3
- classmethod cmr_links(method='opendap', **kwds)[source]¶
Thin wrapper around satellite.cmr_links where short_name is set to “OMPROFOZ”.
- Parameters:
method (str) – ‘opendap’, ‘download’, or ‘s3’. ‘s3’ is not supported for OMI at this time.
- Returns:
links – List of links for download or OpenDAP
- Return type:
list
- classmethod open_dataset(path, bbox=None, **kwargs)[source]¶
- Parameters:
path (str) – Path to a OMI 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:
OMI