This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#' Download and convert TRMM data | |
#' | |
#' @author Claudia Vitolo | |
#' | |
#' @description The TRMM dataset provide global historical rainfall estimation in a gridded format. | |
#' | |
#' @param fileLocation file path where to save the GeoTiff | |
#' @param url url where data is stored (e.g. "ftp://disc2.nascom.nasa.gov/data/TRMM/Gridded/3B43_V7/2012/") | |
#' @param product this is the code that identifies a product, default is "3B43" | |
#' @param version this is the version number, default is 7 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if(!require(RHydro)) install.packages("RHydro",repos="http://R-Forge.R-project.org") | |
if(!require(fuse)) install.packages("fuse", repos="http://R-Forge.R-project.org") | |
library(RHydro) | |
library(fuse) | |
data(DATA) | |
data(modlist) | |
# Set parameter space |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# install/load dependent libraries | |
if(!require(zoo)) install.packages("zoo") | |
library(zoo) | |
if(!require(tgp)) install.packages("tgp") | |
library(tgp) | |
if(!require(qualV)) install.packages("qualV") | |
library(qualV) | |
if(!require(hydromad)) install.packages("hydromad",repos="http://hydromad.catchment.org") | |
library(hydromad) | |
if(!require(devtools)) install.packages("devtools") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Load the package and prepare the list of models | |
library(hydromad) | |
library(RHydro) | |
data(modlist) | |
# read data in | |
temp <- read.csv("dummyData.csv") | |
# Convert to date | |
temp[,1] <- as.Date(temp[,1],format="%Y-%m-%d") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if(!require(RHydro)) install.packages("RHydro",repos="http://R-Forge.R-project.org") | |
library(RHydro) | |
temp <- read.csv("dummyData.csv") | |
DATA <- zooreg(temp[,2:4], order.by=temp[,1]) | |
myDELTIM <- 1 | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if(!require(RHydro)) install.packages("RHydro",repos="http://R-Forge.R-project.org") | |
library(RHydro) | |
temp <- read.csv("dummyData.csv") | |
DATA <- zooreg(temp[,2:4], order.by=temp[,1]) | |
myDELTIM <- 1 | |
myMID <- 60 | |
# Sample parameter space using the Latin Hypercube Sampling method |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Step A: install RHydro | |
if(!require(RHydro)) install.packages("RHydro",repos="http://R-Forge.R-project.org") | |
# Step B: prepare your data | |
library(RHydro) | |
temp <- read.csv("dummyData.csv") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### testRHydro.R ### | |
# Load library | |
library(RHydro) | |
# Load data | |
data(modlist) | |
data(mopex) | |
# Calculate instantaneous runoff | |
Qinst <- fusesma.sim (fuse.DATA,mid=5,modlist,deltim=1, |
NewerOlder