environmentaltools.spatiotemporal.raster.check_inputs

environmentaltools.spatiotemporal.raster.check_inputs(info)[source]

Validate and prepare input configuration for marine spatial analysis processing.

Performs comprehensive validation of input parameters, file paths, and configuration settings required for the marine tools spatial analysis workflow. Sets up default values, creates necessary directory structures, and validates data availability.

Parameters:

info (dict) –

Configuration dictionary containing project parameters, file paths, and processing settings. Expected structure and keys include:

  • ”project”dict
    Project-level configuration with keys:
    • ”name”str

      Name of the project/region

    • ”no_sims”int

      Number of simulations to process

    • ”initial_year”int

      Initial year of the simulation

    • ”final_year”int

      Final year of the simulation

    • ”input_path”str or Path

      Path to the input data directory (e.g., DTM/NetCDF files)

    • ”output_path”str or Path

      Path to the output results directory

    • ”crs”str

      Coordinate Reference System (e.g., “EPSG:25830”)

    • ”refinement”int, optional

      Refinement flag (1 for True, 0 for False)

    • ”n_workers”int, optional

      Number of parallel workers

    • ”index”str

      Name of the indicator/index to process (e.g., “directional_influence”)

  • ”temporal”dict
    Temporal configuration, including:
    • ”seasons”list of str

      List of season keys (e.g., [“TA”, “TB”, “AN”])

    • ”TA”, “TB”, …list of int

      Lists of months for each season

  • Indicator-specific keys (e.g., “presence_boundary”, “influence_extent”, “directional_influence”)dict
    Each indicator contains:
    • ”variable”str

      Name of the variable in NetCDF files (e.g., “elevation”)

    • ”temporal”str or list

      Temporal variable or thresholds

    • ”percentiles”list of str or int, optional

      Percentiles to compute (if applicable)

    • ”horizon_times”list of str, optional

      List of horizon times (for some indices)

    • ”return_periods”list of int, optional

      Return periods (for some indices)

Returns:

Function modifies the input dictionary in-place.

Return type:

None

Raises:
  • FileNotFoundError – If required input files or project do not exist.

  • ValueError – If fld_portion parameter is not a positive integer.

Notes

The function performs the following validations and setup: 1. Verifies existence of input DTM/NetCDF files 2. Checks simulation project and catalogs available files 3. Sets default values for optional parameters 4. Defines seasonal month groupings if not provided 5. Creates auxiliary output directory structure 6. Validates flood portion parameter