cmaqsatproc.readers.goes package

Module contents

class cmaqsatproc.readers.goes.goes_aod[source]

Bases: satellite

goes_aod processor * valid if DQF < dqflt (default = 1) * pixel corners are interpolated in projected space.

Note 1: Qualities are 0: high; 1: medium; 2: low; 3 not retrieved. Note 2: The default requires the highest quality only. This is based

on experience. Because we are gridding, high and medium would get spatially mixed. This makes it hard to see if a monthly average is a bunch of isolated medium quality pixels with no repeat measurements or many of the same pixel. Thus, the higher quality requirement.

Use utils.getcmrlinks to get links from the NASA Common Metadata Repo

Parameters:
  • method (str) – Options are opendap, download, or s3

  • kwds (mappable) – Passed through to utils.getcmrlinks. See getcmrlinks for valid keywords

Returns:

links – List of links to OpenDAP, http downloadable, or s3 links

Return type:

list

classmethod open_dataset(path, bbox=None, dqflt=1, **kwargs)[source]

Open a GOES AOD dataset for satellite processing.

Parameters:
  • path (str) – Path to dataset

  • bbox (iterable) – swlon, swlat, nelon, nelat in decimal degrees East and North

  • dqflt (float) – Only AOD with data quality flags less than dqflt are considered valid

  • kwargs (mappable) – Passed to xarray.open_dataset

Returns:

sat – Satellite processing object.

Return type:

satellite

classmethod open_datasets(paths, bbox, dqflt=1)[source]

Similar to open_dataset, but assumes that all data is on a single grid. Therefore, it can mask pixels and average them before creating a “net” dataset.

Basically, ds = xr.concat([open_dataset(path, bbox) for path in paths], ‘scan’) ds = ds.where(ds[‘valid’]).mean(‘scan’)

Only variables valid, AOD, DQF, and goes_imager_projection are kept.

Parameters:
  • paths (list) – List of paths

  • bbox (iterable) – swlon, swlat, nelon, nelat in decimal degrees

Returns:

sat

Return type:

satellite

classmethod prep_dataset(ds, bbox=None, dqflt=1)[source]

Prepare the dataset by adding a projection, applying valid spatial checks and requiring that the DQF variable have a value less than dqflt.

Return s3 links for date

Parameters:
  • date (str or date-like) – pandas.to_datetime will convert this into a date object.

  • satkey (str) – goes16, goes17, or goes18… any goes satellite that has product

  • product (str) – Usually ABI-L2-AODC, but could be ABI-L2-AODF

  • resolution (str) – Choose, H, d, m or Y.

Returns:

links – All links within the folder based on resolution: - ‘H’: s3://noaa-{satkey}/ABI-L2-AODC/{date:%Y/%j/%H}/ - ‘d’: s3://noaa-{satkey}/ABI-L2-AODC/{date:%Y/%j}/ - ‘Y’: s3://noaa-{satkey}/ABI-L2-AODC/{date:%Y}/ - ‘m’: iterates on all julian days in month

Return type:

list

classmethod s3_to_level3(date, satkey, grid, griddims=None, weighting='area', bbox=None, verbose=0, varkeys=None, as_dataset=True, link_kwargs=None, **kwargs)[source]

Thin wrapper around s3_links, open_datasets, and to_level3.

For keyword documentation, see those functions.