trotsiuk / r3PG

An R package for forest growth simulation using the 3-PG process-based model
https://trotsiuk.github.io/r3PG/
GNU General Public License v3.0
27 stars 16 forks source link

Include default Parameters for European tree species into R package? #57

Closed florianhartig closed 2 years ago

florianhartig commented 3 years ago

Hey @trotsiuk and @DavidForrester,

I think it would be quite useful to include the parameter estimates from https://link.springer.com/article/10.1007/s10342-021-01370-3 in the package. Specifically, what we could do is simply save the MAP parameter estimates as a data object, but ideally would be of course to also save the uncertainty. BayesianTools includes a function to create a prior from a posterior sample, so we could apply this and save the respective BT object.

Combined with the next issue that I will open, this would allow a much swifter use of 3PG.

DavidForrester commented 3 years ago

Sounds like a good idea to me.

trotsiuk commented 3 years ago

On the broader sense, it would be good to include also other sources of parameter estimates, not only from above mentioned paper. Potentially, we can include all the estimated parameter, which David have collected with his literature review.

For the estimations from the paper, would be possible to have MAP and the uncertainty.

florianhartig commented 3 years ago

Yes, I agree, ideal would be to have

a) one data set with parameters from the different studies

b) one "consensus parameterisation" which is our current best estimate of parameters (from all studies), including uncertainties. Possibly, this could be created from a) in a kind of metaanalysis fashion, would have to think about this! If we have explicit posteriors (MCMC samplers) for all studies in a), we could also merge them in a Bayesian way.

Rasilgon commented 3 years ago

Hi! I would be happy to contribute to this, and I could already start working on a) and build one data set with the following information:

