Exploring the datacube output of the SAMIR model

There are two notebooks, one for each running mode, they are otherwise identical in their content. They are divided in 3 parts.

Plotting maps of cumulated or averaged variables

This first part processes the output dataset to sum (for the extensive variables) or average (for intensive variables) along the time dimension to produce a two dimensionnal (spatial) dataset. The resulting maps are then plotted on the same image (and saved in the output directory).

Calculating variable statistics for each land cover class

With the two dimensionnal processed dataset and the land cover raster, statistics for each land cover class can be calculated. The result is a pandas dataframe that can be saved. Here is an example:

DP

Irr

E

Tr

SWCe

SWCr

ETR

NDVI

Rain

Unit

mm

mm

mm

mm

[0-1]

[0-1]

mm

[0-1]

mm

Operation

sum

sum

sum

sum

mean

mean

sum

mean

sum

no_sim

NaN

NaN

NaN

NaN

NaN

NaN

NaN

0.525

465.725

Strawcereals

0.000

0.000

158.894

290.473

0.410

0.411

449.367

0.483

467.686

Oilseeds

0.000

0.000

156.194

291.650

0.349

0.434

447.844

0.514

467.544

Soy

0.000

199.290

247.010

334.268

0.484

0.539

581.279

0.416

469.850

Sunflower

0.000

0.000

218.971

217.039

0.400

0.418

436.009

0.357

468.605

Corn

0.000

154.943

246.207

286.925

0.426

0.565

533.131

0.397

469.100

Grasslands

0.000

0.000

96.462

361.480

0.393

0.361

457.942

0.629

467.333

Plotting variable time series for a chosen coordinate

With this last part, you can enter a point coordinate (in lattitude/longitude coordinates) and extract a time series of the output variables and plot them on a graph.