Checks that a species input handed between LandWeb pipeline stages is not empty, and returns it unchanged so the check can wrap the reference inline.
landweb_require_species(x, name)x, unchanged.
The upstream Biomass_* modules and LandR treat a study area with no tree
species as valid: an empty species table, NULL species layers or an empty
cohortData make them skip their work and finish without error. For
LandWeb every study area is forested, so an empty species input can only
mean a broken species mapping, and a run would otherwise "succeed" with no
vegetation dynamics. This turns that into an error at the stage boundary.
landweb_require_species(data.frame(species = "Pice_mar"), "sppEquiv")
#> species
#> 1 Pice_mar