Next Article in Journal
Invasion of the Giant Hogweed and the Sosnowsky’s Hogweed as a Multidisciplinary Problem with Unknown Future—A Review
Previous Article in Journal
Rethinking Rehabilitation of Salt-Affected Land: New Perspectives from Australian Experience
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Timescape: A Novel Spatiotemporal Modeling Tool

Institute of Research on Terrestrial Ecosystems of the National Italian Research Council (CNR-IRET), Via Marconi 2, 05010 Porano, Italy
*
Author to whom correspondence should be addressed.
These authors contributed equally to this work.
Earth 2022, 3(1), 259-286; https://doi.org/10.3390/earth3010017
Submission received: 23 December 2021 / Revised: 2 February 2022 / Accepted: 15 February 2022 / Published: 17 February 2022

Abstract

:
We developed a novel approach in the field of spatiotemporal modeling, based on the spatialisation of time, the Timescape algorithm. It is especially aimed at sparsely distributed datasets in ecological research, whose spatial and temporal variability is strongly entangled. The algorithm is based on the definition of a spatiotemporal distance that incorporates a causality constraint and that is capable of accommodating the seasonal behavior of the modeled variable as well. The actual modeling is conducted exploiting any established spatial interpolation technique, substituting the ordinary spatial distance with our Timescape distance, thus sorting, from the same input set of observations, those causally related to each estimated value at a given site and time. The notion of causality is expressed topologically and it has to be tuned for each particular case. The Timescape algorithm originates from the field of stable isotopes spatial modeling (isoscapes), but in principle it can be used to model any real scalar random field distribution.

1. Introduction

One of the major issues in ecological modeling is the associated occurrence of spatial and temporal variability of the observations underlying the models [1]. Often one has to merge old-fashioned and modern measurements in a coherent mixture, especially when following the evolution of some phenomenon over time. Concerning both the purely spatial and purely temporal dependence of the variables, we have a rich modeling toolbox at hand, ranging from time series analysis [2,3] to spatial statistics [4,5,6]. However, when one cannot decide whether to favour spatial or temporal variability, the toolbox offers fewer options, commanding greater statistical intricacy [7,8,9,10], see for example the moving average processes [11] or the covariance-based methods [12] implemented in R gstat package [13,14]. In some cases we could have a dynamical model at hand [15], so the modeling is generally conducted via partial differential equations integration, as is often the case with population dynamics [16], stochastic differential equations, and Gaussian random fields [17,18]. Other trending approaches include neural networks and deep leaning techniques [19,20] and space–time Bayesian modeling [21]. Generalized linear models [22] and regression trees [23] are also used in spatial and temporal ecological modeling. Furthermore, one is often confronted with the problem of model scaling [24], though the computational limitations are less and less important.
We chose to treat our observations as a random scalar field through standard geostatistical techniques, without introducing an explicit dynamic model or any kind of machine learning. Spatial statistics demands that the distribution of our observations obeys more or less strict constraints, depending on the kind of modeling we would like to perform [4,25]. On the other hand, the distribution of observations in ecology is often sparse, both in time and space, especially when merging new data, collected according to a robust spatial pattern, with old observations, typically collected just at spot sites or along transects: data non-stationary and a spatially skewed distribution of the observations is often encountered [26], so the modeling should be conducted, as a matter of principle, also with sub-optimal datasets, maybe at the expense of accuracy.
In order to deal with entangled spatial and temporal variability, we propose a novel spatiotemporal interpolation technique—the Timescape algorithm— that estimates the spatiotemporal distribution of a given variable (technically, a real random field ) from a set of observations. The key idea is borrowed from the machinery of relativistic physics [27,28], which incorporates a notion of causality rooted into its very topological structure, the Minkowski spacetime [29]. Time is treated as new spatial dimension [30], via the multiplication by a constant with the dimensions of a velocity, and we also forbid the instantaneous propagation in space of the field values by filtering the possible sources when estimating the random field.
In a nutshell, the Timescape algorithm works at a topological level, introducing a spatiotemporal distance that mimics the Minkowskian structure, then exploiting any ordinary spatial interpolation tool for actually estimating the field values. Our spatiotemporal distance can be tuned by a couple of parameters, the aforementioned velocity and a causal strictness parameter, plus a form factor related to seasonality. The Timescape distance is exposed in Section 2.1 and Section 2.4 and the actual implementation is discussed at length in [31].
On practical grounds, we sought for a modeling tool that is: (1) not too choosy about the distribution of the input data, (2) capable of accommodating seasonal variability, (3) suitable for both both projected and geographical coordinates, (4) capable of running on affordable hardware in decent times, (5) distributable as open source. The resulting software implementations are a Python module [31] and two Java applications, one for projected [32] and one for geographical coordinates [33]. The software is exposed in Section 2.5. A few case studies are discussed in Section 3.

2. Methods

A Timescape model is a discrete representation of a scalar field on a space–time continuum with a temporal dimension and any number of spatial dimensions (Figure 1), i.e., a lattice of spatiotemporal cells (here and henceforth the target) whose values are interpolated from a sparse set of observed field values (the source). A Timescape can be regarded as a stack of sheets, each of which is an ordinary discrete spatial model, indexed by the time, as well as a sheaf of time series, identified by their spatial location.
To define a spatio-temporal distance, we mimic the structure of the Minkowskian relativistic metric [27,28,34]. According to the conventions of relativistic physics, we call event any space–time element x = ( x o , x 1 , x 2 x n ) , where x 0 is the time and x 1 , x 2 x n are the spatial coordinates.
In the following, we will represent the time and only a single spatial component, regardless of the actual number of dimensions (generally two, in both geographical and whatever projected coordinates)—see Figure 2.
The Minkowskian space–time incorporates a notion of causality due to its topology [29]. In order to implement this geometric realization of causality, we must impose an equivalent causal structure on our space–time.

2.1. Space–Time Distances

Each event x can be split in its time component x 0 and space component x = ( x 1 , x 2 x n ) , i.e., x = ( x 0 , x ) . Now define a spatial distance D s ( x , y ) between the events x and y using any given ordinary metric function d : D × D R + , where D is the spatial domain of interest (a subset of R n or any suitable manifold, e.g., the sphere S 2 of geographical coordinates). A metric d ( · ) must satisfy the the following conditions: identity: d ( x , y ) = 0 x y , non-negativity: d ( x , y ) 0 , symmetry: d ( x , y ) = d ( y , x ) and subadditivity: d ( x , y ) d ( x , z ) + d ( z , y ) z D , also known as triangle inequality. The latter, in particular, gives the metric its distinctive character of nearness measurement and it is often the key property for the convergence of the interpolation algorithms. We define the spatial distance simply as
D s ( x , y ) = d ( x , y )
The metrics of practical interest in ecological modeling are the ordinary Euclidean distance in R n for projected coordinates
D s ( x , y ) = k = 1 n x k y k 2
and the geodesic distance in S 2 for geographic coordinates
D s ( x , y ) = R arccos   sin x 2 sin y 2 + cos x 2 cos y 2 cos x 1 y 1
where R is the radius of the Earth, x 1 , y 1 the longitudes and x 2 , y 2 the latitudes of the events x and y [35,36].
Since the temporal coordinates live in (a subset of) R , we could naïvely take | x 0 y 0 | as the temporal distance between x and y , but the dimensions of D s ( x , y ) (length) and | x 0 y 0 | (duration) are not coherent. In order to integrate space and time, we introduce the first of the Timescape parameters: a time-to-space conversion factor c, i.e., a velocity R + associated with each Timescape model. This velocity can have or not have a physical interpretation as a propagation/diffusion coefficient, depending on the model. It has to be tuned to an optimal value, see Section 2.4. Thus, we define the temporal distance
D t ( x , y ) = c | x 0 y 0 |
Now we combine the spatial and temporal distances via the Pythagorean theorem, thus assuring the fulfillment of identity, non-negativity, symmetry, and subadditivity, taking D t 2 ( x , y ) + D s 2 ( x , y ) . This function is a well-behaved metric but lacks a causal structure: the point is that the symmetry property commands no distinction between x and y , whatever x 0 and y 0 , so we renounce the symmetry constraint, resorting to what is technically a distance in a pseudo-metric space [37,38]. The distinctive “measure of closeness” character of a metric is given by its subadditivity so, respecting the latter constraint, we impose a directionality to our distance, restricting to the subset x 0 y 0 , thus introducing the asymmetric function D ( x , y ) from x to y :
D ( x , y ) = D t 2 ( x , y ) + D s 2 ( x , y ) | if x 0 y 0 otherwise
so that if D ( x , y ) is finite D ( y , x ) = (the reverse is not true: D ( x , y ) = D ( y , x ) is finite. The distances can be both , e.g., whenever x 0 = y 0 and D s ( x , y ) 0 ). In a context of spatial interpolation, what (5) is saying is that something happening at x might be a cause of y but y cannot influence x (i.e., no time traveling in the past). We can be more strict, requiring that x 0 < y 0 is not enough for a source in x to propagate up to y , i.e., we forbid instantaneous actions-at-a-distance, introducing the second Timescape parameter, the causal parameter k, positing
Δ ( x , y ) = D ( x , y ) if D s ( x , y ) k D t ( x , y ) otherwise
where k 0 . Said E = T × D the space of all the events, where T R contains all the events’ times, the Δ ( x , y ) in (6) coincides with D ( x , y ) in (5) only in a conical subset whose tip is x (Figure 3). We call this subset C x + the future causal cone of x . It is the locus of the possible outcomes of something happening at x . Formally, C x + = y E | Δ ( x , y ) < .
Exploiting the Heaviside theta function θ ( t ) = 1 if t 0 or 0 otherwise, we also posit finite 0 = , the formal definition of the Timescape distance from x to y can be rephrased (it is important to distinguish the starting event (from x ) from the ending one (to y ). We cannot simply say “distance between x and y ” since Δ ( x , y ) lacks symmetry; the remnant shadow of symmetry lies in the relation y C x if x C y + ).
Δ ( x , y ) = D t 2 ( x , y ) + D s 2 ( x , y ) | | θ k D t ( x , y ) D s ( x , y ) |
Note that (7) is parameterized by c and k: each pair of parameters gives a distinct distance, and therefore a different Timescape model. In Section 2.4 we discuss in detail how to choose c and k, maximizing the accuracy of the interpolation.

2.2. Causal Structure: Topology of the Events Space

Analogously of C x + , we introduce the past causal cone of x , defined as C x = y E | Δ ( y , x ) < , where something occurring at an event in C x is a potential cause of x .
The value of k tunes the causal cones width. The bigger k, the larger the cones, the looser the causal constraint. While the smaller k, the thinner the cones, the stricter the constraint (Figure 4). As limiting cases, as k 0 , the cones shrink to vertical lines, while as k , C x + becomes, E x + the whole future of x and C x becomes E x ; k corresponds to an infinitely fast propagation of information in E .
The Timescape algorithm, in a nutshell, consists of topologically filtering the possible causes for each target event from a set of given source events, picking only the source events that fall into the past causal cone of the target event.
Further mathematical details can be found in the manual accompanying the Python Timescape module [31].

