1

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!

Khan
  • 3
  • 4

1 Answers1

1

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

ClimateUnboxed
  • 7,106
  • 3
  • 41
  • 86
  • Thank you so much for your excellent kind help and well explained. At the same time can I ask you one more question? Like how to calculate the "Standard deviation" by CDO? – Khan Jul 26 '22 at 12:55
  • Welcome to SO @Khan. Please consider upvoting the question and accepting the answer. If you have further questions about CDO, it is better to post a new question. Comments are not suitable as you cannot post code – Robert Wilson Jul 26 '22 at 16:09
  • 1
    @RobertWilson I'm not entirely sure but I think new users are not able to upvote until they get to a certain amount of rep. But you can accept the answer with the green tick though Khan if you found the answer useful – ClimateUnboxed Jul 26 '22 at 21:30