[ncl-talk] Remove ENSO from SST
Adam Phillips
asphilli at ucar.edu
Mon Sep 11 10:38:57 MDT 2017
Hi Priyanka,
There might be other methods, but the one that I have used in the past to
regress ENSO out is:
1) Use wgt_areaave (and weight data by cosine of the latitude to take into
account differing sizes of grid boxes) to form the nino3.4 index. This is
more precise that averaging over the latitude/longitude dimensions.
(Results in a 1-dimensional array)
2) Normalize the nino3.4 index by using dim_standardize. (Result in a
1-dimensional array)
3) Regress your SST array against the normalized nino3.4 index. (Results is
a 2-dimensional lat x lon array.)
4) Run a do loop over every timestep, multiplying the value of 2) times the
spatial pattern of 3). (Results in a 3-dimensional array time x lat x lon.)
5) Subtract 4) from your original SST array to get the residual. (Results
in a 3-dimensional array time x lat x lon.)
Here's a snippet of my code that has done this:
(The following is unchecked, make sure you understand what the code does
before using it.)
; The sst array is dimensioned time x lat x lon
pi=4.*atan(1.0)
rad=(pi/180.)
coswgt=cos(rad*sst&lat)
coswgt!0 = "lat"
coswgt&lat= sst&lat
llats = -5.
llatn = 5.
llonw = 190.
llone = 240.
nino34 =
wgt_areaave(sst(:,{llats:llatn},{llonw:llone}),coswgt({llats:llatn}),1.0,0)
; step 1
nino34 = dim_standardize_Wrap(nino34,0) ; step 2
enso_sst = sst(0,:,:)
enso_sst = (/ regCoef_n(nino34,sst,0,0) /) ; step 3
fin_enso = sst
fin_enso = fin_enso at _FillValue
do gg = 0,dimsizes(sst&time)-1
fin_enso(gg,:,:) = (/ enso_sst*nino34(gg) /) ; step 4
end do
sst_noenso = sst ; calculate residual...
sst_noenso = (/ sst - fin_enso /) ; step 5
Hopefully that points you in the right direction. If you have any further
questions please include the ncl-talk email list in any replies.
Adam
On Sat, Sep 9, 2017 at 1:06 AM, Priyanka Silva <
priyankakeraminiya6 at gmail.com> wrote:
> Dear all,
> I want to remove ENSO index from all SST data and use the residual SST to
> plot correlation between residual SST and area averaged (15S- 08N,
> 95E-130E) rainfall index.
> My residual SST has only time dimension so I cannot plot the correlation
> map.I tried to find the residual SST as follows. Is there any other method
> or how can I plot the correlation map.
>
> Thank you for your help.
> Priyanka.
>
>
>
>
>
> begin
> ;***********************************************************
> ********************
> ;Seasonal mean precipitation averaged over the domain
> ;***********************************************************
> ******************
> f = "mon.precip.nc"
> fin = addfile(f, "r")
> time = fin->time
> ymd = cd_calendar(time,2)
> iTim = ind (ymd.ge.19790101.and.ymd.lt.20130101)
> preci = fin->precip(iTim,{8:-15},{95:130})
> ;printVarSummary(precip)
> pano = rmMonAnnCycTLL(preci)
> ;*******************************************************************
> ;area averaged rainfall index
> ;********************************************************************
> index =dim_avg_Wrap (dim_avg_Wrap (pano(time|:,lat|:,lon|:)))
> ;printVarSummary(index)
> xNew = dim_standardize(index, 1)
> xNew!0="time"
> xNew&time = index&time
> printVarSummary(xNew)
> ;------------------------------------------------------------------------
> f1 = "HadISST_ssta.nc"
> fin1 = addfile(f1, "r")
> time2 = fin1->time
> ymd2 = cd_calendar(time2,2)
> iTim2 = ind (ymd2.ge.19790101.and.ymd2.lt.20130101)
> sst = fin1->ssta(iTim2,:,:)
>
> ;*******************************************************************
> ;ENSO index
> ;******************************************************************
> NINO = fin1->ssta(iTim2,{-5:5},{-120:-170})
> Nino_index = dim_avg_Wrap (dim_avg_Wrap(NINO(time|:,
> latitude|:,longitude|:)))
> ;printVarSummary(Nino_index)
>
> ;---------------Remove ENSO index from SST;---------------------------
> SST = dim_avg_Wrap (dim_avg_Wrap(sst(time|:,latitude|:,longitude|:)))
> Residula_SST = SST - Nino_index
> Residula_SST!0 = "time"
> printVarSummary(Residula_SST)
> end
>
>
> _______________________________________________
> ncl-talk mailing list
> ncl-talk at ucar.edu
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
>
--
Adam Phillips
Associate Scientist, Climate and Global Dynamics Laboratory, NCAR
www.cgd.ucar.edu/staff/asphilli/ 303-497-1726
<http://www.cgd.ucar.edu/staff/asphilli>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20170911/0502355b/attachment.html>
More information about the ncl-talk
mailing list