Module to generate daily meteorological input files for the LISFLOOD hydrological model. The module consists of several similar scripts tailored to different input meteorological datasets, such as ISIMIP3b, W5E5, ERA5-land and MSWX/MSWEP. The following variables are created:
- ERA5-land: precipitation (
tp.nc
), 2-m air temperature (ta.nc
), 2-m dewpoint air temperature (td.nc
), surface downward solar radiation (rgd.nc
), surface net thermal radiation (rn.nc
). - ISIMIP3b, W5E5, MSWX/MSWEP: precipitation (
pr.nc
), 2-m air temperature (ta.nc
), reference potential evaporation (et.nc
), open water potential evaporation (ew.nc
), and bare soil potential evaporation (es.nc
).
The following should be kept in mind when using the scripts:
- The scripts calculate potential evaporation directly from the input data following the LISVAP approach. Separately running the LISVAP module is, therefore, no longer necessary (except for ERA5 where the scripts is not adapted yet).
- The data are resampled and subsetted to the resolution and area of the template map (located at
templatemap_path
specified in the configuration file). - Air temperature and air pressure are downscaled to the template map resolution (up to 1 km using a simple delta lapse-rate correction).
- The output is written to the
scratch_folder
and moved to theoutput_folder
once the processing is done. Thescratch_folder
should point to a storage location dedicated to a lot of file accesses. - The ISIMIP3b and W5E5 scripts load the input data into memory (using the
diskless=True
argument) to avoid read errors which frequently occurred on the system used for developing the scripts. - The ISIMIP3b script can be run simultaneously multiple times to process simultaneously multiple scenarios/models. This will only work if
delete_existing=0
in the configuration file.
GMTED2010 1-km mean surface elevation data is required for all scripts and can be downloaded from the EarthEnv website. Put elevation_1KMmn_GMTEDmn.tif
in gmted2010_folder
(specified in the configuration file).
The following datasets are required depending on the script in question:
-
ISIMIP3b daily meteorological data (historical and climate projections). Download this file list and download the data with
wget -c -i file-list.txt
. Put the data inisimip3b_folder
. -
MSWX and MSWEP daily historical meteorological data. Follow the download instructions on the respective web pages. Use this filter file for rclone. Put the data in
mswx_folder
andmswep_folder
, respectively. Retain the folder structure (e.g.,<mswx_folder>/Past/Temp/Daily/2007133.nc
). -
GSWP3-W5E5 daily historical meteorological data (
obsclim
andcounterclim
). Download this file list and download the data withwget -c -i file-list.txt
. Put the data inw5e5_folder
. -
ERA5-land climate reanalysis hourly climate data. Documentation availaible here. The script ERA5land_CDS_downloader.py allows to download ERA5-land data from the Copernicus Climate Data Store (CDS). This requires a CDS API key. Data are downloaded in monthly files at an hourly time scale in a
download_folder
and then aggregated to the daily time scale in yearly files with the script ERA5land_h2d_yearly.py and saved into thee5land_folder
. Retain the file structure with_YYYY_MM.nc
at the end for monthly files and_YYYY.nc
for yearly files.
The scripts can be run on a normal desktop PC (Windows and Linux) with 32 GB or more of physical memory.
Clone the repository:
git clone https://github.com/hylken/lisflood-meteo-forcing
cd lisflood-meteo-forcing
Produce a configuration file with the correct paths and folders based on the provided template (config.ini
).
Create and activate a Conda environment and run the script as follows:
conda create --name <env> --file requirements.txt
conda activate <env>
python main_ISIMIP3b_projections.py <configuration file>
If the environment creation step fails, we recommend creating the environment and installing the packages as follows:
conda create -n <env> -c conda-forge scipy pandas numpy netcdf4 matplotlib rasterio scikit-image