<div dir="ltr"><div><div><span class="gmail-im"><span style="font-variant-ligatures:no-common-ligatures">SPI:    [len | 8] x [time | 1368] x [lat | 4] x [lon | 9]<br><br></span></span></div><div><span class="gmail-im"><span style="font-variant-ligatures:no-common-ligatures">You must loop over lat and lon also<br></span></span></div><div><span class="gmail-im"><span style="font-variant-ligatures:no-common-ligatures"><br></span></span></div><span class="gmail-im"><span style="font-variant-ligatures:no-common-ligatures">    do nl=0,nlat-1<br></span></span></div><span class="gmail-im"><span style="font-variant-ligatures:no-common-ligatures">       do ml=0,mlon-1<br></span></span><div><div><span class="gmail-im"><span style="font-variant-ligatures:no-common-ligatures">         do k=0,klen-1<br>              res@xyLineColors = xyLineColors(k)<br>              res@gsnCenterString = &quot;len=&quot;+klen(k)<br>              plt(k) = gsn_csm_xy (wks,yrfrac,spi(k,:,nl,ml),res)<br>        end do<br></span></span></div><div><span class="gmail-im"><span style="font-variant-ligatures:no-common-ligatures">       end do<br></span></span></div><div><span class="gmail-im"><span style="font-variant-ligatures:no-common-ligatures">     end do<br></span></span></div><div><span class="gmail-im"><span style="font-variant-ligatures:no-common-ligatures"><br></span></span></div></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Apr 11, 2017 at 9:31 AM, Dawit Abebe <span dir="ltr">&lt;<a href="mailto:dawit.kan@gmail.com" target="_blank">dawit.kan@gmail.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 style="word-wrap:break-word">Dear All,<div><br></div><div>I tried to write a script to (1) calculate SPI and (2) plot the out put. The first set of the script went well through but the second (plotting) returned error at point highlighted blue blow. The message is clear that I should adjust the dimensions, but could not get this right. I just needed some ones help. I posted my script as well as the return of NCL commands below.</div><div><br></div><div><font color="#ff2600">1. My script</font></div><div><br></div><div><div>load &quot;$NCARG_ROOT/lib/ncarg/<wbr>nclscripts/csm/gsn_code.ncl&quot;</div><div>load &quot;$NCARG_ROOT/lib/ncarg/<wbr>nclscripts/csm/gsn_csm.ncl&quot;</div><div>load &quot;$NCARG_ROOT/lib/ncarg/<wbr>nclscripts/csm/contributed.<wbr>ncl&quot;</div><div><br></div><div>begin</div><div><br></div><div>    diri  = &quot;./&quot;</div><div>    fili  = &quot;<a href="http://pre_1901_2014.nc" target="_blank">pre_1901_2014.nc</a>&quot;</div><div>    f     = addfile(diri+fili, &quot;r&quot;)</div><div><br></div><div>    prc  = f-&gt;pre</div><div>    prc@_FillValue = -999.0</div><div>    pmsg = prc@_FillValue</div><div><br></div><div>    printVarSummary(prc)</div><div><span class="m_-3625448695840246213Apple-tab-span" style="white-space:pre-wrap">        </span>dimp = dimsizes(prc)</div><div><span class="m_-3625448695840246213Apple-tab-span" style="white-space:pre-wrap">        </span>ntim = dimp(0)</div><div><span class="m_-3625448695840246213Apple-tab-span" style="white-space:pre-wrap">        </span>nlat = dimp(1)</div><div><span class="m_-3625448695840246213Apple-tab-span" style="white-space:pre-wrap">        </span>mlon = dimp(2)</div><div><br></div><div><span class="m_-3625448695840246213Apple-tab-span" style="white-space:pre-wrap">        </span>len  = (/1, 3, 6, 9, 12, 17, 24, 36/)</div><div><span class="m_-3625448695840246213Apple-tab-span" style="white-space:pre-wrap">        </span>klen = dimsizes(len)</div><div><br></div><div><span class="m_-3625448695840246213Apple-tab-span" style="white-space:pre-wrap">        </span>opt = True</div><div><span class="m_-3625448695840246213Apple-tab-span" style="white-space:pre-wrap">        </span>spi = new((/klen,ntim,nlat,mlon/), typeof(prc), pmsg)</div><div><br></div><div><span class="m_-3625448695840246213Apple-tab-span" style="white-space:pre-wrap">        </span>do k=0,klen-1</div><div><span class="m_-3625448695840246213Apple-tab-span" style="white-space:pre-wrap">        </span>    spi(k,:,:,:)= dim_spi_n(prc, len(k), True, 0)</div><div><span class="m_-3625448695840246213Apple-tab-span" style="white-space:pre-wrap">        </span> end do</div><span class=""><div><br></div><div><span class="m_-3625448695840246213Apple-tab-span" style="white-space:pre-wrap">        </span> copy_VarCoords(prc,spi(0,:,:,:<wbr>))</div><div><span class="m_-3625448695840246213Apple-tab-span" style="white-space:pre-wrap">        </span> spi@long_name = &quot;SPI&quot;</div><div><span class="m_-3625448695840246213Apple-tab-span" style="white-space:pre-wrap">        </span> spi!0         = &quot;len&quot;</div><div><span class="m_-3625448695840246213Apple-tab-span" style="white-space:pre-wrap">        </span> spi&amp;len       =  len</div><div><span class="m_-3625448695840246213Apple-tab-span" style="white-space:pre-wrap">        </span> printVarSummary(spi)</div><div><br></div></span><div>  <span class="m_-3625448695840246213Apple-tab-span" style="white-space:pre-wrap">        </span>yyyymm = f-&gt;time</div><div>  <span class="m_-3625448695840246213Apple-tab-span" style="white-space:pre-wrap">        </span>year    = yyyymm/100</div><div>  <span class="m_-3625448695840246213Apple-tab-span" style="white-space:pre-wrap">        </span>yrStrt  = 1901</div><div>  <span class="m_-3625448695840246213Apple-tab-span" style="white-space:pre-wrap">        </span>yrLast  = 2014</div><div>  <span class="m_-3625448695840246213Apple-tab-span" style="white-space:pre-wrap">        </span>nyear   = yrLast-yrStrt+1</div><span class=""><div>  <span class="m_-3625448695840246213Apple-tab-span" style="white-space:pre-wrap">        </span>yyyymm  = yyyymm_time(yrStrt, yrLast, &quot;integer&quot;)</div></span><div>  <span class="m_-3625448695840246213Apple-tab-span" style="white-space:pre-wrap">        </span>yrfrac  = (/ yyyymm_to_yyyyfrac(yyyymm, 0.0) /)</div><span class=""><div><br></div><div><br></div><div>  <span class="m_-3625448695840246213Apple-tab-span" style="white-space:pre-wrap">        </span>wks          = gsn_open_wks (&quot;ps&quot;,&quot;spi&quot;)</div></span><div>  <span class="m_-3625448695840246213Apple-tab-span" style="white-space:pre-wrap">        </span>res          = True</div><div>  <span class="m_-3625448695840246213Apple-tab-span" style="white-space:pre-wrap">        </span>res@gsnDraw  = False</div><div>  <span class="m_-3625448695840246213Apple-tab-span" style="white-space:pre-wrap">        </span>res@gsnFrame = False</div><div>  <span class="m_-3625448695840246213Apple-tab-span" style="white-space:pre-wrap">        </span>res@vpHeightF= 0.4</div><div>  <span class="m_-3625448695840246213Apple-tab-span" style="white-space:pre-wrap">        </span>res@vpWidthF = 0.8</div><div>  <span class="m_-3625448695840246213Apple-tab-span" style="white-space:pre-wrap">        </span>res@vpXF     = 0.1</div><div><br></div><div>  <span class="m_-3625448695840246213Apple-tab-span" style="white-space:pre-wrap">        </span>res@trYMinF  = -3.0</div><div>  <span class="m_-3625448695840246213Apple-tab-span" style="white-space:pre-wrap">        </span>res@trYMaxF  =  3.0</div><div>  <span class="m_-3625448695840246213Apple-tab-span" style="white-space:pre-wrap">        </span>res@tmYLTickSpacingF  = 0.5</div><div>  <span class="m_-3625448695840246213Apple-tab-span" style="white-space:pre-wrap">        </span>res@tmYLMinorPerMajor = 4</div><div>  <span class="m_-3625448695840246213Apple-tab-span" style="white-space:pre-wrap">        </span>res@gsnYRefLine       = 0.0</div><div>  <span class="m_-3625448695840246213Apple-tab-span" style="white-space:pre-wrap">        </span>res@trXMinF           = yrStrt</div><div>  <span class="m_-3625448695840246213Apple-tab-span" style="white-space:pre-wrap">        </span>res@trXMaxF           = yrLast</div><div>  <span class="m_-3625448695840246213Apple-tab-span" style="white-space:pre-wrap">        </span>res@XBMode            = &quot;Manual&quot;</div><div>  <span class="m_-3625448695840246213Apple-tab-span" style="white-space:pre-wrap">        </span>res@xyMonoDashPattern = True</div><div>  <span class="m_-3625448695840246213Apple-tab-span" style="white-space:pre-wrap">        </span>res@xyLineThicknessF  = 1</div><div><br></div><div>  <span class="m_-3625448695840246213Apple-tab-span" style="white-space:pre-wrap">        </span>plt = new ( klen, &quot;graphic&quot;)</div><div>  <span class="m_-3625448695840246213Apple-tab-span" style="white-space:pre-wrap">        </span>xyLineColors      = (/&quot;black&quot;,&quot;red&quot;,&quot;blue&quot;,&quot;green&quot;<wbr>,&quot;brown&quot;,&quot;magenta&quot;,&quot;purple&quot;/)</div><div><br></div><div>  <span class="m_-3625448695840246213Apple-tab-span" style="white-space:pre-wrap">        </span>do k=0,klen-1</div><div>     res@xyLineColors = xyLineColors(k)</div><div>     res@gsnCenterString = &quot;len=&quot;+klen(k)</div><div>     plt(k) = gsn_csm_xy (wks,yrfrac,spi(k,:,:,:),res)</div><div>  <span class="m_-3625448695840246213Apple-tab-span" style="white-space:pre-wrap">        </span>end do</div><div><br></div><div>  <span class="m_-3625448695840246213Apple-tab-span" style="white-space:pre-wrap">        </span>resP            = True</div><div>  <span class="m_-3625448695840246213Apple-tab-span" style="white-space:pre-wrap">        </span>resP@gsnPanelMainString   = &quot;SPI: Southern Ethiopia (1901-2014)&quot;</div><div>  <span class="m_-3625448695840246213Apple-tab-span" style="white-space:pre-wrap">        </span>resP@gsnPanelMainFont     = &quot;times-roman&quot;</div><div>  <span class="m_-3625448695840246213Apple-tab-span" style="white-space:pre-wrap">        </span>resP@gsnMaximize          = True</div><div>  <span class="m_-3625448695840246213Apple-tab-span" style="white-space:pre-wrap">        </span>gsn_panel(wks,plt,(/4,2/),<wbr>resP)</div><div><br></div><div>  <span class="m_-3625448695840246213Apple-tab-span" style="white-space:pre-wrap">        </span>res@gsnDraw  = True</div><div>  <span class="m_-3625448695840246213Apple-tab-span" style="white-space:pre-wrap">        </span>res@gsnFrame = True</div><div>end</div><div><br></div></div><div><font color="#ff2600">2. Returns from the commands</font></div><div><br></div><p style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo"><span style="font-variant-ligatures:no-common-ligatures">(my_ncl) Dagemawes-MacBook-Pro:~ dawitabebe$ ncl -Q dawitspiscript.ncl</span></p>
<p style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo;min-height:13px"><span style="font-variant-ligatures:no-common-ligatures"></span><br></p>
<p style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo"><span style="font-variant-ligatures:no-common-ligatures">Variable: prc</span></p>
<p style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo"><span style="font-variant-ligatures:no-common-ligatures">Type: double</span></p>
<p style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo"><span style="font-variant-ligatures:no-common-ligatures">Total Size: 393984 bytes</span></p>
<p style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo"><span style="font-variant-ligatures:no-common-ligatures">            49248 values</span></p>
<p style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo"><span style="font-variant-ligatures:no-common-ligatures">Number of Dimensions: 3</span></p>
<p style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo"><span style="font-variant-ligatures:no-common-ligatures">Dimensions and sizes:<span class="m_-3625448695840246213Apple-tab-span" style="white-space:pre-wrap">        </span>[time | 1368] x [lat | 4] x [lon | 9]</span></p>
<p style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo"><span style="font-variant-ligatures:no-common-ligatures">Coordinates: </span></p>
<p style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo"><span style="font-variant-ligatures:no-common-ligatures">            time: [ 380..41987]</span></p>
<p style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo"><span style="font-variant-ligatures:no-common-ligatures">            lat: [3.75..5.25]</span></p>
<p style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo"><span style="font-variant-ligatures:no-common-ligatures">            lon: [36.75..40.75]</span></p>
<p style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo"><span style="font-variant-ligatures:no-common-ligatures">Number Of Attributes: 5</span></p>
<p style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo"><span style="font-variant-ligatures:no-common-ligatures">  correlation_decay_distance :<span class="m_-3625448695840246213Apple-tab-span" style="white-space:pre-wrap">        </span> 450</span></p>
<p style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo"><span style="font-variant-ligatures:no-common-ligatures">  long_name :<span class="m_-3625448695840246213Apple-tab-span" style="white-space:pre-wrap">        </span>precipitation</span></p>
<p style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo"><span style="font-variant-ligatures:no-common-ligatures">  units :<span class="m_-3625448695840246213Apple-tab-span" style="white-space:pre-wrap">        </span>mm/month</span></p>
<p style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo"><span style="font-variant-ligatures:no-common-ligatures">  missing_value :<span class="m_-3625448695840246213Apple-tab-span" style="white-space:pre-wrap">        </span>9.96920996839e+36</span></p>
<p style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo"><span style="font-variant-ligatures:no-common-ligatures">  _FillValue :<span class="m_-3625448695840246213Apple-tab-span" style="white-space:pre-wrap">        </span>-999</span></p><span class="">
<p style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo;min-height:13px"><span style="font-variant-ligatures:no-common-ligatures"></span><br></p>
<p style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo"><span style="font-variant-ligatures:no-common-ligatures">Variable: spi</span></p>
<p style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo"><span style="font-variant-ligatures:no-common-ligatures">Type: double</span></p>
<p style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo"><span style="font-variant-ligatures:no-common-ligatures">Total Size: 3151872 bytes</span></p>
<p style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo"><span style="font-variant-ligatures:no-common-ligatures">            393984 values</span></p>
<p style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo"><span style="font-variant-ligatures:no-common-ligatures">Number of Dimensions: 4</span></p>
<p style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo"><span style="font-variant-ligatures:no-common-ligatures">Dimensions and sizes:<span class="m_-3625448695840246213Apple-tab-span" style="white-space:pre-wrap">        </span>[len | 8] x [time | 1368] x [lat | 4] x [lon | 9]</span></p>
<p style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo"><span style="font-variant-ligatures:no-common-ligatures">Coordinates: </span></p>
<p style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo"><span style="font-variant-ligatures:no-common-ligatures">            len: [1..36]</span></p>
<p style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo"><span style="font-variant-ligatures:no-common-ligatures">            time: [ 380..41987]</span></p>
<p style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo"><span style="font-variant-ligatures:no-common-ligatures">            lat: [3.75..5.25]</span></p>
<p style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo"><span style="font-variant-ligatures:no-common-ligatures">            lon: [36.75..40.75]</span></p>
<p style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo"><span style="font-variant-ligatures:no-common-ligatures">Number Of Attributes: 2</span></p>
<p style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo"><span style="font-variant-ligatures:no-common-ligatures">  long_name :<span class="m_-3625448695840246213Apple-tab-span" style="white-space:pre-wrap">        </span>SPI</span></p>
<p style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo"><span style="font-variant-ligatures:no-common-ligatures">  _FillValue :<span class="m_-3625448695840246213Apple-tab-span" style="white-space:pre-wrap">        </span>-999</span></p>
</span><p style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo"><span style="font-variant-ligatures:no-common-ligatures"><font color="#0433ff">fatal:Number of subscripts do not match number of dimensions of variable,(2) Subscripts used, (3) Subscripts expected</font></span></p>
<p style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo"><span style="font-variant-ligatures:no-common-ligatures"><font color="#0433ff">fatal:[&quot;Execute.c&quot;:8640]:<wbr>Execute: Error occurred at or near line 5902 in file $NCARG_ROOT/lib/ncarg/<wbr>nclscripts/csm/gsn_csm.ncl</font></span></p>
<p style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo;min-height:13px"><span style="font-variant-ligatures:no-common-ligatures"></span><br></p>
<p style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo"><span style="font-variant-ligatures:no-common-ligatures">fatal:[&quot;Execute.c&quot;:8640]:<wbr>Execute: Error occurred at or near line 72 in file dawitspiscript.ncl</span></p><div><br></div><div>Thank you for your support</div><div><br></div><div>Dawit</div><div><br></div><div>==============================<wbr>==============================<wbr>==============================<wbr>====================</div><div><div class="h5"><div><br></div><div><br></div><div> </div><div><div><blockquote type="cite"><div>On Apr 10, 2017, at 4:11 PM, Dennis Shea &lt;<a href="mailto:shea@ucar.edu" target="_blank">shea@ucar.edu</a>&gt; wrote:</div><br class="m_-3625448695840246213Apple-interchange-newline"><div><div dir="ltr"><div><div>Generally, i s recommended that you write a script with NCL commands; then execute the script.<br><br></div>  %&gt; ncl dawit.ncl<br><br></div>Why?  NCL&#39;s interactive environment is not as &#39;friendly&#39; in error recovery as in other tools.  <br></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Apr 10, 2017 at 7:05 AM, Guido Cioni <span dir="ltr">&lt;<a href="mailto:guidocioni@gmail.com" target="_blank">guidocioni@gmail.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 style="word-wrap:break-word">Sorry I didn&#39;t follow the whole conversation so you would have to send me the entire script for me to check...<div><br></div><div>What do you mean by &quot;failed to return the graph&quot;? You get no error or warning and no file is produced?</div><div>Try with the x11 workstation before using the postscript one so that you can easily debug any issue in the script beforehand. </div><div><span class="m_-3625448695840246213HOEnZb"><font color="#888888"><br><div>
<div style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><br class="m_-3625448695840246213m_-4961508701108069603Apple-interchange-newline">Guido Cioni</div><div style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><a href="http://guidocioni.altervista/" target="_blank">http://guidocioni.altervista</a>.o<wbr>rg</div>

