add updateMusoMapping function and fix musoMapping function

This commit is contained in:
hollorol 2017-09-01 23:39:36 +02:00
parent 5cea99e0a4
commit ea8fac69e4
11 changed files with 86 additions and 24 deletions

View File

@ -3,6 +3,7 @@ Title: An R package for BiomeBGC-MuSo ecosystem modelling
Version: 0.3.1.0-1
Authors@R: person("Roland", "Hollo's", , "hollorol@gmail.com", role = c("aut", "cre"))
Description: What the package does (one paragraph).
Depends: R (>= 2.10)
License: GPL-2
LazyData: true
NeedsCompilation: no

View File

@ -6,10 +6,12 @@ export(corrigMuso)
export(getyearlycum)
export(getyearlymax)
export(musoDate)
export(musoMapping)
export(plotMuso)
export(rungetMuso)
export(setupMuso)
export(spinupMuso)
export(supportedMuso)
export(updateMusoMapping)
import(graphics)
import(utils)

View File

@ -55,7 +55,7 @@ calibMuso <- function(settings,parameters=NULL, timee="d", debugging=FALSE, logf
}
if(aggressive==TRUE){
cleanupMuso(location=outputloc)
cleanupMuso(location=outputloc,deep = TRUE)
}
##change the epc file if and only if there are given parameters
@ -229,7 +229,7 @@ calibMuso <- function(settings,parameters=NULL, timee="d", debugging=FALSE, logf
}}
cleanupMuso(location=outputloc)
cleanupMuso(location=outputloc,deep = TRUE)
if(errorsign==1){
return("Modell Failure")
}

View File

@ -26,6 +26,7 @@ cleanupMuso <- function(location=NULL, simplicity=TRUE,deep=FALSE){
areThereAnyFolders <- TRUE
}
if(dir.exists("../ERROR")){
setwd("../ERROR")

View File

@ -113,20 +113,3 @@ corrigMuso <- function(settings, data){
}
return(data)
}
#' genMusoMapping
#'
#' This function leapyear-corrigate the output of the modell
#' @author Roland Hollos
#' @param settings This is the output of the setupMuso() function. It contains all of the RBBGCMuso settings
#' @param data the models outputdata
#' @return It returns the modells leapyear-corrigated output data.
#' @export
#' @usage corrigMuso(settings, data)
genMusoMapping<-function(output_map_init="output_map_init.c"){
outputRaw<-grep("\\[",readLines("output_map_init",-1),value=TRUE)
}

File diff suppressed because one or more lines are too long

View File

@ -56,7 +56,7 @@ rungetMuso <- function(settings, timee="d", debugging=FALSE, logfilename=NULL, k
}
if(aggressive==TRUE){
cleanupMuso(location=outputloc)
cleanupMuso(location=outputloc, deep=TRUE)
}
##We change the working directory becase of the model, but we want to avoid sideeffects, so we save the current location and after that we will change everything to it.

BIN
RBBGCMuso/R/sysdata.rda Normal file

Binary file not shown.

View File

@ -0,0 +1,22 @@
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/outputMapping.R
\name{musoMapping}
\alias{musoMapping}
\title{musoMapping}
\usage{
musoMapping(code, mapData=NULL)
}
\arguments{
\item{code}{the MuSo outputcode}
\item{mapData}{updateMusomapping generated matrix}
}
\value{
The name of the MuSo outputcode
}
\description{
musoMapping can give us the name of a muso outputcode
}
\author{
Roland Hollos
}

View File

@ -0,0 +1,20 @@
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/outputMapping.R
\name{updateMusoMapping}
\alias{updateMusoMapping}
\title{updateMusoMapping}
\usage{
updateMusoMapping(output_map_init="output_map_init.c")
}
\arguments{
\item{output_map_init}{The outputcode-variable bindings is described in output_map_init.c file, via this parameter, you can give it the the function}
}
\value{
The outputcode-variable matrix, and also change the global variable
}
\description{
This function update the the muso outputcode-variable matrix
}
\author{
Roland Hollos
}

Binary file not shown.