Newer
Older
s2dverification
===============
s2dverification (seasonal to decadal verification) is an R framework
that aids in the analysis of forecasts from the data retrieval stage,
through computation of statistics and skill scores against observations,
to visualisation of data and results. While some of its components are
only targeted to verification of seasonal to decadal climate forecasts,
it provides with tools that can be useful for verification of forecasts
in any field.
Find out more in the overview below, on the wiki page at
<https://earth.bsc.es/gitlab/es/s2dverification/wikis/home> or on the
CRAN website at
<https://cran.r-project.org/web/packages/s2dverification/index.html>.
You can also sign up to the s2dverification mailing list by sending a
message with the subject 'subscribe' to <s2dverification-request@bsc.es>
if you want to keep abreast of internal discussons or latest development
releases.
Installation
------------
s2dverification has a system dependency, the CDO libraries, for
interpolation of grid data and retrieval of metadata. Make sure you have
these libraries installed in the system or download and install from
<https://code.zmaw.de/projects/cdo>.
You can then install the released version of s2dverification from CRAN:
Or the development version from the GitLab repository:
# install.packages("devtools")
devtools::install_git("https://earth.bsc.es/gitlab/es/s2dverification.git")
Overview
--------
The following diagram depicts the modules of s2dverification and how
they interact:
![s2dverification module diagram](vignettes/s2dv_modules.png)
The [Data
retrieval](https://earth.bsc.es/gitlab/es/s2dverification/wikis/data_retrieval.md)
module allows you to gather and homogenize NetCDF data files stored in a
local or remote file system. A previous step is required, however, to
set up some configuration parameters so that the module can locate the
source files and recognize their format.
Once the data has been loaded into an R object, [Basic
statistics](https://earth.bsc.es/gitlab/es/s2dverification/wikis/basic_statistics.md)
can be computed, such as climatologies, trends, bias correction,
smoothing, ...
Either after computing basic statistics or directly from the original
data, the functions in the
[Verification](https://earth.bsc.es/gitlab/es/s2dverification/wikis/verification.md)
module allow you to compute deterministic and probabilistic scores and
skill scores, such as root mean square error, time or spatial
correlation or brier score.
[Visualisation](https://earth.bsc.es/gitlab/es/s2dverification/wikis/visualisation.md)
functions are also provided to plot the results obtained from any of the
modules above.
Next you can see an example of usage of s2dverification spanning its
four modules.
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
library(s2dverification)
expA <- list(name = 'experimentA',
path = file.path('/path/to/experiments/$EXP_NAME$/monthly_mean',
'$VAR_NAME$/$VAR_NAME$_$START_DATE$.nc'))
expB <- list(name = 'experimentB',
path = file.path('/path/to/experiments/$EXP_NAME$/monthly_mean',
'$VAR_NAME$/$VAR_NAME$_$START_DATE$.nc'))
obsX <- list(name = 'observationX',
path = file.path('/path/to/observations/$OBS_NAME$/monthly_mean',
'$VAR_NAME$/$VAR_NAME$_$YEAR$$MONTH$.nc'))
data <- Load('tas', list(expA, expB), list(obsX),
sdates = c('19851101', '19911101', '19971101'),
lonmin = 100, lonmax = 250, latmin = -10, latmax = 60,
leadtimemin = 2, leadtimemax = 7,
output = 'lonlat', grid = 't106grid',
method = 'distance-weighted')
## * The load call you issued is:
## * Load(var = "tas", exp = list(structure(list(name = "experimentA", path
## * =
## * "/path/to/experiments/$EXP_NAME$/monthly_mean/$VAR_NAME$/$VAR_NAME$_$START_DATE$.nc"),
## * .Names = c("name", "path")), structure(list(name =
## * "experimentB", path =
## * "/path/to/experiments/$EXP_NAME$/monthly_mean/$VAR_NAME$/$VAR_NAME$_$START_DATE$.nc"),
## * .Names = c("name", "path"))), obs =
## * list(structure(list(name = "observationX", path =
## * "/path/to/observations/$OBS_NAME$/monthly_mean/$VAR_NAME$/$VAR_NAME$_$YEAR$$MONTH$.nc"),
## * .Names = c("name", "path"))), sdates = c("19851101",
## * "19911101", "19971101"), grid = "t106grid", output =
## * "lonlat", storefreq = "monthly", ...)
## * See the full call in '$load_parameters' after Load() finishes.
## * Fetching first experimental files to work out 'var_exp' size...
## * Exploring dimensions... /path/to/experiments/experimentA/monthly_mean/tas/tas_19851101.nc
## * Success. Detected dimensions of experimental data: 2, 3, 11, 6, 63, 134
## * Fetching first observational files to work out 'var_obs' size...
## * Exploring dimensions... /path/to/observations/observationX/monthly_mean/tas/tas_198512.nc
## * Success. Detected dimensions of observational data: 1, 3, 1, 6, 63, 134
## * Will now proceed to read and process 24 data files:
## * /path/to/experiments/experimentA/monthly_mean/tas/tas_19851101.nc
## * /path/to/experiments/experimentA/monthly_mean/tas/tas_19911101.nc
## * /path/to/experiments/experimentA/monthly_mean/tas/tas_19971101.nc
## * /path/to/experiments/experimentB/monthly_mean/tas/tas_19851101.nc
## * /path/to/experiments/experimentB/monthly_mean/tas/tas_19911101.nc
## * /path/to/experiments/experimentB/monthly_mean/tas/tas_19971101.nc
## * /path/to/observations/observationX/monthly_mean/tas/tas_198512.nc
## * /path/to/observations/observationX/monthly_mean/tas/tas_198601.nc
## * /path/to/observations/observationX/monthly_mean/tas/tas_198602.nc
## * /path/to/observations/observationX/monthly_mean/tas/tas_198603.nc
## * /path/to/observations/observationX/monthly_mean/tas/tas_198604.nc
## * /path/to/observations/observationX/monthly_mean/tas/tas_198605.nc
## * /path/to/observations/observationX/monthly_mean/tas/tas_199112.nc
## * /path/to/observations/observationX/monthly_mean/tas/tas_199201.nc
## * /path/to/observations/observationX/monthly_mean/tas/tas_199202.nc
## * /path/to/observations/observationX/monthly_mean/tas/tas_199203.nc
## * /path/to/observations/observationX/monthly_mean/tas/tas_199204.nc
## * /path/to/observations/observationX/monthly_mean/tas/tas_199205.nc
## * /path/to/observations/observationX/monthly_mean/tas/tas_199712.nc
## * /path/to/observations/observationX/monthly_mean/tas/tas_199801.nc
## * /path/to/observations/observationX/monthly_mean/tas/tas_199802.nc
## * /path/to/observations/observationX/monthly_mean/tas/tas_199803.nc
## * /path/to/observations/observationX/monthly_mean/tas/tas_199804.nc
## * /path/to/observations/observationX/monthly_mean/tas/tas_199805.nc
## * Total size of requested data: 27959904 bytes.
## * - Experimental data: ( 2 x 11 x 3 x 6 x 63 x 134 ) x 8 bytes = 26744256 bytes.
## * - Observational data: ( 1 x 1 x 3 x 6 x 63 x 134 ) x 8 bytes = 1215648 bytes.
## * If size of requested data is close to or above the free shared RAM memory, R will crash.
## * Loading... This may take several minutes...
## * Progress: 0% + 33.3% + 33.3% + 33.3%
### Basic statistics
### Verification
### Visualisation