Khan
Khan

Reputation: 3

How can compute "Mean Absolute Error (MAE)" by CDO

I did not find as a new student how to calculate "Mean Absolute Error (MAE)" by CDO! Can you assist us with how to compute by CDO?

Upvotes: 1

Views: 416

Answers (1)

ClimateUnboxed
ClimateUnboxed

Reputation: 8087

if you have your observations (or analysis?) in obs.nc and model in model.nc then you can calculate the MAE in the following way

# calculate the difference 
cdo sub model.nc obs.nc diff.nc   

# absolute value
cdo abs diff.nc abs.nc 

# time mean
cdo timmean abs.nc MAE.nc 

or piping it all in one line:

cdo -timmean -abs -sub model.nc obs.nc MAE.nc 

If instead of the temporal mean you need the spatial MAE then of course you replace timmean with fldmean

Upvotes: 2

Related Questions