diff --git a/Example_Use.R b/Example_Use.R index 548ac955..588ac10a 100644 --- a/Example_Use.R +++ b/Example_Use.R @@ -9,15 +9,12 @@ historic <- historic_input(dbCon, thebb, period = "2001_2020") plot(historic[[1]][[2]]) ##provide or create a long, lat, elev, and optionally id, dataframe - usually read from csv file -in_xyz <- structure(list(Long = c(-127.70521, -127.62279, -127.56235, -127.7162, -## smaller example in BC - -127.18585, -127.1254, -126.94957, -126.95507), - Lat = c(55.3557, 55.38847, 55.28537, 55.25721, 54.88135, 54.65636, 54.6913, 54.61025), - Elev = c(291L, 296L, 626L, 377L, 424L, 591L, 723L, 633L), - ID = LETTERS[1:8], - Zone = c(rep("CWH",3), rep("CDF",5)), - Subzone = c("vm1","vm2","vs1",rep("mm",3),"dk","dc")), - row.names = c(NA, -8L), class = "data.frame") +in_xyz <- data.frame(Long = c(-127.70521, -127.62279, -127.56235, -127.7162, + -127.18585, -127.1254, -126.94957, -126.95507), + Lat = c(55.3557, 55.38847, 55.28537, 55.25721, 54.88135, 54.65636, 54.6913, 54.61025), + Elev = c(291L, 296L, 626L, 377L, 424L, 591L, 723L, 633L), + Zone = c(rep("CWH",3), rep("CDF",5)), + Subzone = c("vm1","vm2","vs1",rep("mm",3),"dk","dc")), ##show available variables: list_variables() @@ -69,7 +66,7 @@ ggplot(res2[RUN != "ensembleMean",],aes(x = PERIOD, y = Tave01, col = RUN, group ##historic timeseries ds_results_hist <- climr_downscale(xyz = in_xyz, which_normal = "auto", - gcm_models = c("ACCESS-ESM1-5"), + gcm_models = c("ACCESS-ESM1-5"), gcm_hist_years = 1910:2010, historic_ts = 1910:2010, return_normal = FALSE,