</div></font></span><div><div class="m_-3625448695840246213h5">
<br><div><blockquote type="cite"><div>On 10 Apr 2017, at 15:01, Dawit Abebe &lt;<a href="mailto:dawit.kan@gmail.com" target="_blank">dawit.kan@gmail.com</a>&gt; wrote:</div><br class="m_-3625448695840246213m_-4961508701108069603Apple-interchange-newline"><div><div style="word-wrap:break-word"><div>Dear Guido,</div><div><br></div><div>What a shame of myself! </div><div><br></div><div>Thanks Guido. I did the correction and went through smoothly but the last command failed to return the graph (4 one side and 3 on the other side in one plot). What do you that I missed to complete this?</div><div><br></div><div>Thanks again</div><div>…………………………………... </div><div><br></div><div><div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo"><span style="font-variant-ligatures:no-common-ligatures">ncl 109&gt; do k=0,klen-1                                                            </span></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo"><span style="font-variant-ligatures:no-common-ligatures">ncl 110&gt;    res@xyLineColors = xyLineColors(k)                                    </span></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo"><span style="font-variant-ligatures:no-common-ligatures">ncl 111&gt;    res@gsnCenterString = &quot;len=&quot;+klen(k)</span></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo"><span style="font-variant-ligatures:no-common-ligatures">ncl 112&gt;    plt(k) = gsn_csm_xy (wks, yrfrac, spi(k,:), res)</span></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo"><span style="font-variant-ligatures:no-common-ligatures">ncl 113&gt; end do</span></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo"><span style="font-variant-ligatures:no-common-ligatures">ncl 114&gt; resP   = True</span></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo"><span style="font-variant-ligatures:no-common-ligatures">ncl 115&gt; resP@txString = &quot;SPI: Southern Ethiopia 1901-2014&quot;</span></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo"><span style="font-variant-ligatures:no-common-ligatures">ncl 116&gt; resP@gsnMaximize = True</span></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo"><span style="font-variant-ligatures:no-common-ligatures">ncl 117&gt; gsn_panel (wks,plt,(/4,2/), resP)</span></div><div><br></div></div><div>………………….</div><div><br></div><br><div><blockquote type="cite"><div>On Apr 10, 2017, at 3:39 PM, Guido Cioni &lt;<a href="mailto:guidocioni@gmail.com" target="_blank">guidocioni@gmail.com</a>&gt; wrote:</div><br class="m_-3625448695840246213m_-4961508701108069603Apple-interchange-newline"><div><div style="word-wrap:break-word">There is a typo in your code. It should be xyLineColors and not xyLineColours.<div>See here <a href="https://www.ncl.ucar.edu/Document/Graphics/Resources/xy.shtml" target="_blank">https://www.ncl.ucar.edu/<wbr>Document/Graphics/Resources/xy<wbr>.shtml</a>.</div><div><br></div><div>(Look closely at the warning/error messages that you are receiving: most of the times they can help you a lot in identifying the problem)</div><div><br></div><div>Hope that helps<br><div><div>
<div style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><br class="m_-3625448695840246213m_-4961508701108069603Apple-interchange-newline">Guido Cioni</div><div style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><a href="http://guidocioni.altervista/" target="_blank">http://guidocioni.altervista</a>.o<wbr>rg</div>

