<div dir="ltr">Try a print(iday9) before the line you are getting the error. It is possible that ddd9.eq.(nd9+1) is not true anywhere and iday9 is returned as a missing value.<div><br></div><div>Responses to ncl-talk only please.</div><div><br></div><div>Maria</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Sep 29, 2014 at 11:53 AM, azizul haque <span dir="ltr">&lt;<a href="mailto:haque.azizul320@yahoo.com" target="_blank">haque.azizul320@yahoo.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div style="color:#000;background-color:#fff;font-family:times new roman,new york,times,serif;font-size:13px"><div>Hi NCL User,</div><div>I am facing big problem with GPCP daily data. I doing daily annual cycle with other CMIP5 models this work well. However, GPCP data gives following error message that I could not solve.Your kind help are appreciated</div><div><br></div><div style="color:rgb(0,0,0);font-size:13px;font-family:&#39;times new roman&#39;,&#39;new york&#39;,times,serif;background-color:transparent;font-style:normal">Error are highlighted in the script below</div><div style="color:rgb(0,0,0);font-size:13px;font-family:&#39;times new roman&#39;,&#39;new york&#39;,times,serif;background-color:transparent;font-style:normal"><br></div><div style="color:rgb(0,0,0);background-color:transparent;font-style:normal"><span>*************</span><span style="font-family:Menlo;font-size:11px">fatal:Subscript out of range, error in subscript #0</span></div>
<div style="margin-top:0px;margin-bottom:0px;font-size:11px;font-family:Menlo">fatal:An error occurred reading pr9Area***********</div><div style="color:rgb(0,0,0);font-size:13px;font-family:&#39;times new roman&#39;,&#39;new york&#39;,times,serif;background-color:transparent;font-style:normal">Script for GPCP sub</div><div style="margin-top:0px;margin-bottom:0px;font-size:11px;font-family:Menlo">j =addfile (&quot;/Users/ahaque/Desktop/CMIP5/historical/Daily/historical/jjas_hist_50y/jjas_hist_50y/<a href="http://GPCP_1DD_v1.2_199610-201312_sa.nc" target="_blank">GPCP_1DD_v1.2_199610-201312_sa.nc</a>&quot;, &quot;r&quot;)</div><div style="margin-top:0px;margin-bottom:0px;font-size:11px;font-family:Menlo">   pr9=j-&gt;PREC;(6301x16X21;x21;{lat1:lat2},{lon1:lon2})   ; (time,lat,lon)  (0,1,2)</div><div style="margin-top:0px;margin-bottom:0px;font-size:11px;font-family:Menlo"> time9     = i-&gt;time</div><div style="margin-top:0px;margin-bottom:0px;font-size:11px;font-family:Menlo">;Convert kg to mm</div><div style="margin-top:0px;margin-bottom:0px;font-size:11px;font-family:Menlo">  pr9        = pr9*1.</div><div style="margin-top:0px;margin-bottom:0px;font-size:11px;font-family:Menlo">  pr9@units  = &quot;mm/day&quot;</div><div style="margin-top:0px;margin-bottom:0px;font-size:11px;font-family:Menlo">  printVarSummary(pr9)</div><div style="margin-top:0px;margin-bottom:0px;font-size:11px;font-family:Menlo">  printMinMax(pr9,1)</div><div style="margin-top:0px;margin-bottom:0px;font-size:11px;font-family:Menlo">  clat9      = latRegWgt(pr9&amp;lat, typeof(pr9), 0) ; create lat weights</div><div style="margin-top:0px;margin-bottom:0px;font-size:11px;font-family:Menlo">  pr9Area    =
 wgt_areaave_Wrap(pr9, clat9, 1, 0)  ; weighted area avg</div><div style="margin-top:0px;margin-bottom:0px;font-size:11px;font-family:Menlo">  ymdStrt9   = 199610 ; start yyyymmdd</div><div style="margin-top:0px;margin-bottom:0px;font-size:11px;font-family:Menlo">  ymdLast9   = 201312      ;last</div><div style="margin-top:0px;margin-bottom:0px;font-size:11px;font-family:Menlo">  yrStrt     = ymdStrt9/10000</div><div style="margin-top:0px;margin-bottom:0px;font-size:11px;font-family:Menlo">  yrLast     = ymdLast9/10000</div><div style="margin-top:0px;margin-bottom:0px;font-size:11px;font-family:Menlo">  nhar       = 4  ; no of fourier comp</div><div style="margin-top:0px;margin-bottom:0px;font-size:11px;font-family:Menlo">  var        =
 &quot;pr&quot;</div><div style="margin-top:0px;margin-bottom:0px;font-size:11px;font-family:Menlo">  TIME9      = cd_calendar(time9,0)   ; type of float</div><div style="margin-top:0px;margin-bottom:0px;font-size:11px;font-family:Menlo">  year9      = floattointeger( TIME9(:,0) )</div><div style="margin-top:0px;margin-bottom:0px;font-size:11px;font-family:Menlo">  month9     = floattointeger( TIME9(:,1) )</div><div style="margin-top:0px;margin-bottom:0px;font-size:11px;font-family:Menlo">  day9       = floattointeger( TIME9(:,2) )</div><div style="margin-top:0px;margin-bottom:0px;font-size:11px;font-family:Menlo">  ddd9       = day_of_year(year9, month9, day9)</div><div style="margin-top:0px;margin-bottom:0px;font-size:11px;font-family:Menlo">  yyyyddd9  
 = year9*1000 + ddd9</div><div style="margin-top:0px;margin-bottom:0px;font-size:11px;font-family:Menlo">  nday9      = 365</div><div style="margin-top:0px;margin-bottom:0px;font-size:11px;font-family:Menlo">  pday9      = new ( nday9, typeof(pr9), getFillValue(pr9))</div><div style="margin-top:0px;margin-bottom:0px;font-size:11px;font-family:Menlo">  do nd9      =0,nday9-2</div><div style="margin-top:0px;margin-bottom:0px;font-size:11px;font-family:Menlo">     iday9   = ind(ddd9.eq.(nd9+1))</div><div style="margin-top:0px;margin-bottom:0px;font-size:11px;font-family:Menlo">     <span style="background-color:rgb(253,239,43)">pday9(nd9) = avg(pr9Area(iday9))</span></div><div style="margin-top:0px;margin-bottom:0px;font-size:11px;font-family:Menlo">     delete(iday9)                       ; may change next ireration</div><div style="margin-top:0px;margin-bottom:0px;font-size:11px;font-family:Menlo">    end do</div><div style="margin-top:0px;margin-bottom:0px;font-size:11px;font-family:Menlo">   pday9(nday9-1)= 0.5*(pday9(0)+pday9(nday9-2))</div><div style="background-color:transparent">





























</div><div style="margin-top:0px;margin-bottom:0px;font-size:11px;font-family:Menlo">   pr9AvgRegion  = avg(pr9Area)</div><div><br></div></div></div><br>_______________________________________________<br>
ncl-talk mailing list<br>
List instructions, subscriber options, unsubscribe:<br>
<a href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk" target="_blank">http://mailman.ucar.edu/mailman/listinfo/ncl-talk</a><br>
<br></blockquote></div><br></div>