[ncl-talk] different RMSE values calculated by NCL and CDO

LI Qi liqi123sh at qq.com
Thu Nov 19 22:15:13 MST 2015


Hi Dennis,


Thank you! The differences do relate to weights.
When both calculating without (or with) weights, the two outputs are exactly the same.




------------------ Original ------------------
From:  "Dennis Shea";<shea at ucar.edu>;
Date:  Fri, Nov 20, 2015 12:51 PM
To:  "LI Qi"<liqi123sh at qq.com>; 
Cc:  "ncl-talk"<ncl-talk at ucar.edu>; 
Subject:  Re: [ncl-talk] different RMSE values calculated by NCL and CDO



I don't have time to look at this right now. So, some speculation ....

[1] NCL's     dim_rmsd_n  does no  weighting (no areal weighting).
     It is just arithmetic.

[2] I speculate that the CDO does some areal weighing (say, cos(lat)
of the differences)



==
NCL has the following functions that may be better for comparing.

http://www.ncl.ucar.edu/Document/Functions/Built-in/wgt_arearmse.shtml
http://www.ncl.ucar.edu/Document/Functions/Built-in/wgt_arearmse2.shtml

Good luck

On Thu, Nov 19, 2015 at 7:04 AM, LI Qi <liqi123sh at qq.com> wrote:
> Dear NCL community,
>
> I would like to calculate spatial RMSE of simulations and observations.
>
> the NCL function I use is:
> rmse = dim_rmsd_n(obs, sim, (/1,2/))
> where (/1,2/) represents the spatial dimensions lon,lat
>
>
> while the CDO command is:
> cdo sqrt -fldmean -sqr -sub sim.nc obs.nc rmse.nc
>
> However, the CDO output (64.44424) is different from the NCL one (63.95646),
> and I couldn't figure out why.
>
> Attached are the two .nc files (sim var=rain_tot(time, lat, lon); obs
> var=crain(time, lat, lon))
>
> Any hint is much appreciated!
>
> Best,
> Qi
>
> _______________________________________________
> ncl-talk mailing list
> ncl-talk at ucar.edu
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20151120/86c1a504/attachment.html 


More information about the ncl-talk mailing list