[ncl-talk] extval_mlegev problem

Adam Herrington adam.herrington at stonybrook.edu
Thu Sep 20 12:45:21 MDT 2018


I am comparing extval_mlegev in ncl to gevfit in matlab.

Example 1 at
https://www.ncl.ucar.edu/Document/Functions/Built-in/extval_mlegev.shtml

in ncl I get:
(0)   LOCATION     487.133
(0)   SCALE        308.777
(0)   SHAPE        0.0936753

in matlab I get:
params =  -0.0937  308.7766  487.1327

Looks good (Kappa is defined negative in Matlab). Now I try a smaller
dataset from Table 4.6 in Wilks statistical methods in the atmospheric
sciences:

  pobs = (/2.01,3.52,2.61,3.89,1.82, \
           3.86,3.31,4.20,4.48,4.51, \
           3.48,4.60,5.20,4.93,3.50, \
           4.58,6.23,2.67,5.24,3.00/)

in ncl I get:
(0)   LOCATION     1.82073
(0)   SCALE        2.23614
(0)   SHAPE        0.396596

In matlab I get:
params =  -0.2912    1.1061    3.4960
where the array is (shape, scale, location)

I don't expect the two algorithms to agree exactly, but the differences are
pretty large here. Is it safe to assume that for arrays of small N, the
solutions will diverge more? The array in example 1 is about double the
size of the array in wilks book.

Adam

Adam
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20180920/23dfd61d/attachment.html>


More information about the ncl-talk mailing list