landcover_assignment.distribution

This module is designed to manage and process land distribution scenarios for the Irish national context, particularly focusing on adjustments in land use areas based on various scenario inputs. It integrates with land cover data management, scenario-specific data fetching, and national area analysis to provide a comprehensive tool for land distribution analysis.

Features:

  • Land Distribution Analysis: Manages the calculation and distribution of land areas across different land use types based on scenario-driven changes.

  • Grassland Distribution Management: Specifically handles the redistribution of grassland areas, taking into account changes in mineral and organic components.

Dependencies:

  • landcover_assignment.resource_manager.landcover_data_manager.DistributionManager

  • landcover_assignment.national_landcover.NationalLandCover

  • landcover_assignment.resource_manager.scenario_data_fetcher.ScenarioDataFetcher

  • pandas for data manipulation and analysis.

Classes:

LandDistribution(scenario_data)

Handles the distribution of land areas for various land use types under different scenarios, adjusting for changes in areas and soil composition.

land_distribution(year, land_use, new_area)

Calculates and updates the distribution of land based on land use type and the area change. It supports special handling for grassland, wetland, and forest types, among others, adjusting shares of mineral, organic, and other soil types accordingly.

grassland_distribution(year, mineral_area, organic_area, grassland_area)

Specifically handles the distribution and adjustment of grassland areas, considering changes in mineral and organic components, and recalculates the total remaining grassland area along with its composition.

Classes

LandDistribution

Handles the distribution of land areas for various land use types under different scenarios,

Module Contents

class landcover_assignment.distribution.LandDistribution(scenario_data)

Handles the distribution of land areas for various land use types under different scenarios, adjusting for changes in areas and soil composition.

This class provides methods to calculate and update land distribution based on changes in land use types, including special considerations for grassland, wetland, and forest. It utilizes data from land cover data managers, national land cover analysis, and scenario-specific data fetchers to accurately model land distribution adjustments under various scenarios.

Parameters:

scenario_data (pd.DataFrame) – A DataFrame containing scenario-specific data inputs. This data is used to fetch catchment names and drive the scenario-based calculations for land distribution adjustments.

Variables:
  • data_manager_class (DistributionManager) – An instance of DistributionManager for managing land distribution data.

  • national_class (NationalLandCover) – An instance of NationalLandCover for accessing and analyzing Irish national context land cover data.

  • sc_fetcher_class (ScenarioDataFetcher) – An instance of ScenarioDataFetcher initialized with scenario data for fetching scenario-specific information.

Notes

land_distribution(year, land_use, new_area)

Calculates and updates the distribution of land based on land use type and the area change. It supports special handling for grassland, wetland, and forest types, among others, adjusting shares of mineral, organic, and other soil types accordingly.

grassland_distribution(year, mineral_area, organic_area, grassland_area)

Specifically handles the distribution and adjustment of grassland areas, considering changes in mineral and organic components, and recalculates the total remaining grassland area along with its composition.

data_manager_class
national_class
sc_fetcher_class
land_distribution(year, land_use, new_area, target_year=None)

Calculates and updates the land distribution based on land use type and area change.

Parameters:
  • year (int) – The reference year for national land use data.

  • land_use (str) – The type of land use to calculate distribution for.

  • new_area (float) – The area change to be applied to the land use type.

  • target_year (int, optional) – The target year. For forest it gives the target-year row (decision D6a): cbm_runner managed forest in the target year plus new_area (the scenario’s afforestation), the NID drained hectares, and cbm_runner’s fire. Without it, forest is the calibration-year row plus new_area as before. For the other land uses it makes the row a target-year row, whose share_burnt is the 3-year rate on the whole area (decision D6b, NationalLandCover.get_burnt_rate()); without it the calibration-year share is diluted. For wetland it also phases out peat extraction (decision D10, NationalLandCover.get_peat_extraction_remaining()).

Returns:

A dictionary containing updated land distribution details.

Return type:

dict

grassland_distribution(year, mineral_area, organic_area_to_wet, grassland_area)

Optimized version to manage the distribution of grassland areas, considering mineral and organic changes.

The mineral area leaves grassland. The rewetted organic area stays in grassland: it is taken from the drained rich/poor shares (in proportion to them) and added to the rewetted rich/poor (rewet-status) shares. The total organic area of the grassland row is unchanged. See docs/rewetting.md.

Parameters:
  • year (int) – The reference year for national land use data.

  • mineral_area (float) – The area of mineral soil that leaves grassland (ha).

  • organic_area_to_wet (float) – The drained organic area that is rewetted and stays in grassland with rewet status (ha).

  • grassland_area (float) – The total grassland area to be considered.

Returns:

A dictionary containing updated grassland distribution details.

Return type:

dict