ilyamaclean / microclimc

Below or above canopy microclimate modelling with R
12 stars 7 forks source link

runNMR error #12

Closed lysoifer closed 1 year ago

lysoifer commented 2 years ago

When running 'runwithNMR' using the parameters specified in the vignette, the following error appears: "Error in runNMR(climdata, prec, lat, long, 1.95, hgt, 2, PAIt, vegp$x, : object 'CampNormTbl9_1' not found"

I think the issue may be in the following line of runNMR: "KS<-rep(CampNormTbl9_1$Ks[sel],19)" Should this line instead read "KS<-rep(microclimc::soilparams$Ksat[sel],19)"

Here is the code that produced the error: runwithNMR_error

Thanks, Lydia

ilyamaclean commented 2 years ago

Hi Lydia,

This is a wrapper function for NicheMapR, so you will need to install NicheMapR and then load the library before running the code above. It should work then. CampNormTh19_1 is a dataset in NicheMapR

Ilya