You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 4 Next »

Step-by-step guide

Some applications require the input files separated each on them containing one single parameter or step. This is not the most efficient way to retrieve it from MARS but the solution is very easy.

For example, imagine that you want to retrieve 3 parameters for the same date 20181001,run 00 and type=pl but you need to have them in 3 separate files. The steps would be:

Retrieve the data following the Retrieval efficiency recommendations, in this case the 3 parameters together:

retrieve,
class=od,
date=2018-10-01,
expver=1,
levelist=250/500/850/900/1000,
levtype=pl,
param=129.128/130.128/157.128,
step=0/3/6,
stream=oper,
grid=1/1,
time=00:00:00,
type=fc,
target="pl_20181001_00_all.grib"

Install the ecCodes tools and use grib_copy to split the file using "multitarget" name (note that the quotes (") in the output name are required):                                                                                               

grib_copy pl_20181001_00_all.grib "pl_20181001_00_[shortName].grib"

This will create 3 different files, one per parameter:

pl_20181001_00_r.grib
pl_20181001_00_t.grib
pl_20181001_00_z.grib




  • No labels