Dear all,
Here is the code I run. Please advice me to correct the codes.
Thank you in advance,
___________________________________________________
___________________________________________________
load"$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"
load"$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl"
load"$NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl"
begin
f = addfile("precip.mon.total.v6.nc","r")
prc2 = f->precip({62456:77035},{-35:37},{344:50})
time = f->time({62456:77035} )
yyyymm_i = cd_calendar(time, -2)
ntim = dimsizes(time)
year = yyyymm_i/100
firstyr = year(0)
lastyr = year(ntim-1)
nyear = lastyr-firstyr+1
YYYYMM = yyyymm_time(firstyr,lastyr , "integer")
yrfrac = yyyymm_to_yyyyfrac(YYYYMM,0.0)
printVarSummary(yrfrac)
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
spia = dim_avg_n_Wrap(spi,(/1,2/))
print(yyyymm_i)
printVarSummary(yyyymm_i)
printVarSummary(spia)
print(spia)
end
---------- Forwarded message ----------
From: jbuzan <jbuzan@purdue.edu>
Date: Sat, Aug 3, 2013 at 3:57 PM
Subject: Re: SPI
To: Setareh Rahimi <setareh.rahimi@gmail.com>
Cc: "ncl-talk@ucar.edu" <ncl-talk@ucar.edu>
You need to be explicit about what you are doing and how you programmed
your code. I am sure that the vast majority of people on ncl-talk have no
idea what you are actually asking.
-Jonathan
On Aug 3, 2013, at 6:26, Setareh Rahimi <setareh.rahimi@gmail.com> wrote:
>
> Dear all,
>
> I have calculated standardizes precipitation index (SPI), I used 42
years, but the values of SPI are 588, not 504. Why does it happen?
> -
> S.Rahimi
>
> _______________________________________________
> ncl-talk mailing list
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
-- S.Rahimi
_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Sun Aug 4 08:18:17 2013
This archive was generated by hypermail 2.1.8 : Wed Aug 07 2013 - 13:59:00 MDT