[ncl-talk] problems with EOF function in ncl

Dennis Shea shea at ucar.edu
Wed Nov 12 16:27:56 MST 2014


The documentation for eof2data needs to be cleared up.

  evecv    = eofunc_Wrap    (x,neval,False)
  evecv_ts = eofunc_ts_Wrap (x,evecv,False)

  x0 = eof2data (evecv,evecv_ts)

The returned x0 will have the correct variance but will be offset from the
expected result.

To return the correct values the 'evecv_ts' must have each evecv_ts at ts_mean(n)
added back
*prior* to use by eof2data.


  do n=0,neval-1
     evecv_ts(n,:) = evecv_ts(n,:) + evecv_ts at ts_mean(n)  ; add component
means back in
  end do
  x1      = eof2data (evecv,evecv_ts)

Attached is a script which uses data drom a book. NCL matches the book
results exactly.

Regards
D

On Wed, Nov 12, 2014 at 8:31 AM, Xia, Geng <gxia at albany.edu> wrote:

>  Hi all
>
>
>  I send out message yesterday, reporting on a problem with EOF function
> in ncl. Thanks to many others who helps me, It
>
> turns out that the EOF function miscalculate the first eof mode (the
> mean). I did an experiment by removing the mean from the dataset, then I
> perform the EOF function and reconstruct the data. The result is perfect
> after that.
>
>
>  This problem won't matter if people is working with anomalies data.
> However, It will be an issue if people use the EOF as a filter. For
> example, if you use EOF to filter the high frequency noise from data set
> and reconstruct the filtered data. It will cause uncertainty.
>
>
>  So hopefully, someone who is managing the EOF coding can see this
> message. The function I think is responsible for the problem is eofunc_ts
> and eofunc.​
>
>
>  Best
>
> Geng Xia
>
>
>
> _______________________________________________
> ncl-talk mailing list
> 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/20141112/9d92725b/attachment.html 
-------------- next part --------------
  3.760  3.660  0.540  5.275  9.768 13.741  4.782
  8.590  4.990  1.340 10.022  7.500 10.162  2.130
  6.220  6.140  4.520  9.842  2.175  2.732  1.089
  7.570  7.280  7.070 12.662  1.791  2.101  0.822
  9.030  7.080  2.590 11.762  4.539  6.217  1.276
  5.510  3.980  1.300  6.924  5.326  7.304  2.403
  3.270  0.620  0.440  3.357  7.629  8.838  8.389
  8.740  7.000  3.310 11.675  3.529  4.757  1.119
  9.640  9.490  1.030 13.567 13.133 18.519  2.354
  9.730  1.330  1.000  9.871  9.871 11.064  3.704
  8.590  2.980  1.170  9.170  7.851  9.909  2.616
  7.120  5.490  3.680  9.716  2.642  3.430  1.189
  4.690  3.010  2.170  5.983  2.760  3.554  2.013
  5.510  1.340  1.270  5.808  4.566  5.382  3.427
  1.660  1.610  1.570  2.799  1.783  2.087  3.716
  5.900  5.760  1.550  8.388  5.395  7.497  1.973
  9.840  9.270  1.510 13.604  9.017 12.668  1.745
  8.390  4.920  2.540 10.053  3.956  5.237  1.432
  4.940  4.380  1.030  6.678  6.494  9.059  2.807
  7.230  2.300  1.770  7.790  4.393  5.374  2.274
  9.460  7.310  1.040 11.999 11.579 16.182  2.415
  9.550  5.350  4.250 11.742  2.766  3.509  1.054
  4.940  4.520  4.500  8.067  1.793  2.103  1.292
  8.210  3.080  2.420  9.097  3.753  4.657  1.719
  9.410  6.440  5.110 12.495  2.446  3.103  0.914
-------------- next part --------------
A non-text attachment was scrubbed...
Name: eof_0.ncl
Type: application/octet-stream
Size: 3353 bytes
Desc: not available
Url : http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20141112/9d92725b/attachment.obj 


More information about the ncl-talk mailing list