eCLM atmospheric forcing based on ERA5#
A possible source of atmospheric forcing for CLM (eCLM, CLM5, CLM3.5) is ERA5.
The folder mkforcing/ contains the scripts that assist the ERA5
retrieval.
Source:
Copernicus Climate Data Store (https://cds.climate.copernicus.eu/)
optional: Jülich Meteocloud (https://datapub.fz-juelich.de/slcs/meteocloud/index.html)
Basis:
Mainly CDO commands.
Some Python scripts.
Notes:
It is safer to extract the lowermost level of temperature, humidity and wind of ERA5 instead of taking mixed 2m-values and 10m values. This internal issue provides some details.
The
download_ERA5_input.pycan be adapted to download another set of quantities.This worfklow is not fully tested.
Prerequisites#
download_ERA5_input.py uses the cdsapi Python module to retrieve
ERA5 data from the Copernicus Climate Data Store. Before using the
download script, cdsapi must be installed and configured with a
user-specific API access token.
More information about installation and access can be found here or alternatively here.
Source the provided environment file
source jsc.2024_Intel.sh
Download of ERA5 data#
download_ERA5_input.py contains a prepared retrieval for the cdsapi python module.
Usage:
Either directly:
python download_ERA5_input.py --year <year> --month <month> --dirout <output_directory>
Or using the wrapper script:
./download_ERA5_input_wrapper.sh
after changing dates and output directory in the Settings section inside this wrapper script.
Non-JSC users should adapt the download script to include temperature, specific humidity and horizontal wind speed.
Preparation of ERA5 data#
Two options are available for preparing ERA5 variables, depending on whether JSC Meteocloud data is accessible. Choose one of the following options before proceeding to the next step.
Option 1: Lowermost model level variables via Meteocloud (JSC users)#
extract_ERA5_meteocloud.sh prepares ERA5 variables from the
lowermost model level (relies on JSC-local files).
Uses level 137, for more information see https://confluence.ecmwf.int/display/UDOC/L137+model+level+definitions
extract_ERA5_meteocloud.sh uses JSC-local grib-input files in
/p/data1/slmet/met_data/ecmwf/era5/grib/. Further information:
/p/data1/slmet/met_data/ecmwf/README.md.
extract_ERA5_meteocloud.sh provides NetCDF files
meteocloud_YYYY_MM.nc with lowermost model level atmospheric
variables. The variables from these NetCDF files are used by
prepare_ERA5_input.sh in the following step.
Usage:
Running the wrapper job
sbatch extract_ERA5_meteocloud_wrapper.job
after adapting year and month loops according to needed dates.
Option 2: Specific humidity computation and 2m->10m conversion (non-JSC / no Meteocloud access)#
For users who do not have access to the Meteocloud, the required variables can be derived from the CDS API download directly.
For ERA5, specific humidity can be computed from dewpoint temperature and surface pressure using
python dewpoint_to_specific_humidity.py <era5_filename>
Also temperature and specific humidity can be converted from 2m to 10m using:
python 2m_to_10m_conversion.py <era5_filename>
Remapping, Data merging, CLM3.5#
The prepare_ERA5_input.sh script prepares ERA5 data by remapping,
changing variable names, and modifying units. The script performs
three main steps:
Remapping - Regrid ERA5 data to the target domain
Merging - Combine different ERA5 datasets
CLM3.5 specific preparation - Apply CLM3.5-specific formatting
Remapping Setup#
When using remapping, the script requires remapping weights and a grid definition file for the target domain. These can be created either automatically by the script or manually beforehand.
Option 1: Automatic creation (recommended)
Specify the domain file and enable automatic generation:
sh prepare_ERA5_input.sh iyear=<year> imonth=<month> lwgtdis=true lgriddes=true domainfile=<eclm_domainfile.nc>
Option 2: Manual creation
Create the remapping weights and grid definition file manually:
cdo gendis,<eclm_domainfile.nc> <era5caf_yyyy_mm.nc> <wgtdis_era5caf_to_domain.nc>
cdo gendis,<eclm_domainfile.nc> <era5meteo_yyyy_mm.nc> <wgtdis_era5meteo_to_domain.nc>
cdo griddes <eclm_domainfile.nc> > <domain_griddef.txt>
<era5caf_yyyy_mm.nc>:cafstands for “CdsApi Format” and<era5caf_yyyy_mm.nc>can be on of the netCDF-files downloaded from the cdsapi.<wgtdis_era5caf_to_domain.nc>can be chosen, illustrative example:wgtdis_era5caf_to_eur11u-189976.nc
Then specify the created files as options:
sh prepare_ERA5_input.sh iyear=<year> imonth=<month> wgtcaf=<wgtcaf> wgtmeteo=<wgtmeteo> griddesfile=<griddesfile>
For additional options, see the script documentation.