import os
# Data directory
= os.path.join(os.path.expanduser('~'), "grass_ncsu_2023")
homedir
# GRASS GIS database variables
#grassbin = "grassdev"
= "grass"
grassbin = os.path.join(homedir, "grassdata")
grassdata = "eu_laea"
location = "italy_LST_daily" mapset
Part 2: Processing data in GRASS
In this notebook we’ll go through the processing of MODIS LST daily time series data to derive relevant predictor variables for modeling the distribution of Aedes albopictus in Northern Italy. Furthermore, we’ll show how to obtain and process occurrence data and background points.
Let’s first go through some temporal concepts within GRASS GIS…
The TGRASS framework
GRASS GIS was the first FOSS GIS that incorporated capabilities to manage, analyze, process and visualize spatio-temporal data, as well as the temporal relationships among time series.
- TGRASS is fully based on metadata and does not duplicate any dataset
- Snapshot approach, i.e., adds time stamps to maps
- A collection of time stamped maps (snapshots) of the same variable are called space-time datasets or STDS
- Maps in a STDS can have different spatial and temporal extents
- Space-time datasets can be composed of raster, raster 3D or vector maps, and so we call them:
- Space time raster datasets (STRDS)
- Space time 3D raster datasets (STR3DS)
- Space time vector datasets (STVDS)
Temporal modules
GRASS temporal modules are named and organized following GRASS core naming scheme. In this way, we have:
- t.*: General modules to handle STDS of all types
- t.rast.*: Modules that deal with STRDS
- t.rast3d.*: Modules that deal with STR3DS
- t.vect.*: Modules that deal with STVDS
Other TGRASS notions
- Time can be defined as intervals (start and end time) or instances (only start time)
- Time can be absolute (e.g., 2017-04-06 22:39:49) or relative (e.g., 4 years, 90 days)
- Granularity is the greatest common divisor of the temporal extents (and possible gaps) of all maps in the space-time cube
- Topology refers to temporal relations between time intervals in a STDS.
TGRASS framework and workflow
GRASS +
In this part of the studio we’ll work with GRASS and Python, so let’s first see/recall the very basics.
Python package grass.script
The grass.script or GRASS GIS Python Scripting Library provides functions for calling GRASS modules within Python scripts. The most commonly used functions include:
run_command
: used when the output of the modules is a raster or vector, no text type output is expectedread_command
: used when the output of the modules is of text typeparse_command
: used with modules whose output can be converted tokey=value
pairswrite_command
: used with modules that expect text input, either in the form of a file or from stdin
It also provides several wrapper functions for frequently used modules, for example:
- To get info from a raster, script.raster.raster_info() is used:
gs.raster_info('dsm')
- To get info of a vector, script.vector.vector_info() is used:
gs.vector_info('roads')
- To list the raster in a location, script.core.list_grouped() is used:
gs.list_grouped(type=['raster'])
- To obtain the computational region, script.core.region() is used:
gs.region()
Python package grass.jupyter
The grass.jupyter library improves the integration of GRASS and Jupyter, and provides different classes to facilitate GRASS maps visualization:
init
: starts a GRASS session and sets up all necessary environment variablesMap
: 2D renderingMap3D
: 3D renderingInteractiveMap
: interactive visualization with foliumTimeSeriesMap
: visualization for spatio-temporal data
Hands-on
So let’s start… We begin by setting variables, checking GRASS installation and initializing GRASS GIS
# Check the GRASS GIS installation
import subprocess
print(subprocess.check_output([grassbin, "--config", "version"], text=True))
8.2.0
# Ask GRASS GIS where its Python packages are
import sys
sys.path.append("--config", "python_path"], text=True).strip()
subprocess.check_output([grassbin, )
Now we are ready to start a GRASS GIS session
# Import the GRASS GIS packages we need
import grass.script as gs
import grass.jupyter as gj
# Start the GRASS GIS Session
= gj.init(grassdata, location, mapset) session
Explore data in the mapset
Let’s first explore what we have within the italy_LST_daily
mapset and display vector and raster maps using different classes from grass.jupyter
library.
# List vector elements
type="vector")['italy_LST_daily'] gs.list_grouped(
['aedes_albopictus',
'aedes_buffer',
'background_points',
'italy_borders_0',
'italy_borders_1',
'mask_bg',
'vect_mask']
# Display vector map
= gj.Map(width=500, use_region=True)
it_map map="italy_borders_0")
it_map.d_vect( it_map.show()
# List raster elements
= gs.list_grouped(type="raster", pattern="lst*")['italy_LST_daily']
rast 0:10] rast[
['lst_2014.001_avg',
'lst_2014.002_avg',
'lst_2014.003_avg',
'lst_2014.004_avg',
'lst_2014.005_avg',
'lst_2014.006_avg',
'lst_2014.007_avg',
'lst_2014.008_avg',
'lst_2014.009_avg',
'lst_2014.010_avg']
# Display raster map with interactive class
= gj.InteractiveMap(width = 500, use_region=True, tiles="OpenStreetMap")
lst_map "lst_2014.005_avg")
lst_map.add_raster(= "bottomright")
lst_map.add_layer_control(position lst_map.show()
SDM workflow
In this part of the Studio we’ll be addressing the left part of the SDM workflow, occurrence and background data and predictors:
Importing species records
We will use occurrence data already downloaded and cleaned. We need to import it into GRASS GIS first.
# Import mosquito records
"v.import",
gs.run_command(input=os.path.join(homedir,"aedes_albopictus.gpkg"),
="aedes_albopictus") output
Let’s add the occurrence points over the previous interactive map
# Display raster map with interactive class
= gj.InteractiveMap(width = 500, use_region=True, tiles="OpenStreetMap")
lst_map "lst_2014.005_avg")
lst_map.add_raster("aedes_albopictus")
lst_map.add_vector(= "bottomright")
lst_map.add_layer_control(position lst_map.show()
You can also get the mosquito occurrences (or any other species or taxa) directly from GBIF into GRASS by means of v.in.pygbif as follows:
# Set computational region
# region = gs.parse_command("g.region", raster="lst_2014.001_avg", flags="g")
# region
# Install extension (requires pygbif: pip install pygbif)
# gs.run_command("g.extension",
# extension="v.in.pygbif")
# Import data from GBIF
# gs.run_command("v.in.pygbif",
# output="aedes_albopictus",
# taxa="Aedes albopictus",
# date_from="2014-01-01",
# date_to="2018-12-31")
Creating random background points
The algorithm MaxEnt that we will use in the next part of this session requires not only the locations of known occurrences, but also information on the rest of the environment available. These are not absences but background data, we actually do not know if the species is there or not, but we need it to compare with the features of the places where the species does occur.
To avoid getting background points exactly where occurrences are, we’ll create buffers around them. Then, we need to ensure that background points are only over land within our computational region. In order to do that, we’ll create a mask over land and we’ll overlay the buffers with the mask. Can you guess what the output will be?
# Create buffer around Aedes albopictus records
"v.buffer",
gs.run_command(input="aedes_albopictus",
="aedes_buffer",
output=2000) distance
# Set computational region
= gs.parse_command("g.region", raster="lst_2014.001_avg", flags="g")
region region
{'projection': '99',
'zone': '0',
'n': '2666000',
's': '2228000',
'w': '4053000',
'e': '4635000',
'nsres': '1000',
'ewres': '1000',
'rows': '438',
'cols': '582',
'cells': '254916'}
# Create a vector mask to limit background points
="MASK = if(lst_2014.001_avg, 1, null())"
expression=expression)
gs.raster.mapcalc(exp
"r.to.vect",
gs.run_command(input="MASK",
="vect_mask",
outputtype="area")
# Subtract buffers from vector mask
"v.overlay",
gs.run_command(="vect_mask",
ainput="aedes_buffer",
binput="xor",
operator="mask_bg") output
Let’s display the result
# Display raster map with interactive class
= gj.InteractiveMap(width = 500, use_region=True, tiles="OpenStreetMap")
mask_map "mask_bg")
mask_map.add_vector(= "bottomright")
mask_map.add_layer_control(position mask_map.show()
Finally, let’s create the random background points…
# Generate random background points
"v.random",
gs.run_command(="background_points",
output=1000,
npoints="mask_bg",
restrict=3749) seed
and display occurrence and background points together over an LST map.
# Display vector map
= gj.Map(width=500, use_region=True)
pb_map map="lst_2014.005_avg")
pb_map.d_rast(map="italy_borders_0", type="boundary")
pb_map.d_vect(map="background_points")
pb_map.d_vect(map="aedes_albopictus", icon="basic/diamond", fill_color="red", size=8)
pb_map.d_vect( pb_map.show()
Create daily LST STRDS
Now we’ll start processing the raster data to derive potentially relevant predictors to include in the model. Our data consists of a time series of daily LST averages. We’ll use the GRASS temporal framework for this and the first step is to create the time series object and register maps in it. See t.create and t.register for further details.
# Create time series
"t.create",
gs.run_command(type="strds",
="absolute",
temporaltype="lst_daily",
output="Average Daily LST",
title="Average daily LST in degree C - 2014-2018") description
# Check it is created
"t.list",
gs.run_command(type="strds")
lst_daily@italy_LST_daily
# Get list of maps
= gs.list_grouped(type="raster", pattern="lst_201*")['italy_LST_daily']
map_list 0:10] map_list[
['lst_2014.001_avg',
'lst_2014.002_avg',
'lst_2014.003_avg',
'lst_2014.004_avg',
'lst_2014.005_avg',
'lst_2014.006_avg',
'lst_2014.007_avg',
'lst_2014.008_avg',
'lst_2014.009_avg',
'lst_2014.010_avg']
# Register maps in strds
"t.register",
gs.run_command(input="lst_daily",
=map_list,
maps="1 days",
increment="2014-01-01",
start="i") flags
# Get info about the strds
"t.info",
gs.run_command(input="lst_daily")
+-------------------- Space Time Raster Dataset -----------------------------+
| |
+-------------------- Basic information -------------------------------------+
| Id: ........................ lst_daily@italy_LST_daily
| Name: ...................... lst_daily
| Mapset: .................... italy_LST_daily
| Creator: ................... veroandreo
| Temporal type: ............. absolute
| Creation time: ............. 2023-06-02 12:42:40.595876
| Modification time:.......... 2023-06-02 12:44:34.918052
| Semantic type:.............. mean
+-------------------- Absolute time -----------------------------------------+
| Start time:................. 2014-01-01 00:00:00
| End time:................... 2019-01-01 00:00:00
| Granularity:................ 1 day
| Temporal type of maps:...... interval
+-------------------- Spatial extent ----------------------------------------+
| North:...................... 2666000.0
| South:...................... 2228000.0
| East:.. .................... 4635000.0
| West:....................... 4053000.0
| Top:........................ 0.0
| Bottom:..................... 0.0
+-------------------- Metadata information ----------------------------------+
| Raster register table:...... raster_map_register_da4f040633c14e86a18ecad57a4fcf3a
| North-South resolution min:. 1000.0
| North-South resolution max:. 1000.0
| East-west resolution min:... 1000.0
| East-west resolution max:... 1000.0
| Minimum value min:.......... -33.142266
| Minimum value max:.......... 0.790684
| Maximum value min:.......... 5.751836
| Maximum value max:.......... 37.377617
| Aggregation type:........... None
| Number of semantic labels:.. 0
| Semantic labels:............ None
| Number of registered maps:.. 1826
|
| Title:
| Average Daily LST
| Description:
| Average daily LST in degree C - 2014-2018
| Command history:
| # 2023-06-02 12:42:40
| t.create type="strds" temporaltype="absolute"
| output="lst_daily" title="Average Daily LST"
| description="Average daily LST in degree C - 2014-2018"
| # 2023-06-02 12:44:34
| t.register -i input="lst_daily"
| maps="lst_2014.001_avg,lst_2014.002_avg,lst_2014.003_avg,lst_2014.004_avg,lst_2014.005_avg,lst_2014.006_avg,lst_2014.007_avg,lst_2014.008_avg,lst_2014.009_avg,lst_2014.010_avg,lst_2014.011_avg,lst_2014.012_avg,lst_2014.013_avg,lst_2014.014_avg,lst_2014.015_avg,lst_2014.016_avg,lst_2014.017_avg,lst_2014.018_avg,lst_2014.019_avg,lst_2014.020_avg,lst_2014.021_avg,lst_2014.022_avg,lst_2014.023_avg,lst_2014.024_avg,lst_2014.025_avg,lst_2014.026_avg,lst_2014.027_avg,lst_2014.028_avg,lst_2014.029_avg,lst_2014.030_avg,lst_2014.031_avg,lst_2014.032_avg,lst_2014.033_avg,lst_2014.034_avg,lst_2014.035_avg,lst_2014.036_avg,lst_2014.037_avg,lst_2014.038_avg,lst_2014.039_avg,lst_2014.040_avg,lst_2014.041_avg,lst_2014.042_avg,lst_2014.043_avg,lst_2014.044_avg,lst_2014.045_avg,lst_2014.046_avg,lst_2014.047_avg,lst_2014.048_avg,lst_2014.049_avg,lst_2014.050_avg,lst_2014.051_avg,lst_2014.052_avg,lst_2014.053_avg,lst_2014.054_avg,lst_2014.055_avg,lst_2014.056_avg,lst_2014.057_avg,lst_2014.058_avg,lst_2014.059_avg,lst_2014.060_avg,lst_2014.061_avg,lst_2014.062_avg,lst_2014.063_avg,lst_2014.064_avg,lst_2014.065_avg,lst_2014.066_avg,lst_2014.067_avg,lst_2014.068_avg,lst_2014.069_avg,lst_2014.070_avg,lst_2014.071_avg,lst_2014.072_avg,lst_2014.073_avg,lst_2014.074_avg,lst_2014.075_avg,lst_2014.076_avg,lst_2014.077_avg,lst_2014.078_avg,lst_2014.079_avg,lst_2014.080_avg,lst_2014.081_avg,lst_2014.082_avg,lst_2014.083_avg,lst_2014.084_avg,lst_2014.085_avg,lst_2014.086_avg,lst_2014.087_avg,lst_2014.088_avg,lst_2014.089_avg,lst_2014.090_avg,lst_2014.091_avg,lst_2014.092_avg,lst_2014.093_avg,lst_2014.094_avg,lst_2014.095_avg,lst_2014.096_avg,lst_2014.097_avg,lst_2014.098_avg,lst_2014.099_avg,lst_2014.100_avg,lst_2014.101_avg,lst_2014.102_avg,lst_2014.103_avg,lst_2014.104_avg,lst_2014.105_avg,lst_2014.106_avg,lst_2014.107_avg,lst_2014.108_avg,lst_2014.109_avg,lst_2014.110_avg,lst_2014.111_avg,lst_2014.112_avg,lst_2014.113_avg,lst_2014.114_avg,lst_2014.115_avg,lst_2014.116_avg,lst_2014.117_avg,lst_2014.118_avg,lst_2014.119_avg,lst_2014.120_avg,lst_2014.121_avg,lst_2014.122_avg,lst_2014.123_avg,lst_2014.124_avg,lst_2014.125_avg,lst_2014.126_avg,lst_2014.127_avg,lst_2014.128_avg,lst_2014.129_avg,lst_2014.130_avg,lst_2014.131_avg,lst_2014.132_avg,lst_2014.133_avg,lst_2014.134_avg,lst_2014.135_avg,lst_2014.136_avg,lst_2014.137_avg,lst_2014.138_avg,lst_2014.139_avg,lst_2014.140_avg,lst_2014.141_avg,lst_2014.142_avg,lst_2014.143_avg,lst_2014.144_avg,lst_2014.145_avg,lst_2014.146_avg,lst_2014.147_avg,lst_2014.148_avg,lst_2014.149_avg,lst_2014.150_avg,lst_2014.151_avg,lst_2014.152_avg,lst_2014.153_avg,lst_2014.154_avg,lst_2014.155_avg,lst_2014.156_avg,lst_2014.157_avg,lst_2014.158_avg,lst_2014.159_avg,lst_2014.160_avg,lst_2014.161_avg,lst_2014.162_avg,lst_2014.163_avg,lst_2014.164_avg,lst_2014.165_avg,lst_2014.166_avg,lst_2014.167_avg,lst_2014.168_avg,lst_2014.169_avg,lst_2014.170_avg,lst_2014.171_avg,lst_2014.172_avg,lst_2014.173_avg,lst_2014.174_avg,lst_2014.175_avg,lst_2014.176_avg,lst_2014.177_avg,lst_2014.178_avg,lst_2014.179_avg,lst_2014.180_avg,lst_2014.181_avg,lst_2014.182_avg,lst_2014.183_avg,lst_2014.184_avg,lst_2014.185_avg,lst_2014.186_avg,lst_2014.187_avg,lst_2014.188_avg,lst_2014.189_avg,lst_2014.190_avg,lst_2014.191_avg,lst_2014.192_avg,lst_2014.193_avg,lst_2014.194_avg,lst_2014.195_avg,lst_2014.196_avg,lst_2014.197_avg,lst_2014.198_avg,lst_2014.199_avg,lst_2014.200_avg,lst_2014.201_avg,lst_2014.202_avg,lst_2014.203_avg,lst_2014.204_avg,lst_2014.205_avg,lst_2014.206_avg,lst_2014.207_avg,lst_2014.208_avg,lst_2014.209_avg,lst_2014.210_avg,lst_2014.211_avg,lst_2014.212_avg,lst_2014.213_avg,lst_2014.214_avg,lst_2014.215_avg,lst_2014.216_avg,lst_2014.217_avg,lst_2014.218_avg,lst_2014.219_avg,lst_2014.220_avg,lst_2014.221_avg,lst_2014.222_avg,lst_2014.223_avg,lst_2014.224_avg,lst_2014.225_avg,lst_2014.226_avg,lst_2014.227_avg,lst_2014.228_avg,lst_2014.229_avg,lst_2014.230_avg,lst_2014.231_avg,lst_2014.232_avg,lst_2014.233_avg,lst_2014.234_avg,lst_2014.235_avg,lst_2014.236_avg,lst_2014.237_avg,lst_2014.238_avg,lst_2014.239_avg,lst_2014.240_avg,lst_2014.241_avg,lst_2014.242_avg,lst_2014.243_avg,lst_2014.244_avg,lst_2014.245_avg,lst_2014.246_avg,lst_2014.247_avg,lst_2014.248_avg,lst_2014.249_avg,lst_2014.250_avg,lst_2014.251_avg,lst_2014.252_avg,lst_2014.253_avg,lst_2014.254_avg,lst_2014.255_avg,lst_2014.256_avg,lst_2014.257_avg,lst_2014.258_avg,lst_2014.259_avg,lst_2014.260_avg,lst_2014.261_avg,lst_2014.262_avg,lst_2014.263_avg,lst_2014.264_avg,lst_2014.265_avg,lst_2014.266_avg,lst_2014.267_avg,lst_2014.268_avg,lst_2014.269_avg,lst_2014.270_avg,lst_2014.271_avg,lst_2014.272_avg,lst_2014.273_avg,lst_2014.274_avg,lst_2014.275_avg,lst_2014.276_avg,lst_2014.277_avg,lst_2014.278_avg,lst_2014.279_avg,lst_2014.280_avg,lst_2014.281_avg,lst_2014.282_avg,lst_2014.283_avg,lst_2014.284_avg,lst_2014.285_avg,lst_2014.286_avg,lst_2014.287_avg,lst_2014.288_avg,lst_2014.289_avg,lst_2014.290_avg,lst_2014.291_avg,lst_2014.292_avg,lst_2014.293_avg,lst_2014.294_avg,lst_2014.295_avg,lst_2014.296_avg,lst_2014.297_avg,lst_2014.298_avg,lst_2014.299_avg,lst_2014.300_avg,lst_2014.301_avg,lst_2014.302_avg,lst_2014.303_avg,lst_2014.304_avg,lst_2014.305_avg,lst_2014.306_avg,lst_2014.307_avg,lst_2014.308_avg,lst_2014.309_avg,lst_2014.310_avg,lst_2014.311_avg,lst_2014.312_avg,lst_2014.313_avg,lst_2014.314_avg,lst_2014.315_avg,lst_2014.316_avg,lst_2014.317_avg,lst_2014.318_avg,lst_2014.319_avg,lst_2014.320_avg,lst_2014.321_avg,lst_2014.322_avg,lst_2014.323_avg,lst_2014.324_avg,lst_2014.325_avg,lst_2014.326_avg,lst_2014.327_avg,lst_2014.328_avg,lst_2014.329_avg,lst_2014.330_avg,lst_2014.331_avg,lst_2014.332_avg,lst_2014.333_avg,lst_2014.334_avg,lst_2014.335_avg,lst_2014.336_avg,lst_2014.337_avg,lst_2014.338_avg,lst_2014.339_avg,lst_2014.340_avg,lst_2014.341_avg,lst_2014.342_avg,lst_2014.343_avg,lst_2014.344_avg,lst_2014.345_avg,lst_2014.346_avg,lst_2014.347_avg,lst_2014.348_avg,lst_2014.349_avg,lst_2014.350_avg,lst_2014.351_avg,lst_2014.352_avg,lst_2014.353_avg,lst_2014.354_avg,lst_2014.355_avg,lst_2014.356_avg,lst_2014.357_avg,lst_2014.358_avg,lst_2014.359_avg,lst_2014.360_avg,lst_2014.361_avg,lst_2014.362_avg,lst_2014.363_avg,lst_2014.364_avg,lst_2014.365_avg,lst_2015.001_avg,lst_2015.002_avg,lst_2015.003_avg,lst_2015.004_avg,lst_2015.005_avg,lst_2015.006_avg,lst_2015.007_avg,lst_2015.008_avg,lst_2015.009_avg,lst_2015.010_avg,lst_2015.011_avg,lst_2015.012_avg,lst_2015.013_avg,lst_2015.014_avg,lst_2015.015_avg,lst_2015.016_avg,lst_2015.017_avg,lst_2015.018_avg,lst_2015.019_avg,lst_2015.020_avg,lst_2015.021_avg,lst_2015.022_avg,lst_2015.023_avg,lst_2015.024_avg,lst_2015.025_avg,lst_2015.026_avg,lst_2015.027_avg,lst_2015.028_avg,lst_2015.029_avg,lst_2015.030_avg,lst_2015.031_avg,lst_2015.032_avg,lst_2015.033_avg,lst_2015.034_avg,lst_2015.035_avg,lst_2015.036_avg,lst_2015.037_avg,lst_2015.038_avg,lst_2015.039_avg,lst_2015.040_avg,lst_2015.041_avg,lst_2015.042_avg,lst_2015.043_avg,lst_2015.044_avg,lst_2015.045_avg,lst_2015.046_avg,lst_2015.047_avg,lst_2015.048_avg,lst_2015.049_avg,lst_2015.050_avg,lst_2015.051_avg,lst_2015.052_avg,lst_2015.053_avg,lst_2015.054_avg,lst_2015.055_avg,lst_2015.056_avg,lst_2015.057_avg,lst_2015.058_avg,lst_2015.059_avg,lst_2015.060_avg,lst_2015.061_avg,lst_2015.062_avg,lst_2015.063_avg,lst_2015.064_avg,lst_2015.065_avg,lst_2015.066_avg,lst_2015.067_avg,lst_2015.068_avg,lst_2015.069_avg,lst_2015.070_avg,lst_2015.071_avg,lst_2015.072_avg,lst_2015.073_avg,lst_2015.074_avg,lst_2015.075_avg,lst_2015.076_avg,lst_2015.077_avg,lst_2015.078_avg,lst_2015.079_avg,lst_2015.080_avg,lst_2015.081_avg,lst_2015.082_avg,lst_2015.083_avg,lst_2015.084_avg,lst_2015.085_avg,lst_2015.086_avg,lst_2015.087_avg,lst_2015.088_avg,lst_2015.089_avg,lst_2015.090_avg,lst_2015.091_avg,lst_2015.092_avg,lst_2015.093_avg,lst_2015.094_avg,lst_2015.095_avg,lst_2015.096_avg,lst_2015.097_avg,lst_2015.098_avg,lst_2015.099_avg,lst_2015.100_avg,lst_2015.101_avg,lst_2015.102_avg,lst_2015.103_avg,lst_2015.104_avg,lst_2015.105_avg,lst_2015.106_avg,lst_2015.107_avg,lst_2015.108_avg,lst_2015.109_avg,lst_2015.110_avg,lst_2015.111_avg,lst_2015.112_avg,lst_2015.113_avg,lst_2015.114_avg,lst_2015.115_avg,lst_2015.116_avg,lst_2015.117_avg,lst_2015.118_avg,lst_2015.119_avg,lst_2015.120_avg,lst_2015.121_avg,lst_2015.122_avg,lst_2015.123_avg,lst_2015.124_avg,lst_2015.125_avg,lst_2015.126_avg,lst_2015.127_avg,lst_2015.128_avg,lst_2015.129_avg,lst_2015.130_avg,lst_2015.131_avg,lst_2015.132_avg,lst_2015.133_avg,lst_2015.134_avg,lst_2015.135_avg,lst_2015.136_avg,lst_2015.137_avg,lst_2015.138_avg,lst_2015.139_avg,lst_2015.140_avg,lst_2015.141_avg,lst_2015.142_avg,lst_2015.143_avg,lst_2015.144_avg,lst_2015.145_avg,lst_2015.146_avg,lst_2015.147_avg,lst_2015.148_avg,lst_2015.149_avg,lst_2015.150_avg,lst_2015.151_avg,lst_2015.152_avg,lst_2015.153_avg,lst_2015.154_avg,lst_2015.155_avg,lst_2015.156_avg,lst_2015.157_avg,lst_2015.158_avg,lst_2015.159_avg,lst_2015.160_avg,lst_2015.161_avg,lst_2015.162_avg,lst_2015.163_avg,lst_2015.164_avg,lst_2015.165_avg,lst_2015.166_avg,lst_2015.167_avg,lst_2015.168_avg,lst_2015.169_avg,lst_2015.170_avg,lst_2015.171_avg,lst_2015.172_avg,lst_2015.173_avg,lst_2015.174_avg,lst_2015.175_avg,lst_2015.176_avg,lst_2015.177_avg,lst_2015.178_avg,lst_2015.179_avg,lst_2015.180_avg,lst_2015.181_avg,lst_2015.182_avg,lst_2015.183_avg,lst_2015.184_avg,lst_2015.185_avg,lst_2015.186_avg,lst_2015.187_avg,lst_2015.188_avg,lst_2015.189_avg,lst_2015.190_avg,lst_2015.191_avg,lst_2015.192_avg,lst_2015.193_avg,lst_2015.194_avg,lst_2015.195_avg,lst_2015.196_avg,lst_2015.197_avg,lst_2015.198_avg,lst_2015.199_avg,lst_2015.200_avg,lst_2015.201_avg,lst_2015.202_avg,lst_2015.203_avg,lst_2015.204_avg,lst_2015.205_avg,lst_2015.206_avg,lst_2015.207_avg,lst_2015.208_avg,lst_2015.209_avg,lst_2015.210_avg,lst_2015.211_avg,lst_2015.212_avg,lst_2015.213_avg,lst_2015.214_avg,lst_2015.215_avg,lst_2015.216_avg,lst_2015.217_avg,lst_2015.218_avg,lst_2015.219_avg,lst_2015.220_avg,lst_2015.221_avg,lst_2015.222_avg,lst_2015.223_avg,lst_2015.224_avg,lst_2015.225_avg,lst_2015.226_avg,lst_2015.227_avg,lst_2015.228_avg,lst_2015.229_avg,lst_2015.230_avg,lst_2015.231_avg,lst_2015.232_avg,lst_2015.233_avg,lst_2015.234_avg,lst_2015.235_avg,lst_2015.236_avg,lst_2015.237_avg,lst_2015.238_avg,lst_2015.239_avg,lst_2015.240_avg,lst_2015.241_avg,lst_2015.242_avg,lst_2015.243_avg,lst_2015.244_avg,lst_2015.245_avg,lst_2015.246_avg,lst_2015.247_avg,lst_2015.248_avg,lst_2015.249_avg,lst_2015.250_avg,lst_2015.251_avg,lst_2015.252_avg,lst_2015.253_avg,lst_2015.254_avg,lst_2015.255_avg,lst_2015.256_avg,lst_2015.257_avg,lst_2015.258_avg,lst_2015.259_avg,lst_2015.260_avg,lst_2015.261_avg,lst_2015.262_avg,lst_2015.263_avg,lst_2015.264_avg,lst_2015.265_avg,lst_2015.266_avg,lst_2015.267_avg,lst_2015.268_avg,lst_2015.269_avg,lst_2015.270_avg,lst_2015.271_avg,lst_2015.272_avg,lst_2015.273_avg,lst_2015.274_avg,lst_2015.275_avg,lst_2015.276_avg,lst_2015.277_avg,lst_2015.278_avg,lst_2015.279_avg,lst_2015.280_avg,lst_2015.281_avg,lst_2015.282_avg,lst_2015.283_avg,lst_2015.284_avg,lst_2015.285_avg,lst_2015.286_avg,lst_2015.287_avg,lst_2015.288_avg,lst_2015.289_avg,lst_2015.290_avg,lst_2015.291_avg,lst_2015.292_avg,lst_2015.293_avg,lst_2015.294_avg,lst_2015.295_avg,lst_2015.296_avg,lst_2015.297_avg,lst_2015.298_avg,lst_2015.299_avg,lst_2015.300_avg,lst_2015.301_avg,lst_2015.302_avg,lst_2015.303_avg,lst_2015.304_avg,lst_2015.305_avg,lst_2015.306_avg,lst_2015.307_avg,lst_2015.308_avg,lst_2015.309_avg,lst_2015.310_avg,lst_2015.311_avg,lst_2015.312_avg,lst_2015.313_avg,lst_2015.314_avg,lst_2015.315_avg,lst_2015.316_avg,lst_2015.317_avg,lst_2015.318_avg,lst_2015.319_avg,lst_2015.320_avg,lst_2015.321_avg,lst_2015.322_avg,lst_2015.323_avg,lst_2015.324_avg,lst_2015.325_avg,lst_2015.326_avg,lst_2015.327_avg,lst_2015.328_avg,lst_2015.329_avg,lst_2015.330_avg,lst_2015.331_avg,lst_2015.332_avg,lst_2015.333_avg,lst_2015.334_avg,lst_2015.335_avg,lst_2015.336_avg,lst_2015.337_avg,lst_2015.338_avg,lst_2015.339_avg,lst_2015.340_avg,lst_2015.341_avg,lst_2015.342_avg,lst_2015.343_avg,lst_2015.344_avg,lst_2015.345_avg,lst_2015.346_avg,lst_2015.347_avg,lst_2015.348_avg,lst_2015.349_avg,lst_2015.350_avg,lst_2015.351_avg,lst_2015.352_avg,lst_2015.353_avg,lst_2015.354_avg,lst_2015.355_avg,lst_2015.356_avg,lst_2015.357_avg,lst_2015.358_avg,lst_2015.359_avg,lst_2015.360_avg,lst_2015.361_avg,lst_2015.362_avg,lst_2015.363_avg,lst_2015.364_avg,lst_2015.365_avg,lst_2016.001_avg,lst_2016.002_avg,lst_2016.003_avg,lst_2016.004_avg,lst_2016.005_avg,lst_2016.006_avg,lst_2016.007_avg,lst_2016.008_avg,lst_2016.009_avg,lst_2016.010_avg,lst_2016.011_avg,lst_2016.012_avg,lst_2016.013_avg,lst_2016.014_avg,lst_2016.015_avg,lst_2016.016_avg,lst_2016.017_avg,lst_2016.018_avg,lst_2016.019_avg,lst_2016.020_avg,lst_2016.021_avg,lst_2016.022_avg,lst_2016.023_avg,lst_2016.024_avg,lst_2016.025_avg,lst_2016.026_avg,lst_2016.027_avg,lst_2016.028_avg,lst_2016.029_avg,lst_2016.030_avg,lst_2016.031_avg,lst_2016.032_avg,lst_2016.033_avg,lst_2016.034_avg,lst_2016.035_avg,lst_2016.036_avg,lst_2016.037_avg,lst_2016.038_avg,lst_2016.039_avg,lst_2016.040_avg,lst_2016.041_avg,lst_2016.042_avg,lst_2016.043_avg,lst_2016.044_avg,lst_2016.045_avg,lst_2016.046_avg,lst_2016.047_avg,lst_2016.048_avg,lst_2016.049_avg,lst_2016.050_avg,lst_2016.051_avg,lst_2016.052_avg,lst_2016.053_avg,lst_2016.054_avg,lst_2016.055_avg,lst_2016.056_avg,lst_2016.057_avg,lst_2016.058_avg,lst_2016.059_avg,lst_2016.060_avg,lst_2016.061_avg,lst_2016.062_avg,lst_2016.063_avg,lst_2016.064_avg,lst_2016.065_avg,lst_2016.066_avg,lst_2016.067_avg,lst_2016.068_avg,lst_2016.069_avg,lst_2016.070_avg,lst_2016.071_avg,lst_2016.072_avg,lst_2016.073_avg,lst_2016.074_avg,lst_2016.075_avg,lst_2016.076_avg,lst_2016.077_avg,lst_2016.078_avg,lst_2016.079_avg,lst_2016.080_avg,lst_2016.081_avg,lst_2016.082_avg,lst_2016.083_avg,lst_2016.084_avg,lst_2016.085_avg,lst_2016.086_avg,lst_2016.087_avg,lst_2016.088_avg,lst_2016.089_avg,lst_2016.090_avg,lst_2016.091_avg,lst_2016.092_avg,lst_2016.093_avg,lst_2016.094_avg,lst_2016.095_avg,lst_2016.096_avg,lst_2016.097_avg,lst_2016.098_avg,lst_2016.099_avg,lst_2016.100_avg,lst_2016.101_avg,lst_2016.102_avg,lst_2016.103_avg,lst_2016.104_avg,lst_2016.105_avg,lst_2016.106_avg,lst_2016.107_avg,lst_2016.108_avg,lst_2016.109_avg,lst_2016.110_avg,lst_2016.111_avg,lst_2016.112_avg,lst_2016.113_avg,lst_2016.114_avg,lst_2016.115_avg,lst_2016.116_avg,lst_2016.117_avg,lst_2016.118_avg,lst_2016.119_avg,lst_2016.120_avg,lst_2016.121_avg,lst_2016.122_avg,lst_2016.123_avg,lst_2016.124_avg,lst_2016.125_avg,lst_2016.126_avg,lst_2016.127_avg,lst_2016.128_avg,lst_2016.129_avg,lst_2016.130_avg,lst_2016.131_avg,lst_2016.132_avg,lst_2016.133_avg,lst_2016.134_avg,lst_2016.135_avg,lst_2016.136_avg,lst_2016.137_avg,lst_2016.138_avg,lst_2016.139_avg,lst_2016.140_avg,lst_2016.141_avg,lst_2016.142_avg,lst_2016.143_avg,lst_2016.144_avg,lst_2016.145_avg,lst_2016.146_avg,lst_2016.147_avg,lst_2016.148_avg,lst_2016.149_avg,lst_2016.150_avg,lst_2016.151_avg,lst_2016.152_avg,lst_2016.153_avg,lst_2016.154_avg,lst_2016.155_avg,lst_2016.156_avg,lst_2016.157_avg,lst_2016.158_avg,lst_2016.159_avg,lst_2016.160_avg,lst_2016.161_avg,lst_2016.162_avg,lst_2016.163_avg,lst_2016.164_avg,lst_2016.165_avg,lst_2016.166_avg,lst_2016.167_avg,lst_2016.168_avg,lst_2016.169_avg,lst_2016.170_avg,lst_2016.171_avg,lst_2016.172_avg,lst_2016.173_avg,lst_2016.174_avg,lst_2016.175_avg,lst_2016.176_avg,lst_2016.177_avg,lst_2016.178_avg,lst_2016.179_avg,lst_2016.180_avg,lst_2016.181_avg,lst_2016.182_avg,lst_2016.183_avg,lst_2016.184_avg,lst_2016.185_avg,lst_2016.186_avg,lst_2016.187_avg,lst_2016.188_avg,lst_2016.189_avg,lst_2016.190_avg,lst_2016.191_avg,lst_2016.192_avg,lst_2016.193_avg,lst_2016.194_avg,lst_2016.195_avg,lst_2016.196_avg,lst_2016.197_avg,lst_2016.198_avg,lst_2016.199_avg,lst_2016.200_avg,lst_2016.201_avg,lst_2016.202_avg,lst_2016.203_avg,lst_2016.204_avg,lst_2016.205_avg,lst_2016.206_avg,lst_2016.207_avg,lst_2016.208_avg,lst_2016.209_avg,lst_2016.210_avg,lst_2016.211_avg,lst_2016.212_avg,lst_2016.213_avg,lst_2016.214_avg,lst_2016.215_avg,lst_2016.216_avg,lst_2016.217_avg,lst_2016.218_avg,lst_2016.219_avg,lst_2016.220_avg,lst_2016.221_avg,lst_2016.222_avg,lst_2016.223_avg,lst_2016.224_avg,lst_2016.225_avg,lst_2016.226_avg,lst_2016.227_avg,lst_2016.228_avg,lst_2016.229_avg,lst_2016.230_avg,lst_2016.231_avg,lst_2016.232_avg,lst_2016.233_avg,lst_2016.234_avg,lst_2016.235_avg,lst_2016.236_avg,lst_2016.237_avg,lst_2016.238_avg,lst_2016.239_avg,lst_2016.240_avg,lst_2016.241_avg,lst_2016.242_avg,lst_2016.243_avg,lst_2016.244_avg,lst_2016.245_avg,lst_2016.246_avg,lst_2016.247_avg,lst_2016.248_avg,lst_2016.249_avg,lst_2016.250_avg,lst_2016.251_avg,lst_2016.252_avg,lst_2016.253_avg,lst_2016.254_avg,lst_2016.255_avg,lst_2016.256_avg,lst_2016.257_avg,lst_2016.258_avg,lst_2016.259_avg,lst_2016.260_avg,lst_2016.261_avg,lst_2016.262_avg,lst_2016.263_avg,lst_2016.264_avg,lst_2016.265_avg,lst_2016.266_avg,lst_2016.267_avg,lst_2016.268_avg,lst_2016.269_avg,lst_2016.270_avg,lst_2016.271_avg,lst_2016.272_avg,lst_2016.273_avg,lst_2016.274_avg,lst_2016.275_avg,lst_2016.276_avg,lst_2016.277_avg,lst_2016.278_avg,lst_2016.279_avg,lst_2016.280_avg,lst_2016.281_avg,lst_2016.282_avg,lst_2016.283_avg,lst_2016.284_avg,lst_2016.285_avg,lst_2016.286_avg,lst_2016.287_avg,lst_2016.288_avg,lst_2016.289_avg,lst_2016.290_avg,lst_2016.291_avg,lst_2016.292_avg,lst_2016.293_avg,lst_2016.294_avg,lst_2016.295_avg,lst_2016.296_avg,lst_2016.297_avg,lst_2016.298_avg,lst_2016.299_avg,lst_2016.300_avg,lst_2016.301_avg,lst_2016.302_avg,lst_2016.303_avg,lst_2016.304_avg,lst_2016.305_avg,lst_2016.306_avg,lst_2016.307_avg,lst_2016.308_avg,lst_2016.309_avg,lst_2016.310_avg,lst_2016.311_avg,lst_2016.312_avg,lst_2016.313_avg,lst_2016.314_avg,lst_2016.315_avg,lst_2016.316_avg,lst_2016.317_avg,lst_2016.318_avg,lst_2016.319_avg,lst_2016.320_avg,lst_2016.321_avg,lst_2016.322_avg,lst_2016.323_avg,lst_2016.324_avg,lst_2016.325_avg,lst_2016.326_avg,lst_2016.327_avg,lst_2016.328_avg,lst_2016.329_avg,lst_2016.330_avg,lst_2016.331_avg,lst_2016.332_avg,lst_2016.333_avg,lst_2016.334_avg,lst_2016.335_avg,lst_2016.336_avg,lst_2016.337_avg,lst_2016.338_avg,lst_2016.339_avg,lst_2016.340_avg,lst_2016.341_avg,lst_2016.342_avg,lst_2016.343_avg,lst_2016.344_avg,lst_2016.345_avg,lst_2016.346_avg,lst_2016.347_avg,lst_2016.348_avg,lst_2016.349_avg,lst_2016.350_avg,lst_2016.351_avg,lst_2016.352_avg,lst_2016.353_avg,lst_2016.354_avg,lst_2016.355_avg,lst_2016.356_avg,lst_2016.357_avg,lst_2016.358_avg,lst_2016.359_avg,lst_2016.360_avg,lst_2016.361_avg,lst_2016.362_avg,lst_2016.363_avg,lst_2016.364_avg,lst_2016.365_avg,lst_2016.366_avg,lst_2017.001_avg,lst_2017.002_avg,lst_2017.003_avg,lst_2017.004_avg,lst_2017.005_avg,lst_2017.006_avg,lst_2017.007_avg,lst_2017.008_avg,lst_2017.009_avg,lst_2017.010_avg,lst_2017.011_avg,lst_2017.012_avg,lst_2017.013_avg,lst_2017.014_avg,lst_2017.015_avg,lst_2017.016_avg,lst_2017.017_avg,lst_2017.018_avg,lst_2017.019_avg,lst_2017.020_avg,lst_2017.021_avg,lst_2017.022_avg,lst_2017.023_avg,lst_2017.024_avg,lst_2017.025_avg,lst_2017.026_avg,lst_2017.027_avg,lst_2017.028_avg,lst_2017.029_avg,lst_2017.030_avg,lst_2017.031_avg,lst_2017.032_avg,lst_2017.033_avg,lst_2017.034_avg,lst_2017.035_avg,lst_2017.036_avg,lst_2017.037_avg,lst_2017.038_avg,lst_2017.039_avg,lst_2017.040_avg,lst_2017.041_avg,lst_2017.042_avg,lst_2017.043_avg,lst_2017.044_avg,lst_2017.045_avg,lst_2017.046_avg,lst_2017.047_avg,lst_2017.048_avg,lst_2017.049_avg,lst_2017.050_avg,lst_2017.051_avg,lst_2017.052_avg,lst_2017.053_avg,lst_2017.054_avg,lst_2017.055_avg,lst_2017.056_avg,lst_2017.057_avg,lst_2017.058_avg,lst_2017.059_avg,lst_2017.060_avg,lst_2017.061_avg,lst_2017.062_avg,lst_2017.063_avg,lst_2017.064_avg,lst_2017.065_avg,lst_2017.066_avg,lst_2017.067_avg,lst_2017.068_avg,lst_2017.069_avg,lst_2017.070_avg,lst_2017.071_avg,lst_2017.072_avg,lst_2017.073_avg,lst_2017.074_avg,lst_2017.075_avg,lst_2017.076_avg,lst_2017.077_avg,lst_2017.078_avg,lst_2017.079_avg,lst_2017.080_avg,lst_2017.081_avg,lst_2017.082_avg,lst_2017.083_avg,lst_2017.084_avg,lst_2017.085_avg,lst_2017.086_avg,lst_2017.087_avg,lst_2017.088_avg,lst_2017.089_avg,lst_2017.090_avg,lst_2017.091_avg,lst_2017.092_avg,lst_2017.093_avg,lst_2017.094_avg,lst_2017.095_avg,lst_2017.096_avg,lst_2017.097_avg,lst_2017.098_avg,lst_2017.099_avg,lst_2017.100_avg,lst_2017.101_avg,lst_2017.102_avg,lst_2017.103_avg,lst_2017.104_avg,lst_2017.105_avg,lst_2017.106_avg,lst_2017.107_avg,lst_2017.108_avg,lst_2017.109_avg,lst_2017.110_avg,lst_2017.111_avg,lst_2017.112_avg,lst_2017.113_avg,lst_2017.114_avg,lst_2017.115_avg,lst_2017.116_avg,lst_2017.117_avg,lst_2017.118_avg,lst_2017.119_avg,lst_2017.120_avg,lst_2017.121_avg,lst_2017.122_avg,lst_2017.123_avg,lst_2017.124_avg,lst_2017.125_avg,lst_2017.126_avg,lst_2017.127_avg,lst_2017.128_avg,lst_2017.129_avg,lst_2017.130_avg,lst_2017.131_avg,lst_2017.132_avg,lst_2017.133_avg,lst_2017.134_avg,lst_2017.135_avg,lst_2017.136_avg,lst_2017.137_avg,lst_2017.138_avg,lst_2017.139_avg,lst_2017.140_avg,lst_2017.141_avg,lst_2017.142_avg,lst_2017.143_avg,lst_2017.144_avg,lst_2017.145_avg,lst_2017.146_avg,lst_2017.147_avg,lst_2017.148_avg,lst_2017.149_avg,lst_2017.150_avg,lst_2017.151_avg,lst_2017.152_avg,lst_2017.153_avg,lst_2017.154_avg,lst_2017.155_avg,lst_2017.156_avg,lst_2017.157_avg,lst_2017.158_avg,lst_2017.159_avg,lst_2017.160_avg,lst_2017.161_avg,lst_2017.162_avg,lst_2017.163_avg,lst_2017.164_avg,lst_2017.165_avg,lst_2017.166_avg,lst_2017.167_avg,lst_2017.168_avg,lst_2017.169_avg,lst_2017.170_avg,lst_2017.171_avg,lst_2017.172_avg,lst_2017.173_avg,lst_2017.174_avg,lst_2017.175_avg,lst_2017.176_avg,lst_2017.177_avg,lst_2017.178_avg,lst_2017.179_avg,lst_2017.180_avg,lst_2017.181_avg,lst_2017.182_avg,lst_2017.183_avg,lst_2017.184_avg,lst_2017.185_avg,lst_2017.186_avg,lst_2017.187_avg,lst_2017.188_avg,lst_2017.189_avg,lst_2017.190_avg,lst_2017.191_avg,lst_2017.192_avg,lst_2017.193_avg,lst_2017.194_avg,lst_2017.195_avg,lst_2017.196_avg,lst_2017.197_avg,lst_2017.198_avg,lst_2017.199_avg,lst_2017.200_avg,lst_2017.201_avg,lst_2017.202_avg,lst_2017.203_avg,lst_2017.204_avg,lst_2017.205_avg,lst_2017.206_avg,lst_2017.207_avg,lst_2017.208_avg,lst_2017.209_avg,lst_2017.210_avg,lst_2017.211_avg,lst_2017.212_avg,lst_2017.213_avg,lst_2017.214_avg,lst_2017.215_avg,lst_2017.216_avg,lst_2017.217_avg,lst_2017.218_avg,lst_2017.219_avg,lst_2017.220_avg,lst_2017.221_avg,lst_2017.222_avg,lst_2017.223_avg,lst_2017.224_avg,lst_2017.225_avg,lst_2017.226_avg,lst_2017.227_avg,lst_2017.228_avg,lst_2017.229_avg,lst_2017.230_avg,lst_2017.231_avg,lst_2017.232_avg,lst_2017.233_avg,lst_2017.234_avg,lst_2017.235_avg,lst_2017.236_avg,lst_2017.237_avg,lst_2017.238_avg,lst_2017.239_avg,lst_2017.240_avg,lst_2017.241_avg,lst_2017.242_avg,lst_2017.243_avg,lst_2017.244_avg,lst_2017.245_avg,lst_2017.246_avg,lst_2017.247_avg,lst_2017.248_avg,lst_2017.249_avg,lst_2017.250_avg,lst_2017.251_avg,lst_2017.252_avg,lst_2017.253_avg,lst_2017.254_avg,lst_2017.255_avg,lst_2017.256_avg,lst_2017.257_avg,lst_2017.258_avg,lst_2017.259_avg,lst_2017.260_avg,lst_2017.261_avg,lst_2017.262_avg,lst_2017.263_avg,lst_2017.264_avg,lst_2017.265_avg,lst_2017.266_avg,lst_2017.267_avg,lst_2017.268_avg,lst_2017.269_avg,lst_2017.270_avg,lst_2017.271_avg,lst_2017.272_avg,lst_2017.273_avg,lst_2017.274_avg,lst_2017.275_avg,lst_2017.276_avg,lst_2017.277_avg,lst_2017.278_avg,lst_2017.279_avg,lst_2017.280_avg,lst_2017.281_avg,lst_2017.282_avg,lst_2017.283_avg,lst_2017.284_avg,lst_2017.285_avg,lst_2017.286_avg,lst_2017.287_avg,lst_2017.288_avg,lst_2017.289_avg,lst_2017.290_avg,lst_2017.291_avg,lst_2017.292_avg,lst_2017.293_avg,lst_2017.294_avg,lst_2017.295_avg,lst_2017.296_avg,lst_2017.297_avg,lst_2017.298_avg,lst_2017.299_avg,lst_2017.300_avg,lst_2017.301_avg,lst_2017.302_avg,lst_2017.303_avg,lst_2017.304_avg,lst_2017.305_avg,lst_2017.306_avg,lst_2017.307_avg,lst_2017.308_avg,lst_2017.309_avg,lst_2017.310_avg,lst_2017.311_avg,lst_2017.312_avg,lst_2017.313_avg,lst_2017.314_avg,lst_2017.315_avg,lst_2017.316_avg,lst_2017.317_avg,lst_2017.318_avg,lst_2017.319_avg,lst_2017.320_avg,lst_2017.321_avg,lst_2017.322_avg,lst_2017.323_avg,lst_2017.324_avg,lst_2017.325_avg,lst_2017.326_avg,lst_2017.327_avg,lst_2017.328_avg,lst_2017.329_avg,lst_2017.330_avg,lst_2017.331_avg,lst_2017.332_avg,lst_2017.333_avg,lst_2017.334_avg,lst_2017.335_avg,lst_2017.336_avg,lst_2017.337_avg,lst_2017.338_avg,lst_2017.339_avg,lst_2017.340_avg,lst_2017.341_avg,lst_2017.342_avg,lst_2017.343_avg,lst_2017.344_avg,lst_2017.345_avg,lst_2017.346_avg,lst_2017.347_avg,lst_2017.348_avg,lst_2017.349_avg,lst_2017.350_avg,lst_2017.351_avg,lst_2017.352_avg,lst_2017.353_avg,lst_2017.354_avg,lst_2017.355_avg,lst_2017.356_avg,lst_2017.357_avg,lst_2017.358_avg,lst_2017.359_avg,lst_2017.360_avg,lst_2017.361_avg,lst_2017.362_avg,lst_2017.363_avg,lst_2017.364_avg,lst_2017.365_avg,lst_2018.001_avg,lst_2018.002_avg,lst_2018.003_avg,lst_2018.004_avg,lst_2018.005_avg,lst_2018.006_avg,lst_2018.007_avg,lst_2018.008_avg,lst_2018.009_avg,lst_2018.010_avg,lst_2018.011_avg,lst_2018.012_avg,lst_2018.013_avg,lst_2018.014_avg,lst_2018.015_avg,lst_2018.016_avg,lst_2018.017_avg,lst_2018.018_avg,lst_2018.019_avg,lst_2018.020_avg,lst_2018.021_avg,lst_2018.022_avg,lst_2018.023_avg,lst_2018.024_avg,lst_2018.025_avg,lst_2018.026_avg,lst_2018.027_avg,lst_2018.028_avg,lst_2018.029_avg,lst_2018.030_avg,lst_2018.031_avg,lst_2018.032_avg,lst_2018.033_avg,lst_2018.034_avg,lst_2018.035_avg,lst_2018.036_avg,lst_2018.037_avg,lst_2018.038_avg,lst_2018.039_avg,lst_2018.040_avg,lst_2018.041_avg,lst_2018.042_avg,lst_2018.043_avg,lst_2018.044_avg,lst_2018.045_avg,lst_2018.046_avg,lst_2018.047_avg,lst_2018.048_avg,lst_2018.049_avg,lst_2018.050_avg,lst_2018.051_avg,lst_2018.052_avg,lst_2018.053_avg,lst_2018.054_avg,lst_2018.055_avg,lst_2018.056_avg,lst_2018.057_avg,lst_2018.058_avg,lst_2018.059_avg,lst_2018.060_avg,lst_2018.061_avg,lst_2018.062_avg,lst_2018.063_avg,lst_2018.064_avg,lst_2018.065_avg,lst_2018.066_avg,lst_2018.067_avg,lst_2018.068_avg,lst_2018.069_avg,lst_2018.070_avg,lst_2018.071_avg,lst_2018.072_avg,lst_2018.073_avg,lst_2018.074_avg,lst_2018.075_avg,lst_2018.076_avg,lst_2018.077_avg,lst_2018.078_avg,lst_2018.079_avg,lst_2018.080_avg,lst_2018.081_avg,lst_2018.082_avg,lst_2018.083_avg,lst_2018.084_avg,lst_2018.085_avg,lst_2018.086_avg,lst_2018.087_avg,lst_2018.088_avg,lst_2018.089_avg,lst_2018.090_avg,lst_2018.091_avg,lst_2018.092_avg,lst_2018.093_avg,lst_2018.094_avg,lst_2018.095_avg,lst_2018.096_avg,lst_2018.097_avg,lst_2018.098_avg,lst_2018.099_avg,lst_2018.100_avg,lst_2018.101_avg,lst_2018.102_avg,lst_2018.103_avg,lst_2018.104_avg,lst_2018.105_avg,lst_2018.106_avg,lst_2018.107_avg,lst_2018.108_avg,lst_2018.109_avg,lst_2018.110_avg,lst_2018.111_avg,lst_2018.112_avg,lst_2018.113_avg,lst_2018.114_avg,lst_2018.115_avg,lst_2018.116_avg,lst_2018.117_avg,lst_2018.118_avg,lst_2018.119_avg,lst_2018.120_avg,lst_2018.121_avg,lst_2018.122_avg,lst_2018.123_avg,lst_2018.124_avg,lst_2018.125_avg,lst_2018.126_avg,lst_2018.127_avg,lst_2018.128_avg,lst_2018.129_avg,lst_2018.130_avg,lst_2018.131_avg,lst_2018.132_avg,lst_2018.133_avg,lst_2018.134_avg,lst_2018.135_avg,lst_2018.136_avg,lst_2018.137_avg,lst_2018.138_avg,lst_2018.139_avg,lst_2018.140_avg,lst_2018.141_avg,lst_2018.142_avg,lst_2018.143_avg,lst_2018.144_avg,lst_2018.145_avg,lst_2018.146_avg,lst_2018.147_avg,lst_2018.148_avg,lst_2018.149_avg,lst_2018.150_avg,lst_2018.151_avg,lst_2018.152_avg,lst_2018.153_avg,lst_2018.154_avg,lst_2018.155_avg,lst_2018.156_avg,lst_2018.157_avg,lst_2018.158_avg,lst_2018.159_avg,lst_2018.160_avg,lst_2018.161_avg,lst_2018.162_avg,lst_2018.163_avg,lst_2018.164_avg,lst_2018.165_avg,lst_2018.166_avg,lst_2018.167_avg,lst_2018.168_avg,lst_2018.169_avg,lst_2018.170_avg,lst_2018.171_avg,lst_2018.172_avg,lst_2018.173_avg,lst_2018.174_avg,lst_2018.175_avg,lst_2018.176_avg,lst_2018.177_avg,lst_2018.178_avg,lst_2018.179_avg,lst_2018.180_avg,lst_2018.181_avg,lst_2018.182_avg,lst_2018.183_avg,lst_2018.184_avg,lst_2018.185_avg,lst_2018.186_avg,lst_2018.187_avg,lst_2018.188_avg,lst_2018.189_avg,lst_2018.190_avg,lst_2018.191_avg,lst_2018.192_avg,lst_2018.193_avg,lst_2018.194_avg,lst_2018.195_avg,lst_2018.196_avg,lst_2018.197_avg,lst_2018.198_avg,lst_2018.199_avg,lst_2018.200_avg,lst_2018.201_avg,lst_2018.202_avg,lst_2018.203_avg,lst_2018.204_avg,lst_2018.205_avg,lst_2018.206_avg,lst_2018.207_avg,lst_2018.208_avg,lst_2018.209_avg,lst_2018.210_avg,lst_2018.211_avg,lst_2018.212_avg,lst_2018.213_avg,lst_2018.214_avg,lst_2018.215_avg,lst_2018.216_avg,lst_2018.217_avg,lst_2018.218_avg,lst_2018.219_avg,lst_2018.220_avg,lst_2018.221_avg,lst_2018.222_avg,lst_2018.223_avg,lst_2018.224_avg,lst_2018.225_avg,lst_2018.226_avg,lst_2018.227_avg,lst_2018.228_avg,lst_2018.229_avg,lst_2018.230_avg,lst_2018.231_avg,lst_2018.232_avg,lst_2018.233_avg,lst_2018.234_avg,lst_2018.235_avg,lst_2018.236_avg,lst_2018.237_avg,lst_2018.238_avg,lst_2018.239_avg,lst_2018.240_avg,lst_2018.241_avg,lst_2018.242_avg,lst_2018.243_avg,lst_2018.244_avg,lst_2018.245_avg,lst_2018.246_avg,lst_2018.247_avg,lst_2018.248_avg,lst_2018.249_avg,lst_2018.250_avg,lst_2018.251_avg,lst_2018.252_avg,lst_2018.253_avg,lst_2018.254_avg,lst_2018.255_avg,lst_2018.256_avg,lst_2018.257_avg,lst_2018.258_avg,lst_2018.259_avg,lst_2018.260_avg,lst_2018.261_avg,lst_2018.262_avg,lst_2018.263_avg,lst_2018.264_avg,lst_2018.265_avg,lst_2018.266_avg,lst_2018.267_avg,lst_2018.268_avg,lst_2018.269_avg,lst_2018.270_avg,lst_2018.271_avg,lst_2018.272_avg,lst_2018.273_avg,lst_2018.274_avg,lst_2018.275_avg,lst_2018.276_avg,lst_2018.277_avg,lst_2018.278_avg,lst_2018.279_avg,lst_2018.280_avg,lst_2018.281_avg,lst_2018.282_avg,lst_2018.283_avg,lst_2018.284_avg,lst_2018.285_avg,lst_2018.286_avg,lst_2018.287_avg,lst_2018.288_avg,lst_2018.289_avg,lst_2018.290_avg,lst_2018.291_avg,lst_2018.292_avg,lst_2018.293_avg,lst_2018.294_avg,lst_2018.295_avg,lst_2018.296_avg,lst_2018.297_avg,lst_2018.298_avg,lst_2018.299_avg,lst_2018.300_avg,lst_2018.301_avg,lst_2018.302_avg,lst_2018.303_avg,lst_2018.304_avg,lst_2018.305_avg,lst_2018.306_avg,lst_2018.307_avg,lst_2018.308_avg,lst_2018.309_avg,lst_2018.310_avg,lst_2018.311_avg,lst_2018.312_avg,lst_2018.313_avg,lst_2018.314_avg,lst_2018.315_avg,lst_2018.316_avg,lst_2018.317_avg,lst_2018.318_avg,lst_2018.319_avg,lst_2018.320_avg,lst_2018.321_avg,lst_2018.322_avg,lst_2018.323_avg,lst_2018.324_avg,lst_2018.325_avg,lst_2018.326_avg,lst_2018.327_avg,lst_2018.328_avg,lst_2018.329_avg,lst_2018.330_avg,lst_2018.331_avg,lst_2018.332_avg,lst_2018.333_avg,lst_2018.334_avg,lst_2018.335_avg,lst_2018.336_avg,lst_2018.337_avg,lst_2018.338_avg,lst_2018.339_avg,lst_2018.340_avg,lst_2018.341_avg,lst_2018.342_avg,lst_2018.343_avg,lst_2018.344_avg,lst_2018.345_avg,lst_2018.346_avg,lst_2018.347_avg,lst_2018.348_avg,lst_2018.349_avg,lst_2018.350_avg,lst_2018.351_avg,lst_2018.352_avg,lst_2018.353_avg,lst_2018.354_avg,lst_2018.355_avg,lst_2018.356_avg,lst_2018.357_avg,lst_2018.358_avg,lst_2018.359_avg,lst_2018.360_avg,lst_2018.361_avg,lst_2018.362_avg,lst_2018.363_avg,lst_2018.364_avg,lst_2018.365_avg"
| increment="1 days" start="2014-01-01"
|
+----------------------------------------------------------------------------+
Generate environmental variables from LST STRDS
Now that we created the time series or “STRDS”, let’s start estimating relevant variables. We start by calculating long term aggregations, also called climatologies.
Long term monthly avg, min and max LST
Let’s see an example first; we’ll estimate the average of all maps which start date is within January.
# January average LST
"t.rast.series",
gs.run_command(input="lst_daily",
="average",
method="strftime('%m', start_time)='01'",
where="lst_average_jan") output
# Get map info and check values
"lst_average_jan")['min'], gs.raster_info("lst_average_jan")['max'] gs.raster_info(
(-20.5722854082661, 9.66456829637104)
If we want to estimate climatologies for all months, let’s try first to get the list of maps that will be the input for t.rast.series, for that we’ll test the condition in t.rast.list first.
# Define list of months as required
=['{0:02d}'.format(m) for m in range(1,2)]
months
for m in months:
"t.rast.list",
gs.run_command(input="lst_daily",
=f"strftime('%m', start_time)='{m}'") where
name|mapset|start_time|end_time
lst_2014.001_avg|italy_LST_daily|2014-01-01 00:00:00|2014-01-02 00:00:00
lst_2014.002_avg|italy_LST_daily|2014-01-02 00:00:00|2014-01-03 00:00:00
lst_2014.003_avg|italy_LST_daily|2014-01-03 00:00:00|2014-01-04 00:00:00
lst_2014.004_avg|italy_LST_daily|2014-01-04 00:00:00|2014-01-05 00:00:00
lst_2014.005_avg|italy_LST_daily|2014-01-05 00:00:00|2014-01-06 00:00:00
lst_2014.006_avg|italy_LST_daily|2014-01-06 00:00:00|2014-01-07 00:00:00
lst_2014.007_avg|italy_LST_daily|2014-01-07 00:00:00|2014-01-08 00:00:00
lst_2014.008_avg|italy_LST_daily|2014-01-08 00:00:00|2014-01-09 00:00:00
lst_2014.009_avg|italy_LST_daily|2014-01-09 00:00:00|2014-01-10 00:00:00
lst_2014.010_avg|italy_LST_daily|2014-01-10 00:00:00|2014-01-11 00:00:00
lst_2014.011_avg|italy_LST_daily|2014-01-11 00:00:00|2014-01-12 00:00:00
lst_2014.012_avg|italy_LST_daily|2014-01-12 00:00:00|2014-01-13 00:00:00
lst_2014.013_avg|italy_LST_daily|2014-01-13 00:00:00|2014-01-14 00:00:00
lst_2014.014_avg|italy_LST_daily|2014-01-14 00:00:00|2014-01-15 00:00:00
lst_2014.015_avg|italy_LST_daily|2014-01-15 00:00:00|2014-01-16 00:00:00
lst_2014.016_avg|italy_LST_daily|2014-01-16 00:00:00|2014-01-17 00:00:00
lst_2014.017_avg|italy_LST_daily|2014-01-17 00:00:00|2014-01-18 00:00:00
lst_2014.018_avg|italy_LST_daily|2014-01-18 00:00:00|2014-01-19 00:00:00
lst_2014.019_avg|italy_LST_daily|2014-01-19 00:00:00|2014-01-20 00:00:00
lst_2014.020_avg|italy_LST_daily|2014-01-20 00:00:00|2014-01-21 00:00:00
lst_2014.021_avg|italy_LST_daily|2014-01-21 00:00:00|2014-01-22 00:00:00
lst_2014.022_avg|italy_LST_daily|2014-01-22 00:00:00|2014-01-23 00:00:00
lst_2014.023_avg|italy_LST_daily|2014-01-23 00:00:00|2014-01-24 00:00:00
lst_2014.024_avg|italy_LST_daily|2014-01-24 00:00:00|2014-01-25 00:00:00
lst_2014.025_avg|italy_LST_daily|2014-01-25 00:00:00|2014-01-26 00:00:00
lst_2014.026_avg|italy_LST_daily|2014-01-26 00:00:00|2014-01-27 00:00:00
lst_2014.027_avg|italy_LST_daily|2014-01-27 00:00:00|2014-01-28 00:00:00
lst_2014.028_avg|italy_LST_daily|2014-01-28 00:00:00|2014-01-29 00:00:00
lst_2014.029_avg|italy_LST_daily|2014-01-29 00:00:00|2014-01-30 00:00:00
lst_2014.030_avg|italy_LST_daily|2014-01-30 00:00:00|2014-01-31 00:00:00
lst_2014.031_avg|italy_LST_daily|2014-01-31 00:00:00|2014-02-01 00:00:00
lst_2015.001_avg|italy_LST_daily|2015-01-01 00:00:00|2015-01-02 00:00:00
lst_2015.002_avg|italy_LST_daily|2015-01-02 00:00:00|2015-01-03 00:00:00
lst_2015.003_avg|italy_LST_daily|2015-01-03 00:00:00|2015-01-04 00:00:00
lst_2015.004_avg|italy_LST_daily|2015-01-04 00:00:00|2015-01-05 00:00:00
lst_2015.005_avg|italy_LST_daily|2015-01-05 00:00:00|2015-01-06 00:00:00
lst_2015.006_avg|italy_LST_daily|2015-01-06 00:00:00|2015-01-07 00:00:00
lst_2015.007_avg|italy_LST_daily|2015-01-07 00:00:00|2015-01-08 00:00:00
lst_2015.008_avg|italy_LST_daily|2015-01-08 00:00:00|2015-01-09 00:00:00
lst_2015.009_avg|italy_LST_daily|2015-01-09 00:00:00|2015-01-10 00:00:00
lst_2015.010_avg|italy_LST_daily|2015-01-10 00:00:00|2015-01-11 00:00:00
lst_2015.011_avg|italy_LST_daily|2015-01-11 00:00:00|2015-01-12 00:00:00
lst_2015.012_avg|italy_LST_daily|2015-01-12 00:00:00|2015-01-13 00:00:00
lst_2015.013_avg|italy_LST_daily|2015-01-13 00:00:00|2015-01-14 00:00:00
lst_2015.014_avg|italy_LST_daily|2015-01-14 00:00:00|2015-01-15 00:00:00
lst_2015.015_avg|italy_LST_daily|2015-01-15 00:00:00|2015-01-16 00:00:00
lst_2015.016_avg|italy_LST_daily|2015-01-16 00:00:00|2015-01-17 00:00:00
lst_2015.017_avg|italy_LST_daily|2015-01-17 00:00:00|2015-01-18 00:00:00
lst_2015.018_avg|italy_LST_daily|2015-01-18 00:00:00|2015-01-19 00:00:00
lst_2015.019_avg|italy_LST_daily|2015-01-19 00:00:00|2015-01-20 00:00:00
lst_2015.020_avg|italy_LST_daily|2015-01-20 00:00:00|2015-01-21 00:00:00
lst_2015.021_avg|italy_LST_daily|2015-01-21 00:00:00|2015-01-22 00:00:00
lst_2015.022_avg|italy_LST_daily|2015-01-22 00:00:00|2015-01-23 00:00:00
lst_2015.023_avg|italy_LST_daily|2015-01-23 00:00:00|2015-01-24 00:00:00
lst_2015.024_avg|italy_LST_daily|2015-01-24 00:00:00|2015-01-25 00:00:00
lst_2015.025_avg|italy_LST_daily|2015-01-25 00:00:00|2015-01-26 00:00:00
lst_2015.026_avg|italy_LST_daily|2015-01-26 00:00:00|2015-01-27 00:00:00
lst_2015.027_avg|italy_LST_daily|2015-01-27 00:00:00|2015-01-28 00:00:00
lst_2015.028_avg|italy_LST_daily|2015-01-28 00:00:00|2015-01-29 00:00:00
lst_2015.029_avg|italy_LST_daily|2015-01-29 00:00:00|2015-01-30 00:00:00
lst_2015.030_avg|italy_LST_daily|2015-01-30 00:00:00|2015-01-31 00:00:00
lst_2015.031_avg|italy_LST_daily|2015-01-31 00:00:00|2015-02-01 00:00:00
lst_2016.001_avg|italy_LST_daily|2016-01-01 00:00:00|2016-01-02 00:00:00
lst_2016.002_avg|italy_LST_daily|2016-01-02 00:00:00|2016-01-03 00:00:00
lst_2016.003_avg|italy_LST_daily|2016-01-03 00:00:00|2016-01-04 00:00:00
lst_2016.004_avg|italy_LST_daily|2016-01-04 00:00:00|2016-01-05 00:00:00
lst_2016.005_avg|italy_LST_daily|2016-01-05 00:00:00|2016-01-06 00:00:00
lst_2016.006_avg|italy_LST_daily|2016-01-06 00:00:00|2016-01-07 00:00:00
lst_2016.007_avg|italy_LST_daily|2016-01-07 00:00:00|2016-01-08 00:00:00
lst_2016.008_avg|italy_LST_daily|2016-01-08 00:00:00|2016-01-09 00:00:00
lst_2016.009_avg|italy_LST_daily|2016-01-09 00:00:00|2016-01-10 00:00:00
lst_2016.010_avg|italy_LST_daily|2016-01-10 00:00:00|2016-01-11 00:00:00
lst_2016.011_avg|italy_LST_daily|2016-01-11 00:00:00|2016-01-12 00:00:00
lst_2016.012_avg|italy_LST_daily|2016-01-12 00:00:00|2016-01-13 00:00:00
lst_2016.013_avg|italy_LST_daily|2016-01-13 00:00:00|2016-01-14 00:00:00
lst_2016.014_avg|italy_LST_daily|2016-01-14 00:00:00|2016-01-15 00:00:00
lst_2016.015_avg|italy_LST_daily|2016-01-15 00:00:00|2016-01-16 00:00:00
lst_2016.016_avg|italy_LST_daily|2016-01-16 00:00:00|2016-01-17 00:00:00
lst_2016.017_avg|italy_LST_daily|2016-01-17 00:00:00|2016-01-18 00:00:00
lst_2016.018_avg|italy_LST_daily|2016-01-18 00:00:00|2016-01-19 00:00:00
lst_2016.019_avg|italy_LST_daily|2016-01-19 00:00:00|2016-01-20 00:00:00
lst_2016.020_avg|italy_LST_daily|2016-01-20 00:00:00|2016-01-21 00:00:00
lst_2016.021_avg|italy_LST_daily|2016-01-21 00:00:00|2016-01-22 00:00:00
lst_2016.022_avg|italy_LST_daily|2016-01-22 00:00:00|2016-01-23 00:00:00
lst_2016.023_avg|italy_LST_daily|2016-01-23 00:00:00|2016-01-24 00:00:00
lst_2016.024_avg|italy_LST_daily|2016-01-24 00:00:00|2016-01-25 00:00:00
lst_2016.025_avg|italy_LST_daily|2016-01-25 00:00:00|2016-01-26 00:00:00
lst_2016.026_avg|italy_LST_daily|2016-01-26 00:00:00|2016-01-27 00:00:00
lst_2016.027_avg|italy_LST_daily|2016-01-27 00:00:00|2016-01-28 00:00:00
lst_2016.028_avg|italy_LST_daily|2016-01-28 00:00:00|2016-01-29 00:00:00
lst_2016.029_avg|italy_LST_daily|2016-01-29 00:00:00|2016-01-30 00:00:00
lst_2016.030_avg|italy_LST_daily|2016-01-30 00:00:00|2016-01-31 00:00:00
lst_2016.031_avg|italy_LST_daily|2016-01-31 00:00:00|2016-02-01 00:00:00
lst_2017.001_avg|italy_LST_daily|2017-01-01 00:00:00|2017-01-02 00:00:00
lst_2017.002_avg|italy_LST_daily|2017-01-02 00:00:00|2017-01-03 00:00:00
lst_2017.003_avg|italy_LST_daily|2017-01-03 00:00:00|2017-01-04 00:00:00
lst_2017.004_avg|italy_LST_daily|2017-01-04 00:00:00|2017-01-05 00:00:00
lst_2017.005_avg|italy_LST_daily|2017-01-05 00:00:00|2017-01-06 00:00:00
lst_2017.006_avg|italy_LST_daily|2017-01-06 00:00:00|2017-01-07 00:00:00
lst_2017.007_avg|italy_LST_daily|2017-01-07 00:00:00|2017-01-08 00:00:00
lst_2017.008_avg|italy_LST_daily|2017-01-08 00:00:00|2017-01-09 00:00:00
lst_2017.009_avg|italy_LST_daily|2017-01-09 00:00:00|2017-01-10 00:00:00
lst_2017.010_avg|italy_LST_daily|2017-01-10 00:00:00|2017-01-11 00:00:00
lst_2017.011_avg|italy_LST_daily|2017-01-11 00:00:00|2017-01-12 00:00:00
lst_2017.012_avg|italy_LST_daily|2017-01-12 00:00:00|2017-01-13 00:00:00
lst_2017.013_avg|italy_LST_daily|2017-01-13 00:00:00|2017-01-14 00:00:00
lst_2017.014_avg|italy_LST_daily|2017-01-14 00:00:00|2017-01-15 00:00:00
lst_2017.015_avg|italy_LST_daily|2017-01-15 00:00:00|2017-01-16 00:00:00
lst_2017.016_avg|italy_LST_daily|2017-01-16 00:00:00|2017-01-17 00:00:00
lst_2017.017_avg|italy_LST_daily|2017-01-17 00:00:00|2017-01-18 00:00:00
lst_2017.018_avg|italy_LST_daily|2017-01-18 00:00:00|2017-01-19 00:00:00
lst_2017.019_avg|italy_LST_daily|2017-01-19 00:00:00|2017-01-20 00:00:00
lst_2017.020_avg|italy_LST_daily|2017-01-20 00:00:00|2017-01-21 00:00:00
lst_2017.021_avg|italy_LST_daily|2017-01-21 00:00:00|2017-01-22 00:00:00
lst_2017.022_avg|italy_LST_daily|2017-01-22 00:00:00|2017-01-23 00:00:00
lst_2017.023_avg|italy_LST_daily|2017-01-23 00:00:00|2017-01-24 00:00:00
lst_2017.024_avg|italy_LST_daily|2017-01-24 00:00:00|2017-01-25 00:00:00
lst_2017.025_avg|italy_LST_daily|2017-01-25 00:00:00|2017-01-26 00:00:00
lst_2017.026_avg|italy_LST_daily|2017-01-26 00:00:00|2017-01-27 00:00:00
lst_2017.027_avg|italy_LST_daily|2017-01-27 00:00:00|2017-01-28 00:00:00
lst_2017.028_avg|italy_LST_daily|2017-01-28 00:00:00|2017-01-29 00:00:00
lst_2017.029_avg|italy_LST_daily|2017-01-29 00:00:00|2017-01-30 00:00:00
lst_2017.030_avg|italy_LST_daily|2017-01-30 00:00:00|2017-01-31 00:00:00
lst_2017.031_avg|italy_LST_daily|2017-01-31 00:00:00|2017-02-01 00:00:00
lst_2018.001_avg|italy_LST_daily|2018-01-01 00:00:00|2018-01-02 00:00:00
lst_2018.002_avg|italy_LST_daily|2018-01-02 00:00:00|2018-01-03 00:00:00
lst_2018.003_avg|italy_LST_daily|2018-01-03 00:00:00|2018-01-04 00:00:00
lst_2018.004_avg|italy_LST_daily|2018-01-04 00:00:00|2018-01-05 00:00:00
lst_2018.005_avg|italy_LST_daily|2018-01-05 00:00:00|2018-01-06 00:00:00
lst_2018.006_avg|italy_LST_daily|2018-01-06 00:00:00|2018-01-07 00:00:00
lst_2018.007_avg|italy_LST_daily|2018-01-07 00:00:00|2018-01-08 00:00:00
lst_2018.008_avg|italy_LST_daily|2018-01-08 00:00:00|2018-01-09 00:00:00
lst_2018.009_avg|italy_LST_daily|2018-01-09 00:00:00|2018-01-10 00:00:00
lst_2018.010_avg|italy_LST_daily|2018-01-10 00:00:00|2018-01-11 00:00:00
lst_2018.011_avg|italy_LST_daily|2018-01-11 00:00:00|2018-01-12 00:00:00
lst_2018.012_avg|italy_LST_daily|2018-01-12 00:00:00|2018-01-13 00:00:00
lst_2018.013_avg|italy_LST_daily|2018-01-13 00:00:00|2018-01-14 00:00:00
lst_2018.014_avg|italy_LST_daily|2018-01-14 00:00:00|2018-01-15 00:00:00
lst_2018.015_avg|italy_LST_daily|2018-01-15 00:00:00|2018-01-16 00:00:00
lst_2018.016_avg|italy_LST_daily|2018-01-16 00:00:00|2018-01-17 00:00:00
lst_2018.017_avg|italy_LST_daily|2018-01-17 00:00:00|2018-01-18 00:00:00
lst_2018.018_avg|italy_LST_daily|2018-01-18 00:00:00|2018-01-19 00:00:00
lst_2018.019_avg|italy_LST_daily|2018-01-19 00:00:00|2018-01-20 00:00:00
lst_2018.020_avg|italy_LST_daily|2018-01-20 00:00:00|2018-01-21 00:00:00
lst_2018.021_avg|italy_LST_daily|2018-01-21 00:00:00|2018-01-22 00:00:00
lst_2018.022_avg|italy_LST_daily|2018-01-22 00:00:00|2018-01-23 00:00:00
lst_2018.023_avg|italy_LST_daily|2018-01-23 00:00:00|2018-01-24 00:00:00
lst_2018.024_avg|italy_LST_daily|2018-01-24 00:00:00|2018-01-25 00:00:00
lst_2018.025_avg|italy_LST_daily|2018-01-25 00:00:00|2018-01-26 00:00:00
lst_2018.026_avg|italy_LST_daily|2018-01-26 00:00:00|2018-01-27 00:00:00
lst_2018.027_avg|italy_LST_daily|2018-01-27 00:00:00|2018-01-28 00:00:00
lst_2018.028_avg|italy_LST_daily|2018-01-28 00:00:00|2018-01-29 00:00:00
lst_2018.029_avg|italy_LST_daily|2018-01-29 00:00:00|2018-01-30 00:00:00
lst_2018.030_avg|italy_LST_daily|2018-01-30 00:00:00|2018-01-31 00:00:00
lst_2018.031_avg|italy_LST_daily|2018-01-31 00:00:00|2018-02-01 00:00:00
Now we add the methods
and we are ready to estimate climatologies for all months with three different methods.
# Now we estimate the climatologies for all months and methods
=['{0:02d}'.format(m) for m in range(1,13)]
months=["average","minimum","maximum"]
methods
for m in months:
for me in methods:
"t.rast.series",
gs.run_command(input="lst_daily",
=me,
method=f"strftime('%m', start_time)='{m}'",
where="lst_{}_{}".format(me,m)) output
# List newly created maps
= gs.list_grouped(type="raster", pattern="*{average,minimum,maximum}*")['italy_LST_daily']
map_list print(map_list)
['lst_average_01', 'lst_average_02', 'lst_average_03', 'lst_average_04', 'lst_average_05', 'lst_average_06', 'lst_average_07', 'lst_average_08', 'lst_average_09', 'lst_average_10', 'lst_average_11', 'lst_average_12', 'lst_average_jan', 'lst_maximum_01', 'lst_maximum_02', 'lst_maximum_03', 'lst_maximum_04', 'lst_maximum_05', 'lst_maximum_06', 'lst_maximum_07', 'lst_maximum_08', 'lst_maximum_09', 'lst_maximum_10', 'lst_maximum_11', 'lst_maximum_12', 'lst_minimum_01', 'lst_minimum_02', 'lst_minimum_03', 'lst_minimum_04', 'lst_minimum_05', 'lst_minimum_06', 'lst_minimum_07', 'lst_minimum_08', 'lst_minimum_09', 'lst_minimum_10', 'lst_minimum_11', 'lst_minimum_12']
# Remove lst_average_jan
"g.remove", type="raster", name="lst_average_jan", flags="f") gs.run_command(
Bioclimatic variables
Perhaps you have heard of Worldclim or CHELSA bioclimatic variables? Well, this are 19 variables that represent potentially limiting conditions for species. They derive from the combination of temperature and precipitation long term averages. As we do not have precipitation data in this exercise, we’ll only estimate the bioclimatic variables that include temperature. See r.bioclim manual for further details. Note that we’ll use the climatologies estimated in the previous step.
# Install extension
"g.extension",
gs.run_command(="r.bioclim") extension
# Get lists of maps needed
=gs.list_grouped(type="raster", pattern="lst_minimum_??")['italy_LST_daily']
tmin=gs.list_grouped(type="raster", pattern="lst_maximum_??")['italy_LST_daily']
tmax=gs.list_grouped(type="raster", pattern="lst_average_??")['italy_LST_daily']
tavg
print(tmin,tmax,tavg)
['lst_minimum_01', 'lst_minimum_02', 'lst_minimum_03', 'lst_minimum_04', 'lst_minimum_05', 'lst_minimum_06', 'lst_minimum_07', 'lst_minimum_08', 'lst_minimum_09', 'lst_minimum_10', 'lst_minimum_11', 'lst_minimum_12'] ['lst_maximum_01', 'lst_maximum_02', 'lst_maximum_03', 'lst_maximum_04', 'lst_maximum_05', 'lst_maximum_06', 'lst_maximum_07', 'lst_maximum_08', 'lst_maximum_09', 'lst_maximum_10', 'lst_maximum_11', 'lst_maximum_12'] ['lst_average_01', 'lst_average_02', 'lst_average_03', 'lst_average_04', 'lst_average_05', 'lst_average_06', 'lst_average_07', 'lst_average_08', 'lst_average_09', 'lst_average_10', 'lst_average_11', 'lst_average_12']
# Estimate temperature related bioclimatic variables
"r.bioclim",
gs.run_command(=tmin,
tmin=tmax,
tmax=tavg,
tavg="worldclim_") output
# List output maps
type="raster", pattern="worldclim*")['italy_LST_daily'] gs.list_grouped(
['worldclim_bio01',
'worldclim_bio02',
'worldclim_bio03',
'worldclim_bio04',
'worldclim_bio05',
'worldclim_bio06',
'worldclim_bio07',
'worldclim_bio10',
'worldclim_bio11']
Let’s have a look at some of the maps we just created
# Display raster map with interactive class
= gj.InteractiveMap(width = 500, use_region=True, tiles="OpenStreetMap")
bio_map "worldclim_bio01")
bio_map.add_raster("worldclim_bio02")
bio_map.add_raster(= "bottomright")
bio_map.add_layer_control(position bio_map.show()
Spring warming
We define spring warming as the velocity with which temperature increases from winter into spring and we calculate it as slope(daily Tmean February-March-April)
. We will use t.rast.aggregate.
# Define list of months
=['{0:02d}'.format(m) for m in range(2,5)] months
# Annual spring warming
"t.rast.aggregate",
gs.run_command(input="lst_daily",
="annual_spring_warming",
output="spring_warming",
basename="gran",
suffix="slope",
method="1 years",
granularity=f"strftime('%m',start_time)='{months[0]}' or strftime('%m',start_time)='{months[1]}' or strftime('%m', start_time)='{months[2]}'") where
# Check raster maps in the STRDS
"t.rast.list", input="annual_spring_warming") gs.run_command(
name|mapset|start_time|end_time
spring_warming_2014|italy_LST_daily|2014-01-01 00:00:00|2015-01-01 00:00:00
spring_warming_2015|italy_LST_daily|2015-01-01 00:00:00|2016-01-01 00:00:00
spring_warming_2016|italy_LST_daily|2016-01-01 00:00:00|2017-01-01 00:00:00
spring_warming_2017|italy_LST_daily|2017-01-01 00:00:00|2018-01-01 00:00:00
spring_warming_2018|italy_LST_daily|2018-01-01 00:00:00|2019-01-01 00:00:00
# Average spring warming
"t.rast.series",
gs.run_command(input="annual_spring_warming",
="avg_spring_warming",
output="average") method
# Display raster map with interactive class
= gj.InteractiveMap(width = 500, use_region=True, tiles="OpenStreetMap")
auc_map "avg_spring_warming")
auc_map.add_raster(= "bottomright")
auc_map.add_layer_control(position auc_map.show()
Autumnal cooling
We define autumnal cooling as the velocity with which temperature decreases from summer into fall and we calculate it as slope(daily Tmean August-September-October)
.
# Define list of months
=['{0:02d}'.format(m) for m in range(8,11)] months
# Annual autumnal cooling
"t.rast.aggregate",
gs.run_command(input="lst_daily",
="annual_autumnal_cooling",
output="autumnal_cooling",
basename="gran",
suffix="slope",
method="1 years",
granularity=f"strftime('%m',start_time)='{months[0]}' or strftime('%m',start_time)='{months[1]}' or strftime('%m', start_time)='{months[2]}'") where
# Check raster maps in the STRDS
"t.rast.list", input="annual_autumnal_cooling") gs.run_command(
name|mapset|start_time|end_time
autumnal_cooling_2014|italy_LST_daily|2014-01-01 00:00:00|2015-01-01 00:00:00
autumnal_cooling_2015|italy_LST_daily|2015-01-01 00:00:00|2016-01-01 00:00:00
autumnal_cooling_2016|italy_LST_daily|2016-01-01 00:00:00|2017-01-01 00:00:00
autumnal_cooling_2017|italy_LST_daily|2017-01-01 00:00:00|2018-01-01 00:00:00
autumnal_cooling_2018|italy_LST_daily|2018-01-01 00:00:00|2019-01-01 00:00:00
# Average autumnal cooling
"t.rast.series",
gs.run_command(input="annual_autumnal_cooling",
="avg_autumnal_cooling",
output="average") method
# Display raster map with interactive class
= gj.InteractiveMap(width = 500, use_region=True, tiles="OpenStreetMap")
spw_map "avg_autumnal_cooling")
spw_map.add_raster(= "bottomright")
spw_map.add_layer_control(position spw_map.show()
Number of days with LSTmean >= 20 and <= 30
Mosquitoes (and virus they might carry) tend to thrive in a certain range of temperatures. Let’s assume this range is from 20 to 30 °C. Here, we’ll estimate the number of days within this range per year, and then, we’ll estimate the average along years. See t.rast.algebra manual for further details.
# Keep only pixels meeting the condition
="tmean_higher20_lower30 = if(lst_daily >= 20.0 && lst_daily <= 30.0, 1, null())"
expression
"t.rast.algebra",
gs.run_command(=expression,
expression="tmean_higher20_lower30",
basename="gran",
suffix=7,
nproc="n") flags
# Count how many times per year the condition is met
"t.rast.aggregate",
gs.run_command(input="tmean_higher20_lower30",
="count_tmean_higher20_lower30",
output="tmean_higher20_lower30",
basename="gran",
suffix="count",
method="1 years") granularity
# Check raster maps in the STRDS
"t.rast.list",
gs.run_command(input="count_tmean_higher20_lower30",
="name,start_time,min,max") columns
name|start_time|min|max
tmean_higher20_lower30_2014|2014-01-01 00:00:00|0.0|173.0
tmean_higher20_lower30_2015|2015-01-01 00:00:00|0.0|155.0
tmean_higher20_lower30_2016|2016-01-01 00:00:00|0.0|158.0
tmean_higher20_lower30_2017|2017-01-01 00:00:00|0.0|146.0
tmean_higher20_lower30_2018|2018-01-01 00:00:00|0.0|172.0
# Average number of days with LSTmean >= 20 and <= 30
"t.rast.series",
gs.run_command(input="count_tmean_higher20_lower30",
="avg_count_tmean_higher20_lower30",
output="average") method
# Display raster map with interactive class
= gj.InteractiveMap(width = 500, use_region=True, tiles="OpenStreetMap")
h20_map "avg_count_tmean_higher20_lower30")
h20_map.add_raster(= "bottomright")
h20_map.add_layer_control(position h20_map.show()
Number of consecutive days with LSTmean <= -10.0
Likewise, there are temperature thresholds that mark a limit to mosquito survival. Here, we’ll use the temperature lower limit to survival. Most importantly, we we’ll count the number of consecutive days with temperatures below this threshold.
Here, we’ll use again the temporal algebra and we’ll recall the concept of topology that we defined at the beginning of the notebook. First, we need to create a STRDS of annual granularity that will contain only zeroes. This annual STRDS, that we call annual mask
, will be the base to add 1 each time the condition of less than -10 °C in consecutive days is met. Finally, we estimate the median number of days with LST lower than -10 °C over the 5 years.
# Create annual mask
"t.rast.aggregate",
gs.run_command(input="lst_daily",
="annual_mask",
output="annual_mask",
basename="gran",
suffix="1 year",
granularity="count") method
# Replace values by zero
="if(annual_mask, 0)"
expression
"t.rast.mapcalc",
gs.run_command(input="annual_mask",
="annual_mask_0",
output=expression,
expression="annual_mask_0") basename
# Calculate consecutive days with LST <= -10.0
="lower_m10_consec_days = annual_mask_0 {+,contains,l} if(lst_daily <= -10.0 && lst_daily[-1] <= -10.0 || lst_daily[1] <= -10.0 && lst_daily <= -10.0, 1, 0)"
expression
"t.rast.algebra",
gs.run_command(=expression,
expression="lower_m10",
basename="gran",
suffix=7) nproc
# Inspect values
"t.rast.list",
gs.run_command(input="lower_m10_consec_days",
="name,start_time,min,max") columns
name|start_time|min|max
lower_m10_2015|2015-01-01 00:00:00|0.0|213.0
lower_m10_2016|2016-01-01 00:00:00|0.0|217.0
lower_m10_2017|2017-01-01 00:00:00|0.0|195.0
lower_m10_2018|2018-01-01 00:00:00|0.0|173.0
# Median number of consecutive days with LST <= -10
"t.rast.series",
gs.run_command(input="lower_m10_consec_days",
="median_lower_m10_consec_days",
output="median") method
# Display raster map with interactive class
= gj.InteractiveMap(width = 500, use_region=True, tiles="OpenStreetMap")
lt10_map "median_lower_m10_consec_days")
lt10_map.add_raster(= "bottomright")
lt10_map.add_layer_control(position lt10_map.show()
We have now derived many potentially relevant predictors for the mosquito habitat suitability and we could still derive some more, for example, the number of mosquito or virus cycles per year based on development temperature thresholds and growing degree days (GDD). This could be achieved with t.rast.accumulate and t.rast.accdetect.
We will now open a GRASS session from R and perform SDM there.