nsrdb.preprocessing.base_data_model.BaseUwiscDataModel
- class BaseUwiscDataModel(input_data, output_pattern)[source]
Bases:
objectShared preprocessing pipeline for UWISC-format conversion.
Methods
Derive solar angles if not already present in the dataset.
derive_stdevs(ds)Derive standard deviations used as training features.
drop_vars(ds)Drop variables that are not part of the UWISC output schema.
Fill any missing variables with NaN arrays.
get_primary_input_file(input_files)Get the primary input file used for naming outputs.
Derive the solar azimuth angle for the dataset.
get_solar_zenith(ds)Derive the solar zenith angle for the dataset.
open_dataset(input_data)Open the raw input data as an xarray dataset.
parse_timestamp(input_file)Parse a timestamp tuple from an input file path.
parse_timestamp_string(input_file)Parse the output timestamp string from an input file path.
process_dataset(ds)Run the shared UWISC preprocessing pipeline on a dataset.
Map source cloud phase flags to UWISC cloud types.
remap_dims(ds)Rename dims and coords to standards and build 2D lat/lon grids.
rename_vars(ds)Rename variables to uwisc conventions.
run(input_data, output_pattern)Run the conversion routine and write the converted dataset.
Apply any subclass-specific preprocessing to the raw dataset.
write_output(ds, output_file)Write converted dataset to the final output file.
Attributes
CLOUD_TYPE_MAPCLOUD_TYPE_SOURCE_VARNAME_MAPTIMESTAMP_PATTERNGet xarray dataset for raw input data.
Get the normalized list of input files.
Get output file name for the configured output pattern.
Get the primary input file used for naming outputs.
Get a single-step time index for the primary input file.
Get the parsed timestamp tuple for the primary input file.
Get the parsed output timestamp string for the primary input.
- property input_files
Get the normalized list of input files.
- classmethod get_primary_input_file(input_files)[source]
Get the primary input file used for naming outputs.
- property primary_input_file
Get the primary input file used for naming outputs.
- classmethod parse_timestamp_string(input_file)[source]
Parse the output timestamp string from an input file path.
- property timestamp
Get the parsed timestamp tuple for the primary input file.
- property timestamp_string
Get the parsed output timestamp string for the primary input.
- property time_index
Get a single-step time index for the primary input file.
- property output_file
Get output file name for the configured output pattern.
- property ds
Get xarray dataset for raw input data.
- classmethod transform_raw_data(ds)[source]
Apply any subclass-specific preprocessing to the raw dataset.