[ncl-talk] problem regarding drought Index SPI plot

Md. Saquib Saharwardi 1610303 saquib16 at iiserb.ac.in
Tue May 2 23:58:01 MDT 2017


Dear NCL-user,
                     I am trying to plot SPI (standardized precipitation
Index) for 30-years data. It is always showing the problem while execution
of scripts.

please provide me suggestions on that.

I haver attached the script with error below.

fili   = "precip.1981.2010.nc"
   f      = addfile(fili, "r")

   yyyymm = f->time

   ntim   = dimsizes(yyyymm)
   if ((ntim%12).ne.0) then
        print("ntim must be divisable by 12")
        exit
   end if
   print(ntim)

   prc    = f->precip
   prc at _FillValue = -999.0      ; change from the default
   pmsg   = prc at _FillValue      ; convenience

   printVarSummary(prc)
   printMinMax(prc,0)

   runlen = (/ 3, 6, 12, 24, 36, 48 /)
   nrun   = dimsizes(runlen)

   opt    = False
  ;opt at spi_type = 3             ; 6.3.0 onward; only if opt=True

   spi = new( (/nrun,ntim/), typeof(prc), pmsg)
   do nr=0,nrun-1
      spi(nr,:) = dim_spi_n(prc, runlen(nr), opt, 0)
   end do

fatal:Dimension sizes on right hand side of assignment do not match
dimension sizes of left hand side
fatal:["Execute.c":8573]:Execute: Error occurred at or near line 22




Thankyou in Advance

With regards
*****************************************************************************
Md. Saquib Saharwardi
Research Scholar
Department of Earth and Environmental Sciences
Indian Institute of Science Education and Research Bhopal (IISERB)
Bhopal- 462066, Madhya Pradesh
Email: saquib16 at iiserb.ac.in
Mob: +91-7471112404
CGMLI (Home Page) <http://home.iiserb.ac.in/%7Ekumarp/index.html>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20170503/9b9c916e/attachment.html 


More information about the ncl-talk mailing list