...
Code Block | ||
---|---|---|
| ||
module load ecmwf-toolbox grib_ls t.grb |
How many messages messages does the GRIB file containscontain? Does it match to the number of expected fields retrieved from MARS?
Expand | ||
---|---|---|
| ||
grib_ls t.grb t.grb edition centre typeOfLevel level dataDate stepRange dataType shortName packingType gridType gridType 4 of 4 messages in t.grb |
...
Expand | ||
---|---|---|
| ||
module load ecmwf-toolbox grib_ls t.gg.grb t.gg.grb edition centre typeOfLevel level dataDate stepRange dataType shortName packingType gridType 1 ecmf isobaricInhPa 1000 20231025 48 fc t grid_simple reduced_gg grib_ls t.ll.grb t.ll.grb edition centre typeOfLevel level dataDate stepRange dataType shortName packingType gridType 1 ecmf isobaricInhPa 1000 20231025 48 fc t grid_simple regular_ll |
...
Expand | ||
---|---|---|
| ||
retrieve, |
Note that this time we user used the MARS keyword "type" and the ecCodes key "shortName" in the name of the target file. How many target files did the requests create?
...
Expand | ||
---|---|---|
| ||
number_of_tapes=11; |
If you need to download this data for entire January 2020, how would you proceed:
- Running one request for entire month (pros / cons)
- Running 31 daily requests (pros / cons)
?
Read, Write, Compute
Retrieve U and V wind components at 10 metre from 10 day old analysis and calculate wind speed > see in MARS catalogue
Code Block | ||
---|---|---|
| ||
retrieve,
class = od,
expver = 1,
stream = oper,
type = analysis,
date = -10,
time = 12,
levtype = sfc,
param = 165.128, # u
grid = 1/1,
fieldset = u
retrieve,
param = 166.128, # v
fieldset = v
compute,
formula = "sqrt(u*u + v*v)",
fieldset = speed
write,
fieldset = speed,
target = "$SCRATCH/windspeed" |
Additional exercise (question from Nikolaos):
...
Code Block | ||
---|---|---|
| ||
read, source = "/ec/res4/scratch/usbk/windspeed", grid = 1/1, area = europe, target = "$SCRATCH/europe_windspeed" |
To convert previously created GRIB file to netCDF using ecCodes in a terminal on the ECS or HPC:
Code Block | ||
---|---|---|
| ||
>module load ecmwf-toolbox >grib_to_netcdf -o $SCRATCH/windspeed.nc $SCRATCH/windspeed grib_to_netcdf: Version 2.30.2 grib_to_netcdf: Processing input file 'windspeed'. grib_to_netcdf: Processing input file 'windspeed'. grib_to_netcdf: Found 1 GRIB field in 2 files. grib_to_netcdf: Ignoring key(s): method, type, stream, refdate, hdate grib_to_netcdf: Creating netCDF file 'windspeed.nc' grib_to_netcdf: NetCDF library version: 4.9.1 of Feb 9 2023 13:54:09 $ grib_to_netcdf: Creating large (64 bit) file format. grib_to_netcdf: Defining variable 'u10'. grib_to_netcdf: Done. |
...