Accommodating Seasonal Variability

In ecological modeling, it is of paramount importance to be able to cope with periodic phenomena. We propose a refinement of the Timescape topological structure that includes seasonality by reshaping the cones by means of a multiplicative positive form factor ψ ( t ) that shrinks and inflates the cone width as ψ ( t ) < 1 or ψ ( t ) > 1 , thus modifying the time distance (4) as
D ˜ t ( x , y ) = c | x 0 y 0 | ψ | x 0 y 0 |
and the Timescape distance (7) accordingly:
Δ ˜ ( x , y ) = D ˜ t 2 ( x , y ) + D s 2 ( x , y ) | θ k D ˜ t ( x , y ) D s ( x , y ) |
Figure 5 shows an example of periodic shrinking with period T, using the form factor ψ α , tuned by the parameter α , defined as (the period of cos 2 is half the period of cos, so the cosine argument’s normalization factor is π / T ).
ψ α ( t ) = α + ( 1 α ) cos 2 π t T
with 0 α 1 (the smaller α , the larger the correction). The resulting “Xmas tree” past cone C ˜ x clearly shows on- and off-season peaks.
The trick operated by ψ α ( t ) in (10) consists of shrinking C x ( k ) the regular causal cone of aperture, k, down to C x ( α k ) , i.e., a smaller cone of aperture α k , during the off-season times, thus reducing the number of possible causes of x since C x ( α k ) C ˜ x C x ( k ) . If α = 0 , the shrinking is so severe that C ˜ x becomes a union of saucers connected at single events on the cone axis. The n-dimensional shrunk causal cone C ˜ x is obtained by rotating the t ψ ( t ) function’s profile about the horizontal axis (Figure 5). In bi-dimensional models it is an ordinary solid of revolution; the rotational symmetry is required by the statistical hypothesis of spatial isotropy, while the widening along time is due to the (finite speed) propagation of the modeled field.

2.3. The Algorithm

A Timescape model consists of a set of estimated values of a scalar field Φ , generally arranged as cells of a regular lattice (the target T ). The field is interpolated from a set of known values (the source S ). Each model is characterized by the choice of a spatial distance (the parameters c and k, and the form factor ψ ) and the spatial interpolation method. In general, there are no constraints on the distribution of the source events—see Figure 6.
Some interpolation methods (e.g., Kriging) require the analysis of the variogram and are also able to evaluate the accuracy of the estimate, while some others (e.g., Inverse Distance Weighting) are less demanding but do not provide an accuracy figure. The Timescape algorithm operates a topological filtering of source events before the actual interpolation, so in principle one can choose any tool from the spatial statistical catalog.
The evaluation of a Timescape variogram deserves a note of caution. First of all, each target event x possesses its own input set S x , the causal neighborhood of x (Figure 7), defined as
S x = S C x = u S | Δ ( u , x ) <
so, as a matter of principle, each x T possesses its own variogram. However, a global variogram can be evaluated by the pairwise comparison of the field values within the source events S .
To evaluate the variogram, we introduce the set S δ ( h ) of the causally connected pairs of S with a distance within the interval of width δ about h:
S δ ( h ) = ( u , w ) S × S | h δ 2 < Δ ( u , w ) h + δ 2
the corresponding variogram value is
γ ( h ) = 1 | S δ ( h ) | ( u , w ) S δ ( h ) Φ ( u ) Φ ( w ) 2
where | S δ ( h ) | is the number of elements of S δ ( h ) . The bin width δ has to be chosen in order to have no overlapping bins, typically δ = max { Δ } N , where N is the optimal number of bins [39] and h is taken at regular intervals h n = n 1 2 δ counting n = 1 N . There is not the usual variogram factor 1 2 in (13) since the asymmetry of Δ in (12) prevents double-counting, in fact the intervals in (12) do not overlap but they do not contain 0. This is of no harm since a zero Timescape distance means at the same place and the same time and, since Φ has to be single-valued, there cannot exist u , w S such that Δ ( u , w ) = 0 and Φ ( u ) Φ ( w ) .
Generally speaking, for each target event x , the value of the field at x is a weighted average of the field values of the source:
Φ ^ ( x ) = u S x W u , Δ ( u , x ) Φ ( u )
the actual functional form of the weight W depends on the spatial interpolator of choice, distance being the only common input to all the interpolators. Note that if S x = there is no way to estimate Φ ^ ( x ) . If this is the case, we attribute a null value to Φ ^ ( x ) . Other than the field value Φ ^ ( x ) , one has to calculate the accuracy of the estimate σ ^ ( x ) ; some interpolators provide such a figure, but some others do not. In the latter case, it is advisable to find the accuracy by jackknifing techniques upon the completion of the interpolation—see Section 2.4 for details.
Summing up, the Timescape workflow proceeds as follows (a block flowchart is given in Figure 8): firstly, one must create an empty target T , choose a distance function (Equation (7) or (9)) and a spatial interpolator, then, for each target event, the algorithm goes as detailed in Table 1.
It is advisable to allocate all the space needed by the finished T before starting the actual interpolation, not to run short of resources during the interpolation. The Python and Java Timescape implementations do so, as a bulk of internal memory (Python) or database records (Java)—see Section 2.5.
The loop above can be parallelized in a number of ways, since all the events in T are all considered independent of each other. A useful performance figure can be calculated during the interpolation—it is the number η ( x ) of elements in S x :
η ( x ) = | S x |
the larger η ( x ) , the more robust are Φ ^ ( x ) and σ ^ ( x ) .
Upon the completion of the loop one has to estimate the model’s accuracy, if it has not already be done by the interpolator itself. If it is not the case, the accuracy can be estimated by jackknifing the source set [40], removing a few random elements at a time, and repeating this process a number of times N [41]. A consistent standard deviation estimate is thus [42]:
σ ^ ( x ) = 1 N 1 k Φ ^ k ( x ) Φ ^ ( x ) 2
where S k is the kth replica ( k = 1 N ) of S with some random elements removed, Φ ^ ( x ) is the model’s field estimate at x , and Φ ^ k ( x ) is its estimate on the subset S k . Note that this accuracy estimate is very time-consuming. On practical grounds, (16) can be performed only on a few S k sub-sources, since the running time of each subset is comparable with that of the full Timescape model. Note also that one cannot remove too many events from S since it could lead to too many empty S k sets, i.e., too many null Φ ^ k ( x ) . Further details on the procedure can be found in Python Timescape module manual [31].
The overall accuracy can be assessed by two figures: a global variance σ model 2 and the ratio of null target events over the total target size η model
σ model 2 = 1 | T * | x T * σ ^ 2 ( x ) , η model = | T * | | T |
where T * = x T | Φ ^ ( x ) null is the set of not-null elements of T . The η model index, in particular, measures the predictive power of the model. σ model is expressed in the same units of Φ , while η is adimensional and 0 η 1 .

2.4. Model Tuning

Given the same input set S and output T , the very character of a Timescape model is given by a number of factors: the spatial interpolator, the metric parameters c, k, and the form factor ψ . We give some suggestions in order to wisely choose an optimal distance.

2.4.1. Spatial Interpolator

The vast family of Gaussian process regression techniques (in short, Kriging) provides a wide choice of interpolators. Furthermore, such techniques provide an accuracy estimate such as a variance figure, so that there is no need to perform the post hoc jackknifing. On the other hand, some old-style deterministic interpolation techniques, like the Inverse Distance Weighting, though lacking the accuracy, are extremely lightweight and fast to perform, so they should be considered, especially when geographic coordinates are involved, with a spatial distance like (3) (As a matter of principle, one should evaluate the geodesic distances on the Earth as elliptic integrals, while (3) just measures the arc length between the locations x and y ). As a rule of thumb, it is advisable to pick the same spatial interpolator one would choose if all the events were located at the same time.

2.4.2. Metric Parameters

c and k affect the metric of E : tuning these values is of paramount importance for a successful interpolation. Other than a trial-and error strategy, one should pick the best performing ( c , k ) pair. What best performing means is a compromise between fast running and accuracy [43]. We recommend a procedure based on residuals minimization by source jackknifing [40]. The idea is based on the cross-estimation of the field values of S with S itself, similar to (16) with S in place of T , for a whole ensemble of ( c , k ) values, picking the best performing pair ( c ¯ , k ¯ ) .
Let us define Φ ^ c k ( u ) the Timescape estimate of Φ ( u ) —which is known—with parameters ( c , k ) . The estimate is performed on the reduced source set S { u } . Mimicking (16), we introduce two indicators: the cumulative residuals R 2 ( c , k ) and the non-null events ratio N ( c , k ) :
R 2 ( c , k ) = 1 | S | 1 u S Φ ^ c k ( u ) Φ ( u ) 2
N ( c , k ) = | u S | Φ ^ c k ( u ) null |
the best performing pair ( c ¯ , k ¯ ) can be found by minimizing R 2 ( c , k ) and maximizing N ( c , k ) at the same time. Figure 9 shows an example of R 2 and N surfaces as functions of c and k on a regular lattice. Note that, for a given c, N ( c , k ) is a decreasing function of k: this is the consequence of the fact that a larger k implies a looser causality (see Figure 4).
As a rule of thumb, any ensemble of ( c , k ) values should initially include k 0 = 1 , i.e., treating space and time on equal grounds. As of c, if there is a characteristic velocity in the model (transport, diffusion, etc.) one can play around such a value, otherwise a naïve first guess could be, given u , v S :
c o = max u u 0 min u u 0 1 × max u , v d ( u , v )
ensuring a fair coverage of the causal cones: for Euclidean spaces, (20) makes S base diameter and height equal.

2.4.3. Form Factor

The topology of the event space–time E is controlled by the form factor ψ . The causal cones are actual cones if ψ 1 or any positive constant, which by the way can be absorbed into k. The form factor is used to modify the shape of the cones and so the topology of E , promoting or depressing the contribution of the events according to their temporal distance. We propose two cases:
Threshold: we can impose a threshold T as a maximum time distance requiring c | y 0 z 0 | T , posing ψ ( t ) = θ ( T t ) whose effect is to close the cone C ˜ y + . See Figure 10 for a comparison with a regular C x + , with ψ ( t ) = 1 .
Periodicity: a periodic ψ ( t ) 1 accommodates seasonality into a Timescape model shrinking the causal cone (Figure 5), thus filtering out the off-season events.
Given a period T, a straightforward form factor is ψ ( t ) = cos 2 ω t , where ω = π / T . If one wants to be more or less selective, some variations on the theme are at hand (Figure 11). Higher even powers of the cosine have sharper maxima and flat minima, so the cone is more selective. On the other hand, roots of cosine give smoother maxima and sharp minima, corresponding to a looser causal constraint. The cross section of the C ˜ ± cones is given by the product function t ψ ( t ) .
As a rule of thumb, as a first guess take ψ ( t ) = 1 for non-seasonal field values and ψ ( t ) = cos 2 ( π T t ) for seasonal fields modeling, then α -tempering the form with ψ α in (10), as discussed therein. The larger the area below ψ , the looser the seasonal selectivity.

