...
Excerpt | ||
---|---|---|
| ||
Say you want to copy the first 3 messages. This can be done with:
|
How do I copy a selected number of messages from a GRIB file?
Step-by-step guide
Say you want to copy the first 3 messages. This can be done with:
...
But it is better to write a rules file and use grib_filter:
Code Block language bash title my.filter if (count < 4) { print "Copying message number [count]"; write; }
Then run this as follows:
% grib_filter -o out.grib my.filter in.grib
Of course you can make the IF condition more complicated e.g. select a range of messages to be copied:
Code Block language bash if (count == 3 || count == 13) { write; # Write out message 3 and 13 only }
Related articles
Content by Label | ||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
...