From 4e19f7e8d5a83ecd04ef0853fffe3718e0501a6e Mon Sep 17 00:00:00 2001 From: brycefrank Date: Fri, 19 Apr 2024 08:00:09 -0700 Subject: [PATCH] feat: adding winck_2015, closes #57 --- parameters/b_winck_2015_1.csv | 7 +++ parameters/br_winck_2015.csv | 5 ++ publications/u_z/winck_2015.R | 96 +++++++++++++++++++++++++++++++++++ 3 files changed, 108 insertions(+) create mode 100644 parameters/b_winck_2015_1.csv create mode 100644 parameters/br_winck_2015.csv create mode 100644 publications/u_z/winck_2015.R diff --git a/parameters/b_winck_2015_1.csv b/parameters/b_winck_2015_1.csv new file mode 100644 index 0000000..ad796a0 --- /dev/null +++ b/parameters/b_winck_2015_1.csv @@ -0,0 +1,7 @@ +response,zone,geographic_region,a,b,c +bt,1,North and High area of Mission,-3.36,2.12,0.65 +bt,2,Southern Misiones and Correntes NE,-3.32,2.12,0.65 +bs,1,North and High area of Mission,-4.51,1.83,1.22 +bs,2,Southern Misiones and Correntes NE,-4.48,1.83,1.22 +bb,1,North and High area of Mission,-2.68,3.73,-1.77 +bb,2,Southern Misiones and Correntes NE,-2.67,3.73,-1.77 diff --git a/parameters/br_winck_2015.csv b/parameters/br_winck_2015.csv new file mode 100644 index 0000000..6fd65e6 --- /dev/null +++ b/parameters/br_winck_2015.csv @@ -0,0 +1,5 @@ +response,zone,geographic_region,size_class,a,b,c +br,1,North and High area of Mission,>= 5 cm,-4.53,5.65,-5.93 +br,2,Southern Misiones and Correntes NE,>= 5 cm,-4.37,5.65,-5.93 +br,1,North and High area of Mission,< 5 cm,-1.81,2.67,-1.09 +br,2,Southern Misiones and Correntes NE,< 5 cm,-1.71,2.67,-1.09 diff --git a/publications/u_z/winck_2015.R b/publications/u_z/winck_2015.R new file mode 100644 index 0000000..38badd5 --- /dev/null +++ b/publications/u_z/winck_2015.R @@ -0,0 +1,96 @@ +winck_2015 <- Publication( + citation = RefManageR::BibEntry( + key = "winck_2015", + bibtype = "article", + title = "Regional prediction models for the aboveground biomass estimation of eucalyptus grandis in Northeastern Argentina", + author = "Winck, Rosa and Fassola, Hugo and Barth, Sara Regina and Crechi, Ernesto and Keller, Aldo and Videla, Daniel and Zaderenko, Constantino", + year = 2015, + month = 7, + pages = "595--606", + volume = 25, + journal = "Ciencia Florestal", + doi = "https://doi.org/10.5902/1980509819611" + ), + descriptors = list( + country = "AR", + taxa = Taxa( + Taxon( + family = "Myrtaceae", + genus = "Eucalyptus", + species = "grandis" + ) + ) + ) +) + +b_param_sets <- load_parameter_frame("b_winck_2015_1") %>% + split(.$response) + +# Do first 3 biomass model sets +for(i in seq_along(b_param_sets)) { + response_name <- names(b_param_sets)[[i]] + + response <- list() + response[[response_name]] <- units::as_units("kg") + + mod_set <- FixedEffectsSet( + response = response, + covariates = list( + dsob = units::as_units("cm"), + hst = units::as_units("m") + ), + parameter_names = c("a", "b", "c"), + predict_fn = function(dsob, hst) { + exp(a + b * log(dsob) + c * log(hst)) + }, + model_specifications = b_param_sets[[i]] + ) + + winck_2015 <- winck_2015 %>% add_set(mod_set) +} + +# Do diameter-specific branch biomass +bb_dias <- FixedEffectsSet( + response = list( + bb = units::as_units("kg") + ), + covariates = list( + dsob = units::as_units("cm"), + hst = units::as_units("m") + ), + parameter_names = c("a", "b", "c"), + predict_fn = function(dsob, hst) { + exp(a + b * log(dsob) + c * log(hst)) + }, + model_specifications = load_parameter_frame("br_winck_2015") +) + +winck_2015 <- winck_2015 %>% add_set(bb_dias) + +# Do foliage biomass +bf <- FixedEffectsSet( + response = list( + bf = units::as_units("kg") + ), + covariates = list( + dsob = units::as_units("cm"), + hst = units::as_units("m"), + att = units::as_units("years"), + gs_s = units::as_units("m^2/ha"), + es_s = units::as_units("ha^-1") + ), + parameter_names = c("a", "b", "c", "d", "e", "f"), + predict_fn = function(dsob, hst, att, gs_s, es_s) { + exp(a + b * dsob + c * hst + d * att + e * gs_s + f * es_s) + }, + model_specifications = tibble::tibble( + a = c(-6.12, -5.63), + b = c(3.26, 3.26), + c = c(-1.08, -1.08), + d = c(-0.65, -0.65), + e = c(-0.43, -0.43), + f = c(0.71, 0.71) + ) +) + +winck_2015 <- winck_2015 %>% add_set(bf) \ No newline at end of file