fix perror and debugging=TRUE bug
This commit is contained in:
parent
fa87c5e3cb
commit
5cea99e0a4
@ -130,8 +130,11 @@ calibMuso <- function(settings,parameters=NULL, timee="d", debugging=FALSE, logf
|
||||
###############################################
|
||||
#############LOG SECTION#######################
|
||||
###############################################
|
||||
|
||||
|
||||
|
||||
perror<-as.numeric(as.vector(lapply(paste(outputloc,logfiles,sep="/"),function(x) tail(readLines(x,-1),1)))) #vector of spinup and normalrun error
|
||||
|
||||
perror<-as.numeric(as.vector(lapply(paste(outputloc,logfiles,sep="/"),function(x) tail(readLines(x,-1),1)))) #vector of spinup and normalrun error
|
||||
|
||||
if((debugging=="stamplog")|(debugging==TRUE)){#If debugging option turned on
|
||||
#If log or ERROR directory does not exists create it!
|
||||
@ -208,7 +211,7 @@ calibMuso <- function(settings,parameters=NULL, timee="d", debugging=FALSE, logf
|
||||
}
|
||||
|
||||
if(errorsign==1){
|
||||
lapply( logfiles, function (x) file.rename(from=paste(dirName,"/", x, sep=""), to=dirERROR))
|
||||
lapply( logfiles, function (x) file.copy(from=paste(dirName,"/", x, sep=""), to=dirERROR))
|
||||
}
|
||||
|
||||
} else {
|
||||
@ -220,7 +223,7 @@ calibMuso <- function(settings,parameters=NULL, timee="d", debugging=FALSE, logf
|
||||
}
|
||||
|
||||
if(errorsign==1){
|
||||
lapply( logfiles, function (x) file.rename(from=paste(dirName, "/",logfilename,"-",x,sep=""), to=dirERROR))
|
||||
lapply( logfiles, function (x) file.copy(from=paste(dirName, "/",logfilename,"-",x,sep=""), to=dirERROR))
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -113,3 +113,20 @@ 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)
|
||||
|
||||
|
||||
}
|
||||
|
||||
@ -204,7 +204,7 @@ rungetMuso <- function(settings, timee="d", debugging=FALSE, logfilename=NULL, k
|
||||
}
|
||||
|
||||
if(errorsign==1){
|
||||
lapply( logfiles, function (x) file.rename(from=paste(dirName,"/", x, sep=""), to=dirERROR))
|
||||
lapply( logfiles, function (x) file.copy(from=paste(dirName, "/",logfilename,"-",x,sep=""), to=dirERROR))
|
||||
}
|
||||
|
||||
} else {
|
||||
@ -216,7 +216,7 @@ rungetMuso <- function(settings, timee="d", debugging=FALSE, logfilename=NULL, k
|
||||
}
|
||||
|
||||
if(errorsign==1){
|
||||
lapply( logfiles, function (x) file.rename(from=paste(dirName, "/",logfilename,"-",x,sep=""), to=dirERROR))
|
||||
lapply( logfiles, function (x) file.copy(from=paste(dirName, "/",logfilename,"-",x,sep=""), to=dirERROR))
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Binary file not shown.
Loading…
Reference in New Issue
Block a user