nsrdb.aggregation.aggregation.MetaManager

class MetaManager[source]

Bases: object

Framework to parse the final meta data for contributing sources.

Methods

load_pickle_tree(fpath)

Load a pickled ckdtree and raise exception if not loadable

meta_sources(fpath_final, source_tree_fpaths)

Make a final meta data with data source columns (full_disk/conus).

meta_sources_2018(fpath_4km)

Make 2018 4km meta data with data source column (west/east/conus).

plot_meta_source(fpath_meta, fname, out_dir, ...)

Make a map plot of the NSRDB Meta source data (west/east/conus).

simple(fpath_meta)

Make a meta dataframe with source column == 'source' for simple agg

static meta_sources(fpath_final, source_tree_fpaths, source_priority=None)[source]

Make a final meta data with data source columns (full_disk/conus).

Parameters:
  • fpath_final (str) – File path to final output grid (usually full 4km meta data).

  • source_tree_fpaths (dict) – Dictionary mapping the source name to pickled meta kdtree pickle filepaths.

  • source_priority (list) – Priority list (high to low) for meta sources.

Returns:

meta (pd.DataFrame) – DataFrame based on fpath_4km but with a “source” column containing the data source string.

static meta_sources_2018(fpath_4km)[source]

Make 2018 4km meta data with data source column (west/east/conus).

WARNING: This is a script very specific to the 2018 GOES data arrangement, with the 4km 30min GOES West satellite, the 2km 15min GOES East satellite, and the 2km 5min CONUS data from GOES East. This only works with the psm v3 4km meta data (accessed on 8/28/2019).

Parameters:

fpath_4km (str) – File path to full 4km meta data.

Returns:

meta (pd.DataFrame) – DataFrame based on fpath_4km but with a “source” column containing the data source string.

static simple(fpath_meta)[source]

Make a meta dataframe with source column == ‘source’ for simple agg

Parameters:

fpath_meta (str) – File path to final meta data.

Returns:

meta (pd.DataFrame) – DataFrame based on fpath_meta but with a “source” column containing the data source string ‘source’.

static load_pickle_tree(fpath)[source]

Load a pickled ckdtree and raise exception if not loadable

Parameters:

fpath (str) – Full filepath to pickle file.

Returns:

tree (ckdtree) – Un-pickled ckdtree to query.

static plot_meta_source(fpath_meta, fname, out_dir, **kwargs)[source]

Make a map plot of the NSRDB Meta source data (west/east/conus).

Parameters:
  • fpath_meta (str) – File path to aggregation meta with source column

  • fname (str) – Filename for output map image file.

  • out_dir (str) – Directory path to save map plot file.

  • **kwargs (dict) – Keyword args for spatial plotting utility.