Skip to contents

Low-level helper that turns LAI, Cm and a canopy-N raster into the two layers consumed by compute_NNI: the aboveground dry biomass W (t DM ha\(^{-1}\)) and the plant N concentration N_actual (pct DM).

Usage

biophysical_to_NNI_inputs(
  lai_rast,
  cm_rast,
  cnc_rast,
  alpha_leaf = 0.35,
  k_NChl = NULL,
  w_min = 1
)

Arguments

lai_rast

RasterLayer or terra SpatRaster with leaf area index.

cm_rast

RasterLayer or terra SpatRaster with leaf dry-matter content (g cm\(^{-2}\)).

cnc_rast

RasterLayer or terra SpatRaster with canopy nitrogen: either CNC_Cprot (g N m\(^{-2}\), protein path) or CNC_Cab (g Chl m\(^{-2}\), chlorophyll path - in that case supply k_NChl).

alpha_leaf

Leaf-to-total aboveground biomass allocation coefficient (default 0.35; use crop_params_NNI for crop-specific values).

k_NChl

When cnc_rast contains CNC_Cab (g Chl m\(^{-2}\)), the canopy-level N:Chl ratio used to convert it to g N m\(^{-2}\) (default NULL = protein path, no conversion).

w_min

Minimum biomass (t DM ha\(^{-1}\)) below which pixels are masked (default 1.0).

Value

A named list with two SpatRaster layers, W and N_actual, ready to be passed to compute_NNI.

Details

Most users should rather call the end-to-end compute_NNI_from_S2 wrapper, which handles crop-specific parameters, FVC / SCL masking and zone classification in a single call. This function is exposed for advanced workflows that need direct control over the conversion.

The conversions follow $$W_{leaf}\ (\mathrm{g\ m^{-2}}) = LAI \cdot C_m \cdot 10^4$$ $$W\ (\mathrm{t\ DM\ ha^{-1}}) = W_{leaf} / (100 \cdot \alpha_{leaf})$$ (leaf-to-total aboveground allocation coefficient \(\alpha_{leaf}\), ~0.30-0.45 depending on crop and phenology), and $$N_{actual}(\% DM) = 100 \cdot N_{total} / W_{leaf} \cdot \alpha_{leaf}^{-1}$$ with \(N_{total}\) either equal to CNC_Cprot (g N m\(^{-2}\)) or k * CNC_Cab when the chlorophyll path is used. Pixels where W < w_min are set to NA because the critical-N dilution curve is not defined below that biomass.