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

Using the ERA5 land/sea mask data in WRF


New member
I have noticed that there is an issue with the land sea mask that you get from ECMWF is not binary.

This is also noted on ECMWF webpage:
Land-sea mask in ERA5 and ERA-Interim - Copernicus User Support Forum - ECMWF Confluence Wiki

Because the mask is not binary I believe it creates an issue with metgrid log
INFORM: Field LANDSEA.mask does not have a valid mask and will not be checked for missing values

which I believe causes issues with TSLB in the wrfinput files

Is there a standard with dealing with these issues? Such as modifying the SFC grib file and changing the values to be either 0/1 based or modifying the TSLB or some other variable in the met_em files to be the fill_value of 285? I thought it could possiblyy be a issue with the model level data but I've done it with Pressure levels from ERA5 and TSLB also shows up as 0K along areas of water. I should note that TSLB is 0K in the wrfout 00 hour file but in other files, the 0K issue has been fixed to be a single constant value over areas of water.

I have also provided a MFT link to some of my files from my run, that I left uncompleted. Let me know if other files would be needed that you also wish to examine.

Hi Chase,
NCAR RDA provides ERA5 dataset (NCAR RDA Dataset ds633.0). From this website you can find the link to "ERA5 atmospheric invariant fields", where you can download the datafile


WPS can ungrib this file and yield correct landsea mask.

Would you please try and let me know if you have any issue? Thanks.
I think I faced the same issue. If yes, the answer is in this post :
You need to change the metgrid.TBL file.
I join a modified version that works for me.


    38.3 KB · Views: 23
Would you please provide more information regarding the changes in METGRID.TBL? Specifically,
(1) It is based on which version of WPS?
(2) Where did you download the ERA5 reanalysis data? What is the resolution of the ERA5 data?
(3) Does this modified METGRID.TBL work for ERA5 data of various resolution?
Thank you.
1- I faced this issue on version 4.4, I am still using this metgrid.TBL on version 4.5
2- I downloaded ERA5 data on Copernicus with a resolution of 31 km, with 37 pressure levels
3- I tried only with my ERA5 dataset

More informations :
With the default metgrid.TBL file, the landmask used in metgrid.exe seems to be the ERA5 landmask. SST was defined only at points considered as water in ERA5 (see figures a_LANDMASK and a_SST, the coastline resolution is not the same). This cause wrong values in TSLB but only in water points (which is not that much a problem). However, it also creates wrong SST values near the coastline (extrapolated from land points TSK). These wrong SST are kept all along the simulation if sst_update isn't used.
With the modified Metgrid.TBL, these problems are fixed.



  • b_TSK.png
    69.8 KB · Views: 12
  • a_TSLB.png
    29.3 KB · Views: 9
  • a_SST.png
    16.3 KB · Views: 8
  • a_LANDMASK.png
    17.9 KB · Views: 10
This works for ERA5 (0.25deg), but what about IFS? The IFS landmask has the same problem with fractional values, and I don't think NOAA/RDA has a 0.1degree landmask available.
Hi Ming,

I am working with Chase who posted the first message in this thread. I tried your solution using the file e5.oper.invariant.128_172_lsm.ll025sc.1979010100_1979010100.grb to create a constants file with the landsea mask. I also tried Mathieu's solution modifying the interpolation of SST in METGRID.TBL. Interestingly, when I looked at the TSK and T2 fields after 1-hour of simulation time on a 12 km grid they were almost identical for the two cases even though the SST fields at the coast were still very wrong in the landsea mask case. I have attached some files to illustrate this point. I am wondering how the TSK and T2 can be correct if SST is wrong and which solution is preferable. Thanks for your help. Jen


    113.3 KB · Views: 3
    293.5 KB · Views: 3
  • SST_ML_tbl.png
    129.4 KB · Views: 3
  • TSK_ML_tbl.png
    291.7 KB · Views: 3
Hi Jen,

Let's try the option: remove the following line from Vtable.ECMWF

34 | 1 | 0 | | SST | K | Sea-Surface Temperature |

Then rerun ungrib.exe. In this case you will have no SST. SKINTEMP will be used as SST later. In this way I expect that there is no unreasonable SST along the coastline.

Let me know if you have more questions.