Minh Hiếu
Minh Hiếu

Reputation: 39

calculate correlation using cdo in Netcdf file

I want to calculate spatial and temporal correlation coefficient with a file having 1 variable and the other having 2. How can I select one variable from the one having 2 to calculate the correlation? Which command should I use? Here is the command I use:

cdo fldcor/timcor infile1.nc infile2.nc output.nc

I tried and the fault is: Input streams have different number of variables per time step! Thanks a lot!

Upvotes: 1

Views: 1919

Answers (1)

Robert Wilson
Robert Wilson

Reputation: 3407

This should work:

cdo -fldcor -selname,var infile1.nc -selname,var infile2.nc output.nc

Upvotes: 2

Related Questions