nsrdb.data_model.clouds.CloudVarSingle

class CloudVarSingle(fpath, pre_proc_flag=True, index=None, dsets=('cloud_type', 'cld_opd_dcomp', 'cld_reff_dcomp', 'cld_press_acha'))[source]

Bases: object

Base framework for single-file/single-timestep cloud data extraction.

Parameters:
  • fpath (str) – Full filepath for the cloud data at a single timestep.

  • pre_proc_flag (bool) – Flag to pre-process and sparsify data.

  • index (np.ndarray) – Nearest neighbor results array to extract a subset of the data.

  • dsets (tuple | list) – Source datasets to extract.

Methods

clean_attrs()

Try to clean unnecessary object attributes to reduce memory usage

get_dset(dset)

Abstract placeholder for data retrieval method

remap_pc_coords()

Remap the parallax/shading corrected coordinates back onto the original "raw" coordinate system and set internal variables to do the same for the cloud data when processed through get_dset() and self.source_data

remap_pc_data(data)

Perform remapping of parallax/shading corrected data onto the raw/original cloud coordinate system including overlaying cloud shadow data over clear data.

Attributes

GRID_LABELS

dsets

Get a list of the available datasets in the cloud file.

fpath

Get the full file path for this cloud data timestep.

grid

Return the cloud data grid for the current timestep.

source_data

Get multiple-variable data dictionary from the cloud data file.

tree

Get the KDTree for the cloud data coordinates eg.

get_dset(dset)[source]

Abstract placeholder for data retrieval method

property dsets

Get a list of the available datasets in the cloud file.

property fpath

Get the full file path for this cloud data timestep.

property grid

Return the cloud data grid for the current timestep.

Returns:

self._grid (pd.DataFrame | None) – GOES source coordinates (labels: [‘latitude’, ‘longitude’]). None if bad dataset

property source_data

Get multiple-variable data dictionary from the cloud data file.

Returns:

data (dict) – Dictionary of multiple cloud datasets. Keys are the cloud dataset names. Values are 1D (flattened/raveled) arrays of data.

property tree

Get the KDTree for the cloud data coordinates eg. cKDTree(self.grid[[‘latitude’, ‘longitude’]])

Returns:

cKDTree

remap_pc_coords()[source]

Remap the parallax/shading corrected coordinates back onto the original “raw” coordinate system and set internal variables to do the same for the cloud data when processed through get_dset() and self.source_data

remap_pc_data(data)[source]

Perform remapping of parallax/shading corrected data onto the raw/original cloud coordinate system including overlaying cloud shadow data over clear data.

Parameters:

data (np.ndarray) – 1D array of flattened data based on the original coordinate system ordering from the cloud file, possibly with sparsification due to pre processing of nan data/coordinates.

Returns:

data (np.ndarray) – 1D array of flattened data that corresponds to the original coordinate system with no parallax/shading corrections but has been re-arranged such that it reflects these coordinate adjustments.

clean_attrs()[source]

Try to clean unnecessary object attributes to reduce memory usage