pysiral.l3proc.alg.uncertainty
Attributes
Classes
A Level-3 processor item to compute uncertainties of key geophysical variables on a grid. |
|
Computes the Level-3 uncertainties for radar freeboard, sea ice freeboard, sea ice thickness and sea ice draft. |
Module Contents
- pysiral.l3proc.alg.uncertainty.__author__ = 'Stefan Hendricks <stefan.hendricks@awi.de>'
- class pysiral.l3proc.alg.uncertainty.Level3GridUncertainties(*args, **kwargs)
Bases:
pysiral.l3proc.Level3ProcessorItemA Level-3 processor item to compute uncertainties of key geophysical variables on a grid. NOTE: As a concession to backward compability: sea ice draft uncertainty will be computed, but
the sea ice draft is not a required input parameter
- required_options = ['water_density', 'snow_depth_correction_factor', 'max_l3_uncertainty']
- l2_variable_dependencies = ['radar_freeboard_uncertainty']
- l3_variable_dependencies = ['sea_ice_freeboard', 'snow_depth', 'snow_density', 'snow_depth_uncertainty', 'snow_density_uncertainty']
- l3_output_variables
- apply()
Compute a level 3 uncertainty. The general idea is to compute the error propagation of average error components, where for components for random error the error of the l2 average is used and for systematic error components the average of the l2 error
- compute_gridded_uncertainty(grid_index: Tuple[int, int]) None
Compute the level-3 uncertainty for a given grid cell
- Parameters:
grid_index – (xi, yj) grid cell index tuple
- Returns:
None: the result is written to the l3grid object
- class pysiral.l3proc.alg.uncertainty.Level3GridUncertaintiesV2(*args, **kwargs)
Bases:
pysiral.l3proc.Level3ProcessorItemComputes the Level-3 uncertainties for radar freeboard, sea ice freeboard, sea ice thickness and sea ice draft. NOTE: This is a re-implementation of Level3GridUncertainties with more flexibility in terms of variable names
and which uncertainties to compute.
- var_name_dict
- _process_dynamic_dependencies() None
Process dynamic dependencies based on the configuration. This method updates the required options, l2 and l3 variable dependencies, and l3 output variables based on the configuration provided during initialization.
- apply()
Compute a level 3 uncertainty. The general idea is to compute the error propagation of average error components, where for components for random error the error of the l2 average is used and for systematic error components the average of the l2 error
- batch_func(func_name: str, **kwargs) None
Batch processing function to apply a specific uncertainty computation method across all grid indices.
- Parameters:
func_name – Name of the uncertainty computation method to apply.
kwargs – Additional keyword arguments to pass to the computation method.
- Returns:
None
- get_variable_name_dict() Dict
Get a dictionary with variable names for source and target variables. This allows to compute uncertainties for custom variable names and multiple solutions.
If not specified, default variable names are used.
- Returns:
Variable name dictionary
- compute_radar_freeboard_uncertainty(xi: int, yj: int, valid_uncertainty_range: Tuple[float, float] = None) None
Compute the level-3 radar freeboard uncertainty for a given grid cell
:param xi, x grid cell index :param yj, y grid cell index :param valid_uncertainty_range: tuple with (min, max) valid range for radar freeboard uncertainty
- Returns:
None: the result is written to the l3grid object
- compute_sea_ice_freeboard_uncertainty(xi: int, yj: int, snow_depth_correction_factor: float = 0.22, valid_uncertainty_range: Tuple[float, float] = None) None
Compute the level-3 sea ice freeboard uncertainty for a given grid cell
:param xi, x grid cell index :param yj, y grid cell index :param snow_depth_correction_factor: correction factor to account for snow loading on freeboard :param valid_uncertainty_range: tuple with (min, max) valid range for radar freeboard uncertainty
- Returns:
None: the result is written to the l3grid object
- compute_gridded_sea_ice_thickness_uncertainty(xi: int, yj: int, sea_water_density: float = 1024.0, valid_uncertainty_range: Tuple[float, float] = None) None
Compute the level-3 uncertainty for a given grid cell
:param xi, x grid cell index :param yj, y grid cell index :param sea_water_density: Seawater density [kg/m^3] :param valid_uncertainty_range: tuple with (min, max) valid range for sea ice thickness uncertainty
- Returns:
None: the result is written to the l3grid object
- compute_sea_ice_draft_uncertainty(xi: int, yj: int, valid_uncertainty_range: Tuple[float, float] = None) None
Compute the sea ice draft uncertainty for a given grid cell
:param xi, x grid cell index :param yj, y grid cell index :param valid_uncertainty_range: tuple with (min, max) valid range for sea ice draft uncertainty
- Returns:
None: the result is written to the l3grid object
- property required_options: List[str]
- property l2_variable_dependencies: List[str]
- property l3_variable_dependencies: List[str]
- property l3_output_variables: Dict[str, Dict]
- property allow_overwrite: bool
Repeated use may overwrite existing data :return: