Project

General

Profile

extraction of variable

Added by kunal bali almost 2 years ago

Hi,

I have 100 files with 5 different variables (VAR1 to VAR5). I need to select only one variable (for example, VAR1).

I can extract the VAR1 via

cdo mergetime file1.nc file2.nc
cdo selvar,VAR1 file2.nc out.nc

But these files are heavy. So mergetime taking so much time.
could you please let me know how to extract direct VAR1 from 100 files before applying MERGETIME.
After extraction of (VAR1), I would like to apply the mergetime.

Thanks
Kunal


Replies (2)

RE: extraction of variable - Added by Karin Meier-Fleischer almost 2 years ago

Hi Kunal,

you can use the apply operator https://code.mpimet.mpg.de/projects/cdo/embedded/cdo.pdf#subsection.2.2.1.

cdo -mergetime -apply,-selname,VAR1 [ file*.nc ] outfile.nc

-Karin

    (1-2/2)