Download the BE global daily gridded data from this page:
https://berkeleyearth.org/data/
You will only need the TAVG product. Note that due to missing parameters such as precipitation some models might not be usable for upscaling using this dataset. Always consider the scope of your work within the context of the available training data and spatial scaling context.
# download the data
# need to call two years
# to bridge two years
pr_dl_be(
path = tempdir(),
year = 2021
)
# load the included data using
data("phenocam_DB")
# optimize model parameters
# using daymet data for training
optim.par <- pr_fit(
data = phenocam_DB,
cost = rmse,
model = "TT",
method = "GenSA"
)
output <- pr_predict(
optim.par$par,
data = be_data,
model = "TT"
)
plot(output)