Skip to content
Snippets Groups Projects
readMECOData.Rd 2.30 KiB
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/MECO.R
\name{readMECOData}
\alias{readMECOData}
\title{Read in output data from LPJmL to calculate the ecosystem change metric MECO}
\usage{
readMECOData(
  folderRef,
  folderRef2 = NULL,
  folderScen,
  saveFile = NULL,
  export = FALSE,
  combined = FALSE,
  varnames,
  headerout = 0,
  timespan_full_ref,
  timespan_full_scen,
  timespan_focus_ref,
  timespan_focus_ref2 = NULL,
  timespan_focus_scen,
  nitrogen,
  npfts,
  ncfts,
  nbfts,
  ncells,
  soillayers = 6
)
}
\arguments{
\item{folderRef}{folder of reference run}

\item{folderRef2}{2nd folder of reference run, if split (default NULL -- no split)}

\item{folderScen}{folder of scenario run}

\item{saveFile}{file to save read in data to (default NULL)}

\item{export}{flag whether to export réad in data to global environment (default F)}

\item{combined}{read in soilc+litc, evap+interc, rh+harvestc separate or as combined outputs (default F -- separate)}

\item{varnames}{data.frame with names of output files -- can be specified to account for variable file names (default NULL -- standard names are used)}

\item{headerout}{headersize of the output files (default 0)}

\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{nitrogen}{include nitrogen outputs for pools and fluxes into MECO calculation (default F)}

\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)}
}
\value{
list data object containing arrays of state_ref, mean_state_ref,
        state_scen, mean_state_scen, fpc_ref, fpc_scen, bft_ref, bft_scen,
        cft_ref, cft_scen, lat, lon, cellArea
}
\description{
Utility function to read in output data from LPJmL for calculation of MECO
}
\examples{
\dontrun{
}
}