add updateMusoMapping function and fix musoMapping function
This commit is contained in:
parent
5cea99e0a4
commit
ea8fac69e4
@ -3,6 +3,7 @@ Title: An R package for BiomeBGC-MuSo ecosystem modelling
|
|||||||
Version: 0.3.1.0-1
|
Version: 0.3.1.0-1
|
||||||
Authors@R: person("Roland", "Hollo's", , "hollorol@gmail.com", role = c("aut", "cre"))
|
Authors@R: person("Roland", "Hollo's", , "hollorol@gmail.com", role = c("aut", "cre"))
|
||||||
Description: What the package does (one paragraph).
|
Description: What the package does (one paragraph).
|
||||||
|
Depends: R (>= 2.10)
|
||||||
License: GPL-2
|
License: GPL-2
|
||||||
LazyData: true
|
LazyData: true
|
||||||
NeedsCompilation: no
|
NeedsCompilation: no
|
||||||
|
|||||||
@ -6,10 +6,12 @@ export(corrigMuso)
|
|||||||
export(getyearlycum)
|
export(getyearlycum)
|
||||||
export(getyearlymax)
|
export(getyearlymax)
|
||||||
export(musoDate)
|
export(musoDate)
|
||||||
|
export(musoMapping)
|
||||||
export(plotMuso)
|
export(plotMuso)
|
||||||
export(rungetMuso)
|
export(rungetMuso)
|
||||||
export(setupMuso)
|
export(setupMuso)
|
||||||
export(spinupMuso)
|
export(spinupMuso)
|
||||||
export(supportedMuso)
|
export(supportedMuso)
|
||||||
|
export(updateMusoMapping)
|
||||||
import(graphics)
|
import(graphics)
|
||||||
import(utils)
|
import(utils)
|
||||||
|
|||||||
@ -55,7 +55,7 @@ calibMuso <- function(settings,parameters=NULL, timee="d", debugging=FALSE, logf
|
|||||||
}
|
}
|
||||||
|
|
||||||
if(aggressive==TRUE){
|
if(aggressive==TRUE){
|
||||||
cleanupMuso(location=outputloc)
|
cleanupMuso(location=outputloc,deep = TRUE)
|
||||||
}
|
}
|
||||||
|
|
||||||
##change the epc file if and only if there are given parameters
|
##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){
|
if(errorsign==1){
|
||||||
return("Modell Failure")
|
return("Modell Failure")
|
||||||
}
|
}
|
||||||
|
|||||||
@ -26,6 +26,7 @@ cleanupMuso <- function(location=NULL, simplicity=TRUE,deep=FALSE){
|
|||||||
areThereAnyFolders <- TRUE
|
areThereAnyFolders <- TRUE
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if(dir.exists("../ERROR")){
|
if(dir.exists("../ERROR")){
|
||||||
setwd("../ERROR")
|
setwd("../ERROR")
|
||||||
|
|
||||||
|
|||||||
@ -113,20 +113,3 @@ corrigMuso <- function(settings, data){
|
|||||||
}
|
}
|
||||||
return(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
@ -56,7 +56,7 @@ rungetMuso <- function(settings, timee="d", debugging=FALSE, logfilename=NULL, k
|
|||||||
}
|
}
|
||||||
|
|
||||||
if(aggressive==TRUE){
|
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.
|
##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
BIN
RBBGCMuso/R/sysdata.rda
Normal file
Binary file not shown.
22
RBBGCMuso/man/musoMapping.Rd
Normal file
22
RBBGCMuso/man/musoMapping.Rd
Normal 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
|
||||||
|
}
|
||||||
20
RBBGCMuso/man/updateMusoMapping.Rd
Normal file
20
RBBGCMuso/man/updateMusoMapping.Rd
Normal 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.
Loading…
Reference in New Issue
Block a user