2.5. Timescape Implementations

Two algorithm implementations have been published: a Python and two Java versions. All the software packages are released under the GNU-GPL license. Other than going deep into the mathematical subtleties of Section 2.1 and Section 2.2, the manuals accompanying the software distributions treat in detail the practical implementation and describe the code. In this paper, we only sketch the key features of the software. Both implementations are limited to two spatial dimensions and provide some statistical analysis tools to explore the source dataset and the finished models.

2.5.1. Python

The Timescape Python module [31] consists of a single module, exposing all the objects, methods, and functions needed to perform source data analysis, parameter tuning, and the actual model interpolation, alongside additional functions dedicated to data plotting and exporting. All the examples in Section 3 have been computed with this software.
The usage is command line-based, but the functions can be easily integrated into users’ own code. The default spatial interpolator exploits the PyKrige module functions [44]; a finished model is a Python object that can be saved in binary format and can be included in a GIS workflow as a multi-layered geotiff image [45], one band per time sheet. The storage is RAM-based, so this is the limiting factor for the number of target cells.
The Python package is designed to be easily configurable, allowing users to code their interpolators. Predefined interpolation methods include Kriging (examples in Section 3.1 and Section 3.2) and Inverse Distance Weighting (Section 3.3 and Section 3.4). Other than the Euclidean (2) and Geodesic (3) spatial distances, square and diamond metrics are provided. The allowed form factors are ψ 1 and a periodic ψ = cos 2 π t T (Equation (10), see for example Section 3.2). Defining other distances or form factors requires a non-trivial intervention on the code.

2.5.2. Java

The Timescape Java implementation consists in two stand-alone applications, one for projected coordinates, the local version [32,46], and one for geographical coordinates, the global version [33,47]. These are distributed as self-consistent jar executables.
The storage of the Timescape models is based on a Hibernate midlayer [48] that manages the connection with any compatible relational database management system (MySql [49] scripts are included in the distribution). The user interaction is mediated by a Graphical User Interface based on standard swing widgets. The database storage is more flexible, in that each target event is just a record of a table, but there is the need for a dedicated database service.
The Java applications allow a full customization of distance and form factor via a javascript-like scripting language but, since it requires run-time interpretation, the performance is dramatically affected. It is also possible to include ancillary variables along with—or even instead of—the source field values.
The java applications come with a utility for the configuration of the database connection and other parameters. A set of tools is also provided to explore, subset, and export the finished models.

2.6. Coping with Binary and Count Data

The Timescape Algorithm per se is designed for the interpolation of real scalar fields, however, discrete data (binaries and counting) can be treated considering the source dataset’s values as reals and applying these workarounds:
Counts: Apply ex-post (i.e., on the finished interpolated values) the floor or ceiling function (The floor x is the closest integer lesser than or equal to x, similarly, the ceiling x is the closest integer greater than or equal to x) thus reducing real values to integers: Φ ^ ( x ) Φ ^ ( x ) or Φ ^ ( x ) Φ ^ ( x ) . A less crude method consists of counting the passing of a series of not equally-spaced numerical thresholds { T 1 T n } , mapping Φ ^ ( x ) k θ Φ ^ ( x ) T k . The latter reduces to Φ ^ ( x ) when { T 1 T n } { 1 n } .
Binaries: we propose two distinct techniques. The first one consists simply of ex-post thresholding: Φ ^ ( x ) θ Φ ^ ( x ) T ( x ) , where T ( x ) is a threshold value, possibly depending on the event x ; in its simplest version, representing true/false source events’ values in the { 0 , 1 } set and given a single threshold T ( 0 , 1 ) , map eventually
Φ ^ ( x ) θ Φ ^ ( x ) T = 1 true if Φ ^ ( x ) T 0 false otherwise
The second technique consists of loosely mimicking the neural network propagation of signals [19,20,50]: only the first time sheet of target events is evaluated as usual, then the sheets Φ ^ ( x ) are reduced to firing/true and silent/false by (21) and used as input for the next time sheet, which is in turn reduced through (21) and so on, up to the last sheet, thus terminating the algorithm with binary target values. Notice that this technique introduces fictitious source values.
The Java Timescape version (Section 2.5.2) provides a scripting language that can be exploited to implement ex-post thresholding.

3. Results

We present four case studies. They cover a variety of coordinate systems, time scales, and peculiarities encountered in ecological geostatistics: projected and geographical coordinates, seasonal effects, uneven distribution, and number of observations.
Three examples come from the field of stable isotopes spatial and temporal distribution, also known as isoscapes [51], an increasingly widespread tool in the complex field of spatial ecological analysis [52,53,54]. Isoscapes (i.e. isotopic landscapes) consist of spatial or spatiotemporal distributions of stable isotopes elemental ratios [51], evaluated after a set of suitable measurements. From a spatial point of view, isoscapes are just maps, or series of maps at different times; from a formal point of view, isoscapes are ordinary real scalar fields, the relevant random variable being the actual isotope ratio, depicted as a function of space and, possibly, time. Isoscapes are an important tool in ecological modeling, since they can highlight spatial patterns in complex bio- and geochemical interactions, from the field of hydrology [55] to plant physiology [56,57] to animal migration [58] and to forensic science [59], naming only a few. In particular, we focus on the spatial distribution and temporal evolution of three stable isotopes from the fields of hydrology and plant physiology. The interpolated field in such isoscapes is the isotopic abundance of hydrogen ( δ 2 H), nitrogen ( δ 15 N) and oxygen ( δ 18 O). In further case studies, the interpolated field is temperature, demonstrating the potentiality of the Timescape algorithm to deal with seasonality.
The measured isotope ratios are usually expressed as differences with respect to a given reference standard, the so-called δ -notation:
δ n X = 1000 × R sample R standard R standard
where R is the molar ratio of the heavy n X stable isotope vs. the lighter, most abundant m X, the factor 1000 rescales the otherwise small numbers to easily readable figures; the deltas are adimensional; for example, δ 13 C represents the abundance of 13 C vs. 12 C in a given sample. A positive δ 13 C indicates an enrichment in 13 C vs. the common 12 C with respect to the standard, while a negative δ 13 C denotes a 13 C depletion.
Table 2 resumes the spatial and temporal characteristics of the source events for each model: number of events, geometry, spatial scale and temporal extension. All the examples are available as extra material, included in the Python software distribution [31] (For the sake of reference, all the examples are accompanied by R’s SpatialPointsDataFrame objects [14,60] with the corresponding projection’s CRC objects [61]).
Table 3 shows the details of the target events set T consistency, the spatial interpolation tool employed (Kriging or Inverse Distance Weighting), the distance function, and the causal cone form factor.
In the following, we briefly describe each case.

3.1. Fungi δ 15 N

This dataset comes from a study about host trees–mycorrhiza relationship conducted via geostatistical methods exploiting carbon and nitrogen stable isotopes abundances [62]. The model’s scalar field represents the hypogeous fungi’s ascomata δ 15 N (Tuber aestivum Vittad—edible black truffles). The complex tree–fungi relations include the nitrogen transport from fungi to the host tree, in particular, the δ 15 N difference, or fractionation, is a clue of tree–fungi symbiosis [63,64,65], with a significant difference in terms of δ 15 N, resulting in a fungal 15 N enrichment with respect to the host leaves [66,67]. From a spatio-temporal point of view, the collection took place within 64 days of continuous fungi–tree interactions, so it was impossible to treat spatial and temporal variability on different grounds. This study led to the development of the Timescape algorithm.
The source consists of 62 events, repeated measures at the same sites, skew-distributed both in space and time. The target is a stack of 64 time sheets counting 128 × 128 spatial cells each (about one million cells).
Figure 12 illustrates the typical Timescape behavior, time increasing from bottom to top: as a new observation comes in, there is a sort of perturbation in the field that pushes its value towards that of the following ones. This perturbation will eventually consolidate or fade according to the closest subsequent source events. The round shapes are due to the choice of Euclidean metric (2) as the spatial distance.
When treating cases like this one, it is important to check the accuracy of the interpolation, so it is advisable to choose a statistical interpolator like Kriginig, which is capable of calculating a target event’s variance estimate. Such variance could be relatively high, but it is noteworthy that a time-unaware geostatistical interpolation would be impossible to perform altogether. As it appears from Figure 12, accuracy stabilizes about the value 1 as time goes on; the upper right corner is meaningless since, spatially, it lies out of the convex hull of the source events, it would be a non-informative area with any ordinary geostatistical tool.
Figure 13 shows a comparison between two Timescape interpolations and a three-dimensional spatial Kriging. The leftmost graph shows the optimally tuned Timescape, and it corresponds to the upper sheet of Figure 12 top-right, predicted values. Its accuracy, estimated by the residuals with the source, is 0.74. The middle graph is from a Timescape model with identical parameters, except for k . It is the loosest causal constraint, the model’s accuracy is 1.08, significantly looser than the fine-tuned Timescape. The rightmost graph is derived from a purely spatial Kriging: the time is transformed into the third spatial dimension via the same conversion factor c of the previous models. The accuracy is only 2.52. The leftmost graph in Figure 13 clearly shows the interference of the causal cones as they propagate over time; the circular shapes are due to the choice of Euclidean metric for the spatial distance. The loose Timescape clearly shows the importance of the causal parameters c and k. In fact, the loose Timescape is not far from a purely spatial model, as the one rightmost graph of Figure 13, the only difference being that for the loose Timescape C x = E x , while for the three-dimensional Kriging C x = E x —see also the topological modifications of the Timescape distance in the discussion, Section 4.2.

3.2. Lowest Temperatures

