Preparing the inputs for Modspa-Pixel

The processing chain requires a lot of inputs to run. For the pixel mode, all the inputs have to be in the same projection and on the same grid to get correct results (this is detailed in each section). For the parcel mode, a pandas DataFrame is built by extracting and averaging input values on the parcel, for each date. This dataframe is then used to build a raster dataset that has the same global structure as an imput dataset for the pixel mode. Raw inputs are first downloaded (optical imagery, weather data, etc.) and then processed to get the inputs required for the SAMIR or SAFY models to run.

Warning

For large spatial windows or over long time windows, make sure to have enough disk space for all the input (raw and preprocessed).

To download the necessary data and prepare the input datasets, run the main_prepare_inputs.py script. It will automatically read the json configuration file and run the various functions necessary. It will create the necessary directories, download Sentinel-2 data and weather data and create the input datasets. If your eodag configuration file is correctly set, it should run without issue. The land cover and soil datasets have to be manually prepared, the custom_inputs_pixel.ipynb or custom_inputs_parcel.ipynb notebooks found in the preprocessing directory can help you prepare these datasets.

(modspa_pixel) /modspa_pixel$ python main_prepare_inputs.py

In the next sections you will find more detail on the input preparation.