r and the forest vegetation simulator
DESCRIPTION
Mason Earles' presentation to the Davis R Users' Group on R and FVSTRANSCRIPT
![Page 1: R and the forest vegetation simulator](https://reader034.vdocuments.us/reader034/viewer/2022042607/559a044a1a28abbd5c8b4775/html5/thumbnails/1.jpg)
R and the Forest Vegetation Simulator Interfacing an old school model with R MASON EARLES D-RUG 02.13.13
![Page 2: R and the forest vegetation simulator](https://reader034.vdocuments.us/reader034/viewer/2022042607/559a044a1a28abbd5c8b4775/html5/thumbnails/2.jpg)
What’s the forest vegetation simulator (FVS)? What did I want to do with it? Where does R fit in?
![Page 3: R and the forest vegetation simulator](https://reader034.vdocuments.us/reader034/viewer/2022042607/559a044a1a28abbd5c8b4775/html5/thumbnails/3.jpg)
What’s FVS? Models forest growth, mortality and fire
![Page 4: R and the forest vegetation simulator](https://reader034.vdocuments.us/reader034/viewer/2022042607/559a044a1a28abbd5c8b4775/html5/thumbnails/4.jpg)
What’s FVS?
- Developed and commonly used by US Forest Service - FORTRAN language - Empirically based growth/mortality
- Individual trees modeled
- Tree interactions affect growth and mortality
![Page 5: R and the forest vegetation simulator](https://reader034.vdocuments.us/reader034/viewer/2022042607/559a044a1a28abbd5c8b4775/html5/thumbnails/5.jpg)
My goal: Use FVS ‘Monte Carlo style’ with stochastic fire and drought events
Problem: I don’t know the FORTRAN language; FVS is a mess of code maintained by a couple of people
![Page 6: R and the forest vegetation simulator](https://reader034.vdocuments.us/reader034/viewer/2022042607/559a044a1a28abbd5c8b4775/html5/thumbnails/6.jpg)
But I know R!
![Page 7: R and the forest vegetation simulator](https://reader034.vdocuments.us/reader034/viewer/2022042607/559a044a1a28abbd5c8b4775/html5/thumbnails/7.jpg)
Open-FVS = publicly available source code…API linking FVS to R
![Page 8: R and the forest vegetation simulator](https://reader034.vdocuments.us/reader034/viewer/2022042607/559a044a1a28abbd5c8b4775/html5/thumbnails/8.jpg)
FVS can now be run from R!
![Page 9: R and the forest vegetation simulator](https://reader034.vdocuments.us/reader034/viewer/2022042607/559a044a1a28abbd5c8b4775/html5/thumbnails/9.jpg)
A few things I’ve done with linked R + FVS
![Page 10: R and the forest vegetation simulator](https://reader034.vdocuments.us/reader034/viewer/2022042607/559a044a1a28abbd5c8b4775/html5/thumbnails/10.jpg)
Batch modify keyword code files w/ R
Keyword file
![Page 11: R and the forest vegetation simulator](https://reader034.vdocuments.us/reader034/viewer/2022042607/559a044a1a28abbd5c8b4775/html5/thumbnails/11.jpg)
Stochastic fire events
Burn probability = 40 years
![Page 12: R and the forest vegetation simulator](https://reader034.vdocuments.us/reader034/viewer/2022042607/559a044a1a28abbd5c8b4775/html5/thumbnails/12.jpg)
%dopar% for parallel simulations
![Page 13: R and the forest vegetation simulator](https://reader034.vdocuments.us/reader034/viewer/2022042607/559a044a1a28abbd5c8b4775/html5/thumbnails/13.jpg)
Stochastic drought events
Similar approach for drought events
![Page 14: R and the forest vegetation simulator](https://reader034.vdocuments.us/reader034/viewer/2022042607/559a044a1a28abbd5c8b4775/html5/thumbnails/14.jpg)
Simulation Examples: #runs = 100