ERA5 data is in the format of each variable per file, which is different from other traditional input data sources. However, processing it through ungrib isn't that much different. You will simply link all files - both upper air and surface data - into your working directory and ungrib will be able to handle it, using Vtable.ECMWF. The one thing you'll need to do differently is to include the invariant data file. You can either download it from the site where you obtain all your ERA data, or we've also attached it to this post. You need to place it in your WPS working directory. Then add the following line to your &metgrid section of the namelist, prior to running metgrid (note: if you downloaded it from here, change the file name to ERA5_INVARIANT):
FYI: If you have access to NCAR's HPC machine, you can obtain the ERA5_INVARIANT file from /glade/work/wrfhelp/era5/
Code:
constants_name = 'ERA5_INVARIANT'
FYI: If you have access to NCAR's HPC machine, you can obtain the ERA5_INVARIANT file from /glade/work/wrfhelp/era5/