Package NUCOMBog. R topics documented:

Similar documents
Package fastdummies. January 8, 2018

Package datasets.load

Package ECctmc. May 1, 2018

Package cattonum. R topics documented: May 2, Type Package Version Title Encode Categorical Features

Package kirby21.base

Package geojsonsf. R topics documented: January 11, Type Package Title GeoJSON to Simple Feature Converter Version 1.3.

Package waver. January 29, 2018

Package SEMrushR. November 3, 2018

Package mdftracks. February 6, 2017

Package clipr. June 23, 2018

Package lumberjack. R topics documented: July 20, 2018

Package repec. August 31, 2018

Package jstree. October 24, 2017

Package validara. October 19, 2017

Package pdfsearch. July 10, 2018

Package canvasxpress

Package deductive. June 2, 2017

Package smapr. October 20, 2017

Package calpassapi. August 25, 2018

Package sfc. August 29, 2016

Package dbx. July 5, 2018

Package barcoder. October 26, 2018

Package weco. May 4, 2018

Package ggimage. R topics documented: November 1, Title Use Image in 'ggplot2' Version 0.0.7

Package bigreadr. R topics documented: August 13, Version Date Title Read Large Text Files

Package strat. November 23, 2016

Package shinyhelper. June 21, 2018

Package censusapi. August 19, 2018

Package goodpractice

Package pwrab. R topics documented: June 6, Type Package Title Power Analysis for AB Testing Version 0.1.0

Package rnaturalearth

Package humanize. R topics documented: April 4, Version Title Create Values for Human Consumption

Package gtrendsr. October 19, 2017

Package reval. May 26, 2015

Package spark. July 21, 2017

Package editdata. October 7, 2017

Package bisect. April 16, 2018

Package shinyfeedback

Package librarian. R topics documented:

Package regexselect. R topics documented: September 22, Version Date Title Regular Expressions in 'shiny' Select Lists

Package ggimage. R topics documented: December 5, Title Use Image in 'ggplot2' Version 0.1.0

Package ecoseries. R topics documented: September 27, 2017

Package gtrendsr. August 4, 2018

Package eply. April 6, 2018

Package SimilaR. June 21, 2018

Package gggenes. R topics documented: November 7, Title Draw Gene Arrow Maps in 'ggplot2' Version 0.3.2

Package postgistools

Package fitbitscraper

Package spelling. December 18, 2017

Package nngeo. September 29, 2018

Package messaging. May 27, 2018

Package censusr. R topics documented: June 14, Type Package Title Collect Data from the Census API Version 0.0.

Package robotstxt. November 12, 2017

Package rprojroot. January 3, Title Finding Files in Project Subdirectories Version 1.3-2

Package QCAtools. January 3, 2017

Package gifti. February 1, 2018

Package Rspc. July 30, 2018

Package catenary. May 4, 2018

Package swmmr. April 10, 2018

Package raker. October 10, 2017

Package available. November 17, 2017

Package oec. R topics documented: May 11, Type Package

Package labelvector. July 28, 2018

Package exifr. October 15, 2017

Package internetarchive

Package ezknitr. September 16, 2016

Package geneslope. October 26, 2016

Package coga. May 8, 2018

Package readxl. April 18, 2017

Package CorporaCoCo. R topics documented: November 23, 2017

Package rsppfp. November 20, 2018

Package readobj. November 2, 2017

Package gfcanalysis. August 29, 2016

Package edfreader. R topics documented: May 21, 2017

Package vinereg. August 10, 2018

Package docxtools. July 6, 2018

Package widyr. August 14, 2017

Package ClusterBootstrap

Package httpcache. October 17, 2017

Package virustotal. May 1, 2017

Package rgho. R topics documented: January 18, 2017

Package liftr. R topics documented: May 14, Type Package

Package projector. February 27, 2018

Package fastqcr. April 11, 2017

Package nos. September 11, 2017

Package GetITRData. October 22, 2017

Package jdx. R topics documented: January 9, Type Package Title 'Java' Data Exchange for 'R' and 'rjava'

Package splithalf. March 17, 2018

Package RODBCext. July 31, 2017

Package WordR. September 7, 2017

Package jpmesh. December 4, 2017

Package IATScore. January 10, 2018

Package profvis. R topics documented:

Package pinyin. October 17, 2018

Package PSTR. September 25, 2017