</div>
<br><div><blockquote type="cite"><div>On 10 Apr 2017, at 14:26, Dawit Abebe &lt;<a href="mailto:dawit.kan@gmail.com" target="_blank">dawit.kan@gmail.com</a>&gt; wrote:</div><br class="m_-3625448695840246213m_-4961508701108069603Apple-interchange-newline"><div><div style="word-wrap:break-word">Dear Dennis and all<div><br></div><div>I’m sorry for bothering you all but tried to do xy plot of spi following example 1but failed. You hinted in your email below that I should change the spi array but could not figure out how to do thi. I tried the following but could not able to continue after some step. I have gone through the documentations and examples but failed to fix my problem. </div><div><br></div><div>………………………………</div><div><br></div><div><div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo"><span style="font-variant-ligatures:no-common-ligatures">Variable: spi</span></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo"><span style="font-variant-ligatures:no-common-ligatures">Type: double</span></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo"><span style="font-variant-ligatures:no-common-ligatures">Total Size: 3151872 bytes</span></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo"><span style="font-variant-ligatures:no-common-ligatures">            393984 values</span></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo"><span style="font-variant-ligatures:no-common-ligatures">Number of Dimensions: 4</span></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo"><span style="font-variant-ligatures:no-common-ligatures">Dimensions and sizes:<span class="m_-3625448695840246213m_-4961508701108069603Apple-tab-span" style="white-space:pre-wrap">        </span>[len | 8] x [time | 1368] x [lat | 4] x [lon | 9]</span></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo"><span style="font-variant-ligatures:no-common-ligatures">Coordinates: </span></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo"><span style="font-variant-ligatures:no-common-ligatures">            len: [1..36]</span></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo"><span style="font-variant-ligatures:no-common-ligatures">            time: [ 380..41987]</span></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo"><span style="font-variant-ligatures:no-common-ligatures">            lat: [3.75..5.25]</span></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo"><span style="font-variant-ligatures:no-common-ligatures">            lon: [36.75..40.75]</span></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo"><span style="font-variant-ligatures:no-common-ligatures">Number Of Attributes: 2</span></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo"><span style="font-variant-ligatures:no-common-ligatures">  long_name :<span class="m_-3625448695840246213m_-4961508701108069603Apple-tab-span" style="white-space:pre-wrap">        </span>SPI</span></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo"><span style="font-variant-ligatures:no-common-ligatures">  _FillValue :<span class="m_-3625448695840246213m_-4961508701108069603Apple-tab-span" style="white-space:pre-wrap">        </span>-999</span></div><div><br></div><div><b>Plot Parameter</b></div><div style="margin:0px;line-height:normal"><span style="font-variant-ligatures:no-common-ligatures"><font face="Verdana"><span style="font-size:11px">ncl 55&gt; yyyymm = f-&gt;time</span></font></span></div><div><font face="Verdana"><span style="font-size:11px">ncl 56&gt; yyyymm = yyyymm/100yrStrt = 1901   </span></font></div><div><div style="margin:0px;font-size:11px;line-height:normal"><span style="font-variant-ligatures:no-common-ligatures"><font face="Verdana">ncl 57&gt; yrLast = 2014</font></span></div><div style="margin:0px;font-size:11px;line-height:normal"><span style="font-variant-ligatures:no-common-ligatures"><font face="Verdana">ncl 58&gt; nyear  = yrLast-yrStrt+1</font></span></div><div style="margin:0px;font-size:11px;line-height:normal"><span style="font-variant-ligatures:no-common-ligatures"><font face="Verdana">ncl 59&gt; yyyymm = yyyymm_time(yrStrt, yrLast, &quot;integer&quot;)</font></span></div><div style="margin:0px;font-size:11px;line-height:normal"><span style="font-variant-ligatures:no-common-ligatures"><font face="Verdana">ncl 60&gt; yrfrac = (/yyyymm_to_yyyyfrac(yyyymm, 0.0)/)</font></span></div><div style="margin:0px;font-size:11px;line-height:normal"><span style="font-variant-ligatures:no-common-ligatures"><font face="Verdana">ncl 61&gt; </font></span></div><div style="margin:0px;font-size:11px;line-height:normal"><span style="font-variant-ligatures:no-common-ligatures"><font face="Verdana">ncl 62&gt; wks        = gsn_open_wks (&quot;ps&quot;,&quot;spi&quot;)</font></span></div><div style="margin:0px;font-size:11px;line-height:normal"><span style="font-variant-ligatures:no-common-ligatures"><font face="Verdana">ncl 63&gt; res        = True</font></span></div><div style="margin:0px;font-size:11px;line-height:normal"><span style="font-variant-ligatures:no-common-ligatures"><font face="Verdana">ncl 64&gt; res@gsnDraw=False</font></span></div><div style="margin:0px;font-size:11px;line-height:normal"><span style="font-variant-ligatures:no-common-ligatures"><font face="Verdana">ncl 65&gt; res@gsnFrame=False</font></span></div><div style="margin:0px;font-size:11px;line-height:normal"><span style="font-variant-ligatures:no-common-ligatures"><font face="Verdana">ncl 66&gt; res@vpHeightF = 0.4</font></span></div><div style="margin:0px;font-size:11px;line-height:normal"><span style="font-variant-ligatures:no-common-ligatures"><font face="Verdana">ncl 67&gt; res@vpWidthF  = 0.8</font></span></div><div style="margin:0px;font-size:11px;line-height:normal"><span style="font-variant-ligatures:no-common-ligatures"><font face="Verdana">ncl 68&gt; res@vpXF      = 0.1</font></span></div><div style="margin:0px;font-size:11px;line-height:normal"><span style="font-variant-ligatures:no-common-ligatures"><font face="Verdana">ncl 69&gt; </font></span></div><div style="margin:0px;font-size:11px;line-height:normal"><span style="font-variant-ligatures:no-common-ligatures"><font face="Verdana">ncl 70&gt; res@trYMinF   = -3.0</font></span></div><div style="margin:0px;font-size:11px;line-height:normal"><span style="font-variant-ligatures:no-common-ligatures"><font face="Verdana">ncl 71&gt; res@trYMaxF   =  3.0</font></span></div><div style="margin:0px;font-size:11px;line-height:normal"><span style="font-variant-ligatures:no-common-ligatures"><font face="Verdana">ncl 72&gt; res@gsnYRefLine = 0.0</font></span></div><div style="margin:0px;font-size:11px;line-height:normal"><span style="font-variant-ligatures:no-common-ligatures"><font face="Verdana">ncl 73&gt; res@xyMonoDashPattern = True</font></span></div><div style="margin:0px;font-size:11px;line-height:normal"><span style="font-variant-ligatures:no-common-ligatures"><font face="Verdana">ncl 74&gt; res@xyLineThicknessF  = 1</font></span></div><div style="margin:0px;font-size:11px;line-height:normal"><span style="font-variant-ligatures:no-common-ligatures"><font face="Verdana">ncl 75&gt; </font></span></div><div style="margin:0px;font-size:11px;line-height:normal"><span style="font-variant-ligatures:no-common-ligatures"><font face="Verdana">ncl 76&gt; plt = new (klen, &quot;graphic&quot;)</font></span></div><div style="margin:0px;font-size:11px;line-height:normal"><span style="font-variant-ligatures:no-common-ligatures"><font face="Verdana">ncl 77&gt; xyLineColors = (/&quot;black&quot;,&quot;red&quot;,&quot;blue&quot;,&quot;green&quot;<wbr>,&quot;brown&quot;,&quot;magenta&quot;,&quot;grape&quot;/)</font></span></div><div style="margin:0px;font-size:11px;line-height:normal"><span style="font-variant-ligatures:no-common-ligatures"><font face="Verdana">ncl 78&gt; do k=0,klen-1</font></span></div><div style="margin:0px;font-size:11px;line-height:normal"><span style="font-variant-ligatures:no-common-ligatures"><font face="Verdana">ncl 79&gt;    res@xyLineColours = xyLineColours(k)</font></span></div><div style="margin:0px;font-size:11px;line-height:normal"><span style="font-variant-ligatures:no-common-ligatures"><font face="Verdana">ncl 80&gt;    res@gsnCenterString = &quot;len=&quot;+klen(k)</font></span></div><div style="margin:0px;font-size:11px;line-height:normal"><span style="font-variant-ligatures:no-common-ligatures"><font face="Verdana">ncl 81&gt;    plt(k) = gsn_csm_xy (wks, yrfrac, spi(k,:), res)</font></span></div><div style="margin:0px;font-size:11px;line-height:normal"><span style="font-variant-ligatures:no-common-ligatures"><font face="Verdana">ncl 82&gt; end do</font></span></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo"><span style="font-variant-ligatures:no-common-ligatures"><font color="#ff2600">fatal:Undefined identifier: (xyLineColours) is undefined, can&#39;t continue</font></span></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo"><span style="font-variant-ligatures:no-common-ligatures">fatal:[&quot;Execute.c&quot;:8638]:Execu<wbr>te: Error occurred at or near line 79</span></div><div>……………………………</div></div></div><div><br></div><div>Thanks for your help</div><div><br></div><div>Dawit</div><div><span style="font-variant-ligatures:no-common-ligatures"><br></span></div><div><br></div><div><br></div><div>  <br><div><blockquote type="cite"><div>On Apr 6, 2017, at 9:00 PM, Dennis Shea &lt;<a href="mailto:shea@ucar.edu" target="_blank">shea@ucar.edu</a>&gt; wrote:</div><br class="m_-3625448695840246213m_-4961508701108069603Apple-interchange-newline"><div><div dir="ltr"><div><div><div><div><div>I do not understand the question.<br><br></div><a href="https://www.ncl.ucar.edu/Applications/" target="_blank">https://www.ncl.ucar.edu/Appli<wbr>cations/</a><br><br></div>Under Data Analysis: Click &#39;Standardized Precipitation Index&#39;<br><br></div>See: Example 1<br><br></div>You need to make the same array changes as in the print.<br><br></div>EG:     <span class="m_-3625448695840246213m_-4961508701108069603gmail-im"><span style="font-variant-ligatures:no-common-ligatures"><font color="#0433ff">spi(0,:,)</font></span></span>==&gt; <span class="m_-3625448695840246213m_-4961508701108069603gmail-im"><span style="font-variant-ligatures:no-common-ligatures"><font color="#0433ff">spi(0,:,nl,ml)</font></span></span><br><div> <br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Apr 6, 2017 at 1:22 AM, Dawit Abebe <span dir="ltr">&lt;<a href="mailto:dawit.kan@gmail.com" target="_blank">dawit.kan@gmail.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 style="word-wrap:break-word"><font color="#ff2600">Hello All,</font><div><br></div><div><font color="#ff2600">Thanks to Dennis, I am able to appreciate the power of NCL computing SPI. My next step is to produce </font></div><div><font color="#ff2600"> (1) a time serious XY plot for seasonal (SPI-3 ending in May and ending in November), annual (SPI-12) and multi annual (SPI-24 and SPI-36 months) and </font></div><div><font color="#ff2600">(2) Shape map of selected annual SPI with extremely sever drought events to examine the spatial characteristics of the drought.</font></div><div><font color="#ff2600"><br></font></div><div><font color="#ff2600">I’m not asking for help before I try by my self (thanks Dennis for the push to do this). However, I need a quick comment how I should proceed from the last step producing the SPI output, which was printing: </font></div><span><div><br></div><div><div style="margin:0px;font-size:11px;line-height:normal;font-family:menlo"><span style="font-variant-ligatures:no-common-ligatures"><font color="#0433ff">print(yyyymm+sprintf(&quot;%8.2f&quot;, prc(:,nl,ml))   \                                 </font></span></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:menlo"><span style="font-variant-ligatures:no-common-ligatures"><font color="#0433ff">                +sprintf(&quot;%8.2f&quot;, spi(0,:,nl,ml))+sprintf(&quot;%8.2f<wbr>&quot;, spi(1,:,nl,ml)) \  </font></span></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:menlo"><span style="font-variant-ligatures:no-common-ligatures"><font color="#0433ff">                +sprintf(&quot;%8.2f&quot;, spi(2,:,nl,ml))+sprintf(&quot;%8.2f<wbr>&quot;, spi(3,:,nl,ml)) \ </font></span></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:menlo"><span style="font-variant-ligatures:no-common-ligatures"><font color="#0433ff">                +sprintf(&quot;%8.2f&quot;, spi(4,:,nl,ml))+sprintf(&quot;%8.2f<wbr>&quot;, spi(5,:,nl,ml)) \  </font></span></div><span style="font-variant-ligatures:no-common-ligatures"><font color="#0433ff">                +sprintf(&quot;%8.2f&quot;, spi(6,:,nl,ml)))</font></span></div><div><span style="font-variant-ligatures:no-common-ligatures"><font color="#0433ff"><br></font></span></div></span><div><font color="#ff2600"><span style="font-variant-ligatures:no-common-ligatures">Do I need to go through this and then start with plot </span>parameters, or I can continue with plot parameters without the print command?</font></div><div><font color="#0433ff"><br></font></div><div><font color="#ff2600">Thank you so much</font></div><span class="m_-3625448695840246213m_-4961508701108069603HOEnZb"><font color="#888888"><div><font color="#ff2600">Dawit</font></div><div><font color="#0433ff"><br></font></div><div><font color="#0433ff"><br></font></div><div>  </div></font></span><div><div><blockquote type="cite"><span><div>On Apr 5, 2017, at 4:43 PM, Dennis Shea &lt;<a href="mailto:shea@ucar.edu" target="_blank">shea@ucar.edu</a>&gt; wrote:</div><br class="m_-3625448695840246213m_-4961508701108069603m_3985381471525000650Apple-interchange-newline"></span><div><div class="m_-3625448695840246213m_-4961508701108069603h5"><div><div dir="ltr"><div><div><div><div><div><div><div>The error mesages is telling you the exact problem:<br>   <span style="font-variant-ligatures:no-common-ligatures"><font color="#0433ff">fatal:Plus: Number of dimensions do not match, can&#39;t continue</font></span></div><div><br>spi has 4-dimensions:<br>   <span style="font-variant-ligatures:no-common-ligatures">[len | 7] x [time | 1368] x [lat | 4] x [lon | 9]<br><br></span></div><span style="font-variant-ligatures:no-common-ligatures">prc has 3-dimensions<br>   </span><span style="font-variant-ligatures:no-common-ligatures">[time | 1368] x [lat | 4] x [lon | 9]<br><br></span></div><span style="font-variant-ligatures:no-common-ligatures">yyyymm has 1-dimension<br>   </span><span style="font-variant-ligatures:no-common-ligatures"> </span><span style="font-variant-ligatures:no-common-ligatures">[time | 1368]<br><br>==============<br></span></div><span style="font-variant-ligatures:no-common-ligatures">The print statement you used was copied from:<br>    <a href="https://www.ncl.ucar.edu/Document/Functions/Built-in/dim_spi_n.shtml" target="_blank">https://www.ncl.ucar.edu/Docum<wbr>ent/Functions/Built-in/dim_spi<wbr>_n.shtml</a><br></span></div><div><span style="font-variant-ligatures:no-common-ligatures">    Example 2<br></span></div><div><span style="font-variant-ligatures:no-common-ligatures">That was working upon a single time series prc[*]<br></span></div><div><span style="font-variant-ligatures:no-common-ligatures"><br></span><font color="#0433ff"></font><span style="font-variant-ligatures:no-common-ligatures"><font color="#0433ff">  <br><br></font></span></div><span style="font-variant-ligatures:no-common-ligatures"><font color="#0433ff">You have a 4-D array. *You* must make the appropriate changed to handle your situation.<br></font></span></div><div><span style="font-variant-ligatures:no-common-ligatures"><font color="#0433ff">The eamples are not generic to all dimensions.<br></font></span></div><div><span style="font-variant-ligatures:no-common-ligatures"><font color="#0433ff"><br></font></span></div><div><span style="font-variant-ligatures:no-common-ligatures"><font color="#0433ff">   nlat=4<br></font></span></div><div><span style="font-variant-ligatures:no-common-ligatures"><font color="#0433ff">   mlon=9<br><br></font></span></div><span style="font-variant-ligatures:no-common-ligatures"><font color="#0433ff">   do nl=0,nlat-1<br></font></span></div><span style="font-variant-ligatures:no-common-ligatures"><font color="#0433ff">      do ml=0,mlon-1<br></font></span></div><span style="font-variant-ligatures:no-common-ligatures"><font color="#0433ff">       print(&quot;-----------------------<wbr>-------------------------&quot;)<br></font></span><div><div><div><div><div><div><div><div><br><div style="margin:0px;font-size:11px;line-height:normal;font-family:menlo"><span style="font-variant-ligatures:no-common-ligatures"><font color="#0433ff">print(yyyymm+sprintf(&quot;%8.2f&quot;, prc(:,nl,ml))   \                                 </font></span></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:menlo"><span style="font-variant-ligatures:no-common-ligatures"><font color="#0433ff">                +sprintf(&quot;%8.2f&quot;, spi(0,:,nl,ml))+sprintf(&quot;%8.2f<wbr>&quot;, spi(1,:,nl,ml)) \  </font></span></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:menlo"><span style="font-variant-ligatures:no-common-ligatures"><font color="#0433ff">                +sprintf(&quot;%8.2f&quot;, spi(2,:,nl,ml))+sprintf(&quot;%8.2f<wbr>&quot;, spi(3,:,nl,ml)) \ </font></span></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:menlo"><span style="font-variant-ligatures:no-common-ligatures"><font color="#0433ff">                +sprintf(&quot;%8.2f&quot;, spi(4,:,nl,ml))+sprintf(&quot;%8.2f<wbr>&quot;, spi(5,:,nl,ml)) \  </font></span></div>
<span style="font-variant-ligatures:no-common-ligatures"><font color="#0433ff">                +sprintf(&quot;%8.2f&quot;, spi(6,:,nl,ml)))<br><br></font></span></div><div><span style="font-variant-ligatures:no-common-ligatures"><font color="#0433ff">    end do<br></font></span></div><div><span style="font-variant-ligatures:no-common-ligatures"><font color="#0433ff">  en do<br></font></span></div></div></div></div></div></div></div></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Apr 5, 2017 at 2:20 AM, Dawit Abebe <span dir="ltr">&lt;<a href="mailto:dawit.kan@gmail.com" target="_blank">dawit.kan@gmail.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 style="word-wrap:break-word"><div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo"><span style="font-variant-ligatures:no-common-ligatures">Hello all,</span></div><div><br></div><div>Kindly help me to fix my problem with printing SPI. I pasted below first the return of printVarSummary(spi), which seems okay. However, my attempt to print  the output (text in blue) did not work.  What was wrong?</div><div><br></div><div>Greatly appreciate your help.</div><div><br></div><div>Dawit</div><div><br></div><div>…………………………………….</div><div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo"><span style="font-variant-ligatures:no-common-ligatures"><br></span></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo"><span style="font-variant-ligatures:no-common-ligatures">copy_VarCoords(prc,spi(0,:,:,:<wbr>))</span></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo"><span style="font-variant-ligatures:no-common-ligatures">spi@long_name = &quot;SPI&quot;</span></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo"><span style="font-variant-ligatures:no-common-ligatures">spi!0         = &quot;len&quot;</span></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo"><span style="font-variant-ligatures:no-common-ligatures">spi&amp;len       =  len</span></div><p style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo">



