# sindex_yrmo, snindex_yrmo

Given two series of year-month values, calculate the Southern Oscillation Index.

## Synopsis

```    function sindex_yrmo(
slpt[*][*] : float,
slpd[*][*] : float,
iprnt[1] : integer
)

function snindex_yrmo(
slpt[*][*]      : float,
slpd[*][*]      : float,
iprnt[1]        : integer,
soi_noise[*][*] : float
)

```

## Arguments

slpt
2D array of monthly data from station/grid pt 1 (num_years x num_months)
slpd
2D array of monthly data from station/grid pt 2 (same dimensions as slpt)
iprnt
print flag (0 means do not print)
soi_noise
2D array of noise index (output, same dimension as slpt, slpd). Space for this variable must be explicitly allocated by the user (see example below).

## Description

Given two series of year-month values (eg: slp) calculate an "index" (eg: Southern Oscillation Index). The overall anomaly standard deviation is used to normalize the anomalies. Both functions return a 2D float array with the dimensions as slpt and slpd.

Both of these routines return the attributes long_name, short_name, and units.

## Example

```begin
nmos    = 12                         ; number of months
nyrstrt = 1880                       ; first year of data
nyrlast = 1997                       ; last year with data
nyrs    = (nyrlast-nyrstrt+1)        ; total number of years
xmsg    = -999.9                     ; missing value
ncol    = nmos+1                     ; number of columns
iprnt   = 1                          ; print soi out

; ================================>  ; READ THE ASCII FILES
; create vector/arrays
yr   = filet(:,0 )                   ; vector containing the years
slpt = filet(:,1:)                   ; tahiti slp
slpd = filed(:,1:)                   ; darwin slp
slpt@_FillValue = xmsg
slpd@_FillValue = xmsg

soi = sindex_yrmo (slpt,slpd,iprnt)
print("soi@_FillValue=" + soi@_FillValue)
print(soi@long_name)
print(soi@short_name)
print(soi@units)

xoi_noise = new ( (/nyrs,nmos/), float  )
xoi = snindex_yrmo(slpt,slpd,iprnt,xoi_noise)
print(xoi@long_name)
print(xoi@short_name)
print(xoi@units)
end
```

### Reference Manual Control Panel

\$Revision: 1.11 \$ \$Date: 1999/03/19 15:32:27 \$