Package sessioninfo. June 21, 2017

Package preprosim. July 26, 2016

Package io. January 15, 2018

Package estprod. May 2, 2018

Package MatchIt. April 18, 2017

Transcription:

Package NUCOMBog September 1, 2017 Title NUtrient Cycling and COMpetition Model Undisturbed Open Bog Ecosystems in a Temperate to Sub-Boreal Climate Version 1.0.4.1 Date 2017-05-02 Modelling the vegetation, carbon, nitrogen and water dynamics of undisturbed open bog ecosystems in a temperate to sub-boreal climate. The executable of the model can downloaded from <https://github.com/jeroenpullens/nucombog>. Depends R (>= 3.0.0), snowfall Suggests R.rsp VignetteBuilder R.rsp License GPL Maintainer J.W.M. Pullens <jeroenpullens@gmail.com> LazyData true RoxygenNote 5.0.1 URL https://github.com/jeroenpullens/nucombog/ BugReports https://github.com/jeroenpullens/nucombog/issues NeedsCompilation no Author J.W.M. Pullens [aut, cre], R. Silveyra Gonzalez [aut], M. Bagnara [aut], F. Hartig [aut] Repository CRAN Date/Publication 2017-09-01 20:08:21 UTC R topics documented: copytestdata......................................... 2 getdata........................................... 3 NUCOMBog........................................ 4 runnucom......................................... 4 runparallelnucom..................................... 5 setupnucom........................................ 6 1

2 copytestdata Index 9 copytestdata Function to copy test data to user specified folder This function copies the test data from the R package to a user-defined folder. This is necesarry since the model does not read the data from R. The model needs to be run in a seperate folder and the executable can be downloaded from the provided URL. The executable needs to be copied to the folder where the data is located. The folder structure should be maintained. If the specified folder does not exist, the function will create it at the user defined loaction. If the packages are installed on default path, then the package_folder argument can be kept empty. If not, the user has to provide the path where the R package is installed. copytestdata(new_folder,package_folder=null) new_folder Folder to where the data needs to be copied package_folder Folder where the R package is installed, if this is not specified during installation leave this empty. for Windows: copytestdata(new_folder="c:/testdata/",package_folder=null) for Linux: copytestdata(new_folder="~/testdata/",package_folder=null)

getdata 3 getdata Function to retrieve data from the monthly output file created by NU- COMBog This function returns the data from the monthly output file created by NUCOMBog. The original model provides net primary production (NPP) as an output, the model has been modified to provide autotrophic respiration aswell. In this way the net ecosystem exchange (NEE) can be calculated, since NEE = NPP - autotrophic respiration. The micrometeorological sign convention is used in this model, e.g. a negative value for NEE means carbon uptake. All fluxes are in gram carbon per square meter per month (gc m-2 month-1). The model gives water table depth (WTD) in meters and positive values mean below ground level. The possible outputs of the model are Net Primary Production (NPP), Net Ecosystem Exchange (NEE), heterotrohpic respiration (hetero_resp) and water table depth (WTD). The desired output needs to be specified in the setup_nucom function. The getdata function is integrated in all runnucom functions. getdata(setup, startval = startval) setup startval setup_structure described in setupnucom From which row does the output need to be loaded. Default is 1, has to be setup in the setupnucom function. getdata(setup=test_setup_singlecore)

