Skip to content
Snippets Groups Projects
Commit 49465a93 authored by Fabian Stenzel's avatar Fabian Stenzel
Browse files

roxygenized, incremented version number and removed old sav_files

parent d9cf73a0
No related branches found
No related tags found
1 merge request!4full review
Showing
with 604 additions and 3305 deletions
Package: biospheremetrics
Type: Package
Title: Biosphere integrity metrics for LPJmL
Version: 0.1.2
Version: 0.1.3
Author: Fabian Stenzel, Johanna Braun, Jannes Breier
Maintainer: Fabian Stenzel <stenzel@pik-potsdam.de>
Description: Functions to compute Biosphere integrity metrics M-COL and M-ECO based on output from LPJmL
......
......@@ -4,13 +4,17 @@ export(average_nyear_window)
export(calcDeltaV)
export(calcMCOL)
export(calcMECO)
export(calculateWithinBiomeDiffs)
export(classify_biomes)
export(disaggregateMECOintoBiomes)
export(disaggregateIntoBiomes)
export(get_biome_names)
export(list_needed_outputs)
export(mecoCrossTable)
export(mecoWrapper)
export(plotBiomeAverages)
export(plotBiomeAveragesToScreen)
export(plotBiomeInternalDistribution)
export(plotBiomeInternalDistributionToScreen)
export(plotBiomes)
export(plotBiomesToScreen)
export(plotMCOL)
......@@ -20,9 +24,11 @@ export(plotMECOcrossTable)
export(plotMECOcrossTableToScreen)
export(plotMECOmap)
export(plotMECOmapToScreen)
export(plotMECOovertimePanel)
export(plotMECOradial)
export(plotMECOradialPanel)
export(plotMECOradialToScreen)
export(plotOvertimeToScreen)
export(plot_biomes)
export(readMCOLdata)
export(readMECOData)
......
This diff is collapsed.
This diff is collapsed.
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/MECO.R
% Please edit documentation in R/MECO.R, R/MECO_sav.R
\name{calcDeltaV}
\alias{calcDeltaV}
\title{Calculates changes in vegetation structure (deltaV)}
\usage{
calcDeltaV(fpcRef, fpcScen, bftRef, bftScen, cftRef, cftScen, weighting)
calcDeltaV(
fpcRef,
fpcScen,
bftRef,
bftScen,
cftRef,
cftScen,
weighting = "equal"
)
calcDeltaV(
fpcRef,
fpcScen,
bftRef,
bftScen,
cftRef,
cftScen,
weighting = "equal"
)
}
\arguments{
\item{fpcRef}{reference fpc array (dim: [ncells,npfts+1])}
......@@ -19,12 +37,17 @@ calcDeltaV(fpcRef, fpcScen, bftRef, bftScen, cftRef, cftScen, weighting)
\item{cftScen}{scenario cft array (dim: [ncells,ncfts])}
\item{weighting}{apply "old" (Ostberg-like), "new", or "equal" weighting of deltaV weights (default "old")}
\item{weighting}{apply "old" (Ostberg-like), "new", or "equal" weighting of deltaV weights (default "equal")}
}
\value{
deltaV array of size ncells with the deltaV value [0,1] for each cell
deltaV array of size ncells with the deltaV value [0,1] for each cell
}
\description{
Utility function to calculate changes in vegetation structure (deltaV)
for calculation of MECO
Utility function to calculate changes in vegetation structure (deltaV)
for calculation of MECO
}
......@@ -33,6 +56,12 @@ for calculation of MECO
deltaV <- calcDeltaV(fpcRef = fpc_ref_mean,fpcScen = apply(fpc_scen,c(1,2),mean),
bftRef = bft_ref_mean,bftScen = apply(bft_scen,c(1,2),mean),
cftRef = cft_ref_mean, cftScen = apply(cft_scen,c(1,2),mean),
weighting = "new")
weighting = "equal")
}
\dontrun{
deltaV <- calcDeltaV(fpcRef = fpc_ref_mean,fpcScen = apply(fpc_scen,c(1,2),mean),
bftRef = bft_ref_mean,bftScen = apply(bft_scen,c(1,2),mean),
cftRef = cft_ref_mean, cftScen = apply(cft_scen,c(1,2),mean),
weighting = "equal")
}
}
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/MCOL.R
% Please edit documentation in R/MCOL.R, R/MCOL_sav.R
\name{calcMCOL}
\alias{calcMCOL}
\title{Calculate the ecosystem change metric gamma between 2 simulations/timesteps}
\title{Calculate MCOL}
\usage{
calcMCOL(
inFol_lu,
......@@ -13,10 +13,30 @@ calcMCOL(
npp_threshold = 20,
pftbands = 11,
cftbands = 32,
readPreviouslySavedData = FALSE,
dataFile = NULL,
ncells = 67420,
saveDataFile = FALSE,
readPreviouslySavedData = FALSE,
fileType = "clm",
headersize = 0,
varnames = NULL,
grass_scaling = T,
grass_harvest_file = "/p/projects/open/Fabian/LPJbox/grazing_data.RData"
)
calcMCOL(
inFol_lu,
inFol_pnv,
startyr,
stopyr,
gridbased = T,
npp_threshold = 20,
pftbands = 11,
cftbands = 32,
dataFile = NULL,
ncells = 67420,
saveDataFile = FALSE,
readPreviouslySavedData = FALSE,
fileType = "clm",
headersize = 0,
varnames = NULL,
......@@ -43,15 +63,15 @@ according to Haberl et al. 2007). Below MCOL will be set to 0.
\item{cftbands}{number of crop functional types}
\item{readPreviouslySavedData}{flag whether to read previously saved data
instead of reading it in from output files (default FALSE)}
\item{saveDataFile}{whether to save input data to file (default FALSE)}
\item{dataFile}{file to save/read input data to/from (default NULL)}
\item{ncells}{number of cells in lpjml grid}
\item{saveDataFile}{whether to save input data to file (default FALSE)}
\item{readPreviouslySavedData}{flag whether to read previously saved data
instead of reading it in from output files (default FALSE)}
\item{fileType}{type of output files - one of "clm", "nc" (default: "clm")}
\item{headersize}{headersize of the output files (default 0)}
......@@ -71,15 +91,28 @@ mapping_lpj67420_to_grazing_regions array with a mapping between 67420
LPJmL cells and the 29 regions}
}
\value{
list data object containing arrays of ...
list data object containing MCOL and components as arrays: mcol,
mcol_overtime, mcol_overtime_perc_piref, mcol_perc, mcol_perc_piref,
ynpp_potential, npp_act_overtime, npp_pot_overtime, npp_eco_overtime,
harvest_cft_overtime, npp_luc_overtime, rharvest_cft_overtime,
fire_overtime, timber_harvest_overtime, harvest_cft, mcol_harvest,
grassland_scaling_factor_cellwise, mcol_luc, mcol_luc_piref
list data object containing MCOL and components as arrays: mcol,
mcol_overtime, mcol_overtime_perc_piref, mcol_perc, mcol_perc_piref,
ynpp_potential, npp_act_overtime, npp_pot_overtime, npp_eco_overtime,
harvest_cft_overtime, npp_luc_overtime, rharvest_cft_overtime,
fire_overtime, timber_harvest_overtime, harvest_cft, mcol_harvest,
grassland_scaling_factor_cellwise, mcol_luc, mcol_luc_piref
}
\description{
Function to calculate the ecosystem change metric gamma according
to Sykes (1999), Heyder (2011), and Ostberg (2015,2018).
This is a reformulated version in R, not producing 100% similar values
than the C/bash version from Ostberg 2018, but following their methodology.
Function to calculate MCOL
Function to calculate MCOL
}
\examples{
\dontrun{
}
\dontrun{
}
}
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/MECO.R
% Please edit documentation in R/MECO.R, R/MECO_sav.R
\name{calcMECO}
\alias{calcMECO}
\title{Calculate the ecosystem change metric MECO between 2 simulations/timesteps}
\title{Calculate the ecosystem change metric MECO between 2 sets of states}
\usage{
calcMECO(
folderRef,
folderRef2 = NULL,
folderScen,
readPreviouslySavedData = FALSE,
saveFileData = NULL,
saveFileMECO = NULL,
combined = FALSE,
nitrogen = FALSE,
weighting = "old",
varnames = NULL,
headerout = 0,
timespan_full_ref,
timespan_full_scen,
timespan_focus_ref,
timespan_focus_ref2 = NULL,
timespan_focus_scen,
npfts,
ncfts,
nbfts,
ncells,
soillayers = 6,
dimensionsOnlyLocal = F
fpc_ref,
fpc_scen,
bft_ref,
bft_scen,
cft_ref,
cft_scen,
state_ref,
state_scen,
weighting = "equal",
lat,
lon,
cellArea,
dimensionsOnlyLocal = F,
nitrogen = T
)
calcMECO(
fpc_ref,
fpc_scen,
bft_ref,
bft_scen,
cft_ref,
cft_scen,
state_ref,
state_scen,
weighting = "equal",
lat,
lon,
cellArea,
dimensionsOnlyLocal = F,
nitrogen = T
)
}
\arguments{
\item{folderRef}{folder of reference run}
\item{fpc_ref}{reference run data for fpc}
\item{folderRef2}{optional 2nd reference run folder (default NULL - no split)}
\item{fpc_scen}{scenario run data for fpc}
\item{folderScen}{folder of scenario run}
\item{bft_ref}{reference run data for fpc_bft}
\item{readPreviouslySavedData}{whether to read in previously saved data
(default: FALSE)}
\item{bft_scen}{scenario run data for fpc_bft}
\item{saveFileData}{file to save read in data to (default NULL)}
\item{cft_ref}{reference run data for cftfrac}
\item{saveFileMECO}{file to save MECO data to (default NULL)}
\item{cft_scen}{scenario run data for cftfrac}
\item{combined}{read in soilc+litc, evap+interc, rh+harvestc separate or as
combined outputs (default F -- separate)}
\item{state_ref}{reference run data for state variables}
\item{nitrogen}{include nitrogen outputs for pools and fluxes into MECO
calculation (default F)}
\item{state_scen}{scenario run data for state variables}
\item{weighting}{apply "old" (Ostberg-like), "new", or "equal" weighting of
deltaV weights (default "old")}
\item{varnames}{data.frame with names of output files (outname) and time res.
(timestep) -- can be specified to account for variable file names
(default NULL -- standard names as below)
varnames <- data.frame(row.names = c("grid", "fpc", "fpc_bft", "cftfrac", "firec", "rh_harvest", "npp", "evapinterc", "runoff", "transp", "soillitc", "vegc", "swcsum", "firef", "rh", "harvestc", "evap", "interc", "soilc", "litc", "swc", "vegn", "soilnh4", "soilno3", "leaching", "n2o_denit", "n2o_nit", "n2o_denit", "n2_emis", "bnf", "n_volatilization"),
outname = c("grid.bin","fpc.bin","fpc_bft.bin","cftfrac.bin","firec.bin","rh_harvest.bin","npp.bin","evapinterc.bin","runoff.bin","transp.bin","soillitc.bin","vegc.bin","swcsum.bin","firef.bin","rh.bin","harvestc.bin","evap.bin","interc.bin","soilc.bin","litc.bin","swc.bin","vegn.bin","soilnh4.bin","soilno3.bin","leaching.bin","n2o_denit.bin","n2o_nit.bin","n2o_denit.bin","n2_emis.bin","bnf.bin","n_volatilization.bin"),
timestep = c("Y", "Y", "Y", "Y", "Y", "Y", "Y", "Y", "Y", "Y", "Y", "Y", "Y", "Y", "Y", "Y", "Y", "Y", "Y", "Y", "Y", ,"Y", "Y", "Y", "Y", "Y", "Y", "Y", "Y", "Y", "Y"))}
\item{headerout}{headersize of the output files (default: 0 bytes)}
\item{timespan_full_ref}{full timespan of output files in reference period}
\item{timespan_full_scen}{full timespan of output files in scenario period}
\item{timespan_focus_ref}{specific years to use as reference period}
\item{timespan_focus_ref2}{specific years to use as 2nd part of reference
period in case this is split (default NULL)}
\item{timespan_focus_scen}{specific years to use as scenario period}
\item{npfts}{number of natural plant functional types (== bands in fpc - 1)}
deltaV weights (default "equal")}
\item{ncfts}{number of crop bands (rainfed+irrigated)}
\item{lat}{latitude array}
\item{nbfts}{number of bands in fpc_bft (bioenergy functional types)}
\item{lon}{longitude array}
\item{ncells}{number of cells in lpjml grid}
\item{soillayers}{number of soil layers (default: 6)}
\item{cellArea}{cellarea array}
\item{dimensionsOnlyLocal}{flag whether to use only local change component
for water/carbon/nitrogen fluxes and pools, or use an average of
local change, global change and ecosystem balance (default F)}
\item{nitrogen}{include nitrogen outputs (default: TRUE)}
}
\value{
list data object containing arrays of deltaV, local_change,
global_change, ecosystem_balance, carbon_fluxes, carbon_stocks,
water_fluxes, meco_total (+ nitrogen_fluxes and nitrogen_stocks)
list data object containing arrays of meco_total, deltaV, local_change,
global_change, ecosystem_balance, carbon_stocks, carbon_fluxes,
water_fluxes (+ nitrogen_stocks and nitrogen_fluxes)
list data object containing arrays of meco_total, deltaV, local_change,
global_change, ecosystem_balance, carbon_stocks, carbon_fluxes,
water_fluxes (+ nitrogen_stocks and nitrogen_fluxes)
}
\description{
Function to calculate the ecosystem change metric MECO, based on gamma/deltaV
work from Sykes (1999), Heyder (2011), and Ostberg (2015,2018).
This is a reformulated version in R, not producing 100% similar values
than the C/bash version from Ostberg et al. 2018, but similar the methodology
Function to calculate the ecosystem change metric MECO, based on gamma/deltaV
work from Sykes (1999), Heyder (2011), and Ostberg (2015,2018).
This is a reformulated version in R, not producing 100% similar values
......@@ -100,4 +93,6 @@ than the C/bash version from Ostberg et al. 2018, but similar the methodology
\examples{
\dontrun{
}
\dontrun{
}
}
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/MECO.R, R/MECO_sav.R
\name{calculateWithinBiomeDiffs}
\alias{calculateWithinBiomeDiffs}
\title{Calculate meco with each biomes average cell}
\usage{
calculateWithinBiomeDiffs(
biome_classes,
dataFile_base,
intra_biome_distrib_file,
create = FALSE,
res = 0.05,
plotting = FALSE
)
calculateWithinBiomeDiffs(
biome_classes,
dataFile_base,
intra_biome_distrib_file,
create = FALSE,
res = 0.05,
plotting = FALSE
)
}
\arguments{
\item{biome_classes}{biome classes object as returned by classify biomes,
calculated for dataFile_base}
\item{dataFile_base}{base MECO to compute differences with (only ref is relevant)}
\item{intra_biome_distrib_file}{file to additionally write results to}
\item{create}{create new modified files, or read already existing ones?}
\item{res}{how finegrained the distribution should be (resolution)}
\item{plotting}{whether plots for each biome should be created}
}
\value{
data object with distibution - dim: c(biomes,meco_variables,bins)
data object with distibution - dim: c(biomes,meco_variables,bins)
}
\description{
Function to calculate meco with each biomes average cell
as a measure of internal variability
Function to calculate meco with each biomes average cell
as a measure of internal variability
}
\examples{
\dontrun{
}
\dontrun{
}
}
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/MECO.R
\name{disaggregateMECOintoBiomes}
\alias{disaggregateMECOintoBiomes}
% Please edit documentation in R/MECO.R, R/MECO_sav.R
\name{disaggregateIntoBiomes}
\alias{disaggregateIntoBiomes}
\title{Averages MECO values across regions}
\usage{
disaggregateMECOintoBiomes(
meco,
disaggregateIntoBiomes(
data,
biome_class,
type = "quantile",
classes = "4biomes"
)
disaggregateIntoBiomes(
data,
biome_class,
type = "quantile",
classes = "4biomes"
)
}
\arguments{
\item{meco}{MECO list object as returned by calcMECO}
\item{data}{List object, of which every item should be disaggregated}
\item{biome_class}{biome class list object as returned by classify_biomes}
......@@ -23,12 +30,20 @@ disaggregateMECOintoBiomes(
"4biomes" (tropics/temperate/boreal/arctic) or "allbiomes"}
}
\description{
Returns the average value across either 4 regions or all (19) biomes for MECO
and each of the subcomponents for each
Returns the average value across either 4 regions or all (19) biomes for MECO
and each of the subcomponents for each
}
\examples{
\dontrun{
disaggregateMECOintoBiomes(meco = meco,
disaggregateIntoBiomes(meco = meco,
biome_class = biome_classes,
type = "quantile",classes = "4biomes")
}
\dontrun{
disaggregateIntoBiomes(meco = meco,
biome_class = biome_classes,
type = "quantile",classes = "4biomes")
}
......
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/MECO.R
% Please edit documentation in R/MECO.R, R/MECO_sav.R
\name{get_biome_names}
\alias{get_biome_names}
\title{Get biome names}
\usage{
get_biome_names(biomeNameLength = 2)
get_biome_names(biomeNameLength = 2)
}
\arguments{
......@@ -11,9 +13,13 @@ get_biome_names(biomeNameLength = 2)
or full biome names}
}
\description{
Returns biome names with variable length (abbreviated, short, or full)
Returns biome names with variable length (abbreviated, short, or full)
}
\examples{
\dontrun{
}
\dontrun{
}
}
......@@ -4,12 +4,16 @@
\alias{list_needed_outputs}
\title{Returns LPJmL outputs required for given metric}
\usage{
list_needed_outputs(metric = "all", with_nitrogen = TRUE)
list_needed_outputs(
metric = "all",
with_nitrogen = TRUE,
only_first_filename = TRUE
)
}
\arguments{
\item{metric}{string/list of strings, containing name of metric to get
required outputs for. Pick from "meco", "mcol", "biome", "all_pbs",
"pb_n", "pb_w", "pb_b", "pb_lsc", "all" (default)}
required outputs for. Pick from "meco", "mcol", "biome", "nitrogen",
"lsc", "bluewater", "greenwater", "water", "biosphere", "all" (default)}
\item{withNitrogen}{logical: include nitrogen outputs? default: TRUE}
}
......
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/MECO.R
% Please edit documentation in R/MECO.R, R/MECO_sav.R
\name{mecoCrossTable}
\alias{mecoCrossTable}
\title{Create modified MECO data for crosstable}
\usage{
mecoCrossTable(dataFileIn, dataFileOut, biome_classes_in, pickCells = NULL)
mecoCrossTable(dataFileIn, dataFileOut, biome_classes_in, pickCells = NULL)
}
\arguments{
......@@ -17,6 +19,12 @@ mecoCrossTable(dataFileIn, dataFileOut, biome_classes_in, pickCells = NULL)
instead of computing the average state}
}
\description{
Function to create a modified MECO data file where for each biome
the average scenario cell is compared to the average scenario cell of all
other biomes. This can then be used to compute a crosstable with the average
difference between each of them as in the SI of Ostberg et al. 2013
(Critical impacts of global warming on land ecosystems)
Function to create a modified MECO data file where for each biome
the average scenario cell is compared to the average scenario cell of all
other biomes. This can then be used to compute a crosstable with the average
......@@ -26,4 +34,6 @@ difference between each of them as in the SI of Ostberg et al. 2013
\examples{
\dontrun{
}
\dontrun{
}
}
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/MECO.R, R/MECO_sav.R
\name{mecoWrapper}
\alias{mecoWrapper}
\title{Wrapper for calculating the ecosystem change metric MECO}
\usage{
mecoWrapper(
folderRef,
folderRef2 = NULL,
folderScen,
readPreviouslySavedData = FALSE,
saveFileData = NULL,
saveFileMECO = NULL,
combined = FALSE,
nitrogen = FALSE,
weighting = "equal",
varnames = NULL,
headerout = 0,
timespan_full_ref,
timespan_full_scen,
timespan_focus_ref,
timespan_focus_ref2 = NULL,
timespan_focus_scen,
npfts,
ncfts,
nbfts,
ncells,
soillayers = 6,
dimensionsOnlyLocal = F,
overtime = F,
window = 30
)
mecoWrapper(
folderRef,
folderRef2 = NULL,
folderScen,
readPreviouslySavedData = FALSE,
saveFileData = NULL,
saveFileMECO = NULL,
combined = FALSE,
nitrogen = FALSE,
weighting = "equal",
varnames = NULL,
headerout = 0,
timespan_full_ref,
timespan_full_scen,
timespan_focus_ref,
timespan_focus_ref2 = NULL,
timespan_focus_scen,
npfts,
ncfts,
nbfts,
ncells,
soillayers = 6,
dimensionsOnlyLocal = F,
overtime = F,
window = 30
)
}
\arguments{
\item{folderRef}{folder of reference run}
\item{folderRef2}{optional 2nd reference run folder (default NULL - no split)}
\item{folderScen}{folder of scenario run}
\item{readPreviouslySavedData}{whether to read in previously saved data
(default: FALSE)}
\item{saveFileData}{file to save read in data to (default NULL)}
\item{saveFileMECO}{file to save MECO data to (default NULL)}
\item{combined}{read in soilc+litc, evap+interc, rh+harvestc separate or as
combined outputs (default F -- separate)}
\item{nitrogen}{include nitrogen outputs for pools and fluxes into MECO
calculation (default F)}
\item{weighting}{apply "old" (Ostberg-like), "new", or "equal" weighting of
deltaV weights (default "equal")}
\item{varnames}{data.frame with names of output files (outname) and time res.
(timestep) -- can be specified to account for variable file names
(default NULL -- standard names as below)
varnames <- data.frame(row.names = c("grid", "fpc", "fpc_bft", "cftfrac", "firec", "rh_harvest", "npp", "evapinterc", "runoff", "transp", "soillitc", "vegc", "swcsum", "firef", "rh", "harvestc", "evap", "interc", "soilc", "litc", "swc", "vegn", "soilnh4", "soilno3", "leaching", "n2o_denit", "n2o_nit", "n2o_denit", "n2_emis", "bnf", "n_volatilization"),
outname = c("grid.bin","fpc.bin","fpc_bft.bin","cftfrac.bin","firec.bin","rh_harvest.bin","npp.bin","evapinterc.bin","runoff.bin","transp.bin","soillitc.bin","vegc.bin","swcsum.bin","firef.bin","rh.bin","harvestc.bin","evap.bin","interc.bin","soilc.bin","litc.bin","swc.bin","vegn.bin","soilnh4.bin","soilno3.bin","leaching.bin","n2o_denit.bin","n2o_nit.bin","n2o_denit.bin","n2_emis.bin","bnf.bin","n_volatilization.bin"),
timestep = c("Y", "Y", "Y", "Y", "Y", "Y", "Y", "Y", "Y", "Y", "Y", "Y", "Y", "Y", "Y", "Y", "Y", "Y", "Y", "Y", "Y", ,"Y", "Y", "Y", "Y", "Y", "Y", "Y", "Y", "Y", "Y"))}
\item{headerout}{headersize of the output files (default: 0 bytes)}
\item{timespan_full_ref}{full timespan of output files in reference period}
\item{timespan_full_scen}{full timespan of output files in scenario period}
\item{timespan_focus_ref}{specific years to use as reference period}
\item{timespan_focus_ref2}{specific years to use as 2nd part of reference
period in case this is split (default NULL)}
\item{timespan_focus_scen}{specific years to use as scenario period}
\item{npfts}{number of natural plant functional types (== bands in fpc - 1)}
\item{ncfts}{number of crop bands (rainfed+irrigated)}
\item{nbfts}{number of bands in fpc_bft (bioenergy functional types)}
\item{ncells}{number of cells in lpjml grid}
\item{soillayers}{number of soil layers (default: 6)}
\item{dimensionsOnlyLocal}{flag whether to use only local change component
for water/carbon/nitrogen fluxes and pools, or use an average of
local change, global change and ecosystem balance (default F)}
}
\value{
list data object containing arrays of meco_total, deltaV, local_change,
global_change, ecosystem_balance, carbon_stocks, carbon_fluxes,
water_fluxes (+ nitrogen_stocks and nitrogen_fluxes)
list data object containing arrays of meco_total, deltaV, local_change,
global_change, ecosystem_balance, carbon_stocks, carbon_fluxes,
water_fluxes (+ nitrogen_stocks and nitrogen_fluxes)
}
\description{
Function to read in data for meco, and call the calculation function once,
if overtime is F, or for each timeslice of length window years, if
overtime is T
Function to read in data for meco, and call the calculation function once,
if overtime is F, or for each timeslice of length window years, if
overtime is T
}
\examples{
\dontrun{
}
\dontrun{
}
}
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/MECO.R
% Please edit documentation in R/MECO.R, R/MECO_sav.R
\name{plotBiomeAverages}
\alias{plotBiomeAverages}
\title{Plot radial MECO plot to file with 4/16 biomes}
\usage{
plotBiomeAverages(
data,
file,
biome_class_names,
title = "",
titleSize = 2,
leg_scale = 1,
eps = FALSE
)
plotBiomeAverages(
data,
file,
......@@ -30,14 +40,22 @@ plotBiomeAverages(
\item{eps}{write as eps, replacing png in filename (default: True)}
}
\value{
None
None
}
\description{
Function to plot an aggregated radial status of MECO values [0-1]
for the different sub-categories to file
Function to plot an aggregated radial status of MECO values [0-1]
for the different sub-categories to file
}
\examples{
\dontrun{
}
\dontrun{
}
}
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/MECO.R
% Please edit documentation in R/MECO.R, R/MECO_sav.R
\name{plotBiomeAveragesToScreen}
\alias{plotBiomeAveragesToScreen}
\title{Plot radial MECO plot to file with 4/16 biomes}
\usage{
plotBiomeAveragesToScreen(
data,
biome_class_names,
title = "",
titleSize = 2,
leg_scale = 0.5
)
plotBiomeAveragesToScreen(
data,
biome_class_names,
......@@ -24,14 +32,22 @@ plotBiomeAveragesToScreen(
\item{leg_scale}{character string title for plot}
}
\value{
None
None
}
\description{
Function to plot an aggregated radial status of MECO values [0-1]
for the different sub-categories to file
Function to plot an aggregated radial status of MECO values [0-1]
for the different sub-categories to file
}
\examples{
\dontrun{
}
\dontrun{
}
}
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/MECO.R, R/MECO_sav.R
\name{plotBiomeInternalDistribution}
\alias{plotBiomeInternalDistribution}
\title{Plot to file distribution of similarity within biomes}
\usage{
plotBiomeInternalDistribution(
data,
file,
biomes_abbrv,
scale,
title = "",
legendtitle = "",
eps = FALSE
)
plotBiomeInternalDistribution(
data,
file,
biomes_abbrv,
scale,
title = "",
legendtitle = "",
eps = FALSE
)
}
\arguments{
\item{data}{data object with distibution - as returned by
calculateWithInBiomeDiffs. dim: c(biomes,bins)}
\item{file}{to write into}
\item{biomes_abbrv}{to mask the focusBiome from}
\item{scale}{scaling factor for distribution. defaults to 1}
\item{title}{character string title for plot, default empty}
\item{legendtitle}{character string legend title, default empty}
\item{eps}{write as eps or png (default: F -> png)}
}
\value{
None
None
}
\description{
Function to plot to file the distribution of similarity within biomes
Function to plot to file the distribution of similarity within biomes
}
\examples{
\dontrun{
}
\dontrun{
}
}
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/MECO.R, R/MECO_sav.R
\name{plotBiomeInternalDistributionToScreen}
\alias{plotBiomeInternalDistributionToScreen}
\title{Plot distribution of similarity within biomes}
\usage{
plotBiomeInternalDistributionToScreen(
data,
biomes_abbrv,
title = "",
legendtitle = "",
scale = 1
)
plotBiomeInternalDistributionToScreen(
data,
biomes_abbrv,
title = "",
legendtitle = "",
scale = 1
)
}
\arguments{
\item{data}{data object with distibution - as returned by
calculateWithInBiomeDiffs for each subcategory of meco.
dim: c(biomes,bins)}
\item{biomes_abbrv}{to mask the focusBiome from}
\item{title}{character string title for plot, default empty}
\item{legendtitle}{character string legend title, default empty}
\item{scale}{scaling factor for distribution. defaults to 1}
}
\value{
None
None
}
\description{
Function to plot the distribution of similarity within biomes
Function to plot the distribution of similarity within biomes
}
\examples{
\dontrun{
}
\dontrun{
}
}
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/MECO.R
% Please edit documentation in R/MECO.R, R/MECO_sav.R
\name{plotBiomes}
\alias{plotBiomes}
\title{Plot biomes to file}
\usage{
plotBiomes(
biome_ids,
biomeNameLength = 1,
orderLegend = "plants",
file,
title = "",
titleSize = 2,
legYes = T,
leg_scale = 1,
eps = FALSE
)
plotBiomes(
biome_ids,
biomeNameLength = 1,
......@@ -39,13 +51,20 @@ grasslands, then tundra ..., or "zones" to go from north to south
\item{eps}{write as eps, replacing png in filename (default: True)}
}
\value{
None
None
}
\description{
Function to plot biome classification to file
Function to plot biome classification to file
}
\examples{
\dontrun{
}
\dontrun{
}
}
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/MECO.R
% Please edit documentation in R/MECO.R, R/MECO_sav.R
\name{plotBiomesToScreen}
\alias{plotBiomesToScreen}
\title{Plot biomes}
\usage{
plotBiomesToScreen(
biome_ids,
biomeNameLength = 1,
orderLegend = "plants",
title = "",
titleSize = 2,
legYes = T,
leg_scale = 0.5
)
plotBiomesToScreen(
biome_ids,
biomeNameLength = 1,
......@@ -33,13 +43,20 @@ grasslands, then tundra ..., or "zones" to go from north to south
(default: "plants")}
}
\value{
None
None
}
\description{
Function to plot biome classification
Function to plot biome classification
}
\examples{
\dontrun{
}
\dontrun{
}
}
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/MCOL.R
% Please edit documentation in R/MCOL.R, R/MCOL_sav.R
\name{plotMCOL}
\alias{plotMCOL}
\title{Plot absolute MCOL, overtime, maps, and npp into given folder}
\usage{
plotMCOL(
mcolData,
outFol,
plotyears,
minVal,
maxVal,
legendpos,
startyr,
mapyear,
mapyear_buffer = 5,
highlightyear,
eps = FALSE
)
plotMCOL(
mcolData,
outFol,
......@@ -22,7 +36,8 @@ plotMCOL(
\item{mcolData}{mcol data list object (returned from calcMCOL) containing
mcol, npp_eco_overtime, npp_act_overtime, npp_pot_overtime,
npp_bioenergy_overtime, mcol_overtime, npp_harv_overtime,
mcol_overtime_perc_piref, mcol_perc, mcol_perc_piref, ynpp}
mcol_overtime_perc_piref, mcol_perc, mcol_perc_piref, ynpp
all in GtC}
\item{outFol}{folder to write into}
......@@ -46,12 +61,18 @@ mcol_overtime_perc_piref, mcol_perc, mcol_perc_piref, ynpp}
\item{eps}{write plots as eps, instead of png (default = FALSE)}
}
\value{
none
none
}
\description{
Wrapper function to plot absolute mcol, overtime, maps, and npp into given folder
Wrapper function to plot absolute mcol, overtime, maps, and npp into given folder
}
\examples{
\dontrun{
}
\dontrun{
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment