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.

Notes:

  1. Qualities are 0: high; 1: medium; 2: low; 3 not retrieved.

  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.

Uses utils.getcmrlinks to get links from the NASA Common Metadata Repository (CMR)

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

  • kwds (mappable) – Passed through to utils.getcmrlinks and utils.getcmrgranules. Summary of getcmrgranules copied below for convenience. See getcmrgranules for definitive docs.

Returns:

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

Return type:

list

Notes

getcmrgranules keywords

temporalstr

NASA temporal that is recognized by NASA CMR For example: - YYYY-MM-DDTHH:MM:SSZ or - YYYY-MM-DDTHH:MM:SSZ/YYYY-MM-DDTHH:MM:SSZ or - YYYY-MM-DDTHH:MM:SSZ/P01D (or P01M, P01Y, etc)

bboxlist

Longitude/latitude bounding edges as floats (wlon,slat,elon,nlat)

polyshapely.geometry.Polygon

The exterior will be converted to floats and ordered x1,y1,…,xN,yN

filterfuncfunction

Takes a link dictionary from CMR and returns True if it should be retained

concept_idstr

Optional, NASA concept_id that is the unique identifier for a collection in NASA’s Common Metadata Repository

short_namestr

Optional, short_name identifier for a collection that is often, but not always unique in the NASA CMR. If you have the short_name and want the concept_id put the url below in your browser where you replace OMNO2 (the example) with your short_name https://cmr.earthdata.nasa.gov/search/collections?short_name=OMNO2

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 – Class instance of goes_aod

Return type:

goes_aod

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 – Class instance of goes_aod

Return type:

goes_aod

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.