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

Running `ungrib` on complete ERA5 global atmospheric reanalysis sigma levels

bigveech

New member
Hi everyone,

I’m working to initialize an MPAS run using initial conditions from the full ERA5 reanalysis dataset. Since my simulations target much higher altitudes (>100 mb), I’m using the 137 model levels rather than the standard 37 pressure levels to achieve higher resolution in these upper layers.

I noticed a Vtable.ECMWF_sigma file in the Variable_Tables directory, but it seems outdated and causes the following error:
Code:
ERROR: Vtable does not contain Grib2 decoding information. 11 or 12 columns of information is expected. *** stopping parse_table ***

I also tried Vtable.ECMWF, but that didn’t work since it’s configured for pressure levels.

Does anyone have suggestions for creating WPS intermediate files from this dataset or a Vtable compatible with these model levels? Any tips would be greatly appreciated!
 
Would you please upload a single complete ERA5 data for me to take a look?

We didn't process ERA data from Copernicus before and I am curious how it would work with MPAS.

Thanks.
 
I was able to initialize MPAS using the ERA5 model level data. I'll document the steps I took.

1. Download the data from Copernicus using CDSAPI
Python:
c = cdsapi.Client()

# Model levels
c.retrieve('reanalysis-era5-complete', {
    'date': '2023-10-16',
    'levelist': '1/to/137/by/1',
    'levtype': 'ml',
    'param': '129/130/131/132/133',
    'stream': 'oper',
    'time': '12',
    'type': 'an',
    'area': 'global',
    'grid': '0.25/0.25',
    'format': 'grib',
}, '20231016.era5.t12z.global.ml.grib')

# Surface levels
c.retrieve("reanalysis-era5-complete", {
    "date": "2023-10-16",
    "levtype": "sfc",
    "param": "31/34/39/40/41/42/43/67/129/134/139/141/151/165/166/167/168/170/172/183/235/236",
    "stream": "oper",
    "time": "12",
    "type": "an",
    "area": "global",
    "grid": "0.25/0.25",
    "format": "grib2",
}, "20231016.era5.t12z.global.sfc.grib")

2. Run `ungrib` twice, model levels and surface levels. Note: as of today (release 4.6.0) the `Vtable.ECMWF_sigma` file is out of date in the WPS repository. I've attached an updated version here. I don't know if it's fully correct but it's been working for me. You should now have 2 WPS intermediate files:
Code:
HYB:2023-10-16_12
SFC:2023-10-16_12

3. Concat files to form single dataset:
Bash:
cat HYB:2023-10-16_12 SFC:2023-10-16_12 > ALL:2023-10-16_12

4. Run `calc_ecmwf_p` WPS util program. More details here: WRF Guide: WPS Utility Programs. I was able to generate my own `ecmwf_coeffs` file for the 137 model level data using the `n`, `a[Pa]`, and `b` columns from this table. I'll attach mine in case anyone wants to do this using the 137 model levels (remove `.txt` extension). This will output an additional WPS intermediate file `PRES:2023-10-16_12`.

5. Concat pressure intermediate file with rest of outputs:
Code:
cat ALL:2023-10-16_12 PRES:2023-10-16_12 > ERA5:2023-10-16_12

I was able to use this final intermediate file to initialize the MPAS model using `init_atmosphere`.
 

Attachments

  • ecmwf_coeffs.txt
    3.2 KB · Views: 2
  • Vtable.ECMWF_sigma.txt
    4.2 KB · Views: 2
Last edited:
Top