From 91bd1cc8ab0a17d2680bf99695687d2fc33de85e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ver=C3=B3nica=20Torralba-Fern=C3=A1ndez?= Date: Fri, 19 Mar 2021 09:03:50 +0100 Subject: [PATCH 1/2] Including abs to retain the absolute value of the correlation --- R/CST_Calibration.R | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/R/CST_Calibration.R b/R/CST_Calibration.R index 58ef7207..34607bad 100644 --- a/R/CST_Calibration.R +++ b/R/CST_Calibration.R @@ -416,7 +416,7 @@ Calibration <- function(exp, obs, cal.method = "mse_min", } else { par.out[3] <- with(quant.obs.fc, obs.sd * sqrt(1. - cor.obs.fc^2) / fc.dev.sd) } - par.out[2] <- with(quant.obs.fc, cor.obs.fc * obs.sd / fc.ens.av.sd) + par.out[2] <- with(quant.obs.fc, abs(cor.obs.fc) * obs.sd / fc.ens.av.sd) par.out[1] <- with(quant.obs.fc, obs.av - par.out[2] * fc.ens.av.av, na.rm = na.rm) return(par.out) @@ -473,4 +473,4 @@ Calibration <- function(exp, obs, cal.method = "mse_min", .CalibrationMembersRPC <- function(exp, ens_mean, ens_mean_cal, var_obs, var_noise, r){ member_cal <- (exp - ens_mean) * sqrt(var_obs) * sqrt(1 - r^2) / sqrt(var_noise) + ens_mean_cal return(member_cal) -} \ No newline at end of file +} -- GitLab From bb46beac69b78020272073fef3b61a24738ac94e Mon Sep 17 00:00:00 2001 From: nperez Date: Tue, 25 May 2021 16:27:52 +0200 Subject: [PATCH 2/2] Update NEWS and version number --- DESCRIPTION | 2 +- NEWS.md | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/DESCRIPTION b/DESCRIPTION index 7fe8d681..6bc5898f 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,7 +1,7 @@ Package: CSTools Title: Assessing Skill of Climate Forecasts on Seasonal-to-Decadal Timescales -Version: 4.0.0 +Version: 4.0.1 Authors@R: c( person("Nuria", "Perez-Zanon", , "nuria.perez@bsc.es", role = c("aut", "cre"), comment = c(ORCID = "0000-0001-8568-3071")), person("Louis-Philippe", "Caron", , "louis-philippe.caron@bsc.es", role = "aut", comment = c(ORCID = "0000-0001-5221-0147")), diff --git a/NEWS.md b/NEWS.md index 23d19889..6dbf7005 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,3 +1,9 @@ +### CSTools 4.0.1 +**Submission date to CRAN: XX-06-2021** + +- Fixes: + + Calibration retains correlation absolute value + ### CSTools 4.0.0 **Submission date to CRAN: XX-12-2020** -- GitLab