Tip
Need help? Please let us know in the SUEWS Community.
Please report issues with the manual on GitHub Issues (or use Report Issue for This Page for page-specific feedback).
Please cite SUEWS with proper information from our Zenodo page.
6.3.1.1. supy.util.gen_forcing_era5#
- supy.util.gen_forcing_era5(lat_x: float, lon_x: float, start: str, end: str, dir_save=PosixPath('.'), hgt_agl_diag=100.0, logging_level=20) list[source]#
Generate SUEWS forcing files using ERA-5 timeseries data.
Downloads ERA5 surface timeseries data from CDS API and converts to SUEWS forcing format. Uses simple diagnostics: environmental lapse rate (6.5 K/km) for temperature and neutral MOST for wind speed.
- Parameters:
lat_x (float) – Latitude of the location.
lon_x (float) – Longitude of the location.
start (str) – Start date (e.g., “2020-01-01”).
end (str) – End date (e.g., “2020-12-31”).
dir_save (pathlib.Path or str, optional) – Directory for saving ERA5 CSV files, by default Path(“.”).
hgt_agl_diag (float, optional) – Height above ground level for diagnostics (m), by default 100.
logging_level (int, optional) – Logging level [50=CRITICAL, 40=ERROR, 30=WARNING, 20=INFO, 10=DEBUG].
- Returns:
List of SUEWS forcing file paths.
- Return type:
Note
Requires CDS API configuration: https://cds.climate.copernicus.eu/api-how-to
Uses ERA5 timeseries dataset (surface data, ~26s for 30 years)
Point location only (no spatial grids)
Use supy.util.read_forcing() to import generated files
Examples
>>> list_fn = gen_forcing_era5(50.86, 4.35, "2020-01-01", "2020-01-31")
6.3.1.1. Reference#
ECMWF, S. P. (2016). In IFS documentation CY41R2 Part IV: Physical Processes. ECMWF: Reading, UK, 111-113. https://www.ecmwf.int/en/elibrary/16648-part-iv-physical-processes