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

Initialize MPAS with ERA5 data


New member
I want to use ERA5 data for initializing MPAS. I have seen this link NCAR RDA Dataset ds633.0. But I do not know which one to use, the data with pressure levels or the ones at the surface? Is it like that I have to both, so in that case how do I combine the intermediate files generated for pressure level and surface level?

You need to download both surface data and pressure level data in the upper air. Please see the attached file that describes how to download ERA5 data.

Note that you need to ungrib the surface invariant file separately, change the time of the data to make it consistent with the time in other ERA datafile, and then using Linux "cat" command to combine the data, producing a single file that can be used by MPAS INIT program.

Please try and let me know if you have problems.


  • ERA5_download_instruction.pdf
    539.2 KB · Views: 48
Thank you so much. I will definitely try and update you. Is there a separate data for surface invariant file or is it included in the surface data file listed on this website? Also can you please tell me how good NCEP FNL data is for initializing MPAS?
The surface invariant file is not include din surface data file. In CISL RDA, the two invariant files are:
e5.oper.invariant.128_172_lsm.regn320sc.2016010100_2016010100.grb (land-sea mask)
e5.oper.invariant.128_129_z.regn320sc.2016010100_2016010100.grb (terrain geopotential)

As for FNL data, theoretically it should work for MPAS initialization. However, we often use GFS because GFS has higher resolution than FNL.
Thank you so much once again. But unfortunately I could not find this exact file. Rather I found the follwoing from
Will these two files work? Otherwise can you kindly provide the link to the files that you mentioned?
I am getting my ERA5 data from Copernicus. It works well for WRF. I download the pressure level data and the "single-level" (surface) data. I use a slightly modified ERA5 Vtable. When I run ungrib, the log file indicates that landsea and geopt are present (they're in the surface file).

However, the init file I create with MPAS init_atmosphere does not seem to be correct. Using convert_mpas, I see reasonable values for most 2D variables (e.g. T2m, SST, etc.). But surface_pressure is all zeros, and 3D variables (e.g. qv, theta) are nonsense. I vaguely recall that something special had to be done with surface pressure for WRF, but I can't remember exactly what.

Everything I can think of as possibly relevant is attached, with extensions changed to work around the forum file type restrictions.


  • ungrib.log
    476 KB · Views: 3
  • namelist.wps
    672 bytes · Views: 7
  • log.init_atmosphere.0000.out.txt
    15.1 KB · Views: 4
  • namelist.init_atmosphere.txt
    1.4 KB · Views: 12
  • Vtable.txt
    3.8 KB · Views: 12

Below is the link to the ERA5 invariant datafile:

/FS/DECS/DS630.0/e5.oper.invariant/201601/e5.oper.invariant.128_172_lsm.regn320sc.2016010100_2016010100.grb (land-sea mask)
/FS/DECS/DS630.0/e5.oper.invariant/201601/e5.oper.invariant.128_129_z.regn320sc.2016010100_2016010100.grb (terrain geopotential, m2/s2)

I can access these files from NACR machine. Outside NCAR I guess one has to download them. Please send email to, asking how to download the files from machine outside NCAR network.
The surface file is 2TB. I don't have a practical way to upload that. Can you look at the ungrib.log and see if the correct variables are being converted? It looks OK to me, but I may be interpreting it wrong. It definitely works OK for WRF.

Another possibility is that convert_mpas is not working on the init file, but that seems less likely.

Otherwise, I can give you the API script I use to download the data from Copernicus, and you can download it from there.
ungrib.log looks fine and I don't see anything abnormal.
Please upload your API script for downloading data from Copernicus, and the Vtable you used . I will see whether I can repeat the case. Thanks.
I mistyped. The surface file is only 2GB, so it probably could be uploaded. But it still might be better to get it direct from Copernicus. The Vtable is already attached above. Here's the API script, the second section gets the surface file.


    3.1 KB · Views: 18

Thank you for uploading the files.

I download era5_20230616_2d_globe.grib and era5_20230616_3d_globe.grib using your python script. Then ungrib this two files using your Vtable. I found that the terrain height (i.e., SOILHGT) is wrong in the intermediate file. Please see the screen shot attached.

I also upload the intermediate file I created (ERA5:2023-06-16_00) to Nextcloud just in case you want to take a look.

The wrong terrain height basically explains why the upper level data are unreasonable. The data in original grib file look fine. Therefore, something might be wrong in the Vtable.


  • soilght.png
    2.5 MB · Views: 9
Terrain height (units of meters) is not available from ERA5. Geopotential (units of m^2 / s^2) is available, and is in the Vtable. Apparently metgrid is clever enough to compute height from geopotential, but MPAS init_atmosphere_model is not. I checked both the parameter list for ERA5 on Copernicus (Copernicus Climate Data Store |) and on NCAR RDA (, neither has height available.

I think this is a bug in MPAS, it should be able to compute height from geopotential as WPS can.
The plot I showed is from the intermediate file derived from ERA5. This is the file produced by ungrib, which MPAS will take as input.
I understand that. But ERA5 does not provide terrain height (SOILHGT), so ungrib can't populate that variable in the intermediate file. That doesn't matter to WRF, because metgrid calculates what it needs. Apparently MPAS does not. GEOPT is redundant with SOILHGT, they contain the same information except for the factor G.

Am I the only person trying to run MPAS with ERA5 initialization?
SOILHGT is included in the intermediate file. Please see the attached log file.

The original ERA5 grib file contains the variable "soil geopotential" (i.e. Z=Geopotential), and ungrib calculates SOILHGT based on "soil geopotential"


  • era5.log
    77.1 KB · Views: 5
I'm confused. You showed a plot above that indicates that SOILHGT has wrong values in the intermediate file. If ungrib calculates it from GEOPT, it must be doing it wrong.

I keep returning to the fact that this process of downloading ERA5 data from Copernicus and running WPS with this Vtable produces correct results in WRF.
if you still have the met_em file that is produced from this ERA5 data, would you please upload it for me to take a look?
Or you can check the variable SOILHGT yourself. Please let me know whether it looks reasonable.
Last edited:
In the met_em files produced from ERA5, SOILHGT is nonsense (values between 188000 and 366000 m). But this doesn't cause any problems for WRF. PSFC, PRES, and all 3D variables are sane.