From 5a7d652e4e1679d85ef21a1264ba0e72b7a7c554 Mon Sep 17 00:00:00 2001 From: Eva Rifa Date: Fri, 24 Mar 2023 16:40:19 +0100 Subject: [PATCH] Correct figures in vignettes and update documentation --- R/WindPowerDensity.R | 4 ++-- man/CST_WindCapacityFactor.Rd | 4 ++-- man/CST_WindPowerDensity.Rd | 4 ++-- vignettes/AgriculturalIndicators.Rmd | 20 +++++++++--------- .../GDD_SEAS5_Corr_Y13-16-1.png | Bin .../GST_ERA5_Climatology-1.png | Bin .../HarvestR_Bias_2013-1.png | Bin .../SU35_ERA5_Y2016-1.png | Bin .../SU35_Percentile_SEAS5_Y2016-1.png | Bin .../SU35_SEAS5_BC_Y2016-1.png | Bin .../SU35_SEAS5_Y2016-1.png | Bin .../{figures => Figures}/WCF_histogram.png | Bin .../{figures => Figures}/WPD_histogram.png | Bin .../WSDI_SEAS5_FRPSS_Y13-16-1.png | Bin 14 files changed, 16 insertions(+), 16 deletions(-) rename vignettes/{figures => Figures}/GDD_SEAS5_Corr_Y13-16-1.png (100%) rename vignettes/{figures => Figures}/GST_ERA5_Climatology-1.png (100%) rename vignettes/{figures => Figures}/HarvestR_Bias_2013-1.png (100%) rename vignettes/{figures => Figures}/SU35_ERA5_Y2016-1.png (100%) rename vignettes/{figures => Figures}/SU35_Percentile_SEAS5_Y2016-1.png (100%) rename vignettes/{figures => Figures}/SU35_SEAS5_BC_Y2016-1.png (100%) rename vignettes/{figures => Figures}/SU35_SEAS5_Y2016-1.png (100%) rename vignettes/{figures => Figures}/WCF_histogram.png (100%) rename vignettes/{figures => Figures}/WPD_histogram.png (100%) rename vignettes/{figures => Figures}/WSDI_SEAS5_FRPSS_Y13-16-1.png (100%) diff --git a/R/WindPowerDensity.R b/R/WindPowerDensity.R index 5691bb5..3578209 100644 --- a/R/WindPowerDensity.R +++ b/R/WindPowerDensity.R @@ -34,8 +34,8 @@ #'wind$data <- array(rweibull(n = 100, shape = 2, scale = 6), #' c(member = 10, lat = 2, lon = 5)) #'wind$coords <- list(lat = c(40, 41), lon = 1:5) -#'variable <- list(Variable = list(varName = 'sfcWind', -#' metadata = list(sfcWind = list(level = 'Surface')))) +#'variable <- list(varName = 'sfcWind', +#' metadata = list(sfcWind = list(level = 'Surface'))) #'wind$attrs <- list(Variable = variable, Datasets = 'synthetic', #' when = Sys.time(), Dates = '1990-01-01 00:00:00') #'class(wind) <- 's2dv_cube' diff --git a/man/CST_WindCapacityFactor.Rd b/man/CST_WindCapacityFactor.Rd index 9d9cfa4..638f5b8 100644 --- a/man/CST_WindCapacityFactor.Rd +++ b/man/CST_WindCapacityFactor.Rd @@ -62,8 +62,8 @@ wind <- NULL wind$data <- array(rweibull(n = 100, shape = 2, scale = 6), c(member = 10, lat = 2, lon = 5)) wind$coords <- list(lat = c(40, 41), lon = 1:5) -variable <- list(Variable = list(varName = 'sfcWind', - metadata = list(sfcWind = list(level = 'Surface')))) +variable <- list(varName = 'sfcWind', + metadata = list(sfcWind = list(level = 'Surface'))) wind$attrs <- list(Variable = variable, Datasets = 'synthetic', when = Sys.time(), Dates = '1990-01-01 00:00:00') class(wind) <- 's2dv_cube' diff --git a/man/CST_WindPowerDensity.Rd b/man/CST_WindPowerDensity.Rd index 54390a0..c33bd8d 100644 --- a/man/CST_WindPowerDensity.Rd +++ b/man/CST_WindPowerDensity.Rd @@ -55,8 +55,8 @@ wind <- NULL wind$data <- array(rweibull(n = 100, shape = 2, scale = 6), c(member = 10, lat = 2, lon = 5)) wind$coords <- list(lat = c(40, 41), lon = 1:5) -variable <- list(Variable = list(varName = 'sfcWind', - metadata = list(sfcWind = list(level = 'Surface')))) +variable <- list(varName = 'sfcWind', + metadata = list(sfcWind = list(level = 'Surface'))) wind$attrs <- list(Variable = variable, Datasets = 'synthetic', when = Sys.time(), Dates = '1990-01-01 00:00:00') class(wind) <- 's2dv_cube' diff --git a/vignettes/AgriculturalIndicators.Rmd b/vignettes/AgriculturalIndicators.Rmd index ec14f58..3c9cf7d 100644 --- a/vignettes/AgriculturalIndicators.Rmd +++ b/vignettes/AgriculturalIndicators.Rmd @@ -167,7 +167,7 @@ PlotEquiMap(Bias[1, , ], lon = prlr_obs$coords$lon, lat = prlr_obs$coords$lat, ``` You will see the following maps of HarvestR bias in 2013. - +![HarvestR_Bias_2013](./Figures/HarvestR_Bias_2013-1.png) In 2013, the ensemble-mean SEAS5 seasonal forecast of HarvestR is underestimated by up to 60 mm over Douro Valley region (the central four grid points). @@ -267,7 +267,7 @@ PlotEquiMap(GST_Clim, lon = tas_obs$coords$lon, lat = tas_obs$coords$lat, The ERA5 GST climatology is shown as below. - +![ERA5 GST Climatology](./Figures/GST_ERA5_Climatology-1.png) ERA5 GST ranges from 17-18.5°C over the Douro Valley region for the period from 2013-2016 as shown in the figure. @@ -395,9 +395,9 @@ PlotEquiMap(SU35_exp_BC_Y2016, You can see the figure as below. - - - +![SU35_ERA5_Y2016](./Figures/SU35_ERA5_Y2016-1.png) +![SU35_SEAS5_Y2016](./Figures/SU35_SEAS5_Y2016-1.png) +![SU35_SEAS5_BC_Y2016](./Figures/SU35_SEAS5_BC_Y2016-1.png) As seen above, the bias-adjusted SU35 forecasts are much closer to the ERA5 results, although differences remain. @@ -436,7 +436,7 @@ SU35_exp_Percentile <- TotalTimeExceedingThreshold(S5txP, threshold = obs_percen Compute the same ensemble-mean SU35 **with percentile adjustment** in 2016 by running ``` -SU35_exp_per_Y2016 <- MeanDims(SU35_exp_Percentile[, 4, , ], 'member') +SU35_exp_per_Y2016 <- MeanDims(SU35_exp_Percentile[4, , , ], 'member') ``` Plot the same map for comparison @@ -454,8 +454,7 @@ PlotEquiMap(SU35_exp_per_Y2016, bar_extra_margin = c(0, 0, 0, 0), units_scale = 2) ``` - - +![SU35_Percentile_SEAS5_Y2016](./Figures/SU35_Percentile_SEAS5_Y2016-1.png) As seen in the figure above, applying the percentile adjustment seems to implicitly adjust certain extent of bias which was observed in the non-bias-adjusted SEAS5 forecast. @@ -513,7 +512,7 @@ PlotEquiMap(GDD_Corr, lon = tas_obs$coords$lon, lat = tas_obs$coords$lat, The map of correlation coefficient for the 2013-2016 period is shown as below. - +![GDD_SEAS5_Corr_Y13-16](./Figures/GDD_SEAS5_Corr_Y13-16-1.png) The 2013-2016 correlation coefficients of the SEAS5 forecasts of GDD in reference with ERA5 reanalysis over Douro Valley range between 0.6 and 0.8. @@ -584,7 +583,8 @@ PlotEquiMap(WSDI_FRPSS, lon = tasmax_obs$coords$lon, lat = tasmax_obs$coords$lat The FRPSS map for 2013-2016 SEAS WSDI is shown as below. - +![WSDI_SEAS5_FRPSS_Y13-16](./Figures/WSDI_SEAS5_FRPSS_Y13-16-1.png) + As seen in the map, the FRPSS in the eastern part of Douro Valley falls in 0.6-0.9, which are good enough to be useful when compared to observational climatology. diff --git a/vignettes/figures/GDD_SEAS5_Corr_Y13-16-1.png b/vignettes/Figures/GDD_SEAS5_Corr_Y13-16-1.png similarity index 100% rename from vignettes/figures/GDD_SEAS5_Corr_Y13-16-1.png rename to vignettes/Figures/GDD_SEAS5_Corr_Y13-16-1.png diff --git a/vignettes/figures/GST_ERA5_Climatology-1.png b/vignettes/Figures/GST_ERA5_Climatology-1.png similarity index 100% rename from vignettes/figures/GST_ERA5_Climatology-1.png rename to vignettes/Figures/GST_ERA5_Climatology-1.png diff --git a/vignettes/figures/HarvestR_Bias_2013-1.png b/vignettes/Figures/HarvestR_Bias_2013-1.png similarity index 100% rename from vignettes/figures/HarvestR_Bias_2013-1.png rename to vignettes/Figures/HarvestR_Bias_2013-1.png diff --git a/vignettes/figures/SU35_ERA5_Y2016-1.png b/vignettes/Figures/SU35_ERA5_Y2016-1.png similarity index 100% rename from vignettes/figures/SU35_ERA5_Y2016-1.png rename to vignettes/Figures/SU35_ERA5_Y2016-1.png diff --git a/vignettes/figures/SU35_Percentile_SEAS5_Y2016-1.png b/vignettes/Figures/SU35_Percentile_SEAS5_Y2016-1.png similarity index 100% rename from vignettes/figures/SU35_Percentile_SEAS5_Y2016-1.png rename to vignettes/Figures/SU35_Percentile_SEAS5_Y2016-1.png diff --git a/vignettes/figures/SU35_SEAS5_BC_Y2016-1.png b/vignettes/Figures/SU35_SEAS5_BC_Y2016-1.png similarity index 100% rename from vignettes/figures/SU35_SEAS5_BC_Y2016-1.png rename to vignettes/Figures/SU35_SEAS5_BC_Y2016-1.png diff --git a/vignettes/figures/SU35_SEAS5_Y2016-1.png b/vignettes/Figures/SU35_SEAS5_Y2016-1.png similarity index 100% rename from vignettes/figures/SU35_SEAS5_Y2016-1.png rename to vignettes/Figures/SU35_SEAS5_Y2016-1.png diff --git a/vignettes/figures/WCF_histogram.png b/vignettes/Figures/WCF_histogram.png similarity index 100% rename from vignettes/figures/WCF_histogram.png rename to vignettes/Figures/WCF_histogram.png diff --git a/vignettes/figures/WPD_histogram.png b/vignettes/Figures/WPD_histogram.png similarity index 100% rename from vignettes/figures/WPD_histogram.png rename to vignettes/Figures/WPD_histogram.png diff --git a/vignettes/figures/WSDI_SEAS5_FRPSS_Y13-16-1.png b/vignettes/Figures/WSDI_SEAS5_FRPSS_Y13-16-1.png similarity index 100% rename from vignettes/figures/WSDI_SEAS5_FRPSS_Y13-16-1.png rename to vignettes/Figures/WSDI_SEAS5_FRPSS_Y13-16-1.png -- GitLab