
Read natural-grass productivity from an LPJmL run.
Source:R/feed_lpjml.R
read_lpjml_grass_productivity.RdSums the natural-grass PFT net primary production bands (the ungrazed
natural stand, climate-driven) into a per-cell productivity layer used to
distribute grazing livestock by grass production rather than pasture area.
The pinned WHEP artifact is used by default; pass run_dir to read a local
finished LPJmL run, or pass productivity / productivity_path to use an
already-derived custom artifact. Natural-grass NPP is exogenous to the
grazing density, so it avoids the livestock to grassland_lsuha to grass-NPP
circularity.
Usage
read_lpjml_grass_productivity(
run_dir = NULL,
years = NULL,
first_year = 1901L,
example = FALSE,
productivity = NULL,
productivity_path = NULL
)Arguments
- run_dir
Path to the LPJmL run output directory holding
pft_npp.nc. If unset, the pinnedlpjml-grass-productivityartifact is used.- years
Integer vector of calendar years to read.
- first_year
First calendar year of the run's output time axis.
- example
If
TRUE, return a small fixture instead of reading a run.- productivity
Optional already-derived natural-grass productivity tibble/data frame. Takes precedence over pinned data and
run_dir.- productivity_path
Optional path to an already-derived natural-grass productivity artifact (
.parquet,.csv, or.rds). Takes precedence over pinned data andrun_dir.