Hindcasting using weather data

Introduction

ERF supports hindcasting simulations using weather data from

  1. WRF files (wrfinput, wrfbdy, wrflow),

  2. ERA5 weather data, and

  3. GFS weather data.

The WRF files have to be generated using the WRF pre-processing system (WPS). For ERA5 and GFS weather data, there are automated Python tools as described in the section below that download and process the weather data, and writes out visualizable output as well as the initial and boundary condition files for running ERF simulations in a seamless manner. Currently there are examples for performing hurricane hindcasting using weather data.

Hindcasting using weather data from WRF files

The options to be used to enable using WRF files and using them for time-dependent boundary conditions for hindcasting are

erf.use_real_bcs = true
erf.real_width     = 4
erf.real_set_width = 1
erf.init_type      = "WRFInput"
erf.nc_init_file_0 = "wrfinput_d01"
erf.nc_bdy_file    = "wrfbdy_d01"
erf.nc_low_file = "wrflowinp_d01"
erf.rebalance_wrfinput = true

For hurricane simulations, the variable Coriolis force terms have to be activated using

erf.use_coriolis = true
erf.coriolis_3d  = true
erf.variable_coriolis = true
erf.has_lat_lon = true

For hurricane simulations, to enable tracking the hurricane – to get the data for plotting the hurricane tracks, use the following options.

erf.io_hurricane_eye_tracker = true
erf.hurricane_eye_latitude = 25.0; # deg N
erf.hurricane_eye_longitude = -83.3; # deg W

The user must provide the approximate initial location of the hurricane in latitude and longitude format using the options erf.hurricane_eye_latitude and erf.hurricane_eye_longitude. The output of tracks will be written in a folder Output_StormTracker/latlon at the same frequency as the plot output (erf.plot_int).

Hindcasting using weather data from ERA5/GFS

This section contains the details for hindcasting simulations from real weather data using ERA5 or GFS.

  1. Follow the steps in the erftools directory to generate the initial condition and boundary condition files.

    • For ERA5 data see the README section here.

    • For GFS data see the README section here.

  2. From the step above, copy the Output/ERA5Data_3D (Output/GFSData_3D for GFS) directory to the directory where ERF will be run. This is the boundary data for the lateral forcing of large-scale meteorology. Set the inputs option erf.hindcast_boundary_data_dir = ERA5Data_3D.

  3. The Python script also outputs the domain size to be used in the inputs file for the ERF run. For example:

    geometry.prob_lo  =  -2593434.0 -2065213.0 0.0
    geometry.prob_hi  =   2593434.0  2328015.0 25000.0
    
  4. Copy the initial condition file to the ERF run directory. This can be the first file in the hindcast_boundary_data_dir. It can also be a file that was generated at the same time as the first file in hindcast_boundary_data_dir. For example, the initial condition can be from ERA5 data, but the boundary data can be from GFS data. However, the initial condition and the very first file in hindcast_boundary_data_dir should correspond to the same date and geographical area.

  5. Run ERF.

The following are the inputs required for hindcast simulations with ERA5/GFS.

// If using era5 or gfs data to initialize
// and for boundary forcing
erf.init_type = "HindCast"
// Initial condition filename -
// obtained from running the python script
// with the inputs file specifying the date and
// geographical area
erf.hindcast_IC_filename = "ERF_IC_2025_08_18_00_00_000.bin"

// Boundary conditions
geometry.is_periodic = 0 0 0
xlo.type = "Outflow"
xhi.type = "Outflow"
ylo.type = "Outflow"
yhi.type = "Outflow"
zlo.type = "SlipWall"
zhi.type = "SlipWall"

// Lateral forcing with reanalysis/forecast data
erf.hindcast_boundary_data_dir = "ERA5Data_3D"
// Time interval in hours between the boundary
// data files
erf.hindcast_data_interval_in_hrs = 3.0
erf.hindcast_lateral_forcing = true
// Sponge strength
erf.hindcast_lateral_sponge_strength = 0.3
// Sponge length of 144 km (for eg.)
erf.hindcast_lateral_sponge_length = 144000

// Sponge damping for top of domain
// to absorb reflections
erf.hindcast_zhi_sponge_damping = true
// Sponge strnegth
erf.hindcast_zhi_sponge_strength = 0.3
// Sponge length of 5 km
erf.hindcast_zhi_sponge_length = 5000.0

For hurricane simulations, the variable coriolis force terms have to be enabled using

// Coriolis force
erf.use_coriolis = true
erf.coriolis_3d = true