Dear Mr/Mrs;
I am trying to calculate Standardised Precipitation Index (SPI). I run the
below codes, but the result I have got is not between (+3,-3), values more
than +3 like 14, 20 are included in the output. I also got lots of fill
values rather than a number.Could you please kindly advice me what it is
wrong with the codes I run.
Kind regards,
f = addfile("precip.mon.1981-2010.ltm.v6.nc","r")
prc = f->precip
dimp = dimsizes(prc)
ntim = dimp(0)
nlat = dimp(1)
mlon = dimp(2)
len = (/3, 6/)
klen = dimsizes(len)
spi = new((/klen,ntim,nlat,mlon/) ,float,prc@_FillValue)
do k=0,klen-1
spi(k,:,:,:) = dim_spi_n(prc, len(k), False, 0)
end do
print(sprintf("%8.2f", prc) \
+sprintf("%8.2f", spi(0,:,:,:)) \
+sprintf("%8.2f", spi(1,:,:,:)) )
-- S.Rahimi
_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Mon Jul 29 13:35:09 2013
This archive was generated by hypermail 2.1.8 : Thu Aug 01 2013 - 15:55:03 MDT