pysiral.l3proc.alg.uncertainty ============================== .. py:module:: pysiral.l3proc.alg.uncertainty Attributes ---------- .. autoapisummary:: pysiral.l3proc.alg.uncertainty.__author__ Classes ------- .. autoapisummary:: pysiral.l3proc.alg.uncertainty.Level3GridUncertainties pysiral.l3proc.alg.uncertainty.Level3GridUncertaintiesV2 Module Contents --------------- .. py:data:: __author__ :value: 'Stefan Hendricks ' .. py:class:: Level3GridUncertainties(*args, **kwargs) Bases: :py:obj:`pysiral.l3proc.Level3ProcessorItem` A 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 .. py:attribute:: required_options :value: ['water_density', 'snow_depth_correction_factor', 'max_l3_uncertainty'] .. py:attribute:: l2_variable_dependencies :value: ['radar_freeboard_uncertainty'] .. py:attribute:: l3_variable_dependencies :value: ['sea_ice_freeboard', 'snow_depth', 'snow_density', 'snow_depth_uncertainty', 'snow_density_uncertainty'] .. py:attribute:: l3_output_variables .. py:method:: 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 .. py:method:: compute_gridded_uncertainty(grid_index: Tuple[int, int]) -> None Compute the level-3 uncertainty for a given grid cell :param grid_index: (xi, yj) grid cell index tuple :return: None: the result is written to the l3grid object .. py:class:: Level3GridUncertaintiesV2(*args, **kwargs) Bases: :py:obj:`pysiral.l3proc.Level3ProcessorItem` Computes 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. .. py:attribute:: var_name_dict .. py:method:: _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. .. py:method:: 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 .. py:method:: batch_func(func_name: str, **kwargs) -> None Batch processing function to apply a specific uncertainty computation method across all grid indices. :param func_name: Name of the uncertainty computation method to apply. :param kwargs: Additional keyword arguments to pass to the computation method. :return: None .. py:method:: 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. :return: Variable name dictionary .. py:method:: 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 :return: None: the result is written to the l3grid object .. py:method:: 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 :return: None: the result is written to the l3grid object .. py:method:: 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 :return: None: the result is written to the l3grid object .. py:method:: 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 :return: None: the result is written to the l3grid object .. py:property:: required_options :type: List[str] .. py:property:: l2_variable_dependencies :type: List[str] .. py:property:: l3_variable_dependencies :type: List[str] .. py:property:: l3_output_variables :type: Dict[str, Dict] .. py:property:: allow_overwrite :type: bool Repeated use may overwrite existing data :return: