[ncl-talk] computing SOI index for 100 ensembles

Sri nandini bax8609 at uni-hamburg.de
Thu Apr 15 02:29:01 MDT 2021

```Hello dear ncl-users,

I have some errors while computing the SOI model index over a
100ensembles. Could someone help me out below in my script (i only
attached the part where the error is); in the looping over the ensemble
part for computing the climatologies and than the standard deviation? I
would like compute the SOI index for each ensemble and than plot out the
timeseries.

T      = (fslp->slp(tStrt:tLast,:,{latT},{lonT}))
D      = (fslp->slp(tStrt:tLast,:,{latD},{lonD}))
printVarSummary(T)               ;[time | 661] x [ens | 100]
printVarSummary(D)               ;[time | 661] x [ens | 100]

TClm   = new ((/nmos,nens/), typeof(T), T at _FillValue)     ; monthly
climatologies
DClm   = new ((/nmos,nens/), typeof(D), D at _FillValue)

do nmo=0,nmos-1                                ; loop over each month
for current member
do n=0,nens-1                                      ; loop over each
ensemble member
TClm(nmo,n) = avg(T(tClmStrt+nmo:tClmLast:nmos,n))  ;; convenience
and efficiency
DClm(nmo,n) = avg(D(tClmStrt+nmo:tClmLast:nmos,n))
end do
end do
printVarSummary(TClm)
printVarSummary(DClm)
TAnom    = T
DAnom    = D

do nmo=0,nmos-1                                   ; anomalies
reference clim
do ne=0,nens-1
TAnom(nmo::nmos,n) = T(nmo::nmos,n) - TClm(nmo)
DAnom(nmo::nmos,n) = D(nmo::nmos,n) - DClm(nmo)
end do
end do
printVarSummary(TAnom)
printVarSummary(DAnom)

TAnomStd   = stddev(TAnom(tClmStrt:tClmLast))     ; stddev of
anomalies over clStrt & clLast
DAnomStd   = stddev(DAnom(tClmStrt:tClmLast))
printVarSummary(TAnomStd)
printVarSummary(DAnomStd) ; signal and noise
soi_signal = (TAnom/TAnomStd) - (DAnom/DAnomStd)  ; (ntim)
copy_VarCoords(TAnom, soi_signal)
soi_signal at long_name = "SOI: 20th Century Reanalysis: "+yrStrt+"-"+yrLast
printVarSummary(soi_signal)

--
Dr. Sri, Nandini-Weiss
Research Associate

Universität Hamburg
Center for Earth System Research and Sustainability (CEN)
Cluster of Excellence 'Climate, Climatic Change, and Society' (CLICCS)

Bundesstrasse 53, 20146 Hamburg

```