Re: About the calculation of PDO(Pacific Decadal Oscillation)

From: Adam Phillips <asphilli_at_nyahnyahspammersnyahnyah>
Date: Thu Aug 23 2012 - 12:08:15 MDT

Hi DK,
I would venture to guess that the warning message is referring to the
fact that your sst array contains missing values over land. So, I don't
believe it is anything to worry about. You can subselect an area over
the ocean in your sst array and I bet the warnings go away... Adam

On 08/23/2012 12:02 PM, Ke Deng wrote:
> Hi, Adam
> I am sorry for the late reply. Thank u for your detailed answer and I
> get the result of PDO(611 values). But there is a warning problem
> finally "warning:regCoef: 3705 array(s) contained all missing values".
> I hope to know whether this will affect the results. Thank u!
>
> Best,
> DK
>
> On Thu, Aug 16, 2012 at 1:03 PM, Adam Phillips <asphilli@ucar.edu
> <mailto:asphilli@ucar.edu>> wrote:
>
> Hi DK,
> The method you outlined below is generally correct. I would
> square-root cosine of the latitude weight the data to account for
> the differences in grid box size. It is your choice as to exactly
> what domain to use when computing the EOFs, but the one we use
> here is 20:70N, 110:260E. I would also recommend detrending the
> data prior to calculating the EOF to remove the long-term SST
> warming trend.
>
> Here's a code snippet that I have that uses HadISST monthly SST data:
>
> a = addfile("hadisst.187001-201012.nc <http://hadisst.187001-201012.nc>","r")
> sst = a->sst
> sst = rmMonAnnCycTLL(sst)
> sst = dtrend_msg_n(ispan(0,dimsizes(sst&time)-1,1),sst,True,False,0) ; detrend the data
>
> pi=4.*atan(1.0)
> rad=(pi/180.)
> coswgt=cos(rad*sst&lat)
> coswgt!0 = "lat"
> coswgt&lat= sst&lat
> do ff = 0,dimsizes(sst&time)-1 ; remove global mean at each timestep
> sst(ff,:,:) = (/ sst(ff,:,:) - wgt_areaave(sst(ff,{-60:70},:),coswgt({-60.:70.}),1.0,0) /)
> end do
> delete(coswgt)
> sst_CW= SqrtCosWeight(sst) ; spatially weight SST field to account for differing grid box sizes
> evecv = eofunc(sst_CW({lat|20:70},{lon|110:260},time|:),1,75) ; compute EOFs
> pcts = eofunc_ts(sst_CW({lat|20:70},{lon|110:260},time|:),evecv,False) ; compute EOF timeseries
> delete(sst_CW)
> pctsS = dim_standardize(pcts(0,:),0) ; standardize PC1
> delete(evecv)
> finarr = sst(0,:,:) ; done for metadata
> finarr = (/ regCoef(pctsS,sst(lat|:,lon|:,time|:)) /)
>
>
> Take a look at the documentation pages of the functions I use so
> that you fully understand what they are doing, especially the
> eofunc and eofunc_ts pages.
> http://www.ncl.ucar.edu/Document/Functions/list_alpha.shtml
> (for example:)
> http://www.ncl.ucar.edu/Document/Functions/Contributed/rmMonAnnCycTLL.shtml
> http://www.ncl.ucar.edu/Document/Functions/Built-in/dtrend_msg_n.shtml
>
> Note that to search for NCL functions you can go to the first link
> I provided above and search for "regression", "EOF", etc. to see
> what functions NCL has that could be used.
>
> At some point in the future I will add an example to the Climate
> Indices page here:
> http://www.ncl.ucar.edu/Applications/indices.shtml
> that will use the coding I gave above.
>
> Good luck,
> Adam
>
>
>
> On 08/14/2012 03:55 AM, Ke Deng wrote:
>> HI, all
>>
>> I have a question about how to use ncl to calculate the PDO
>> index. I searched online but only find the results and method
>> about that.
>> Below is the method I searched online.
>>
>> Data used:
>>
>> * monthly 5x5 Hadley Center SST 1900-93
>>
>> Method:
>>
>> 1. create monthly anomaly fields for all grid points
>>
>> 2. create a monthly mean global SST anomaly time series for all
>> months, 1900-93, using gridpoints specified in file
>> grid.temp.glob_ocean.977
>>
>> 3. create a "residual SST anomaly" field for the North Pacific by
>> subtracting out the global mean anomaly from each North Pacific
>> grid point in file grid.N_Pac_SST.resi.172 (20N-65N, only in
>> Pacific Basin) for all months and locations
>>
>> np_resi(mo,loc)= np_ssta(mo,loc) - global_mean(mo)
>>
>> 4. compute the EOFs of the North Pacific residual SST anomaly
>> fields, and ignore all missing data point (set them to zeros)
>>
>> 5. the PDO index is the leading PC from the above analysis
>>
>> 6. for PDO index values post 1993, project observed "North
>> Pacific residual SST anomalies" onto the leading eigenvector
>> (what we call the "PDO pattern" of ssts) from the EOF analysis
>> done in step 4. We now do this with the Reynold's and Smith
>> Optimally Interpolated SST (version 2) data.
>>
>> Is there anyone have the relative script about how to calculate
>> the PDO? Thanks!
>>
>> Best,
>>
>> DK
>>
>>
>>
>> _______________________________________________
>> ncl-talk mailing list
>> List instructions, subscriber options, unsubscribe:
>> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
> --
> ______________________________________________________________
> Adam Phillipsasphilli@ucar.edu <mailto:asphilli@ucar.edu>
> NCAR/Climate and Global Dynamics Division(303) 497-1726 <tel:%28303%29%20497-1726>
> P.O. Box 3000
> Boulder, CO 80307-3000http://www.cgd.ucar.edu/cas/asphilli
>
>
> _______________________________________________
> ncl-talk mailing list
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
>

-- 
______________________________________________________________
Adam Phillips                                asphilli@ucar.edu
NCAR/Climate and Global Dynamics Division       (303) 497-1726
P.O. Box 3000				
Boulder, CO 80307-3000    http://www.cgd.ucar.edu/cas/asphilli

_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Thu Aug 23 12:08:22 2012

This archive was generated by hypermail 2.1.8 : Thu Aug 23 2012 - 16:16:15 MDT