Adding prettyOut option to calibMuso
This commit is contained in:
parent
044f71d346
commit
021d889fd1
@ -17,6 +17,7 @@
|
|||||||
#' @param binaryPlace The place of the binary output files.
|
#' @param binaryPlace The place of the binary output files.
|
||||||
#' @param fileToChange You can change any line of the epc or the ini file, you just have to specify with this variable which file you van a change. Two options possible: "epc", "ini"
|
#' @param fileToChange You can change any line of the epc or the ini file, you just have to specify with this variable which file you van a change. Two options possible: "epc", "ini"
|
||||||
#' @param skipSpinup If TRUE, calibMuso wont do spinup simulation
|
#' @param skipSpinup If TRUE, calibMuso wont do spinup simulation
|
||||||
|
#' @param prettyOut date ad Date type, separate year, month, day vectors
|
||||||
#' @return No return, outputs are written to file
|
#' @return No return, outputs are written to file
|
||||||
#' @usage calibMuso(settings,parameters=NULL, timee="d", debugging=FALSE, logfilename=NULL,
|
#' @usage calibMuso(settings,parameters=NULL, timee="d", debugging=FALSE, logfilename=NULL,
|
||||||
#' keepEpc=FALSE, export=FALSE, silent=FALSE, aggressive=FALSE, leapYear=FALSE)
|
#' keepEpc=FALSE, export=FALSE, silent=FALSE, aggressive=FALSE, leapYear=FALSE)
|
||||||
@ -30,7 +31,7 @@ calibMuso <- function(settings=NULL, calibrationPar=NULL,
|
|||||||
silent=FALSE, aggressive=FALSE,
|
silent=FALSE, aggressive=FALSE,
|
||||||
leapYear=FALSE,keepBinary=FALSE,
|
leapYear=FALSE,keepBinary=FALSE,
|
||||||
binaryPlace="./", fileToChange="epc",
|
binaryPlace="./", fileToChange="epc",
|
||||||
skipSpinup = TRUE, modifyOriginal =FALSE){
|
skipSpinup = TRUE, modifyOriginal =FALSE, prettyOut = FALSE){
|
||||||
##########################################################################
|
##########################################################################
|
||||||
###########################Set local variables and places########################
|
###########################Set local variables and places########################
|
||||||
########################################################################
|
########################################################################
|
||||||
@ -321,7 +322,21 @@ calibMuso <- function(settings=NULL, calibrationPar=NULL,
|
|||||||
}
|
}
|
||||||
|
|
||||||
if(timee=="d"){
|
if(timee=="d"){
|
||||||
|
if(!prettyOut){
|
||||||
colnames(Reva) <- unlist(settings$outputVars[[1]])
|
colnames(Reva) <- unlist(settings$outputVars[[1]])
|
||||||
|
} else{
|
||||||
|
dates <- as.Date(musoDate(startYear = settings$startYear,
|
||||||
|
numYears = settings$numYears,
|
||||||
|
timestep="d",combined = TRUE,corrigated = FALSE),
|
||||||
|
"%d.%m.%Y")
|
||||||
|
Reva <- cbind.data.frame(dates,
|
||||||
|
musoDate(startYear = settings$startYear,
|
||||||
|
numYears = settings$numYears,
|
||||||
|
timestep = "d", combined = FALSE, corrigated = FALSE),
|
||||||
|
Reva)
|
||||||
|
colnames(Reva) <- as.character(c("date","day","month","year",unlist(settings$outputVars[[1]])) )
|
||||||
|
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
if(timee=="y")
|
if(timee=="y")
|
||||||
colnames(Reva) <- unlist(settings$outputVars[[2]])
|
colnames(Reva) <- unlist(settings$outputVars[[2]])
|
||||||
@ -331,11 +346,17 @@ calibMuso <- function(settings=NULL, calibrationPar=NULL,
|
|||||||
|
|
||||||
if(leapYear){
|
if(leapYear){
|
||||||
Reva <- corrigMuso(settings,Reva)
|
Reva <- corrigMuso(settings,Reva)
|
||||||
|
if(!prettyOut){
|
||||||
rownames(Reva) <- musoDate(settings$startYear,settings$numYears)
|
rownames(Reva) <- musoDate(settings$startYear,settings$numYears)
|
||||||
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
if(!prettyOut){
|
||||||
rownames(Reva) <- musoDate(settings$startYear, settings$numYears, corrigated=FALSE)
|
rownames(Reva) <- musoDate(settings$startYear, settings$numYears, corrigated=FALSE)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if(export!=FALSE){
|
if(export!=FALSE){
|
||||||
|
|||||||
11
README.md
11
README.md
@ -1,11 +0,0 @@
|
|||||||
|
|
||||||
# This is the official repository of the RBBCMuSo package
|
|
||||||
|
|
||||||
Written by Roland HOLLÓS, Dóra HIDY
|
|
||||||
|
|
||||||
E-mail: <hollorol@protonmail.com>
|
|
||||||
|
|
||||||
|
|
||||||
## Acknowledgements
|
|
||||||
|
|
||||||
The research was funded by the Széchenyi 2020 programme, the European Regional Development Fund and the Hungarian Government (GINOP-2.3.2-15-2016-00028).
|
|
||||||
14
README.org
Normal file
14
README.org
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
#+TITLE: This is the official repository of the RBBCMuSo package
|
||||||
|
#+AUTHOR: Roland HOLLÓS, Dóra HIDY, Zoltán BARCZA
|
||||||
|
|
||||||
|
Written by Roland HOLLÓS, Dóra HIDY
|
||||||
|
|
||||||
|
E-mail: hollorol@gmail.com
|
||||||
|
* Introduction
|
||||||
|
|
||||||
|
|
||||||
|
* Installation
|
||||||
|
* Usage
|
||||||
|
* Acknowledgements
|
||||||
|
|
||||||
|
The research was funded by the Széchenyi 2020 programme, the European Regional Development Fund and the Hungarian Government (GINOP-2.3.2-15-2016-00028).
|
||||||
Loading…
Reference in New Issue
Block a user