This case study shows the ability of the Timescape algorithm to cope with seasonal variability. The source dataset consists in the monthly lowest temperatures recording of the Umbria region in central Italy [68,69].
The temperature records span 20 years with monthly time resolution ( 1 / 12 year ), and their spatial resolution increases over time as more stations have been added in the two decades considered. The interpolation has been conducted with a periodic causal cone ( T = 1 year) using universal Kriging. The great number of source events, more than 2000, added further computational load: in fact, the throughput is as low as 30 target events per second, see the following Table 4 in Section 3.5.
The source events are shown in Figure 14. Note the temporal gaps in the measurements. Additionally, new stations started logging data over time, resulting in denser events from year 1990 on, while around 1980 the collection is sparse in both space and time. This is the typical distribution skewness of surveys based on a growing measurement network.
The seasonal character of the output is apparent in the time series shown in Figure 15, extracted from the Timescape at the sites marked A, B, and in Figure 14: the upper time limit is 2005 (five years later than the source data ending), so in fact we are forecasting the values (shaded areas).
The series period remains constant (one year, of course) and the damping effect is negligible. Seasonal variability is cumbersome for Kriging [73]; in our case, the Timescape algorithm filtered out the off-season source values, thus reproducing the correct periodic behavior. The plots shown in Figure 15 have different starting times, corresponding to the earliest meaningful time (i.e., the first non-null Φ ^ ( x ) ) for the the given site. The time resolution of the series is one month. The B series of Figure 15 is initially influenced by outlying low values, due to the influence of a distant mountain station, which eventually becomes irrelevant, as closer measuring stations started logging data over time.
It is worth noting that the accuracy increases as more and more events are included in the target x past causal cones C x . This effect is not a sort of reverse heteroskedasticity, it is just an effect of η ( x ) increasing with time (Equation (15)).
This example demonstrates how easily the Timescape distance incorporates seasonality. Figure 16 shows our model versus a “wrong” non-seasonal Timescape and a spatial (three-dimensional) Kriging. It clearly appears from the time series that seasonality is totally absent in the non-seasonal Timescape, whose other parameters are identical to the original model, and that the spatial Kriging reproduces an extremely damped seasonality. The Kriging has been performed, transforming the input times in metric coordinates (UTM—Universal Transverse Mercator projected coordinates) and multiplying time by the same c of the Timescape model, which has the physical dimensions of a velocity, see Table 2.

3.3. Extra Virgin Olive Oil δ 18 O

This dataset comes from a study on the geographic traceability of Italian Extra Virgin Olive Oil (EVOO) through isoscape analysis [74] based on the spatial distribution of Carbon [57,75,76] and Oxygen [77,78,79] isotopic composition of precipitation and source water [80]. The δ 18 O isoscapes, in particular, are related to the elevation and to the distance from the sea and correlate with the year’s precipitation [77,78]; the original results in [74] have been obtained by standard spatial statistical procedures.
The source events distribution and variogram are shown in Figure 17. Measurements have been all taken at regular time intervals (once a year, at olive harvest time), as the spatiotemporal distribution clearly shows three distinct layers in the years 2009, 2010, and 2021. Furthermore, the EVOO’s δ 18 O values are linked to the harvest years’ precipitation [74], with nearly no correlation from one year to the other [77]. Although the variogram suggests a good source events space–time distribution, the lack of intra-year correlation makes the Timescape algorithm fail.
The Timescape interpolation of the same data gives results that are comparable with [74] for the first year only (Figure 18, left), while the subsequent years (center and right) do not match well with the source events. Note in particular how the extreme values are averaged out in 2010 and 2011, completely washing out the output variance.
This example shows clearly that the Timescape algorithm is not a universal tool. In this case, each year’s data are self-contained and independent of each other, so mixing three years of observations is not correct.
The computation per se, however, is straightforward: the high events throughput (more than one thousand per second, see Table 4) is due to the relatively scarce number of source events and, mostly, to the computational speed of the IDW. In this case, the weight Function (14) is simply W ( u , x ) = Δ ( u , x ) 1 . It is worth noting that the same model interpolation by Kriging gave rise to a significant number of errors, about 35% of the target events, in spite of the relatively large width of the casual cone ( k = 5 ). This is due to the fact that each year’s δ 18 O integrates that particular year’s water intake of the olive tree, and it is unrelated to other years’ values, resulting in different values with the same spatial coordinates, which is particularly disturbing for Kriging [4]—the high number of target event computational errors is an alarm bell, signaling a possible inconsistency of the source events’ values or a badly chosen interpolation tool, as it is in this case.

3.4. Precipitation δ 2 H

This example is based on the renowned Global Network of Isotopes in Precipitation (GNIP) dataset [82,83] from the International Atomic Energy Agency [84]. The collection of isotopic abundance data started in the early 1960s and the station’s network has grown dramatically over time. For historical and technical reasons, the spatial coverage is uneven (Figure 19), with the earlier, denser coverage in central Europe.
The interpolation algorithm chosen is a smooth version of the Inverse Distance Weighting method, with a bell-shaped weight function
W u , x = 1 Δ ( u , x ) 2 + m 2
where m 2 is a positive inertial term that prevents the overweighting of the closest source events. In our case m 2 = 2 . Moreover, a maximum number of ten neighbors has been imposed. Nonetheless, the computation is CPU-intensive since the geodesic metric (3) involves slow trigonometric calculations. Limiting the causal neighborhood requires S x to be ordered by distance, then trimmed retaining only the closest events to x ; this is based on the heuristic observation that only the closest elements contribute significantly to the weight functions. Both Python and Java Timescape implementations allow this kind of trimming.
This example shows how the interpolation results are affected by the addition of new sampling sites. The dates covered are from 1975 to 1984 (included). This is of course a very crude model, based only on the GNIP δ 2 H observations, and further improvements could benefit from a regionalised regression based on climatic ancillary data [78,85]. An acknowledged source of Hydrogen isoscapes is the web-based application IsoMAP [86], which also provides insightful information about precipitation hydrogen and oxygen isoscapes in general [79].

3.5. Performance Analysis

The interpolation throughput has been estimated in terms of evaluated target events per second, and typical values range from a few tens to more than one thousand, depending on three factors: the number of source events | S | , the spatial interpolator (see the method column in Table 3, Kriging is slower than IDW), the distance function (geodesic is much slower than Euclidean), and the causal cone form factor (periodic is slower than straight). The cone shape and width also influence the number of null target events. Table 4 resumes the modeling performance of the Python Timescape version on three quite standard hw/sw configurations, not claiming exhaustiveness:
-
configuration 1: laptop–Intel i7 @ 2.60 GHz, 4 cores, 16 GByte RAM, SSD storage, Python 3.8 on Windows 10 OS.
-
configuration 2: laptop–Intel i7 @ 2.30 GHz, 4 cores, 8 GByte RAM, SSD storage, Python 3.7 on Ubuntu Linux 19.10 OS.
-
configuration 3: virtual machine–Oracle Virtualbox on MacPro host, Intel Xeon-E5 @ 3.50 GHz–4 dedicated cores, 16 GByte reserved RAM out of 64, SSD storage, Python 3.8 on Xubuntu Linux 20.04-LTS OS.
The lowest throughput is associated with the temperature model (Section 3.2). In fact, this model associates a large source set, a periodic form factor, and a Kriging spatial interpolator, each factor adding its computational load.
A fair estimate of the python Timescape throughput can be set roughly about a few hundreds events per second with a standard hardware configuration. A conservative estimate of 100 evt/s is a good starting point for a new model.
We give no figures for the Java applications, since their time performance depends essentially on the database connection speed.

4. Discussion

The outcome of a Timescape model is based on three elements: the source set distribution, the spatiotemporal geometry (i.e., the shape of the causal cone and the parameters c and k), and the chosen spatial interpolation method. Picking a spatial interpolator is a matter of personal taste and computational performance; it is worth stressing that the Timescape distance is independent of (logically, it precedes the) spatial interpolation itself, so two models based on the same source with the same topology but different interpolators should not be much different to two ordinary spatial models.
As for the scale of modeling, using geographical coordinates adds further complexity due to the geodesic distance (3). If it is possible, i.e. the patches must be statistically “rich enough” and the Timescape distance parameters have to be the same across the patches (a necessary hypothesis is that far apart patches are independent of each other), it is advisable to divide the whole target set into patches which are tractable with projected coordinates, then merge the results, as could be done with any ordinary spatial interpolator (Geometrically, one builds an atlas of compatible charts. Special care is required since the spherical coordinates are periodic and singular at the poles).
We can explore further topological diversions modifying the structure of distance; Section 4.2 introduces a few suggestions. Altering the definition of the causal cones has a deep impact on causality, so the results can be unexpected even if the mathematical procedure itself is sound. A possible scenario could be inferring the past from the future (properly, retrodiction), exchanging the role of past end future cones C x and C x + .

4.1. Measurements, Stationarity, Accuracy

As it is the case with any spatial and spatiotemporal modeling tool, the statistical distribution of the input dataset is of the utmost importance for a reliable modeling strategy. Non-stationary data are often encountered in ecological modeling, as well as spatially uneven and skew-distributed measurements. The Timescape distance can help to mitigate these problems since the topological filtering operated by (7) and (9), reducing the number of input data events for each target output event, in some cases has a stabilizing effect on the variances. This is not a general rule, though: every dataset behaves distinctly. Seasonality, in particular, is well-managed by (9) the Xmas tree causal cone, since removing the off-season events from the past causal cones stabilizes the mean value and reduces the variance (see Figure 5).
Accuracy assessment is the most delicate phase of Timescape modeling. On the one hand, statistical interpolators provide an accuracy figure σ ^ ( x ) along with the estimated field Φ ^ ( x ) at running time, but it is also possible to apply jackknifing (16) on the finished target for every interpolator. The Python Timescape module [31] offers a set of functions (see Figure 9) for an initial guess of the model’s accuracy.

4.2. Timescape Topology Modification

The distance (7) can be modified in a more general way than just applying a form factor that is only a function of time (9). As a matter of principle, the past causal cone C x of x can have any shape, provided that it is a subset of the past of x : C x E x , where E x = y E | y 0 x 0 —see Figure 2. As a limiting case, C x could be the whole x ’s past E x . Any such cone shape would retain the property Δ ( x , y ) < Δ ( y , x ) = but not necessarily y C x x C y + .
Another modification of (7) consists of including retrodiction; just glue C x and C x + by the common tip x as a double cone C x . This restores symmetry in the metric function ( x C y y C x ), but at the price of subadditivity, that only holds if, given x , y , z E , the three events are mutually causally connected, i.e., x C y , y C z and z C x (the converse is guaranteed by symmetry). Otherwise symmetry is violated, as clarified in Figure 20. Furthermore, allowing retrodiction requires a factor one-half in front of variogram (13) to prevent double-counting.
Giving up causality altogether, the topological filtering can still be performed, with any x -neighborhood in lieu of C x double cone, but it would hardly be of any use in ecological modeling. It is worth mentioning that taking the whole E as C x for all x , though respecting both symmetry and subadditivity just means performing a standard spatial interpolation in one more dimension, with no topological filtering at all: this is not a Timescape model anymore.
Other than geometrically, the distance (7) can be modified according to a set of external factors, i.e., exploiting the knowledge of one or more ancillary variables. For example, the form factor-modified time distance D ˜ t (8) could be a function of some weather-related variables other than the time
D ˜ t ( x , y ) = c | x 0 y 0 | ψ x 0 , y 0 Ψ a 1 ( x ) a n ( x ) , a 1 ( y ) a n ( y )
where the a k are the observations of ancillary variables at the x and y events. Note that ψ x 0 , y 0 is more general than ψ | x 0 y 0 | in (8).
The Java applications [32,33] allow the mentioned modifications of distance function and the inclusion of ancillary variables, via a scripting language. The Python module [31] can only use symmetrical cones in the event’s past, allowing at most C x = E x as a limiting case, letting k . Practically, a large enough k suffices, say k = max D s ( u , x ) / min D t ( u , x ) , where u S , x T belong to the source and target sets, respectively.

