Articles with tag IC

Published on 2025/08/25
Originally finished on 2024/10/03

Note: This method is not the most efficient, unless you would need large chunks of data. For downloading anything shorter than a whole month, I would actually recommend downloading using the cdsapi module in python as a script or actually use the CDS portal. You can download about 11 days of data on pressure levels in one go, and even more for data on the surface level. (I am planning to write more on that later.) This article is thus provided as-is and for your reference only.

Although NCAR’s repository for ERA5 data in grib was phased out, the data can still be somehow obtained here as for now: TDS Catalog.

ERA5 has different categories like surface (SFC) and pressure level (PL). They do not need to be separated to two streams of initial conditions.

Also, the variable LANDSEA which is a binary mask, is located in ERA5’s invariant category. If it is not downloaded and ungrib-ed, MPAS will complain:

ERROR: ********************************************************************************
ERROR: LANDSEA field not found in meteorological data file ERA5PL:2023-04-22_00
CRITICAL ERROR: ********************************************************************************
Logging complete.  Closing file at 2024/10/03 14:33:39

Check the Vtable for ERA5:

GRIB | Level| Level| Level| metgrid  |  metgrid | metgrid                                  |
Code | Code |   1  |   2  | Name     |  Units   | Description                              |
-----+------+------+------+----------+----------+------------------------------------------+
 129 | 100  |   *  |      | GEOPT    | m2 s-2   |                                          |
     | 100  |   *  |      | HGT      | m        | Height                                   |
 130 | 100  |   *  |      | TT       | K        | Temperature                              |
 131 | 100  |   *  |      | UU       | m s-1    | U                                        |
 132 | 100  |   *  |      | VV       | m s-1    | V                                        |
 157 | 100  |   *  |      | RH       | %        | Relative Humidity                        |
 165 |  1   |   0  |      | UU       | m s-1    | U                                        | At 10 m
 166 |  1   |   0  |      | VV       | m s-1    | V                                        | At 10 m
 167 |  1   |   0  |      | TT       | K        | Temperature                              | At 2 m
 168 |  1   |   0  |      | DEWPT    | K        |                                          | At 2 m
     |  1   |   0  |      | RH       | %        | Relative Humidity                        | At 2 m
 172 |  1   |   0  |      | LANDSEA  | 0/1 Flag | Land/Sea flag                            |
 129 |  1   |   0  |      | SOILGEO  | m2 s-2   |                                          |
...

GRIB Code for Land/Sea flag is 172.

{A87F2431-62FD-4C68-843F-DFCF7B561B92}.png

(https://thredds.rda.ucar.edu/thredds/catalog/files/g/d633000/e5.oper.invariant/197901/catalog.html)

It is in the invariant field.

Published on 2025/08/25
Originally finished on 2024/10/01

TL;DR: Use the existing modules on NSCC.

Note: NSCC is a local supercomputer. If your supercomputer does not have wps out-of-the-box or as a module, you might need to download and build it.

Get WPS

Don’t rebuild the wheel.

module load wps
module load wrf
cp -r /app/apps/wps <RELEVANT_PATH>

Then edit the namelist file.

For Vtable, refer to this website: WRF - Free Data.

Use WPS

First, use link_grib followed by grib files. It will generate files like GRIBFILE.AAA.

Then, edit the namelist.wps accordingly. Mainly, look for the start and end datetime and the file interval, and also the filename prefix in the &ungrib section.

Then, use ungrib.exe. If it complains, fix according to the error prompt.

ungrib.exe will look into GRIBFILES one by one and try to extract useful fields. Since not all GRIBFILE might be relevant, it is normal to see empty lines, something like

Inventory for date = 20XX-XX-XX XX:00:00

PRES   GEOPT    HGT      TT       UU       VV       RH       DEWPT    LANDSEA  SOILGEO  SOILHGT  PSFC     PMSL     SKINTEMP SEAICE   SST      SNOW_DEN SNOW_EC  SNOW     SNOWH    ST000007 ST007028 ST028100 ST100289 SM000007 SM007028 SM028100 SM100289
-------------------------------------------------------------------------------
-------------------------------------------------------------------------------