Skip to content

Usage Guide for download_era5_dataframe_singlelocation.py and download_era5_dataframe_grid.py

This script downloads wave data from ERA5-reanalysis

Need Help

To view the help documentation for the script, use the following command:

1
python download_era5_dataframe_singlelocation.py --help

or

1
python download_era5_dataframe_grid.py --help

Common command line arguments

  • -i: Sets the file prefix to use for output data files
More details A string that typically represents the name of the place where the data come from
  • -p: If 1, make a plot
More details A flag to make (or suppress) a plot
  • -a: start year

  • -b: end year

Examples

Example #1: single point

Additional command line arguments:

  • -x: longitude
  • -y: latitude
  • -w: water depth, either 'deep' or 'intermediate'
More details Intermediate water is defined as water depths where d/L is between 0.05 and 0.5, where d = water depth in meters, and L is wavelength in meters

This example downloads waves at a single point

1
python download_era5_dataframe_singlelocation.py  -i "my_location" -a 1984 -b 2023 -x -160.8052  -y 64.446 -w intermediate -p 1

Here's an example screenshot

Screenshot from 2024-05-22 13-34-51

The (optional) plots created. This is not intended to be a publication ready figures. This merely shows the data, as a convenience:

slapton_reanalysis-era5-single-levels_timeseries_Hs

slapton_reanalysis-era5-single-levels_joint_and_marginal_distributions_Hs_Tpeak slapton_reanalysis-era5-single-levels_joint_and_marginal_distributions_Hs_Tmean slapton_reanalysis-era5-single-levels_joint_and_marginal_distributions_Hs_Dmean

Example #2: grid

Additional command line arguments:

  • -f: Sets the file (geojson) to be analyzed
More details The geoJSON format file should contain a polygon

For 2D measurements, at 'my_location', from 1984 to 2023 inclusive, according to a geoJSON file region of interest

1
python download_era5_dataframe_grid.py -i "my_location" -a 1984 -b 2023 -f /path/to/your/geoJSON file -p 1

Here's an example screenshot

Screenshot from 2024-05-22 13-23-48

The (optional) plots created. This is not intended to be a publication ready figures. This merely shows the data, as a convenience:

AK_mean_2d