MagicForrest / DGVMTools

R package for processing, analysing and visualising ouput from Dynamic Global Vegetation Models (DGVMs)
GNU General Public License v3.0
29 stars 22 forks source link

define new quantity seems to fail #94

Closed anthoni-p closed 2 months ago

anthoni-p commented 2 months ago

Hi Matt. is there somethign wrong in the definition or handling of a new quantity in the code below? yield.quant=DGVMTools::defineQuantity(id="yield",name="yield","kgDM/m^2/y") GUESS.updated=DGVMTools::addTo(yield.quant,add.to = GUESS) S0.sp500.src=defineSource("S0_sp500_luc1550","S0_sp500_luc1550" ,dir="~/GCP/GCP_2023/tech_cfxinput_runs/S0_global_nspin500/output-2024-03-05/" ,format=GUESS.updated) yield.s0.sp500=getField(source = S0.sp500.src,quant="yield") Error in getStandardQuantity_LPJ(source, quant, layers, target.sta = target.STAInfo, : Unfortunately standard quantity yield does not seem to be available in LPJ-GUESS

cheers Peter

MagicForrest commented 2 months ago

Hmmm... try adding "format" = "GUESS" to the defineQuantity() call.

anthoni-p commented 2 months ago

yep, yield.quant=DGVMTools::defineQuantity(id="yield",name="yield","kgDM/m^2/y",format="GUESS") works, thanks