DATA PROCESSING AND ANALYSIS
13 NOV 2018 I SIMON ROSANKA, IEK-8 SABINE SCHRÖDER, IEK-8
TOOLS FOR DATA ANALYSIS – HANDS-ON SESSION
PROBLEM
CDO and NCOs
TASK
Main task:
Obtain the correlation coefficient between dry air temperature and specific humidity at a pressure level of 500 hPa for Summer and Winter over Europe.
Subtask:
1. Use CDO and NCOs
2. Include correct naming in final file 3. Stick to CF-conventions
CDO and NCOs
USEFUL WEBLINKS
• NCO:
http://nco.sourceforge.net/nco.html#Reference-Manual
• CDO:
https://code.mpimet.mpg.de/projects/cdo/embedded/cdo_refcard.pdf
CDO and NCOs
STRATEGY
1. Merge data (to obtain seasonal data)
2. Interpolate from model levels to pressure level (500 hPa) 3. Split dataset
4. Calculate correlation factor 5. Mask Europe
6. Adjust attributes
CDO and NCOs
USEFUL CDO COMMANDS
• sinfo
• mergetime
• ml2pl
• splitseas
• splitname
• timcor
• sellonlatbox
CDO and NCOs
SOLUTION (1)
1. Obtain header information cdo sinfon in.nc
2. Merge monthly data into yearly data:
cdo mergetime data_* out.nc 3. Interpolate onto pressure level:
cdo ml2pl,50000 in.nc out.nc 4. Split data into seasons:
cdo splitseas in.nc out_
CDO and NCOs
SOLUTION (2)
5. Split variables into single files:
cdo splitname in.nc out_
6. Obtain correlation factor for each season:
cdo timcor tm1_ave.nc qm1_ave.nc out.nc 7. Select only Europe:
cdo sellonlatbox,-15,-50,30,70 in.nc out.nc
CDO and NCOs
SOLUTION (3)
8. Rename correlation variable and make consistent with CF-convention:
ncrename –v tm1_ave,cor_tm1_qm1
ncatted –a long_name,cor_tm1_qm1,m,c,”correlation coefficient”
ncatted –a units,cor_tm1_qm1,m,c,”1”
CDO and NCOs
SOLUTION (4)
CDO and NCOs