</p><div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo"><span style="font-variant-ligatures:no-common-ligatures">printVarSummary(spi)</span></div><div><br></div><div><br></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo"><span style="font-variant-ligatures:no-common-ligatures">Variable: spi</span></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo"><span style="font-variant-ligatures:no-common-ligatures">Type: double</span></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo"><span style="font-variant-ligatures:no-common-ligatures">Total Size: 2757888 bytes</span></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo"><span style="font-variant-ligatures:no-common-ligatures">            344736 values</span></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo"><span style="font-variant-ligatures:no-common-ligatures">Number of Dimensions: 4</span></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo"><span style="font-variant-ligatures:no-common-ligatures">Dimensions and sizes:<span class="m_-3625448695840246213m_-4961508701108069603m_3985381471525000650m_-3429062055612373153Apple-tab-span" style="white-space:pre-wrap">        </span>[len | 7] x [time | 1368] x [lat | 4] x [lon | 9]</span></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo"><span style="font-variant-ligatures:no-common-ligatures">Coordinates: </span></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo"><span style="font-variant-ligatures:no-common-ligatures">            len: [1..36]</span></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo"><span style="font-variant-ligatures:no-common-ligatures">            time: [ 380..41987]</span></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo"><span style="font-variant-ligatures:no-common-ligatures">            lat: [3.75..5.25]</span></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo"><span style="font-variant-ligatures:no-common-ligatures">            lon: [36.75..40.75]</span></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo"><span style="font-variant-ligatures:no-common-ligatures">Number Of Attributes: 2</span></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo"><span style="font-variant-ligatures:no-common-ligatures">  long_name :<span class="m_-3625448695840246213m_-4961508701108069603m_3985381471525000650m_-3429062055612373153Apple-tab-span" style="white-space:pre-wrap">        </span>SPI</span></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo"><span style="font-variant-ligatures:no-common-ligatures">  _FillValue :<span class="m_-3625448695840246213m_-4961508701108069603m_3985381471525000650m_-3429062055612373153Apple-tab-span" style="white-space:pre-wrap">        </span>-999</span></div><div><br></div><div><br></div><div><div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo"><span style="font-variant-ligatures:no-common-ligatures"><font color="#0433ff">yyyymm = cd_calendar(f-&gt;time, -1) </font></span></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo"><span style="font-variant-ligatures:no-common-ligatures"><font color="#0433ff"><br></font></span></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo"><span style="font-variant-ligatures:no-common-ligatures"><font color="#0433ff">print(yyyymm+sprintf(&quot;%8.2f&quot;, prc)   \                                 </font></span></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo"><span style="font-variant-ligatures:no-common-ligatures"><font color="#0433ff">                +sprintf(&quot;%8.2f&quot;, spi(0,:))+sprintf(&quot;%8.2f&quot;, spi(1,:)) \  </font></span></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo"><span style="font-variant-ligatures:no-common-ligatures"><font color="#0433ff">                +sprintf(&quot;%8.2f&quot;, spi(2,:))+sprintf(&quot;%8.2f&quot;, spi(3,:)) \ </font></span></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo"><span style="font-variant-ligatures:no-common-ligatures"><font color="#0433ff">                +sprintf(&quot;%8.2f&quot;, spi(4,:))+sprintf(&quot;%8.2f&quot;, spi(5,:)) \  </font></span></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo"><span style="font-variant-ligatures:no-common-ligatures"><font color="#0433ff">                +sprintf(&quot;%8.2f&quot;, spi(6,:)))                              </font></span></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo"><span style="font-variant-ligatures:no-common-ligatures"><font color="#0433ff">fatal:Plus: Number of dimensions do not match, can&#39;t continue</font></span></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo"><span style="font-variant-ligatures:no-common-ligatures"><font color="#0433ff">fatal:[&quot;Execute.c&quot;:8638]:Execu<wbr>te: Error occurred at or near line 37</font></span></div><div><br></div></div><div><br></div></div><br>______________________________<wbr>_________________<br>
ncl-talk mailing list<br>
<a href="mailto:ncl-talk@ucar.edu" target="_blank">ncl-talk@ucar.edu</a><br>
List instructions, subscriber options, unsubscribe:<br>
<a href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk" rel="noreferrer" target="_blank">http://mailman.ucar.edu/mailma<wbr>n/listinfo/ncl-talk</a><br>
<br></blockquote></div><br></div>
</div></div></div></blockquote></div><br></div></div></blockquote></div><br></div>
</div></blockquote></div><br></div></div>______________________________<wbr>_________________<br>ncl-talk mailing list<br><a href="mailto:ncl-talk@ucar.edu" target="_blank">ncl-talk@ucar.edu</a><br>List instructions, subscriber options, unsubscribe:<br><a href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk" target="_blank">http://mailman.ucar.edu/mailma<wbr>n/listinfo/ncl-talk</a><br></div></blockquote></div><br></div></div></div></div></blockquote></div><br></div></div></blockquote></div><br></div></div></div></div></blockquote></div><br></div>
</div></blockquote></div><br></div></div></div></div></blockquote></div><br></div>