Newer
Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
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
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
---
title: "Malaria Suitability Indicator"
author: "Earth Sciences department, Barcelona Supercomputing Center (BSC)"
date: "`r Sys.Date()`"
output: rmarkdown::html_vignette
vignette: >
%\VignetteEngine{knitr::knitr}
%\VignetteIndexEntry{Agricultural Indicators}
%\usepackage[utf8]{inputenc}
---
<style>
body {
text-align: justify
}
</style>
```{r echo=FALSE}
knitr::opts_chunk$set(warnings=FALSE, message=FALSE)
```
Climate Suitability for Malaria Transmission
-----------------------------
## Introduction
Climate sensitive infectious diseases are a subject of major concern for public
health agencies around the world in the context of global change. Malaria is an
infectious disease caused by parasites of the genus _Plasmodium_ and transmitted
by mosquitoes of the genus _Anopheles_. Although Europe has been free of endemic
malaria circulation since the early 1970s as a result of improving socio-economic
conditions, improving climatic conditions pose a risk of malaria re emergence in
the continent.
In the context of the Lancet Countdown in Europe collaboration, the Climate Suitability
for Malaria indicator was created for tracking the climatic conditions for transmission
of this disease in the continent between 1950 and 2021. This indicator is based
on the climatic requirements from Plasmodium vivax, former parasite endemic to Europe.
In this vignette, we propose to show the computation of the Climate Suitability
for Malaria indicator using the **TotalTimeExceedingThreshold -** function from
the CSIndicators package. This function is able to operate with multidimensional
arrays and s2dv_cube objects. In this example, we will make use of the
**CST_TotalTimeExceedingThreshold** function, which was developed for the latter
(For further information about the different types of objects visit the section
about [Data retrieval and storage](https://cran.r-project.org/package=CSTools/vignettes/Data_Considerations.html)
from CSTools package ).
## Load libraries
In addition to the functiosn from the **CSIndicators** package, we will make use
of functions from the **CSTools** package.
```{r}
library(CSIndicators)
library(CSTools)
```
Temporary links to functions
```{r}
source("https://earth.bsc.es/gitlab/nperez/Flor/-/raw/master/CST_Load_devel_from_s2dv.R")
```
## 1. Data extraction
### 1.1 Area of interest
In this vignette, the malaria indicator between 2010 and 2020 will be computed
for the Iberian Peninsula.
* Which countries?
* What coordinates?
[Wikipedia image](https://es.wikipedia.org/wiki/Pen%C3%ADnsula_ib%C3%A9rica#/media/Archivo:Espa%C3%B1a_y_Portugal.jpg)
### 1.2 Data extraction
To compute the malaria indicator, we will use reanalysis data from the ERA5-Land
repository. These data are produced by the Copernicus service and extracted and
curated by the Earth Sciences department from the Barcelona Supercomputing Center.
The function `CST_Load` from the `CSTools` package allows the user to access the
processed data and to work with it using function from the `CSIndicators` package.
In order to extract data using `CST_Load`, there are some requirements to be met.
First, the path to the files is introduced using *whitecards* delimited by dollar
signs, which are useful for iterating over variables. Second, the temporal extent
and resolution of the output is inputted with `sdates`, which takes a vector of all
necessary dates. The spatial extent is insputed within `lonmax`, `lonmin`, `latmax`
and `latmin.`
```{r}
# Path to file locations using whitecards
path_ERA5_CDS <- list(path='/esarchive/recon/ecmwf/era5land/$STORE_FREQ$_mean/$VAR_NAME$_f1h/$VAR_NAME$_$YEAR$$MONTH$.nc')
# Temporal extent and resolution:
# We will work with all months from 2010 to 2020
year_in <- 2020 # initial year
year_fi <- 2021 # last year
month_in <- 1 # first month
month_fi <- 12 # last month
sdates <- paste0(year_in:year_fi, '0101')
# Extract data
vars <- c('tas', 'tdps', 'prlr')
out <- NULL
for(var in vars){
out[[var]] <- CST_Load_s2dv(var = var,
exp = NULL, # We only require observved data
obs = list(path_ERA5_CDS),
sdates = sdates,
lonmax = 355, lonmin = 350,
latmax = 45, latmin = 43,
storefreq = 'monthly',
leadtimemin = month_in,
leadtimemax = month_fi,
output = "lonlat")
}
```
This function creates `s2dv_cube` objects, defined as XXXX. For further information
about these objects visit [Data retrieval and storage](https://cran.r-project.org/package=CSTools/vignettes/Data_Considerations.html).
As an example, we will show the dimensions of near surface temperature
```{r}
dim(out$tas$data)
```
Near surface temperature is made up of 10 years with 12 months per year distributed
over a grid of XXxXX.
## 2. Data transformation
### 2.1 Near surface temperature and near surface dew point temperature
The first step before working with temperature is transforming their unit from
Kelvin (K) to Degrees Celsius (C).
```{r}
summary(out$tas$data)
```
```{r}
for(var in c('tas', 'tdps')){
out[[var]]$data <- out[[var]]$data - 273.15
}
summary(out$tas$data)
```
### 2.2 Precipitation
```{r}
summary(out$prlr$data)
```
```{r}
out$prlr$data <- out$prlr$data*3600*24*30.41*1000
summary(out$prlr$data)
```
### 2.3 Relative humidity
```{r}
out$rh <- out$tas
out$rh$data <- 100*(exp((17.625*out$tdps$data)/(243.04+out$tdps$data)) /
exp((17.625*out$tas$data) / (243.04+out$tas$data)))
summary(out$rh$data)
```
### 2.4 Land use
Add chunk
## 3. Compute indicator
## 4. Visualization
Add chunk
## 5. Summary statistics
Add chunk
## 6. Conclusions
Add chunk
## References
Add text