4.3. Timescape vs. Minkowskian Geometry

Since the seminal work of Minkowski [87], the causal structure of relativistic space–time has been encoded in the so-called light cone. Causally connected events lie within each other’s light cone, while no signal can reach two events outside the cones. Furthermore, the speed of light c acts as the obvious conversion factor between spatial and temporal coordinates. Therefore, the Minkowskian space–time is naturally equipped with a topological structure that incorporates causality straightforwardly.
The Timescape geometry purposely introduces a light cone like structure in the ordinary, non-relativistic, space–time. The role of the speed of light is shared between our c and k parameters, and the causal connection has to be introduced somehow forcefully, but the resulting topology is almost identical.
As far as topology is concerned, the Timescape and Minkowskian spaces act similarly, but the metric behavior is completely different. Using our symbols, the Timescape D T and Minkowskian D M squared distances are
D T 2 ( x , y ) = D t 2 ( x , y ) + D s 2 ( x , y ) D M 2 ( x , y ) = D t 2 ( x , y ) D s 2 ( x , y )
the minus sign of D M in (25) encodes the light cone structure (The sign of D M 2 ( x , y ) defines, for each event x , three different space–time regions: the so-called time-like one, corresponding to the interior of our causal cones, the space-like region of causally unreachable events, and their common boundary, the locus of light-like events y whose D M ( x , y ) = 0 , reserved for light (or other massless particles). This is not the kind of space one expects to find in ecological modeling: D T ( x , y ) = 0 means that x and y coincide in space and time, unlike D M ( x , y ) = 0 that includes all the light-like events’ pairs. Furthermore, D M is not even a distance since D M 2 is not positive definite and, even when D M 2 0 , it does not behave as a distance; on the boundary of the light cone D t = D s D M = 0 , which perfectly describes the light in the relativistic arena, but it is far from what an ordinary distance is expected to do. On the other hand, the plus of D T in (25) ensures subadditivity, i.e., D T restricted to the causal cone is a proper distance. In fact, it is just a Pythagorean sum of squared sides (Figure 3). Summarizing, our Timescape distance mimics the Minkowskian topological structure, not its metric. The trick is operated by the θ ( k D t D s ) in the denominator of (7) that makes Δ singular. The topological correspondence being: Minkowski space-like interval → Timescape Δ = , time-like → Δ < , light-like → Δ < also. There is nothing special about the events laying on the boundary of the causal cones. Coping with infinite values is not a problem with most modern structured programming language, however, if singular distances were a concern, one could define a proximity measure Δ 1 ( x , y ) from x to y inverting (7) as
Δ 1 ( x , y ) = θ k D t ( x , y ) D s ( x , y ) D t 2 ( x , y ) + D s 2 ( x , y ) | |
the denominator of (26) never vanishes since, given two events x y , at least D t ( x , y ) > 0 or D s ( x , y ) > 0 . This trick is based on the fact that spatial interpolators are defined or can be rephrased in terms of inverse distances. The published Timescape implementations use the distance (7), since both Python and Java cope well with infinities.

4.4. A Universal Tool?

The Timescape algorithm can be exploited, in principle, with any set of observed variables varying in space and time. The Timescape algorithm should not be intended as a universal tool, however. In Table 5, we sketch a decision tree to help decide whether it should be chosen or not, depending on the distribution of input observations. In particular, it has to not be chosen whenever there is a clear temporal or spatial pattern in the source data that allows the disentanglement of spatial and temporal variability by subsetting the input set—this is the case, for example, for the Olive oil δ 18 O case study, Section 3.3.
The subject of spatiotemporal modeling offers some interesting alternatives to our proposed algorithm. Table 5 is a decision tree, showing when we suggest applying the Timescape algorithm, along with some possible alternatives. The decision should be based not only on the actual measurements, but also on the very nature of the scalar field being interpolated. A few references are suggested. Figure 21 synthetically resumes the decision tree detailed in Table 5. The list of alternatives is far from complete and, of course, there is a certain grade of arbitrariness about how entangled the spatial and temporal field dependencies are.
In the following, we describe the cases singled out in Table 5. The list of alternative methods is far from exhaustive. The use cases are classified following the kind of spatial and temporal dependence of the modeled field [25].
Purely temporal: when the input dataset can be clearly partitioned as a bunch of time series, the algorithm can be applied, but it is unnecessarily complicated and time-consuming; in this case, the Timescape result is at best comparable with ordinary one-dimensional time series [2,3]. ODE techniques can also be considered [16].
Prevailing temporal: the Timescape algorithm can be advantageously applied. The minimum temperatures example is an example of this kind of distribution. In such cases, it is advisable to use sharp (i.e., very selective, small k) causal cones to dampen the influence of nearby points. Many alternative tools exist from the field of dynamical systems as exact and stochastic differential equations [16,17,88].
Entangled spatial and temporal: this is Timescape’s ideal playground; the fungi δ 15 N is a typical case of equal importance of time and space dependence of the measured values. The Timescape parameters must be carefully tuned (Section 2.4) to optimize the results. Alternative tools range from stochastic fields [17] to Bayesian modeling [21] and covariance-based methods [12,26]. The choice is often a matter of personal taste and confidence with the selected tool. It is also worth mentioning machine learning [50,89] and neural networks [19,20], from the field of Artificial Intelligence. In order to select the best performing tool, one should ideally have a control set against which they check the results [53]. Unfortunately, this is not always the case with sub-optimal datasets, not to mention non-stationarity, heteroskedasticity, etc. To deal with such datasets, the Timescape accuracy (17) can be estimated from the input set itself. Other methods may offer different options [43].
Prevailing spatial: in this case, the Timescape algorithm can advantageously be applied. The δ 2 H case study is an example of the kind. In such cases, it is advisable to use broad (i.e., less selective, large k) causal cones to promote the influence of nearby points. Broad causal cones can easily increase the computational load. Useful alternative tools include generalized linear models [22] and boosted regression trees [23]. Sometimes ordinary geostatistics can do a good job, including the time as a third spatial coordinate, without causal constraints [5].
Purely spatial: if the measurements do not have an explicit time dependence, the Timescape algorithm is useless, of course. When the input data consists of repeated but uncorrelated measurements at different times (as the δ 18 O example demonstrates), the Timescape algorithm is even worse than a purely spatial model. Instead, each set of equal-time measurements should be treated independently [4,5].
In a broad sense, Artificial Intelligence techniques can be suitable alternatives in ecological spatiotemporal modeling as well as in many other fields of research [88,89], especially when variables interaction is to be considered; the Timescape algorithm, as it is implemented as of now [31,32,33], cannot cope with multiple variables, but its very core, the Timescape distance (7), can be exploited in a more general multi-variable context.
Summarizing, the Timescape algorithm is not a universal tool, but it has a remarkably wide range of applicability—the more entangled the space–time dependence, the better (Figure 21). Furthermore, the topological filtering (Section 2.2) operated by (7) can easily accommodate the periodic behavior of the modeled fields.
Binary variables and counts, although not strictly real fields, can be treated with the workarounds described in Section 2.6 as subsets of real random variables. The input values are simply treated as real.

5. Conclusions

The Timescape algorithm is a modeling tool aimed at the interpolation of spatiotemporal field distributions from recorded observations presenting an entangled variability in space and time. The spatial and temporal records of the modeled field are embedded into a space–time inspired by the causal topology of the Minkowskian space, the well-known arena of relativistic physics. This is achieved by applying the distance Function (7) for filtering the causally connected events before submitting the actual field estimate to an ordinary spatial interpolator. The choice of the interpolator is up to the user, as well as a couple of parameters that tune the distance to fit the particular input data. Seasonality, often encountered in ecological modeling, can be dealt with by modifying the distance Function (7) by means of a form factor (9).
The Timescape algorithm has been already implemented as a Python module and as two Java stand-alone GUI-based applications. The software is distributed under the GNU-GPL open license. The software is meant to be used with georeferenced input data and can be included in a GIS workflow, eventually exporting geotiff files.
Our modeling tool can cope with seasonality by playing with the shape of the causal cone without subsetting the input set season-by-season. Moreover, the algorithm can be applied with a variety of interpolation methods. Ideally, any spatial interpolator would do, the choice being driven by the input data and the user’s taste.

Author Contributions

Conceptualization M.C., F.C., G.R. and M.L.; Methodology M.C. and F.C.; Formal analysis M.C., F.C. and R.P.; Data curation M.C., F.C., R.P. and G.R., Visualization M.C. and G.R.; Software development M.C. and F.C.; Software testing R.P. and G.R.; Funding acquisition M.L. and M.C.; Manuscript curation M.C., F.C., R.P., G.R. and M.L. All authors have read and agreed to the published version of the manuscript.

Funding

This work was supported by the Italian National Research Council grants IBAF003/2013/POR, IBAF/02/2017/TR, CNR STM-0051519 and the European grant COST STSM-TD1209-17435. The authors are also in debt for the fundamental scientific orientation gained within REALMed project, funded by ARIMNet2 (2017–2020), EU-FP 7th grant agreement no. 618127.

Institutional Review Board Statement

Not applicable.

Informed Consent Statement

Not applicable.

Data Availability Statement

Timescape is published under the GNU-GPL3 license. The source code and the case studies’ data are available to download. The Python package along with the sample data is available at [31] and the Java implementations are available at [32,33].

Conflicts of Interest

The authors declare no conflict of interest.

References

  1. Evans, M.R. Modelling ecological systems in a changing world. Philos. Trans. R. Soc. B Biol. Sci. 2012, 367, 181–190. [Google Scholar] [CrossRef] [PubMed] [Green Version]
  2. Beran, J. Mathematical Foundations of Time Series Analysis; Springer International Publishing: Berlin/Heidelberg, Germany, 2017. [Google Scholar] [CrossRef]
  3. Shumway, R.H.; Stoffer, D.S. Time Series Analysis and Its Applications; Springer International Publishing: Berlin/Heidelberg, Germany, 2017. [Google Scholar] [CrossRef]
  4. Cressie, N. Statistics for Spatial Data; John Wiley & Sons, Inc.: Hoboken, NJ, USA, 1993. [Google Scholar] [CrossRef]
  5. Chilès, J.P.; Delfiner, P. Geostatistics; John Wiley & Sons, Inc.: Hoboken, NJ, USA, 2012. [Google Scholar] [CrossRef]
  6. Delicado, P.; Giraldo, R.; Comas, C.; Mateu, J. Statistics for spatial functional data: Some recent contributions. Environmetrics 2009, 21, 224–239. [Google Scholar] [CrossRef]
  7. Cressie, N.; Wikle, C.K. Statistics for Spatio-Temporal Data; John Wiley & Sons, Inc.: Hoboken, NJ, USA, 2015. [Google Scholar]
  8. Wikle, C.K.; Zammit-Mangion, A.; Cressie, N. Spatio-Temporal Statistics with R; Chapman and Hall/CRC: Boca Raton, FL, USA, 2019. [Google Scholar]
  9. Kyriakidis, P.C.; Journel, A.G. Geostatistical space-time models: A review. Math. Geol. 1999, 31, 651–684. [Google Scholar] [CrossRef]
  10. Le, N.D.; Zidek, J.V. Statistical Analysis of Environmental Space-Time Processes; Springer Series in Statistics; Springer: Berlin/Heidelberg, Germany, 2006. [Google Scholar]
  11. Epperson, B.K. Spatial and space–time correlations in ecological models. Ecol. Model. 2000, 132, 63–76. [Google Scholar] [CrossRef]
  12. Pebesma, E. Spacetime: Spatio-Temporal Data in R. J. Stat. Softw. 2012, 51, 1–30. [Google Scholar] [CrossRef] [Green Version]
  13. Graeler, B.; Pebesma, E.; Heuvelink, G. Spatio-Temporal Interpolation using gstat. R J. 2016, 8, 204–218. [Google Scholar] [CrossRef]
  14. R Core Team. R: A Language and Environment for Statistical Computing; R Foundation for Statistical Computing: Vienna, Austria, 2018. [Google Scholar]
  15. Chen, Q.; Han, R.; Ye, F.; Li, W. Spatio-temporal ecological models. Ecol. Inform. 2011, 6, 37–43. [Google Scholar] [CrossRef]
  16. Holmes, E.E.; Lewis, M.A.; Banks, J.E.; Veit, R.R. Partial Differential Equations in Ecology: Spatial Interactions and Population Dynamics. Ecology 1994, 75, 17–29. [Google Scholar] [CrossRef]
  17. Lindgren, F.; Rue, H.; Lindström, J. An explicit link between Gaussian fields and Gaussian Markov random fields: The stochastic partial differential equation approach. J. R. Stat. Soc. Ser. B (Stat. Methodol.) 2011, 73, 423–498. [Google Scholar] [CrossRef] [Green Version]
  18. Rue, H.; Lindgren, F.; van Niekerk, J.; Krainski, E.; Fattah, E.A. R-INLA: Approximate Bayesian Inference for Latent Gaussian Models. Available online: https://www.r-inla.org (accessed on 7 January 2022).
  19. Christin, S.; Hervet, É.; Lecomte, N. Applications for deep learning in ecology. Methods Ecol. Evol. 2019, 10, 1632–1644. [Google Scholar] [CrossRef]
  20. Brodrick, P.G.; Davies, A.B.; Asner, G.P. Uncovering Ecological Patterns with Convolutional Neural Networks. Trends Ecol. Evol. 2019, 34, 734–745. [Google Scholar] [CrossRef] [PubMed]
  21. Knorr-Held, L. Bayesian modeling of inseparable space-time variation in disease risk. Stat. Med. 2000, 19, 2555–2567. [Google Scholar] [CrossRef] [Green Version]
  22. Bolker, B.M.; Brooks, M.E.; Clark, C.J.; Geange, S.W.; Poulsen, J.R.; Stevens, M.H.H.; White, J.S.S. Generalized linear mixed models: A practical guide for ecology and evolution. Trends Ecol. Evol. 2009, 24, 127–135. [Google Scholar] [CrossRef] [PubMed]
  23. Elith, J.; Leathwick, J.R.; Hastie, T. A working guide to boosted regression trees. J. Anim. Ecol. 2008, 77, 802–813. [Google Scholar] [CrossRef]
  24. Fritsch, M.; Lischke, H.; Meyer, K.M. Scaling methods in ecological modelling. Methods Ecol. Evol. 2020, 11, 1368–1378. [Google Scholar] [CrossRef]
  25. Wang, J.F.; Stein, A.; Gao, B.B.; Ge, Y. A review of spatial sampling. Spat. Stat. 2012, 2, 1–14. [Google Scholar] [CrossRef]
  26. Jun, M.; Stein, M.L. Nonstationary covariance models for global data. Ann. Appl. Stat. 2008, 2, 1271–1289. [Google Scholar] [CrossRef]
  27. Frankel, T. The Geometry of Physics; Cambridge University Press: Cambridge, UK, 2009. [Google Scholar] [CrossRef]
  28. Jost, J. Geometry and Physics; Springer: Berlin/Heidelberg, Germany, 2009. [Google Scholar] [CrossRef]
  29. Ashtekar, A.; Petkov, V. (Eds.) Springer Handbook of Spacetime; Springer: Berlin/Heidelberg, Germany, 2014. [Google Scholar] [CrossRef]
  30. Basseville, M. Distance measures for signal processing and pattern recognition. Signal Process. 1989, 18, 349–369. [Google Scholar] [CrossRef] [Green Version]
  31. Ciolfi, M. Timescape Python Module, GNU-GPL 3 License. Available online: https://github.com/ciolfis/timescape (accessed on 1 December 2021).
  32. Ciolfi, M. TimescapeLocal Java Application, GNU-GPL 3 License. Available online: https://sourceforge.net/projects/timescapelocal (accessed on 1 December 2021).
  33. Ciolfi, M. TimescapeGlobal Java Application, GNU-GPL 3 License. Available online: https://sourceforge.net/projects/timescapeglobal (accessed on 1 December 2021).
  34. Jost, J. Riemannian Geometry and Geometric Analysis; Springer: Berlin/Heidelberg, Germany, 2011. [Google Scholar] [CrossRef]
  35. Banerjee, S. On Geodetic Distance Computations in Spatial Modeling. Biometrics 2005, 61, 617–625. [Google Scholar] [CrossRef]
  36. Mamajek, E.E.; Prsa, A.; Torres, G.; Harmanec, P.; Asplund, M.; Bennett, P.D.; Capitaine, N.; Christensen-Dalsgaard, J.; Depagne, E.; Folkner, W.M.; et al. IAU 2015 Resolution B3 on Recommended Nominal Conversion Constants for Selected Solar and Planetary Properties. arXiv 2015, arXiv:1510.07674. [Google Scholar]
  37. Ambartzumian, R.V. A note on pseudo-metrics on the plane. Z. Wahrscheinlichkeitstheorie Verwandte Geb. 1976, 37, 145–155. [Google Scholar] [CrossRef]
  38. Schroeder, V. Quasi-metric and metric spaces. Conform. Geom. Dyn. Am. Math. Soc. 2006, 10, 355–361. [Google Scholar] [CrossRef]
  39. Scott, D.W. On optimal and data-based histograms. Biometrika 1979, 66, 605–610. [Google Scholar] [CrossRef]
  40. Efron, B.; Stein, C. The Jackknife Estimate of Variance. Ann. Stat. 1981, 9, 586–596. [Google Scholar] [CrossRef]
  41. Knight, K. Mathematical Statistics; Chapman & Hall CRC: Boca Raton, FL, USA, 2000. [Google Scholar]
  42. McIntosh, A. The Jackknife Estimation Method. arXiv 2016, arXiv:1606.00497. [Google Scholar]
  43. Bennett, N.D.; Croke, B.F.; Guariso, G.; Guillaume, J.H.; Hamilton, S.H.; Jakeman, A.J.; Marsili-Libelli, S.; Newham, L.T.; Norton, J.P.; Perrin, C.; et al. Characterising performance of environmental models. Environ. Model. Softw. 2013, 40, 1–20. [Google Scholar] [CrossRef]
  44. PyKrige Developers. PyKrige, 2D and 3D Python Kriging Implementation. Available online: https://pykrige.readthedocs.io (accessed on 1 December 2021).
  45. Open Geospatial Consortium. OGC GeoTIFF Standard. Available online: https://www.opengeospatial.org/standards/geotiff (accessed on 1 December 2021).
  46. Ciolfi, M.; Chiocchini, F.; Mattioni, M.; Lauteri, M. Timescape Local spacetime interpolation tool: Projected coordinates java standalone application. Smart ELab 2017, 10, 20–39. [Google Scholar] [CrossRef]
  47. Ciolfi, M.; Chiocchini, F.; Mattioni, M.; Lauteri, M. Timescape Global spacetime interpolation tool: Geographic coordinates java standalone application. Smart ELab 2018, 11, 1–51. [Google Scholar] [CrossRef]
  48. Hibernate Object Relational Mapping. Available online: http://hibernate.org (accessed on 1 December 2021).
  49. Oracle. MySQL Developer Zone. Available online: https://dev.mysql.com (accessed on 1 December 2021).
  50. Gallant, S. Perceptron-based learning algorithms. IEEE Trans. Neural Netw. 1990, 1, 179–191. [Google Scholar] [CrossRef]
  51. West, J.B.; Bowen, G.J.; Dawson, T.E.; Tu, K.P. (Eds.) Isoscapes; Springer: Dordrecht, The Netherlands, 2010. [Google Scholar] [CrossRef]
  52. Wagner, H.H.; Fortin, M.J. Spatial Analysis of Landscapes: Concepts and Statistics. Ecology 2005, 86, 1975–1987. [Google Scholar] [CrossRef] [Green Version]
  53. Rossi, R.E.; Mulla, D.J.; Journel, A.G.; Franz, E.H. Geostatistical Tools for Modeling and Interpreting Ecological Spatial Dependence. Ecol. Monogr. 1992, 62, 277–314. [Google Scholar] [CrossRef]
  54. West, J.B.; Bowen, G.J.; Cerling, T.E.; Ehleringer, J.R. Stable isotopes as one of nature’s ecological recorders. Trends Ecol. Evol. 2006, 21, 408–414. [Google Scholar] [CrossRef] [PubMed]
  55. Bowen, G.J.; Good, S.P. Incorporating water isoscapes in hydrological and water resource investigations. WIREs Water 2015, 2, 107–119. [Google Scholar] [CrossRef]
  56. West, J.B.; Sobek, A.; Ehleringer, J.R. A Simplified GIS Approach to Modeling Global Leaf Water Isoscapes. PLoS ONE 2008, 3, e2447. [Google Scholar] [CrossRef] [PubMed] [Green Version]
  57. Brugnoli, E.; Farquhar, G.D. Photosynthetic Fractionation of Carbon Isotopes. In Photosynthesis; Springer: Dordrecht, The Netherlands, 2000; pp. 399–434. [Google Scholar] [CrossRef]
  58. Hobson, K.A.; Wassenaar, L.I. (Eds.) Tracking Animal Migration with Stable Isotopes, 2nd ed.; Elsevier: Amsterdam, The Netherlands, 2019; ISBN 9780128147238. [Google Scholar] [CrossRef]
  59. Chesson, L.A.; Tipple, B.J.; Ehleringer, J.R.; Park, T.; Bartelink, E.J. Forensic applications of isotope landscapes (“isoscapes”). In Forensic Anthropology; John Wiley & Sons, Ltd.: Hoboken, NJ, USA, 2017; pp. 127–148. [Google Scholar] [CrossRef]
  60. Bivand, R.S.; Pebesma, E.; Gomez-Rubio, V. Applied Spatial Data Analysis with R; Springer: New York, NY, USA, 2013. [Google Scholar] [CrossRef]
  61. Pebesma, E.; Bivand, R. Classes and Methods for Spatial Data in R. R News 2005, 5, 1–20. [Google Scholar]
  62. Ciolfi, M.; Piovesan, G. Spatiotemporal Analysis and Modeling of Ecological Processes at Ecosystem, Landscape and Bioregion Scale. Ph.D. Thesis, Università della Tuscia, Viterbo, Italy, 2016. [Google Scholar]
  63. Hogberg, P.; Hogberg, M.N.; Quist, M.E.; Ekblad, A.; Nasholm, T. Nitrogen isotope fractionation during nitrogen uptake by ectomycorrhizal and non-mycorrhizal Pinus sylvestris. New Phytol. 1999, 142, 569–576. [Google Scholar] [CrossRef]
  64. Hobbie, E.A.; Colpaert, J.V. Nitrogen availability and colonization by mycorrhizal fungi correlate with nitrogen isotope patterns in plants. New Phytol. 2003, 157, 115–126. [Google Scholar] [CrossRef] [PubMed]
  65. Dawson, T.E.; Mambelli, S.; Plamboeck, A.H.; Templer, P.H.; Tu, K.P. Stable Isotopes in Plant Ecology. Annu. Rev. Ecol. Syst. 2002, 33, 507–559. [Google Scholar] [CrossRef]
  66. Henn, M.R.; Chapela, I.H. Ecophysiology of 13C and 15N isotopic fractionation in forest fungi and the roots of the saprotrophic-mycorrhizal divide. Oecologia 2001, 128, 480–487. [Google Scholar] [CrossRef]
  67. Govindarajulu, M.; Pfeffer, P.E.; Jin, H.; Abubaker, J.; Douds, D.D.; Allen, J.W.; Bücking, H.; Lammers, P.J.; Shachar-Hill, Y. Nitrogen transfer in the arbuscular mycorrhizal symbiosis. Nature 2005, 435, 819–823. [Google Scholar] [CrossRef]
  68. Umbria Region Hydrographic Service. Available online: https://servizioidrografico.regione.umbria.it (accessed on 1 December 2021).
  69. Annali Regione Umbria. Annals of the Umbria Hydrographic Service. Available online: https://annali.regione.umbria.it (accessed on 1 December 2021).
  70. Natural Earth Public Domain Vector and Raster Maps. Available online: https://www.naturalearthdata.com (accessed on 1 December 2021).
  71. Geoportale Nazionale of the Italian Ministry for the Environment. Available online: http://www.pcn.minambiente.it (accessed on 1 December 2021).
  72. QGIS Development Team. QGIS Geographic Information System. Open Source Geospatial Foundation Project. Available online: http://qgis.osgeo.org (accessed on 1 December 2021).
  73. Giraldo, R.; Delicado, P.; Mateu, J. Continuous Time-Varying Kriging for Spatial Prediction of Functional Data: An Environmental Application. J. Agric. Biol. Environ. Stat. 2010, 15, 66–82. [Google Scholar] [CrossRef]
  74. Chiocchini, F.; Portarena, S.; Ciolfi, M.; Brugnoli, E.; Lauteri, M. Isoscapes of carbon and oxygen stable isotope compositions in tracing authenticity and geographical origin of Italian extra-virgin olive oils. Food Chem. 2016, 202, 291–301. [Google Scholar] [CrossRef] [PubMed] [Green Version]
  75. Portarena, S.; Gavrichkova, O.; Lauteri, M.; Brugnoli, E. Authentication and traceability of Italian extra-virgin olive oils by means of stable isotopes techniques. Food Chem. 2014, 164, 12–16. [Google Scholar] [CrossRef]
  76. Camin, F.; Larcher, R.; Nicolini, G.; Bontempo, L.; Bertoldi, D.; Perini, M.; Schlicht, C.; Schellenberg, A.; Thomas, F.; Heinrich, K.; et al. Isotopic and Elemental Data for Tracing the Origin of European Olive Oils. J. Agric. Food Chem. 2010, 58, 570–577. [Google Scholar] [CrossRef] [PubMed]
  77. Longinelli, A.; Selmo, E. Isotopic composition of precipitation in Italy: A first overall map. J. Hydrol. 2003, 270, 75–88. [Google Scholar] [CrossRef]
  78. Isotopic Composition of Precipitation in the Mediterranean Basin in Relation to Air Circulation Patterns and Climate; Number 1453 in TECDOC Series; International Atomic Energy Agency: Vienna, Austria, 2005.
  79. Bowen, G.J.; Revenaugh, J. Interpolating the isotopic composition of modern meteoric precipitation. Water Resour. Res. 2003, 39, 1299. [Google Scholar] [CrossRef]
  80. Camin, F.; Larcher, R.; Perini, M.; Bontempo, L.; Bertoldi, D.; Gagliano, G.; Nicolini, G.; Versini, G. Characterisation of authentic Italian extra-virgin olive oils by stable isotope ratios of C, O and H and mineral composition. Food Chem. 2010, 118, 901–909. [Google Scholar] [CrossRef]
  81. Visual Data Tools Inc. DataGraph Scientific Graphing Tool for macOS. Available online: https://www.visualdatatools.com/DataGraph/ (accessed on 7 January 2022).
  82. The Global Network of Isotopes in Precipitation of the International Atomic Energy Agency. Available online: https://www.iaea.org/services/networks/gnip (accessed on 1 December 2021).
  83. Statistical Treatment of Data on Environmental Isotopes in Precipitation; Number 331 in Technical Reports Series; International Atomic Energy Agency: Vienna, Austria, 1992.
  84. IAEA. International Atomic Energy Agency. Available online: https://www.iaea.org (accessed on 1 December 2021).
  85. Terzer, S.; Wassenaar, L.I.; Araguás-Araguás, L.J.; Aggarwal, P.K. Global isoscapes for δ18O and δ2H in precipitation: Improved prediction using regionalized climatic regression models. Hydrol. Earth Syst. Sci. 2013, 17, 4713–4728. [Google Scholar] [CrossRef]
  86. IsoMAP—Isoscapes Modeling, Analysis and Prediction. Available online: http://isomap.org (accessed on 1 December 2021).
  87. Minkowski, H. Das Relativitätsprinzip. Ann. Phys. 1915, 352, 927–938. [Google Scholar] [CrossRef] [Green Version]
  88. Week, B.; Nuismer, S.L.; Harmon, L.J.; Krone, S.M. A white noise approach to evolutionary ecology. J. Theor. Biol. 2021, 521, 110660. [Google Scholar] [CrossRef]
  89. Lucas, T.C.D. A translucent box: Interpretable machine learning in ecology. Ecol. Monogr. 2020, 90, e01422. [Google Scholar] [CrossRef]
Figure 1. The whole space–time centered about the event x of coordinates ( x 0 , x 1 , x 2 ) : x is located at ( x 1 , x 2 ) in a bi-dimensional space at time x 0 : x = ( x 0 , x 1 , x 2 ) .
Figure 1. The whole space–time centered about the event x of coordinates ( x 0 , x 1 , x 2 ) : x is located at ( x 1 , x 2 ) in a bi-dimensional space at time x 0 : x = ( x 0 , x 1 , x 2 ) .
Earth 03 00017 g001
Figure 2. A limited portion of the space–time centered about the event x = ( x 0 , x 1 , x 2 x n ) .
Figure 2. A limited portion of the space–time centered about the event x = ( x 0 , x 1 , x 2 x n ) .
Earth 03 00017 g002
Figure 3. A geometrical interpretation of Δ : Δ ( x , y ) is the hypotenuse of the triangle formed by D s ( x , y ) and D t ( x , y ) if y C x + . For all the other events C x + the distance is infinte. For example: Δ ( x , u ) = because u 0 < x 0 , Δ ( x , v ) = because v 0 = x 0 and Δ ( x , w ) = because D s ( x , w ) > k D t ( x , w ) even if w 0 > x 0 .
Figure 3. A geometrical interpretation of Δ : Δ ( x , y ) is the hypotenuse of the triangle formed by D s ( x , y ) and D t ( x , y ) if y C x + . For all the other events C x + the distance is infinte. For example: Δ ( x , u ) = because u 0 < x 0 , Δ ( x , v ) = because v 0 = x 0 and Δ ( x , w ) = because D s ( x , w ) > k D t ( x , w ) even if w 0 > x 0 .
Earth 03 00017 g003
Figure 4. Sheaves of future and past causal cones. x sits at the common tip of the cones. The cones widen as k increases. For k = 0 the cones shrink to segments, and for k the cones coincide to the whole past ( E x ) and future( E x + ) of x .
Figure 4. Sheaves of future and past causal cones. x sits at the common tip of the cones. The cones widen as k increases. For k = 0 the cones shrink to segments, and for k the cones coincide to the whole past ( E x ) and future( E x + ) of x .
Earth 03 00017 g004
Figure 5. (Left): the causal cones C x and C ˜ x of x ; note that Δ ˜ ( y , x ) < Δ ˜ ( z , x ) = even if Δ ( y , x ) > Δ ( z , x ) . (Right): the cross section of C ˜ x , backwards in time, in units of T. The slope of the dashed line is 1 and that of the dotted line is α .
Figure 5. (Left): the causal cones C x and C ˜ x of x ; note that Δ ˜ ( y , x ) < Δ ˜ ( z , x ) = even if Δ ( y , x ) > Δ ( z , x ) . (Right): the cross section of C ˜ x , backwards in time, in units of T. The slope of the dashed line is 1 and that of the dotted line is α .
Earth 03 00017 g005
Figure 6. Source () and target (•) events. The target events are the centers of a regular lattice of equal cells arranged as an ( n + 1 ) -dimensional box.
Figure 6. Source () and target (•) events. The target events are the centers of a regular lattice of equal cells arranged as an ( n + 1 ) -dimensional box.
Earth 03 00017 g006
Figure 7. Two target events x and y with their input sets S x and S y .
Figure 7. Two target events x and y with their input sets S x and S y .
Earth 03 00017 g007
Figure 8. Timescape flowchart. Users must choose a target set T, a spatial interpolator, the distance parameters c and k, and form factor ψ (thick boxes). The accuracy can be evaluated by the spatial interpolator itself or a posteriori, depending on the chosen spatial interpolator.
Figure 8. Timescape flowchart. Users must choose a target set T, a spatial interpolator, the distance parameters c and k, and form factor ψ (thick boxes). The accuracy can be evaluated by the spatial interpolator itself or a posteriori, depending on the chosen spatial interpolator.
Earth 03 00017 g008
Figure 9. (Left): An example of R 2 ( c , k ) . (Right): N ( c , k ) in percent units. Plots from a dedicated function of the Python package [31].
Figure 9. (Left): An example of R 2 ( c , k ) . (Right): N ( c , k ) in percent units. Plots from a dedicated function of the Python package [31].
Earth 03 00017 g009
Figure 10. The effect of ψ ( t ) = θ ( T t ) .
Figure 10. The effect of ψ ( t ) = θ ( T t ) .
Earth 03 00017 g010
Figure 11. (Left): three periodic form factors, solid line ψ ( t ) = cos 2 ω t , dashed line (stricter) ψ ( t ) = cos 20 ω t , dotted line (looser) ψ ( t ) = | cos ω t | . (Right): the corresponding cross-sections of the causal cones.
Figure 11. (Left): three periodic form factors, solid line ψ ( t ) = cos 2 ω t , dashed line (stricter) ψ ( t ) = cos 20 ω t , dotted line (looser) ψ ( t ) = | cos ω t | . (Right): the corresponding cross-sections of the causal cones.
Earth 03 00017 g011
Figure 12. (Top left): source events S . (Top right): target field values Φ ^ ( x ) . (Bottom left): η ( x ) i.e., events in the causal neighborhood S x . (Bottom right): accuracy σ ^ ( x ) . The source coordinates are the actual ones, the target coordinates are cell indexes.
Figure 12. (Top left): source events S . (Top right): target field values Φ ^ ( x ) . (Bottom left): η ( x ) i.e., events in the causal neighborhood S x . (Bottom right): accuracy σ ^ ( x ) . The source coordinates are the actual ones, the target coordinates are cell indexes.
Earth 03 00017 g012
Figure 13. The topmost sheet of three models. (Left): fine-tuned Timescape, i.e., the topmost horizontal sheet of predicted values Φ ^ ( x ) (top right of Figure 12). (Center): the loosest possible Timescape. (Right): three-dimensional Kriging.
Figure 13. The topmost sheet of three models. (Left): fine-tuned Timescape, i.e., the topmost horizontal sheet of predicted values Φ ^ ( x ) (top right of Figure 12). (Center): the loosest possible Timescape. (Right): three-dimensional Kriging.
Earth 03 00017 g013
Figure 14. (Left): The weather stations network (red dots) in Umbria; A, B and C are referred to the actual sites of the time series of Figure 15. (Right): spatio-temporal distribution of the source events. Base map and boundaries from NaturalEarthData [70] and Geoportale Nazionale [71], map prepared with Qgis [72].
Figure 14. (Left): The weather stations network (red dots) in Umbria; A, B and C are referred to the actual sites of the time series of Figure 15. (Right): spatio-temporal distribution of the source events. Base map and boundaries from NaturalEarthData [70] and Geoportale Nazionale [71], map prepared with Qgis [72].
Earth 03 00017 g014
Figure 15. Time series extracted at the sites A (top), B (middle) and C (botom) marked in Figure 14. Time is in years and field values in °C. The shadowed area marks the extrapolated values. Time series A starts in 1988, as there were no recording stations nearby before.
Figure 15. Time series extracted at the sites A (top), B (middle) and C (botom) marked in Figure 14. Time is in years and field values in °C. The shadowed area marks the extrapolated values. Time series A starts in 1988, as there were no recording stations nearby before.
Earth 03 00017 g015
Figure 16. The same time series of Figure 15 at sites (A)–(C) compared with different interpolation techniques. Black: periodic Timescape, the actual case. Red: Straight cone (i.e., non-seasonal) Timescape. Blue: three-dimensional spatial Kriging. Time is in years and field values in °C, error bars not shown.
Figure 16. The same time series of Figure 15 at sites (A)–(C) compared with different interpolation techniques. Black: periodic Timescape, the actual case. Red: Straight cone (i.e., non-seasonal) Timescape. Blue: three-dimensional spatial Kriging. Time is in years and field values in °C, error bars not shown.
Earth 03 00017 g016
Figure 17. (Left): source events spatial distribution. (Center): source events spatiotemporal distribution, notice the layered time structure, time is expressed in years, space distances in thousands of kilometers. (Right): the spatiotemporal variogram (13), distances in kilometers.
Figure 17. (Left): source events spatial distribution. (Center): source events spatiotemporal distribution, notice the layered time structure, time is expressed in years, space distances in thousands of kilometers. (Right): the spatiotemporal variogram (13), distances in kilometers.
Earth 03 00017 g017
Figure 18. 2009, 2010, and 2011 δ 18 O isoscapes as sheets of the model. Plots prepared with DataGraph [81] from exported geotiff images.
Figure 18. 2009, 2010, and 2011 δ 18 O isoscapes as sheets of the model. Plots prepared with DataGraph [81] from exported geotiff images.
Earth 03 00017 g018
Figure 19. Three sheets of the Timescape model, time increasing top to bottom (year 1981, 1985, and 1989). (Left): Causal neighborhood η ( x ) , source events’ sites are shown as red dots. (Right): field values Φ ^ ( x ) , note the typical bull’s eye shapes due to the IDW algorithm.
Figure 19. Three sheets of the Timescape model, time increasing top to bottom (year 1981, 1985, and 1989). (Left): Causal neighborhood η ( x ) , source events’ sites are shown as red dots. (Right): field values Φ ^ ( x ) , note the typical bull’s eye shapes due to the IDW algorithm.
Earth 03 00017 g019
Figure 20. Symmetric double causal cones. Note that Δ ( x , y ) < and Δ ( y , z ) < , nonetheless Δ ( x , z ) = because x 0 = z 0 x z x C z .
Figure 20. Symmetric double causal cones. Note that Δ ( x , y ) < and Δ ( y , z ) < , nonetheless Δ ( x , z ) = because x 0 = z 0 x z x C z .
Earth 03 00017 g020
Figure 21. An input-driven decision tree. The extreme cases (purely spatial and purely temporal dependencies, see Table 5) suggest that the Timescape algorithm is either unsuitable or far too involved, and the entangled cases can be advantageously treated.
Figure 21. An input-driven decision tree. The extreme cases (purely spatial and purely temporal dependencies, see Table 5) suggest that the Timescape algorithm is either unsuitable or far too involved, and the entangled cases can be advantageously treated.
Earth 03 00017 g021
Table 1. Target events’ loop (dashed box of Figure 8).
Table 1. Target events’ loop (dashed box of Figure 8).
1 C x u S | Δ ( u , x ) < Equation (7) Equation (9) Figure 3
2 S x S C x filtering–Equation (11) Figure 7
3 η ( x ) | S x | Equation (15)
4   if S x = Φ ^ ( x ) null
               else Φ ^ ( x ) S x W ( u . . . ) Φ ( u ) estimate–Equation (14)
                   if interp. allows σ ^ ( x ) var Kriging…
                   else σ ^ ( x ) null IDW…
5update x : Φ ^ ( x ) , σ ^ ( x ) , η ( x )
Table 2. Model features. | S | is the number of source events.
Table 2. Model features. | S | is the number of source events.
Model | S | Coordinates∼ScaleTime Span-Resol.
Fungi δ 15 N62Local Euclidean ( x , y ) 100 mfew days– 1 day
Min temperature2521WGS84 UTM33 N100 km20 years–1 month
Olive oil δ 18 O275European Lambert1000 km3 years–1 year
Precipitation δ 2 H1152Geographical ( λ , ϕ ) 10 4 km10 years–1 year
Table 3. Model parameters. The target cells are ordered by time × horizontal × vertical.
Table 3. Model parameters. The target cells are ordered by time × horizontal × vertical.
ModelMethodDistanceFormTarget Cells | T |
Fungi δ 15 NKrigingEuclidean ψ 1 64 × 128 × 128 = 1 , 048 , 576
Min temperatureKrigingEuclideanEquation (10) α = 0 240 × 25 × 32 = 192 , 000
Olive oil δ 18 OIDWEuclidean ψ 1 7 × 74 × 99 = 51 , 282
Precipitation δ 2 HIDWGeodesic ψ 1 20 × 120 × 50 = 120 , 000
Table 4. Model performances, measured in target events per second. η model (17) is expressed in percent, running times in minute seconds.
Table 4. Model performances, measured in target events per second. η model (17) is expressed in percent, running times in minute seconds.
Model η model Configuration 1Configuration 2Configuration 3
Timeevt/sTimeevt/sTimeevt/s
Fungi δ 15 N55%87 32 200125 2 14075 33 231
Min temperature73%115 49 28118 6 2778 20 41
Olive oil δ 18 O81%39 131547 109135 1478
Precipitation δ 2 H62%15 42 15716 4 12411 21 176
Table 5. Observations-driven decision tree. ODE/PDE = Ordinary/Partial Differential Equations.
Table 5. Observations-driven decision tree. ODE/PDE = Ordinary/Partial Differential Equations.
Field DependenceTimescapeAlternativesReferences
temporal onlyuselesstime series analysis[2,3]
ODE and PDE
prev. temporalsharp cones k 0 dynamical systems[16,17,88]
machine learning[89]
entangled S + Toptimal suitabilitystochastic PDE[17,18]
covariance-based[12]
Bayesian modeling[21]
neural networks[19,20]
prev. spatialbroad cones k gen. lin. models[22]
regression trees[23]
spatial onlyuselessgeostatistics[4,5]
Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Share and Cite

MDPI and ACS Style

Ciolfi, M.; Chiocchini, F.; Pace, R.; Russo, G.; Lauteri, M. Timescape: A Novel Spatiotemporal Modeling Tool. Earth 2022, 3, 259-286. https://doi.org/10.3390/earth3010017

AMA Style

Ciolfi M, Chiocchini F, Pace R, Russo G, Lauteri M. Timescape: A Novel Spatiotemporal Modeling Tool. Earth. 2022; 3(1):259-286. https://doi.org/10.3390/earth3010017

Chicago/Turabian Style

Ciolfi, Marco, Francesca Chiocchini, Rocco Pace, Giuseppe Russo, and Marco Lauteri. 2022. "Timescape: A Novel Spatiotemporal Modeling Tool" Earth 3, no. 1: 259-286. https://doi.org/10.3390/earth3010017

APA Style

Ciolfi, M., Chiocchini, F., Pace, R., Russo, G., & Lauteri, M. (2022). Timescape: A Novel Spatiotemporal Modeling Tool. Earth, 3(1), 259-286. https://doi.org/10.3390/earth3010017

Article Metrics

Back to TopTop