Scheduled Downtime
On Friday 21 April 2023 @ 5pm MT, this website will be down for maintenance and expected to return online the morning of 24 April 2023 at the latest

(RESOLVED) ERA-5 data compartmentalized by variable

This post was from a previous version of the WRF&MPAS-A Support Forum. New replies have been disabled and if you have follow up questions related to this post, then please start a new thread from the forum home page.


I am interested in downscaling ERA-5 using WRF. However, it seems as though, at least in the places I have looked, that the necessary data required to drive WRF are compartmentalized by variable and are not data-time specific. Regarding the latter problem, does anyone know of a repository that contains ERA-5 data in date-specific grb format? There is a workaround to this problem.... I can use cdo "splithour" to decompose the grb files into discrete chuncks. However, I am interested in downscaling 40-50 years of data, so this would be a huge undertaking all by itself.

Thanks so much,
Hi Stefan,
I'm not sure where you are getting data, but have you tried here:
I haven't personally downloaded data from that site, so I'm not sure if it has the same problem you are seeing.
Thanks for the reply,

This is exactly where I am getting the data from. However, the files are variable-specific, and different files contain different time slices. For instance, the sfc fields contain hourly slices for an entire month in a single file, where as pl fields contain hourly slices for 1 day in a single file. Since ungrib.exe needs files to be discrete in time, and because the variables are in separate files altogether, I was wondering if there were ERA5 data somewhere that were already "WPS friendly". For instance, ERA-I data from CISL are date-time specific.

As it stands now with ERA5, I will effectively have to "build" my own time-specific grb files containing the ~10-15 needed variables before running ungrib.exe. This is an unsavory prospect considering I wish to downscale ERA5 over a 40-50 year period....

Any tips are much appreciated.

These ERRA5 data are GRIB1 format data. WPS can handle files with multiple time slices if these files are in GRIB1 format. So you don't need to worry how to split these files into single time-slice data.
I agree with you it is really not convenient that variables are saved in different files. However, this is only for downloading data. I don't think it is necessary that you put all required variables to a single file. You can simply link all these files and run ungrib to extract data from them.
Please let me know if you have more questions.
Thank you, that is useful information!

Just one more question...

When you suggest linking the files instead of building new files, that sounds great. However, if there are 12 different variables, this would mean I would need to run ungrib.exe 12 separate times, making sure my prefixes are variable specific each time, correct?

Actually, as suggested earlier by Ming Chen, you can simply link all of the variables in one go with the link_grib.csh script. Ungrib should have no problems in processing files that individually contain only a single variable but that collectively provide all required fields for model initialization.