Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.


Excerpt
hiddentrue

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.

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:

Code Block
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 ECC tools and use grib_copy to split the file using "multitarget" name (note that the quotes (") in the output name are required):                                                                                               

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

This will create 3 different files, one per parameter:

No Format
pl_20181001_00_r.grib
pl_20181001_00_t.grib
pl_20181001_00_z.grib


Content by Label
showLabelsfalse
max5
spaces~usa
showSpacefalse
sortmodified
reversetrue
typepage
cqllabel = "webapi-faqs" and label = "files" and type = "page" and space = "UDOC"
labelskb-how-to-article