diff --git a/DESCRIPTION b/DESCRIPTION index 5070970e6192818a80efe57112a3936f0b1aa131..f75f83816454ae28577adc420a0f30f61a487e69 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,8 +1,8 @@ Package: airGR Type: Package Title: Suite of GR Hydrological Models for Precipitation-Runoff Modelling -Version: 1.0.9.2 -Date: 2017-06-22 +Version: 1.0.9.3 +Date: 2017-06-26 Authors@R: c( person("Laurent", "Coron", role = c("aut", "trl")), person("Charles", "Perrin", role = c("aut", "ths")), diff --git a/R/DataAltiExtrapolation_Valery.R b/R/DataAltiExtrapolation_Valery.R index f6629f2eb60fc027a9e647d73dcfa394cc22a8fd..c15cffecfd678ec9d8919c1bb766d76c7abd29ca 100644 --- a/R/DataAltiExtrapolation_Valery.R +++ b/R/DataAltiExtrapolation_Valery.R @@ -433,7 +433,7 @@ DataAltiExtrapolation_Valery <- function(DatesR, ##Extrapolation ##Thresold_of_inputs_median_elevation Zthreshold <- 4000 - LayerPrecip_df <- sapply(1:NLayers, function(iLayer) { + LayerPrecip_mat <- sapply(1:NLayers, function(iLayer) { ##If_layer_elevation_smaller_than_Zthreshold if (ZLayers[iLayer] <= Zthreshold) { prcp <- as.double(Precip * exp(TabGradP * (ZLayers[iLayer] - ZInputs))) @@ -450,7 +450,7 @@ DataAltiExtrapolation_Valery <- function(DatesR, return(prcp) }) if (PrecipScale) { - LayerPrecip_mat <- LayerPrecip_df / rowMeans(LayerPrecip_df) * Precip + LayerPrecip_mat <- LayerPrecip_mat / rowMeans(LayerPrecip_mat) * Precip LayerPrecip_mat[is.nan(LayerPrecip_mat)] <- 0 } LayerPrecip <- as.list(as.data.frame(LayerPrecip_mat))