# Fwd: draw xy plot from 3 dimensional variable

From: Setareh Rahimi <setareh.rahimi_at_nyahnyahspammersnyahnyah>
Date: Mon Aug 05 2013 - 04:43:53 MDT

---------- Forwarded message ----------
From: Setareh Rahimi <setareh.rahimi@gmail.com>
Date: Sun, Aug 4, 2013 at 7:50 AM
Subject: draw xy plot from 3 dimensional variable
To: ncl-talk@ucar.edu

Dear all,

I know that my email have been seen by the member of the ncl groups, but
since this is an ergent need I send this email again. Please kindlu advice
me in this regard as soon as possible.

After calculating SPI, I need to have a xy plot. My problem is that SPI has
3 dimensions, as you know to plot a xy plot 1 dimensional variables are
needed. So my question is how can I convert 3 dimensinal SPI to 1
dimensinal. I need to plot SPI for whole Africa cntinent, not specific
lat/lon.

______________________________________________________________________________________________________________________________________

begin

prc2 = f->precip({62456:77035},{-35:37},{344:50})
time = f->time({62456:77035} )

yyyymm_i = cd_calendar(time, -2)

ntim = dimsizes(time)

dimp = dimsizes(prc2)
ntim = dimp(0)
nlat = dimp(1)
mlon = dimp(2)
len = (/3,6,12,24/)
klen = dimsizes(len)
spi = new((/klen,ntim,nlat,mlon/),float)

do k=0,klen-1
spi(k,:,:,:) = dim_spi_n(prc2, len(k), False, 0)
end do
end

```--
S.Rahimi

```

_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Mon Aug 5 04:44:03 2013

This archive was generated by hypermail 2.1.8 : Wed Aug 07 2013 - 13:59:00 MDT