4 runnucom NUCOMBog NUCOMBog The NUCOMBog R package provides an interface to the NUCOMBog model in R. The package simulates the dynamics of five plant functional types (PFTs): graminoids, ericaceous shrubs and three groups of Sphagnum mosses (lawn, hollow and hummock mosses) on a monthly time step. The R package also calculates the monthly heterotrophic respiration and therefore the net ecosystem exchange can be calculated. The package provides a user-friendly tool that allows simulating peatlands over years/decades, under different management strategies and climate change scenarios. For details on how to use the package, go to the help files of the functions. This work was supported by a STSM grant to from COST Action FP1304 (Profound, http://cost-profound.eu/site/) runnucom Run NUCOMBog Code to run NUCOMBog on a single core. runnucom(setup, parameters = NULL) setup parameters The setup structure created by setup_nucom function needs to be inserted here, for more information see the setup_nucom function help, by typing "?NUCOMBog::setup_NUCOM". The parameters which are used in the model. If no parameter values are given the default values will be used. The parameters have to have the format of a dataframe with colum names: "names" and "values". See example data available via the testcopydata function. The default parameters are from Heijmans et al. 2008.

runparallelnucom 5 The executable of the model can downloaded from https://github.com/jeroenpullens/nucombog References Heijmans, M., Mauquoy, D., van Geel, B., and Berendse, F. (2008). Long-term effects of climate change on vegetation and carbon dynamics in peat bogs. Journal of Vegetation Science, 19(3) names<-c("co2ref","gram_beta","eric_maxgr") initialparameters <- c(380,0.5,65) initialparameters<-data.frame(names,initialparameters) names(initialparameters)<-c("names","values") runnucom(setup = test_setup_singlecore,parameters=initialparameters) ## with predefined parameters: runnucom(setup = test_setup_singlecore,parameters=null) runparallelnucom Run parallel NUCOM Code to run NUCOMBog parallel on multiple cores. runparallelnucom(setup, clustertype, numcores = 1, parameters) setup clustertype numcores parameters The setup needs to be made before by running the setup_nucom function. Clustertype: The model has only been tested on SOCK cluster, which is the set to default. Number of Cores on which are model needs to be run (NOTE: Non-parallel runs can only be run on 1 core). Default is 1. The parameters which are used in the model. If no parameter values are given the default values will be used. The parameters have to have the format of a dataframe with colum names: "names" and "values". The default parameters are from Heijmans et al. 2008.

6 setupnucom References Heijmans, M., Mauquoy, D., van Geel, B., and Berendse, F. (2008). Long-term effects of climate change on vegetation and carbon dynamics in peat bogs. Journal of Vegetation Science, 19(3)!!the variable "test_setup" is from the function setupnucom, see the help for more information!! parallel<-runparallelnucom(setup = test_setup, clustertype = "SOCK", numcores = 1, parameters=initialparameters) setupnucom make setupnucom Code to make the setup structure needed run the model. The data used in the example is stored in the package and can be copied to a user specified location via the copytestdata function of this package. setupnucom(maindir, climate, environment, inival, start, end, type, numfolders = 1, parallel = F, separate = F, startval = 1) maindir climate environment Working directory climate input (monthly) format: year, month, air temperature, precipitation, potential evapotranspiration (tab seperated). The potential evapotranspiration needs to be calcluated by using the Penman open water evapotranspiration. environment input (yearly) format: year, atmospheric co2 values, nitrogen deposition

setupnucom 7 Value inival start end type numfolders parallel separate initial values of biomass year in which the simulation starts year in which the simulation ends Which output is needed? For more information see the help of the getdata function. The amount of folders that needs to be created (in case of parallel computing) Run the model on parallel cores? TRUE/FALSE, default is FALSE. Does the model needs to be run for all parameters seperate? Default is FALSE startval From which row does the output need to be loaded. Default is 1. A list with paths and filenames and parameter values which can be implemented in the runnucom and the runnucomparallel function. #Define complete file path in setup for LINUX: ~/home/.../data/! pay attention to the last "/" for Windows_ C://..//data//! pay attention to the last "//" ##Single core setup: test_setup_singlecore <- setupnucom(maindir="/home/jeroen/nucombog_data/", climate="climlvmhis.txt", environment="envlvmhis.txt", inival="inivallvmhis.txt", start=1766, end=1999, type=c("nee","wtd"), parallel=f) ## Multi core setup: names<-c("co2ref","gram_beta","eric_maxgr") nparvector<-50 initialparameters <- matrix(runif(n=length(names)*nparvector, min=c(300,0.1,40), max=c(500,1,80)), nrow=length(names))

8 setupnucom initialparameters<-data.frame(names,initialparameters) names(initialparameters)<-c("names",rep("values",nparvector)) initialparameters$names<-as.character(initialparameters$names) test_setup <- setupnucom(maindir="/home/jeroen/nucombog_data/", climate="climlvmhis.txt", environment="envlvmhis.txt", inival="inivallvmhis.txt", start=1766, end=1999, type=c("nee","wtd"), parallel=t, numfolders=nparvector, separate=f, startval=1)

Index Topic NUCOMBog runparallelnucom, 5 setupnucom, 6 copytestdata, 2 getdata, 3 NUCOMBog, 4 NUCOMBog-package (NUCOMBog), 4 runnucom, 4 runparallelnucom, 5 setupnucom, 6 9