# CDO commands used for data processing in COMO project
# Created by: Thomas Poméon, t.pomeon@fz-juelich.de and O. U. Charlene GABA, gaba.charlene@gmail.com

# Subsetting of data
sellonlatbox,lon1,lon2,lat1,lat2 infile outfile

# Merging by time
cdo mergetime *.nc outfile

# Merging by filename
cdo cat *.nc outfile

# select only certain cariable to keep
cdo select,name=var1,var2,...,varN ifiles ofile

# regridding data to example grid
cdo -remapbil,1.nc 2.nc 2_remapped.nc

# Multiply by days in month
cdo -muldpm in.nc out.nc

# Change attribute
cdo -setattribute,var@units=mm/month in.nc out.nc

# multiply variable with constant
cdo aexpr,"myvar=myvar*3.14"  ifile  ofile 
