Project

General

Profile

play the wildcard

Added by Ralf Mueller over 8 years ago

Play the wildcard

... with files

Some operators like cat and merge have an abitrary number of input files. That's why its a problem to put them into a chain with other operators. Especially cat can create large temporary data. But this has been solved through the usage of wildcards: Given a single quoted shell-like wildcard string, CDO can evaluate it into a file list. With that technique, operations like

 cdo -timmean -cat ’exp004_201?_global.nc*’ global_Timemean.nc

are possible.

... with variables

What about selecting variables with wildcards? If you want to do this, the select operator should be your choice. Wildcards can be uses for variables names or parameters:

cdo -select,’name=s*’ $ifile $ofile
cdo -select,’param=1.?.0’ $ifile $ofile

And don't forget, that there is a range syntax for integers, which is supported by all operators that handle integers for selection
cdo -select,timestep=2,3,5/8,10 $ifile $ofile