The Earth Observation Prototype 5 (EOP5) for Crop water productivity mapping is a prototype algorithm designed to address the high resolution quantification of water productivity in main croplands in the Jucar River Basin (Spain) by using the WaPOR modelling tool.
This repository is part of the Deliverable 3.2 of SOS-Water - Water Resources System Safe Operating Space in a Changing Climate and Society (DOI:10.3030/101059264). Other code contributions to D3.2 can be found at the SOS-Water - WP3 Earth Observation repository.
Check out the project website at sos-water.eu for more information on the project.
This folder contains all the necessary files and inputs to run pyWaPOR version 3.4.3 for the Jucar River Basin Pilot Case. Steps to run the model:
-
Create a new environment and install python (eg. pywapor) example in conda
conda create --name pywapor python -
Install gdal=3.6 with conda
*conda install -c conda-forge gdal=3.6 -
Install the following packages
conda install -c conda-forge pywapor=3.4.3 pyshp hvplot -
Create/Collect your EO accounts and password for the platforms below
-
Open config.cfg and fill accordingly (default values should work)
-
Open lulc_lut and change landuse parameters if needed
-
Files custom_downloads.json and se_root_custom_config.json include native sources from which download variables, change only if needed.
-
Open pywapor_v343 and uncomment 'Setup accounts' section (or a subset of it, only the accounts that have been created in step 2). When running these lines for the first time a popup will appear to request user and password for each account. This only has to be done once, can be commented for further runs.
-
Run the file
Optional:
- For the extraction of spatially-aggregated values (.nc files and .xlsx tables) at the polygon level: . Run pywapor_postprocessing.py filling shp_name and version for your area of interest
- For the extraction of timeseries for specific sites: . Prepare a shapefile with the sites of interes (e.g. area_valsites.shp) . Run extract_tss4sites.py by filling demo_site parameter.
"NASA": Used for MODIS, SRTM, CHIRPS and MERRA2 data.
- Create an account at https://urs.earthdata.nasa.gov.
- Make sure to accept the terms of use at "Applications > Authorized Apps > Approve More Applications":
- NASA GESDISC DATA ARCHIVE
- LP DAAC OPeNDAP
"TERRA": Used for TERRA (VITO:PROVA-V).
Create an account at https://viewer.terrascope.be.""",
"ECMWF": Used for ERA5.
Create an account at https://cds.climate.copernicus.eu.
- On your profile page, scroll to the "API key" section.
- Accept conditions when running
setup("ECMWF")for the first time.""",
You will be required to introduce UID and API Key later Accept the terms and conditions of Copernicus https://cds.climate.copernicus.eu/cdsapp/#!/terms/licence-to-use-copernicus-products
"EARTHEXPLORER": Used for LANDSAT.
Create an account at https://earthexplorer.usgs.gov,
"COPERNICUS_DATA_SPACE": """> Used for 'SENTINEL2' and SENTINEL3.
Create an account at https://dataspace.copernicus.eu,
"VIIRSL1": Used for VIIRSL1
Normally you do not need this account: it is only used when using the requests.get download method, which is not the default! Create an account at https://ladsweb.modaps.eosdis.nasa.gov/. In the top right, press Login > Generate Token
Detailed technical notes on the algorithms used are available at the SOS-Water - WP3 Earth Observation repository.
Views and opinions expressed are those of the author(s) only and do not necessarily reflect those of the European Union or CINEA. Neither the European Union nor the granting authority can be held responsible for them.
![]() |
This project has received funding from the European Union’s Horizon Europe research and innovation programme under grant agreement No 101059264. |

