## Introduction

The R package medfateland has been designed to run simulations of forest functioning and dynamics at the landscape and regional scales. The package allows executing the stand-level models available in package medfate on points and cells within landscape, in either sequential or parallel computation. In addition, medfateland allows considering spatial hydrological processes in forested watersheds. Hence, medfateland can be used as a tool for eco-hydrological applications.

## Data structures

IMPORTANT: All data the following data structures have been deprecated because of their dependencies with package sp.

Package medfateland offers three spatial classes that inherit fields from three corresponding classes in package meteoland:

• SpatialPointsLandscape: represents a set of forest stands (including soil description) as points within a landscape. Extends class SpatialPointsTopography.
• SpatialPixelsLandscape: represents a set of forests (including soil description) or other land cover units (i.e. agricultural, rock outcrops or urban areas) as pixels within a gridded landscape. Extends class SpatialPixelsTopography.
• SpatialGridLandscape: represents a set of forests (including soil description) or other land cover units (i.e. agricultural, rock outcrops or urban areas) as pixels within a complete grid. Extends class SpatialGridTopography.

Spatial objects SpatialPointsLandscape, SpatialPixelsLandscape and SpatialGridLandscape allow simulations to be performed straightforwardly for a set of forests distributed spatially. Simulations of local processes are performed sequentially or in parallel computation for all forest stands, because landscape processes are not considered.

An additional spatial class is defined for watershed ecohydrological modelling:

• DistributedWatershed: Represents a (forested) watershed, including land cover units (i.e. agricultural, rock outcrops or urban areas), forest and soil information as well as bedrock properties. Extends class SpatialPixelsLandscape.

Simulating water balance on objects DistributedWatershed allows considering an aquifer compartment for each cell as well as simulating spatial water transfer between cells, i.e. overland, subsurface water and groundwater flows.

## Dynamic simulation functions

Eco-hydrological processes are fundamental for the simulation models included in the medfate package. Eco-hydrological processes can be divided into local and landscape processes.

### Local water balance

By local water balance we refer to the water balance of soils and plants within forest stands. Processes affecting soil water content include rainfall, canopy interception, infiltration and runoff, percolation and deep drainage, soil evaporation and plant transpiration.

In package medfate, the local soil water balance of a forest is primarily used to predict drought stress for living plants in it using function spwb(). Package medfateland allows simulating water balance for multiple stands distributed spatially over a given time period using function spwb_spatial(), which makes internal calls to spwb() on elements the spatial classes introduced above. Function spwb_spatial_day() is analogous to the former, but are used for the simulation of a single day, using internal calls to function spwb_day() of medfate. Function spwb_spatial() and its one-day counterpart may be used to:

1. Monitor or forecast temporal variation in soil water content in particular stands (for example to estimate mushroom yield) or over continuous areas.
2. Monitor or forecast temporal variation of plant drought stress in particular stands (for example to anticipate mortality events) or over continuous areas.
3. Monitor or forecast temporal variation of fuel moisture in particular stands (for example to monitor wildfire risk) or over continuous areas.

### Carbon balance and plant growth

Changes in leaf area and plant growth are key to evaluate the influence of climatic conditions on forest structure and function. Processes affecting annual changes leaf area and plant size are those involved water and carbon balances, as well as those affecting growth directly. Processes influencing plant water balance include those affecting soil water content, such as rainfall, canopy interception, infiltration and runoff, percolation and deep drainage, soil evaporation and plant transpiration. Carbon balance arises from the relationship between plant photosynthesis and respiration, although carbon reserves play a role in the availability of carbon for growth. Water and carbon balances are coupled through the regulation of transpiration done by stomata. Plant growth is affected by the availability of carbon (source limitation), but also by temperature and water status (sink limitation). Leaf area of plants can be severely decreased by drought stress, causing an increase in dead leaf area and affecting carbon and water fluxes.

Package medfate allows simulating plant growth and mortality of a set of cohorts (competing for light and water) in a single forest stand using function growth(). Package medfateland extends this by providing function growth_spatial(), which operates on spatial classes and makes internal calls to function growth(). Function growth_spatial_day() is analogous to the former, but are used for the simulation of a single day, using internal calls to function growth_day() of medfate. Function growth_spatial() and its one-day counterpart may be used to:

1. Monitor or forecast temporal variation in water fluxes and soil water content in particular stands (for example to estimate regulation ecosystem services) taking into account processes determining plant growth.
2. Monitor or forecast temporal variation of plant drought stress in particular stands(for example to anticipate mortality events) taking into account processes determining plant growth.
3. Monitor or forecast temporal variation of live fuel moisture and the amount of standing dead and live fuels in particular stands (for example to monitor wildfire risk).

### Forest dynamics

Changes in forest structure and composition result from the interplay of demographic processes (growth, mortality and recruitment) and may include forest management.

Package medfate includes function fordyn(), which allows simulating these processes at yearly time steps on a given forest stand, building on previous models. Package medfateland extends this by providing function fordyn_spatial(), which operates on spatial classes and make internal calls to function fordyn(). In addition, medfateland provides function fordyn_scenario(), which allows performing simulations of forest dynamics for a set of forest stands, while controlling management actions following a timber demand-based approach.

### Water and carbon balance including spatial processes

When input data is in form of continuous spatial variation of forests over a landscape, the medfateland package allows studying local soil water balance in combination with lateral water transfer processes using function spwb_land(). The package also allows studying local water balance and plant growth processes in combination with lateral water transfer processes using function growth_land(). Three lateral flows are considered in medfateland:

1. Overland surface flows from upslope cells
2. Lateral saturated soil flows (i.e. interflow) between adjacent cells
3. Lateral groundwater flow (i.e. baseflow) between adjacent cells

Functions spwb_land() and growth_land() may be used to:

1. Determine areas where particular plant species have high vulnerability to suffer from drought stress, while accounting for watershed hydrology.
2. Partition the total rainfall in given watershed among:
1. water evaporated from canopy interception or bare soil evaporation
2. water transpired by plants
3. water exported via runoff or deep drainage into the water table and river streams.