dycove.utils.model_loader.BaseMapLoader

class dycove.utils.model_loader.BaseMapLoader(modeldir, model_name, quantity_name, eco_plot)[source]

Abstract base class for loading map quantities from DYCOVE model outputs.

Provides shared logic for vegetation quantities and file management between model-specific subclasses DFMMapLoader and ANUGAMapLoader, and potentially others in the future.

Parameters:
  • modeldir (str or Path) – Path to the model’s working directory.

  • model_name (str) – Root name of the model file (without extension).

  • quantity (str) – Quantity to load (e.g., 'Velocity', 'Mortality -- Flooding').

  • eco_plot (bool) – Whether vegetation quantities are being plotted.

  • n_ets_year (int) – Number of eco-time-steps per simulated year.

Notes

  • Subclasses must implement the load() method to return a dictionary of arrays containing the required fields (e.g. X, Y, Bathymetry, and the target quantity).

  • As expected, loading vegetation data/DYCOVE outputs relies on logic independent of the numerical model being used. But even in the case of plotting vegetation, we would also want to plot bathymetry as a layer underneath, which is dependent on numerical model load methods.

__init__(modeldir, model_name, quantity_name, eco_plot)[source]

Methods

__init__(modeldir, model_name, ...)

check_final_index(index)

Raises error if final plot time exceeds simulation length

load(hydro_i, ets, eco_year)

check_final_index(index)[source]

Raises error if final plot time exceeds simulation length