As I start point, I could use the listed publications on the 3PG website (https://3pg.forestry.ubc.ca/3pg-studies/), but if you already have a collection of tables/files that serve this purpose, it would save some time. Once done, I could place it in external data as a new file or new tab of the existing xlsx, and add it to the pkg internal data, for example, as db_parameter. Additionally, I figure that a get_parameter function to obtain this data set and filter it by species, region, or any other of the columns would be the way to go.

There is no development branch, so I could fork the master and send a PR when ready. Let me know what you think of it. Thanks!

DavidForrester commented 3 years ago

A table containing all 3-PG parameter sets (currently > 70) that I am aware of is available in an Excel file that can be downloaded from: https://sites.google.com/site/davidforresterssite/home/projects/3PGmix

This should already contain all the parameters in the papers listed at https://3pg.forestry.ubc.ca/3pg-studies/, plus many more. However, if you check the Excel table and find that there are missing parameter sets, please let me know so that I can add them (some users still seem to prefer using the Excel version of 3-PG rather than r3PG).

Rasilgon commented 3 years ago

Thanks @DavidForrester for the link! It is a great start!

I have reshaped the data to have parameter sets for each species/clone/site with only one value per parameter, instead of having multiple values for some parameters in one parameter set. The idea, I think, would be to have complete parameter sets ready to be used with r3PG. Now there are 108 unique parameter sets. I kept the original comments for each parameter set in a comments column. I also checked some of the publications when needed.

When doing this some issues arose:

Generic

Specific

DavidForrester commented 3 years ago

The reasons for missing parameters vary a lot between studies. Many studies do not list all the parameters. In this case some say that they used default values, but others don't specify this. I guess it is ok to assume that most used the default parameters. Sometimes the authors modified 3-PG slightly so a parameter was replaced with something else, in which case I didn't include that parameter value. I think there were also some cases where I left a parameter value out because it was unreaslistic (outside the range indicated by empirical data) and appeared to be the result of tuning the model rather than any measurements. I cannot remember which papers mentioned Rttover rather than gammaR, but if the descriptions sound similar and other parameters have not been modified, then it is probably the same parameter. It is no problem to look at specific problems in the table you mentioned, just let me know if you want me to have a look.

Rasilgon commented 3 years ago

Hi @DavidForrester!

I could finally complete the table based on yours. Here is a link to it:

https://docs.google.com/spreadsheets/d/1lfsrwiW69ESfWGroWJcx6kcfn_NP-I3AnR5vpXizyCY/edit?usp=sharing

There is a small Readme tab. All parameter sets are in the Parameter_DB. The column Comments has a further explanation on issues of each parameter set. The column Source_comments includes your comments and any important information from the source/publication. For example, in Comments is specified which publications used the parameter Rttover.

It would be great if you can have a look. I include parameter values that were in the publications but not in the table you linked. Besides this, another big change is that there are more parameter sets. For instance, it was possible to split the tropical rainforest sets into plantations, old growth sites and reforestation sites.

Once the issues are solved and the table is consolidated, I can start with the next step: including in the package.

Thanks!!

DavidForrester commented 3 years ago

Thanks for putting this together. It is a great resource and useful also to see the missing or incorrect parameters that were in the original Excel file – I have now fixed these!

I added some comments to the shared table you developed. I think you can often add the default parameters when they did not specify which parameters were used. It would also be good to mention somewhere in your final table or its README files something like that (i) you filled in missing values in this way, (ii) that it is important to note that some parameter sets are based on very little data or a lot of tuning and are therefore unlikely to be as reliable as others, but that for completeness you included them all.

There were many differences between the original Excel file and your new file because I did not always divide the parameter sets when only a small number of parameters differed within a given study or experiment. But I think the way you have split these is good.

While checking some of the parameter sets, I found that I was missing two sets/citations.

Gupta, R., Sharma, L., 2021. Modelling the growth response to climate change and management of Tectona grandis L. f. using the 3‑PGmix model. Annals of Forest Science 78, 83.

Xie, Y., Lei, X., Shi, J., 2020b. Impacts of climate change on biological rotation of Larix olgensis plantations for timber production and carbon storage in northeast China using the 3-PGmix model. Ecological Modelling 435, 109267. BUT NOTE THAT THIS IS PROBABLY THE SAME AS USED BY Xie, Y., Wang, H., Lei, X., 2020. Simulation of climate change and thinning effects on productivity of Larix olgensis plantations in northeast China using 3-PGmix model. Journal of Environmental Management 261, 110249.

Rasilgon commented 2 years ago

Hi @DavidForrester ! Thanks for all comments! I will get to it as soon as I can. Tomorrow I am leaving, and I will be away until Christmas, so I might not report anything more until January.

Rasilgon commented 2 years ago

Hi @DavidForrester,

I have gone through your comments and updated the table accordingly. Thanks for your explanations on the parameters of the height equations and on the plausibility of some sets.

I have included the two new sets you mentioned and added a column "Notes", which includes relevant information on issues related to the parameter set.

Now the table is a bit tidier and almost ready. There are some parameters for which you did not provide feedback, perhaps you overlooked them. They are all (except two) parameters that are available in the publications, but not present in the table from the 3PG google site. They are red highlighted and commented.

The two troublesome parameters are the specific leaf area for E. grandis x urophylla from Staple et al. 2014 and the foliage stem partitioning ratio in the Gonzalez-Benecke studies. Both are named differently, and therefore, I am not sure if they can be used. They are yellow highlighted and commented.

We should decide what to do with mandatory parameters for which the publication did not provide values. When in the study it is specified that they used otherwise the default values, I filled them with the default values. When not, I left them empty. I think that a good approach would be to leave them empty, if there is no explicit indication to use default in the publication. Besides, if a r3PG-user wants to use one of those parameter sets and wishes to have the empty values replaced by the default ones, r3PG already has a function (prepare_input) to do so.

DavidForrester commented 2 years ago

Stape_2002_Thesis_PhD.pdf

Hi Rasilgon,

I have added the Stape 2002 thesis. It looks like the SLA parameter is the same as the usual 3PG parameter and could therefore be used.

The pFS parameters in the Gonzalez-Benecke studies are not the same as those required for our version of 3PG. They have been modified so that they can calculate them from their specific type of inventory data.

I agree that when parameters are not provided and it is not clear that default values were used, then it would be fine to leave them empty.

Rasilgon commented 2 years ago

Great! Thanks for the publication!

The pFS parameters in the Gonzalez-Benecke studies are not the same as those required for our version of 3PG. They have been modified so that they can calculate them from their specific type of inventory data.

Alright! I am removing from the DB.

I agree that when parameters are not provided and it is not clear that default values were used, then it would be fine to leave them empty.

Ok! Then I will do so.

twest820 commented 2 years ago

Hi, if it's not already in the upcoming pull request I'd like to suggest also citing the paper in README.md. I wasn't aware of Forrester et al. 2021 until relatively recently and this would make it more easily discoverable.

trotsiuk commented 2 years ago

I have now incorporated the citation. Additionally there will be the summary what Rasilgon is currently preparing with all the citation.