cmaqsatproc.readers.tempo package¶
Module contents¶
- class cmaqsatproc.readers.tempo.TEMPO_HCHO_L2[source]¶
Bases:
TEMPO_L2Default TEMPO satellite processor. * bbox subsets the mirror_step dimensions
- classmethod cmaq_process(qf, l3, qkey=None, l3key=None, extent=None)[source]¶
Process CMAQ as though it were observed by TEMPO, which is simply based on the overpass time.
- Parameters:
qf (xarray.Dataset) – CMAQ file that has composition (e.g., NO2) and met (DENS and TA or PRES/TA/Q). qf should already have the UTC time selected that matches l3.
l3 (xarray.Dataset) – Output from to_level3, paths_to_level3, or cmr_to_level3 with as_dataset=True (the default).
qkey (str) – CMAQ Key NO2 or HCHO.
l3key (str) – Satellite key
- Returns:
overf – An overpass file with satellite-like CMAQ.
- Return type:
xr.DataArray
- classmethod cmr_links(method='s3', **kwargs)[source]¶
Thin wrapper around satellite.cmr_links where concept_id is set to “C3685912035-LARC_CLOUD”, which is the V04 product. For V03, use “C2930730944-LARC_CLOUD”
- Parameters:
method (str) – ‘opendap’, ‘download’, or ‘s3’.
- Returns:
links – List of links for download, s3, or OpenDAP
- Return type:
list
- class cmaqsatproc.readers.tempo.TEMPO_L2[source]¶
Bases:
satelliteDefault TEMPO_L2 satellite processor. * bbox subsets the mirror_step dimensions
- add_cmaq_amf(qf, qkey, extent='troposphere', amfkey=None, swopt='tempo', debug=False)[source]¶
Add an AMF using an alternate shape factor from the partial vertical column density (pvcd) calculated from CMAQ met and conc data interpolated to the TEMPO grid. This should be done before to_level3
- Parameters:
qf (xr.Dataset) – Must contain DENS, TA, PRES, and qkey. If DENS is not present, then PRES/TA/Q can be used. If Q is missing, just PRES and TA.
qkey (str) – Model variable to be used for shape factor.
extent (str) – troposphere, stratosphere, total
amfkey (str) – Name for output variable to be stored. Defaults to amf_cmaq_extent where extent is troposphere, stratosphere, or total
swopt (str) – The scattering weight option determines if the scattering weight is interpolated to CMAQ or if CMAQ is interpolated to tempo. Options: ‘tempo’ calculates the AMF on native TEMPO coordinate. ‘cmaq’ calculates the AMF on native CMAQ coordinate
- Returns:
amf – Air mass factor with temperature corrected scattering weights applied to the shape factor from pvcd.
- Return type:
xr.DataArray
Notes
CMAQ met/conc data is often unreliable in the stratosphere. It is best to only use the troposphere.
- classmethod cmaq_process(qf, l3, qkey, l3key, extent='troposphere')[source]¶
Process CMAQ as though it were observed by TEMPO, which is simply based on the overpass time.
- Parameters:
qf (xarray.Dataset) – CMAQ file that has composition (e.g., NO2) and met (DENS and TA or PRES/TA/Q). qf should already have the UTC time selected that matches l3.
l3 (xarray.Dataset) – Output from to_level3, paths_to_level3, or cmr_to_level3 with as_dataset=True (the default).
qkey (str) – CMAQ Key NO2 or HCHO.
l3key (str) – Satellite key
- Returns:
overf – An overpass file with satellite-like CMAQ.
- Return type:
xr.DataArray
- classmethod open_dataset(path, bbox=None, min_data_quality_flag=2, max_eff_cloud_fraction=0.2, max_solar_zenith_angle=70, **kwargs)[source]¶
- Parameters:
path (str) – Path to a TEMPO file
bbox (iterable) – swlon, swlat, nelon, nelat in decimal degrees East and North of 0, 0
min_data_quality_flag (int) – Minimum acceptable value of main_data_quality_flag: - 0=normal - 1=suspicious - 2=bad
kwargs (mappable) – Passed to xarray.open_dataset
- Returns:
sat – Satellite processing instance
- Return type:
- class cmaqsatproc.readers.tempo.TEMPO_NO2_L2[source]¶
Bases:
TEMPO_L2Default TEMPO satellite processor. * bbox subsets the mirror_step dimensions
- classmethod cmaq_process(qf, l3, qkey=None, l3key=None, extent=None)[source]¶
Process CMAQ as though it were observed by TEMPO, which is simply based on the overpass time.
- Parameters:
qf (xarray.Dataset) – CMAQ file that has composition (e.g., NO2) and met (DENS and TA or PRES/TA/Q). qf should already have the UTC time selected that matches l3.
l3 (xarray.Dataset) – Output from to_level3, paths_to_level3, or cmr_to_level3 with as_dataset=True (the default).
qkey (str) – CMAQ Key NO2 or HCHO.
l3key (str) – Satellite key
- Returns:
overf – An overpass file with satellite-like CMAQ.
- Return type:
xr.DataArray
- classmethod cmr_links(method='s3', **kwargs)[source]¶
Thin wrapper around satellite.cmr_links where concept_id is set to “C3685896872-LARC_CLOUD”, which is the V04 product. For V03, use “C2930725014-LARC_CLOUD”.
- Parameters:
method (str) – ‘opendap’, ‘download’, or ‘s3’.
- Returns:
links – List of links for download, s3, or OpenDAP
- Return type:
list