<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">Dear Dennis,<div class=""><br class=""></div><div class="">Thanks for command lines below. I updated my script accordingly and made some adjustments based on error message particularly in</div><div class=""> <font color="#0433ff" class="">res@gsnCenterString = "len="+klen(k) </font>which returned an error of reading “keen” and when adjusted the command to "r<font color="#0433ff" class="">es@gsnCenterString = "klen="+len(k)”</font> the error message is no longer there. </div><div class=""><br class=""></div><div class="">However, I am not able to fix other two errors:</div><div class=""><br class=""></div><div class=""><p style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""><font color="#0433ff" class="">fatal:Subscript out of range, error in subscript #0</font></span></p>
<p style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""><font color="#0433ff" class="">fatal:An error occurred reading xyLineColors</font></span></p>
<p style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""><font color="#0433ff" class="">fatal:["Execute.c":8640]:Execute: Error occurred at or near line 68 in file da_spiscript.ncl</font></span></p><div class=""><br class=""></div></div><div class="">In the script I defined xyLineColours as follows: </div><div class=""><br class=""></div><div class=""><div class=""> <span class="Apple-tab-span" style="white-space:pre">        </span><font color="#0433ff" class="">plt = new (klen, "graphic")</font></div><div class=""><font color="#0433ff" class=""> <span class="Apple-tab-span" style="white-space:pre">        </span>xyLineColors = (/"black","red","blue","green","brown","magenta","purple”/)</font></div></div><div class=""><font color="#0433ff" class=""><br class=""></font></div><div class="">How should I handle this?</div><div class=""><br class=""></div><div class="">Thanks again for unreserved support.</div><div class=""><br class=""></div><div class="">Dawit</div><div class=""><br class=""></div><div class=""><br class=""></div><div class=""><br class=""></div><div class=""><div><blockquote type="cite" class=""><div class="">On Apr 12, 2017, at 5:43 AM, Dennis Shea <<a href="mailto:shea@ucar.edu" class="">shea@ucar.edu</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class=""><div class=""><div class=""><span class="gmail-im"><span style="font-variant-ligatures:no-common-ligatures" class="">SPI: [len | 8] x [time | 1368] x [lat | 4] x [lon | 9]<br class=""><br class=""></span></span></div><div class=""><span class="gmail-im"><span style="font-variant-ligatures:no-common-ligatures" class="">You must loop over lat and lon also<br class=""></span></span></div><div class=""><span class="gmail-im"><span style="font-variant-ligatures:no-common-ligatures" class=""><br class=""></span></span></div><span class="gmail-im"><span style="font-variant-ligatures:no-common-ligatures" class=""> do nl=0,nlat-1<br class=""></span></span></div><span class="gmail-im"><span style="font-variant-ligatures:no-common-ligatures" class=""> do ml=0,mlon-1<br class=""></span></span><div class=""><div class=""><span class="gmail-im"><span style="font-variant-ligatures:no-common-ligatures" class=""> do k=0,klen-1<br class=""> res@xyLineColors = xyLineColors(k)<br class=""> res@gsnCenterString = "len="+klen(k)<br class=""> plt(k) = gsn_csm_xy (wks,yrfrac,spi(k,:,nl,ml),res)<br class=""> end do<br class=""></span></span></div><div class=""><span class="gmail-im"><span style="font-variant-ligatures:no-common-ligatures" class=""> end do<br class=""></span></span></div><div class=""><span class="gmail-im"><span style="font-variant-ligatures:no-common-ligatures" class=""> end do<br class=""></span></span></div><div class=""><span class="gmail-im"><span style="font-variant-ligatures:no-common-ligatures" class=""><br class=""></span></span></div></div></div><div class="gmail_extra"><br class=""><div class="gmail_quote">On Tue, Apr 11, 2017 at 9:31 AM, Dawit Abebe <span dir="ltr" class=""><<a href="mailto:dawit.kan@gmail.com" target="_blank" class="">dawit.kan@gmail.com</a>></span> wrote:<br class=""><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word" class="">Dear All,<div class=""><br class=""></div><div class="">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 class=""><br class=""></div><div class=""><font color="#ff2600" class="">1. My script</font></div><div class=""><br class=""></div><div class=""><div class="">load "$NCARG_ROOT/lib/ncarg/<wbr class="">nclscripts/csm/gsn_code.ncl"</div><div class="">load "$NCARG_ROOT/lib/ncarg/<wbr class="">nclscripts/csm/gsn_csm.ncl"</div><div class="">load "$NCARG_ROOT/lib/ncarg/<wbr class="">nclscripts/csm/contributed.<wbr class="">ncl"</div><div class=""><br class=""></div><div class="">begin</div><div class=""><br class=""></div><div class=""> diri = "./"</div><div class=""> fili = "<a href="http://pre_1901_2014.nc/" target="_blank" class="">pre_1901_2014.nc</a>"</div><div class=""> f = addfile(diri+fili, "r")</div><div class=""><br class=""></div><div class=""> prc = f->pre</div><div class=""> prc@_FillValue = -999.0</div><div class=""> pmsg = prc@_FillValue</div><div class=""><br class=""></div><div class=""> printVarSummary(prc)</div><div class=""><span class="m_-3625448695840246213Apple-tab-span" style="white-space:pre-wrap">        </span>dimp = dimsizes(prc)</div><div class=""><span class="m_-3625448695840246213Apple-tab-span" style="white-space:pre-wrap">        </span>ntim = dimp(0)</div><div class=""><span class="m_-3625448695840246213Apple-tab-span" style="white-space:pre-wrap">        </span>nlat = dimp(1)</div><div class=""><span class="m_-3625448695840246213Apple-tab-span" style="white-space:pre-wrap">        </span>mlon = dimp(2)</div><div class=""><br class=""></div><div class=""><span class="m_-3625448695840246213Apple-tab-span" style="white-space:pre-wrap">        </span>len = (/1, 3, 6, 9, 12, 17, 24, 36/)</div><div class=""><span class="m_-3625448695840246213Apple-tab-span" style="white-space:pre-wrap">        </span>klen = dimsizes(len)</div><div class=""><br class=""></div><div class=""><span class="m_-3625448695840246213Apple-tab-span" style="white-space:pre-wrap">        </span>opt = True</div><div class=""><span class="m_-3625448695840246213Apple-tab-span" style="white-space:pre-wrap">        </span>spi = new((/klen,ntim,nlat,mlon/), typeof(prc), pmsg)</div><div class=""><br class=""></div><div class=""><span class="m_-3625448695840246213Apple-tab-span" style="white-space:pre-wrap">        </span>do k=0,klen-1</div><div class=""><span class="m_-3625448695840246213Apple-tab-span" style="white-space:pre-wrap">        </span> spi(k,:,:,:)= dim_spi_n(prc, len(k), True, 0)</div><div class=""><span class="m_-3625448695840246213Apple-tab-span" style="white-space:pre-wrap">        </span> end do</div><span class=""><div class=""><br class=""></div><div class=""><span class="m_-3625448695840246213Apple-tab-span" style="white-space:pre-wrap">        </span> copy_VarCoords(prc,spi(0,:,:,:<wbr class="">))</div><div class=""><span class="m_-3625448695840246213Apple-tab-span" style="white-space:pre-wrap">        </span> spi@long_name = "SPI"</div><div class=""><span class="m_-3625448695840246213Apple-tab-span" style="white-space:pre-wrap">        </span> spi!0 = "len"</div><div class=""><span class="m_-3625448695840246213Apple-tab-span" style="white-space:pre-wrap">        </span> spi&len = len</div><div class=""><span class="m_-3625448695840246213Apple-tab-span" style="white-space:pre-wrap">        </span> printVarSummary(spi)</div><div class=""><br class=""></div></span><div class=""> <span class="m_-3625448695840246213Apple-tab-span" style="white-space:pre-wrap">        </span>yyyymm = f->time</div><div class=""> <span class="m_-3625448695840246213Apple-tab-span" style="white-space:pre-wrap">        </span>year = yyyymm/100</div><div class=""> <span class="m_-3625448695840246213Apple-tab-span" style="white-space:pre-wrap">        </span>yrStrt = 1901</div><div class=""> <span class="m_-3625448695840246213Apple-tab-span" style="white-space:pre-wrap">        </span>yrLast = 2014</div><div class=""> <span class="m_-3625448695840246213Apple-tab-span" style="white-space:pre-wrap">        </span>nyear = yrLast-yrStrt+1</div><span class=""><div class=""> <span class="m_-3625448695840246213Apple-tab-span" style="white-space:pre-wrap">        </span>yyyymm = yyyymm_time(yrStrt, yrLast, "integer")</div></span><div class=""> <span class="m_-3625448695840246213Apple-tab-span" style="white-space:pre-wrap">        </span>yrfrac = (/ yyyymm_to_yyyyfrac(yyyymm, 0.0) /)</div><span class=""><div class=""><br class=""></div><div class=""><br class=""></div><div class=""> <span class="m_-3625448695840246213Apple-tab-span" style="white-space:pre-wrap">        </span>wks = gsn_open_wks ("ps","spi")</div></span><div class=""> <span class="m_-3625448695840246213Apple-tab-span" style="white-space:pre-wrap">        </span>res = True</div><div class=""> <span class="m_-3625448695840246213Apple-tab-span" style="white-space:pre-wrap">        </span>res@gsnDraw = False</div><div class=""> <span class="m_-3625448695840246213Apple-tab-span" style="white-space:pre-wrap">        </span>res@gsnFrame = False</div><div class=""> <span class="m_-3625448695840246213Apple-tab-span" style="white-space:pre-wrap">        </span>res@vpHeightF= 0.4</div><div class=""> <span class="m_-3625448695840246213Apple-tab-span" style="white-space:pre-wrap">        </span>res@vpWidthF = 0.8</div><div class=""> <span class="m_-3625448695840246213Apple-tab-span" style="white-space:pre-wrap">        </span>res@vpXF = 0.1</div><div class=""><br class=""></div><div class=""> <span class="m_-3625448695840246213Apple-tab-span" style="white-space:pre-wrap">        </span>res@trYMinF = -3.0</div><div class=""> <span class="m_-3625448695840246213Apple-tab-span" style="white-space:pre-wrap">        </span>res@trYMaxF = 3.0</div><div class=""> <span class="m_-3625448695840246213Apple-tab-span" style="white-space:pre-wrap">        </span>res@tmYLTickSpacingF = 0.5</div><div class=""> <span class="m_-3625448695840246213Apple-tab-span" style="white-space:pre-wrap">        </span>res@tmYLMinorPerMajor = 4</div><div class=""> <span class="m_-3625448695840246213Apple-tab-span" style="white-space:pre-wrap">        </span>res@gsnYRefLine = 0.0</div><div class=""> <span class="m_-3625448695840246213Apple-tab-span" style="white-space:pre-wrap">        </span>res@trXMinF = yrStrt</div><div class=""> <span class="m_-3625448695840246213Apple-tab-span" style="white-space:pre-wrap">        </span>res@trXMaxF = yrLast</div><div class=""> <span class="m_-3625448695840246213Apple-tab-span" style="white-space:pre-wrap">        </span>res@XBMode = "Manual"</div><div class=""> <span class="m_-3625448695840246213Apple-tab-span" style="white-space:pre-wrap">        </span>res@xyMonoDashPattern = True</div><div class=""> <span class="m_-3625448695840246213Apple-tab-span" style="white-space:pre-wrap">        </span>res@xyLineThicknessF = 1</div><div class=""><br class=""></div><div class=""> <span class="m_-3625448695840246213Apple-tab-span" style="white-space:pre-wrap">        </span>plt = new ( klen, "graphic")</div><div class=""> <span class="m_-3625448695840246213Apple-tab-span" style="white-space:pre-wrap">        </span>xyLineColors = (/"black","red","blue","green"<wbr class="">,"brown","magenta","purple"/)</div><div class=""><br class=""></div><div class=""> <span class="m_-3625448695840246213Apple-tab-span" style="white-space:pre-wrap">        </span>do k=0,klen-1</div><div class=""> res@xyLineColors = xyLineColors(k)</div><div class=""> res@gsnCenterString = "len="+klen(k)</div><div class=""> plt(k) = gsn_csm_xy (wks,yrfrac,spi(k,:,:,:),res)</div><div class=""> <span class="m_-3625448695840246213Apple-tab-span" style="white-space:pre-wrap">        </span>end do</div><div class=""><br class=""></div><div class=""> <span class="m_-3625448695840246213Apple-tab-span" style="white-space:pre-wrap">        </span>resP = True</div><div class=""> <span class="m_-3625448695840246213Apple-tab-span" style="white-space:pre-wrap">        </span>resP@gsnPanelMainString = "SPI: Southern Ethiopia (1901-2014)"</div><div class=""> <span class="m_-3625448695840246213Apple-tab-span" style="white-space:pre-wrap">        </span>resP@gsnPanelMainFont = "times-roman"</div><div class=""> <span class="m_-3625448695840246213Apple-tab-span" style="white-space:pre-wrap">        </span>resP@gsnMaximize = True</div><div class=""> <span class="m_-3625448695840246213Apple-tab-span" style="white-space:pre-wrap">        </span>gsn_panel(wks,plt,(/4,2/),<wbr class="">resP)</div><div class=""><br class=""></div><div class=""> <span class="m_-3625448695840246213Apple-tab-span" style="white-space:pre-wrap">        </span>res@gsnDraw = True</div><div class=""> <span class="m_-3625448695840246213Apple-tab-span" style="white-space:pre-wrap">        </span>res@gsnFrame = True</div><div class="">end</div><div class=""><br class=""></div></div><div class=""><font color="#ff2600" class="">2. Returns from the commands</font></div><div class=""><br class=""></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures:no-common-ligatures" class="">(my_ncl) Dagemawes-MacBook-Pro:~ dawitabebe$ ncl -Q dawitspiscript.ncl</span></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo; min-height: 13px;" class=""><span style="font-variant-ligatures:no-common-ligatures" class=""></span><br class=""></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures:no-common-ligatures" class="">Variable: prc</span></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures:no-common-ligatures" class="">Type: double</span></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures:no-common-ligatures" class="">Total Size: 393984 bytes</span></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures:no-common-ligatures" class=""> 49248 values</span></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures:no-common-ligatures" class="">Number of Dimensions: 3</span></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures:no-common-ligatures" class="">Dimensions and sizes:<span class="m_-3625448695840246213Apple-tab-span" style="white-space:pre-wrap">        </span>[time | 1368] x [lat | 4] x [lon | 9]</span></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures:no-common-ligatures" class="">Coordinates: </span></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures:no-common-ligatures" class=""> time: [ 380..41987]</span></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures:no-common-ligatures" class=""> lat: [3.75..5.25]</span></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures:no-common-ligatures" class=""> lon: [36.75..40.75]</span></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures:no-common-ligatures" class="">Number Of Attributes: 5</span></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures:no-common-ligatures" class=""> correlation_decay_distance :<span class="m_-3625448695840246213Apple-tab-span" style="white-space:pre-wrap">        </span> 450</span></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures:no-common-ligatures" class=""> long_name :<span class="m_-3625448695840246213Apple-tab-span" style="white-space:pre-wrap">        </span>precipitation</span></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures:no-common-ligatures" class=""> units :<span class="m_-3625448695840246213Apple-tab-span" style="white-space:pre-wrap">        </span>mm/month</span></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures:no-common-ligatures" class=""> missing_value :<span class="m_-3625448695840246213Apple-tab-span" style="white-space:pre-wrap">        </span>9.96920996839e+36</span></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures:no-common-ligatures" class=""> _FillValue :<span class="m_-3625448695840246213Apple-tab-span" style="white-space:pre-wrap">        </span>-999</span></div><span class=""><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo; min-height: 13px;" class=""><span style="font-variant-ligatures:no-common-ligatures" class=""></span><br class=""></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures:no-common-ligatures" class="">Variable: spi</span></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures:no-common-ligatures" class="">Type: double</span></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures:no-common-ligatures" class="">Total Size: 3151872 bytes</span></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures:no-common-ligatures" class=""> 393984 values</span></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures:no-common-ligatures" class="">Number of Dimensions: 4</span></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures:no-common-ligatures" class="">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></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures:no-common-ligatures" class="">Coordinates: </span></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures:no-common-ligatures" class=""> len: [1..36]</span></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures:no-common-ligatures" class=""> time: [ 380..41987]</span></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures:no-common-ligatures" class=""> lat: [3.75..5.25]</span></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures:no-common-ligatures" class=""> lon: [36.75..40.75]</span></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures:no-common-ligatures" class="">Number Of Attributes: 2</span></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures:no-common-ligatures" class=""> long_name :<span class="m_-3625448695840246213Apple-tab-span" style="white-space:pre-wrap">        </span>SPI</span></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures:no-common-ligatures" class=""> _FillValue :<span class="m_-3625448695840246213Apple-tab-span" style="white-space:pre-wrap">        </span>-999</span></div>
</span><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures:no-common-ligatures" class=""><font color="#0433ff" class="">fatal:Number of subscripts do not match number of dimensions of variable,(2) Subscripts used, (3) Subscripts expected</font></span></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures:no-common-ligatures" class=""><font color="#0433ff" class="">fatal:["Execute.c":8640]:<wbr class="">Execute: Error occurred at or near line 5902 in file $NCARG_ROOT/lib/ncarg/<wbr class="">nclscripts/csm/gsn_csm.ncl</font></span></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo; min-height: 13px;" class=""><span style="font-variant-ligatures:no-common-ligatures" class=""></span><br class=""></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures:no-common-ligatures" class="">fatal:["Execute.c":8640]:<wbr class="">Execute: Error occurred at or near line 72 in file dawitspiscript.ncl</span></div><div class=""><br class=""></div><div class="">Thank you for your support</div><div class=""><br class=""></div><div class="">Dawit</div><div class=""><br class=""></div><div class="">==============================<wbr class="">==============================<wbr class="">==============================<wbr class="">====================</div><div class=""><div class="h5"><div class=""><br class=""></div><div class=""><br class=""></div><div class=""> </div><div class=""><div class=""><blockquote type="cite" class=""><div class="">On Apr 10, 2017, at 4:11 PM, Dennis Shea <<a href="mailto:shea@ucar.edu" target="_blank" class="">shea@ucar.edu</a>> wrote:</div><br class="m_-3625448695840246213Apple-interchange-newline"><div class=""><div dir="ltr" class=""><div class=""><div class="">Generally, i s recommended that you write a script with NCL commands; then execute the script.<br class=""><br class=""></div> %> ncl dawit.ncl<br class=""><br class=""></div>Why? NCL's interactive environment is not as 'friendly' in error recovery as in other tools. <br class=""></div><div class="gmail_extra"><br class=""><div class="gmail_quote">On Mon, Apr 10, 2017 at 7:05 AM, Guido Cioni <span dir="ltr" class=""><<a href="mailto:guidocioni@gmail.com" target="_blank" class="">guidocioni@gmail.com</a>></span> wrote:<br class=""><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word" class="">Sorry I didn't follow the whole conversation so you would have to send me the entire script for me to check...<div class=""><br class=""></div><div class="">What do you mean by "failed to return the graph"? You get no error or warning and no file is produced?</div><div class="">Try with the x11 workstation before using the postscript one so that you can easily debug any issue in the script beforehand. </div><div class=""><span class="m_-3625448695840246213HOEnZb"><font color="#888888" class=""><br class=""><div class="">
<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" class=""><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" class=""><a href="http://guidocioni.altervista/" target="_blank" class="">http://guidocioni.altervista</a>.o<wbr class="">rg</div>
</div></font></span><div class=""><div class="m_-3625448695840246213h5">
<br class=""><div class=""><blockquote type="cite" class=""><div class="">On 10 Apr 2017, at 15:01, Dawit Abebe <<a href="mailto:dawit.kan@gmail.com" target="_blank" class="">dawit.kan@gmail.com</a>> wrote:</div><br class="m_-3625448695840246213m_-4961508701108069603Apple-interchange-newline"><div class=""><div style="word-wrap:break-word" class=""><div class="">Dear Guido,</div><div class=""><br class=""></div><div class="">What a shame of myself! </div><div class=""><br class=""></div><div class="">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 class=""><br class=""></div><div class="">Thanks again</div><div class="">…………………………………... </div><div class=""><br class=""></div><div class=""><div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo" class=""><span style="font-variant-ligatures:no-common-ligatures" class="">ncl 109> do k=0,klen-1 </span></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo" class=""><span style="font-variant-ligatures:no-common-ligatures" class="">ncl 110> res@xyLineColors = xyLineColors(k) </span></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo" class=""><span style="font-variant-ligatures:no-common-ligatures" class="">ncl 111> res@gsnCenterString = "len="+klen(k)</span></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo" class=""><span style="font-variant-ligatures:no-common-ligatures" class="">ncl 112> 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" class=""><span style="font-variant-ligatures:no-common-ligatures" class="">ncl 113> end do</span></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo" class=""><span style="font-variant-ligatures:no-common-ligatures" class="">ncl 114> resP = True</span></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo" class=""><span style="font-variant-ligatures:no-common-ligatures" class="">ncl 115> resP@txString = "SPI: Southern Ethiopia 1901-2014"</span></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo" class=""><span style="font-variant-ligatures:no-common-ligatures" class="">ncl 116> resP@gsnMaximize = True</span></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo" class=""><span style="font-variant-ligatures:no-common-ligatures" class="">ncl 117> gsn_panel (wks,plt,(/4,2/), resP)</span></div><div class=""><br class=""></div></div><div class="">………………….</div><div class=""><br class=""></div><br class=""><div class=""><blockquote type="cite" class=""><div class="">On Apr 10, 2017, at 3:39 PM, Guido Cioni <<a href="mailto:guidocioni@gmail.com" target="_blank" class="">guidocioni@gmail.com</a>> wrote:</div><br class="m_-3625448695840246213m_-4961508701108069603Apple-interchange-newline"><div class=""><div style="word-wrap:break-word" class="">There is a typo in your code. It should be xyLineColors and not xyLineColours.<div class="">See here <a href="https://www.ncl.ucar.edu/Document/Graphics/Resources/xy.shtml" target="_blank" class="">https://www.ncl.ucar.edu/<wbr class="">Document/Graphics/Resources/xy<wbr class="">.shtml</a>.</div><div class=""><br class=""></div><div class="">(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 class=""><br class=""></div><div class="">Hope that helps<br class=""><div class=""><div class="">
<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" class=""><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" class=""><a href="http://guidocioni.altervista/" target="_blank" class="">http://guidocioni.altervista</a>.o<wbr class="">rg</div>
</div>
<br class=""><div class=""><blockquote type="cite" class=""><div class="">On 10 Apr 2017, at 14:26, Dawit Abebe <<a href="mailto:dawit.kan@gmail.com" target="_blank" class="">dawit.kan@gmail.com</a>> wrote:</div><br class="m_-3625448695840246213m_-4961508701108069603Apple-interchange-newline"><div class=""><div style="word-wrap:break-word" class="">Dear Dennis and all<div class=""><br class=""></div><div class="">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 class=""><br class=""></div><div class="">………………………………</div><div class=""><br class=""></div><div class=""><div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo" class=""><span style="font-variant-ligatures:no-common-ligatures" class="">Variable: spi</span></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo" class=""><span style="font-variant-ligatures:no-common-ligatures" class="">Type: double</span></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo" class=""><span style="font-variant-ligatures:no-common-ligatures" class="">Total Size: 3151872 bytes</span></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo" class=""><span style="font-variant-ligatures:no-common-ligatures" class=""> 393984 values</span></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo" class=""><span style="font-variant-ligatures:no-common-ligatures" class="">Number of Dimensions: 4</span></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo" class=""><span style="font-variant-ligatures:no-common-ligatures" class="">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" class=""><span style="font-variant-ligatures:no-common-ligatures" class="">Coordinates: </span></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo" class=""><span style="font-variant-ligatures:no-common-ligatures" class=""> len: [1..36]</span></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo" class=""><span style="font-variant-ligatures:no-common-ligatures" class=""> time: [ 380..41987]</span></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo" class=""><span style="font-variant-ligatures:no-common-ligatures" class=""> lat: [3.75..5.25]</span></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo" class=""><span style="font-variant-ligatures:no-common-ligatures" class=""> lon: [36.75..40.75]</span></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo" class=""><span style="font-variant-ligatures:no-common-ligatures" class="">Number Of Attributes: 2</span></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo" class=""><span style="font-variant-ligatures:no-common-ligatures" class=""> 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" class=""><span style="font-variant-ligatures:no-common-ligatures" class=""> _FillValue :<span class="m_-3625448695840246213m_-4961508701108069603Apple-tab-span" style="white-space:pre-wrap">        </span>-999</span></div><div class=""><br class=""></div><div class=""><b class="">Plot Parameter</b></div><div style="margin:0px;line-height:normal" class=""><span style="font-variant-ligatures:no-common-ligatures" class=""><font face="Verdana" class=""><span style="font-size:11px" class="">ncl 55> yyyymm = f->time</span></font></span></div><div class=""><font face="Verdana" class=""><span style="font-size:11px" class="">ncl 56> yyyymm = yyyymm/100yrStrt = 1901 </span></font></div><div class=""><div style="margin:0px;font-size:11px;line-height:normal" class=""><span style="font-variant-ligatures:no-common-ligatures" class=""><font face="Verdana" class="">ncl 57> yrLast = 2014</font></span></div><div style="margin:0px;font-size:11px;line-height:normal" class=""><span style="font-variant-ligatures:no-common-ligatures" class=""><font face="Verdana" class="">ncl 58> nyear = yrLast-yrStrt+1</font></span></div><div style="margin:0px;font-size:11px;line-height:normal" class=""><span style="font-variant-ligatures:no-common-ligatures" class=""><font face="Verdana" class="">ncl 59> yyyymm = yyyymm_time(yrStrt, yrLast, "integer")</font></span></div><div style="margin:0px;font-size:11px;line-height:normal" class=""><span style="font-variant-ligatures:no-common-ligatures" class=""><font face="Verdana" class="">ncl 60> yrfrac = (/yyyymm_to_yyyyfrac(yyyymm, 0.0)/)</font></span></div><div style="margin:0px;font-size:11px;line-height:normal" class=""><span style="font-variant-ligatures:no-common-ligatures" class=""><font face="Verdana" class="">ncl 61> </font></span></div><div style="margin:0px;font-size:11px;line-height:normal" class=""><span style="font-variant-ligatures:no-common-ligatures" class=""><font face="Verdana" class="">ncl 62> wks = gsn_open_wks ("ps","spi")</font></span></div><div style="margin:0px;font-size:11px;line-height:normal" class=""><span style="font-variant-ligatures:no-common-ligatures" class=""><font face="Verdana" class="">ncl 63> res = True</font></span></div><div style="margin:0px;font-size:11px;line-height:normal" class=""><span style="font-variant-ligatures:no-common-ligatures" class=""><font face="Verdana" class="">ncl 64> res@gsnDraw=False</font></span></div><div style="margin:0px;font-size:11px;line-height:normal" class=""><span style="font-variant-ligatures:no-common-ligatures" class=""><font face="Verdana" class="">ncl 65> res@gsnFrame=False</font></span></div><div style="margin:0px;font-size:11px;line-height:normal" class=""><span style="font-variant-ligatures:no-common-ligatures" class=""><font face="Verdana" class="">ncl 66> res@vpHeightF = 0.4</font></span></div><div style="margin:0px;font-size:11px;line-height:normal" class=""><span style="font-variant-ligatures:no-common-ligatures" class=""><font face="Verdana" class="">ncl 67> res@vpWidthF = 0.8</font></span></div><div style="margin:0px;font-size:11px;line-height:normal" class=""><span style="font-variant-ligatures:no-common-ligatures" class=""><font face="Verdana" class="">ncl 68> res@vpXF = 0.1</font></span></div><div style="margin:0px;font-size:11px;line-height:normal" class=""><span style="font-variant-ligatures:no-common-ligatures" class=""><font face="Verdana" class="">ncl 69> </font></span></div><div style="margin:0px;font-size:11px;line-height:normal" class=""><span style="font-variant-ligatures:no-common-ligatures" class=""><font face="Verdana" class="">ncl 70> res@trYMinF = -3.0</font></span></div><div style="margin:0px;font-size:11px;line-height:normal" class=""><span style="font-variant-ligatures:no-common-ligatures" class=""><font face="Verdana" class="">ncl 71> res@trYMaxF = 3.0</font></span></div><div style="margin:0px;font-size:11px;line-height:normal" class=""><span style="font-variant-ligatures:no-common-ligatures" class=""><font face="Verdana" class="">ncl 72> res@gsnYRefLine = 0.0</font></span></div><div style="margin:0px;font-size:11px;line-height:normal" class=""><span style="font-variant-ligatures:no-common-ligatures" class=""><font face="Verdana" class="">ncl 73> res@xyMonoDashPattern = True</font></span></div><div style="margin:0px;font-size:11px;line-height:normal" class=""><span style="font-variant-ligatures:no-common-ligatures" class=""><font face="Verdana" class="">ncl 74> res@xyLineThicknessF = 1</font></span></div><div style="margin:0px;font-size:11px;line-height:normal" class=""><span style="font-variant-ligatures:no-common-ligatures" class=""><font face="Verdana" class="">ncl 75> </font></span></div><div style="margin:0px;font-size:11px;line-height:normal" class=""><span style="font-variant-ligatures:no-common-ligatures" class=""><font face="Verdana" class="">ncl 76> plt = new (klen, "graphic")</font></span></div><div style="margin:0px;font-size:11px;line-height:normal" class=""><span style="font-variant-ligatures:no-common-ligatures" class=""><font face="Verdana" class="">ncl 77> xyLineColors = (/"black","red","blue","green"<wbr class="">,"brown","magenta","grape"/)</font></span></div><div style="margin:0px;font-size:11px;line-height:normal" class=""><span style="font-variant-ligatures:no-common-ligatures" class=""><font face="Verdana" class="">ncl 78> do k=0,klen-1</font></span></div><div style="margin:0px;font-size:11px;line-height:normal" class=""><span style="font-variant-ligatures:no-common-ligatures" class=""><font face="Verdana" class="">ncl 79> res@xyLineColours = xyLineColours(k)</font></span></div><div style="margin:0px;font-size:11px;line-height:normal" class=""><span style="font-variant-ligatures:no-common-ligatures" class=""><font face="Verdana" class="">ncl 80> res@gsnCenterString = "len="+klen(k)</font></span></div><div style="margin:0px;font-size:11px;line-height:normal" class=""><span style="font-variant-ligatures:no-common-ligatures" class=""><font face="Verdana" class="">ncl 81> plt(k) = gsn_csm_xy (wks, yrfrac, spi(k,:), res)</font></span></div><div style="margin:0px;font-size:11px;line-height:normal" class=""><span style="font-variant-ligatures:no-common-ligatures" class=""><font face="Verdana" class="">ncl 82> end do</font></span></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo" class=""><span style="font-variant-ligatures:no-common-ligatures" class=""><font color="#ff2600" class="">fatal:Undefined identifier: (xyLineColours) is undefined, can't continue</font></span></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo" class=""><span style="font-variant-ligatures:no-common-ligatures" class="">fatal:["Execute.c":8638]:Execu<wbr class="">te: Error occurred at or near line 79</span></div><div class="">……………………………</div></div></div><div class=""><br class=""></div><div class="">Thanks for your help</div><div class=""><br class=""></div><div class="">Dawit</div><div class=""><span style="font-variant-ligatures:no-common-ligatures" class=""><br class=""></span></div><div class=""><br class=""></div><div class=""><br class=""></div><div class=""> <br class=""><div class=""><blockquote type="cite" class=""><div class="">On Apr 6, 2017, at 9:00 PM, Dennis Shea <<a href="mailto:shea@ucar.edu" target="_blank" class="">shea@ucar.edu</a>> wrote:</div><br class="m_-3625448695840246213m_-4961508701108069603Apple-interchange-newline"><div class=""><div dir="ltr" class=""><div class=""><div class=""><div class=""><div class=""><div class="">I do not understand the question.<br class=""><br class=""></div><a href="https://www.ncl.ucar.edu/Applications/" target="_blank" class="">https://www.ncl.ucar.edu/Appli<wbr class="">cations/</a><br class=""><br class=""></div>Under Data Analysis: Click 'Standardized Precipitation Index'<br class=""><br class=""></div>See: Example 1<br class=""><br class=""></div>You need to make the same array changes as in the print.<br class=""><br class=""></div>EG: <span class="m_-3625448695840246213m_-4961508701108069603gmail-im"><span style="font-variant-ligatures:no-common-ligatures" class=""><font color="#0433ff" class="">spi(0,:,)</font></span></span>==> <span class="m_-3625448695840246213m_-4961508701108069603gmail-im"><span style="font-variant-ligatures:no-common-ligatures" class=""><font color="#0433ff" class="">spi(0,:,nl,ml)</font></span></span><br class=""><div class=""> <br class=""></div></div><div class="gmail_extra"><br class=""><div class="gmail_quote">On Thu, Apr 6, 2017 at 1:22 AM, Dawit Abebe <span dir="ltr" class=""><<a href="mailto:dawit.kan@gmail.com" target="_blank" class="">dawit.kan@gmail.com</a>></span> wrote:<br class=""><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word" class=""><font color="#ff2600" class="">Hello All,</font><div class=""><br class=""></div><div class=""><font color="#ff2600" class="">Thanks to Dennis, I am able to appreciate the power of NCL computing SPI. My next step is to produce </font></div><div class=""><font color="#ff2600" class=""> (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 class=""><font color="#ff2600" class="">(2) Shape map of selected annual SPI with extremely sever drought events to examine the spatial characteristics of the drought.</font></div><div class=""><font color="#ff2600" class=""><br class=""></font></div><div class=""><font color="#ff2600" class="">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 class=""><div class=""><br class=""></div><div class=""><div style="margin:0px;font-size:11px;line-height:normal;font-family:menlo" class=""><span style="font-variant-ligatures:no-common-ligatures" class=""><font color="#0433ff" class="">print(yyyymm+sprintf("%8.2f", prc(:,nl,ml)) \ </font></span></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:menlo" class=""><span style="font-variant-ligatures:no-common-ligatures" class=""><font color="#0433ff" class=""> +sprintf("%8.2f", spi(0,:,nl,ml))+sprintf("%8.2f<wbr class="">", spi(1,:,nl,ml)) \ </font></span></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:menlo" class=""><span style="font-variant-ligatures:no-common-ligatures" class=""><font color="#0433ff" class=""> +sprintf("%8.2f", spi(2,:,nl,ml))+sprintf("%8.2f<wbr class="">", spi(3,:,nl,ml)) \ </font></span></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:menlo" class=""><span style="font-variant-ligatures:no-common-ligatures" class=""><font color="#0433ff" class=""> +sprintf("%8.2f", spi(4,:,nl,ml))+sprintf("%8.2f<wbr class="">", spi(5,:,nl,ml)) \ </font></span></div><span style="font-variant-ligatures:no-common-ligatures" class=""><font color="#0433ff" class=""> +sprintf("%8.2f", spi(6,:,nl,ml)))</font></span></div><div class=""><span style="font-variant-ligatures:no-common-ligatures" class=""><font color="#0433ff" class=""><br class=""></font></span></div></span><div class=""><font color="#ff2600" class=""><span style="font-variant-ligatures:no-common-ligatures" class="">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 class=""><font color="#0433ff" class=""><br class=""></font></div><div class=""><font color="#ff2600" class="">Thank you so much</font></div><span class="m_-3625448695840246213m_-4961508701108069603HOEnZb"><font color="#888888" class=""><div class=""><font color="#ff2600" class="">Dawit</font></div><div class=""><font color="#0433ff" class=""><br class=""></font></div><div class=""><font color="#0433ff" class=""><br class=""></font></div><div class=""> </div></font></span><div class=""><div class=""><blockquote type="cite" class=""><span class=""><div class="">On Apr 5, 2017, at 4:43 PM, Dennis Shea <<a href="mailto:shea@ucar.edu" target="_blank" class="">shea@ucar.edu</a>> wrote:</div><br class="m_-3625448695840246213m_-4961508701108069603m_3985381471525000650Apple-interchange-newline"></span><div class=""><div class="m_-3625448695840246213m_-4961508701108069603h5"><div class=""><div dir="ltr" class=""><div class=""><div class=""><div class=""><div class=""><div class=""><div class=""><div class="">The error mesages is telling you the exact problem:<br class=""> <span style="font-variant-ligatures:no-common-ligatures" class=""><font color="#0433ff" class="">fatal:Plus: Number of dimensions do not match, can't continue</font></span></div><div class=""><br class="">spi has 4-dimensions:<br class=""> <span style="font-variant-ligatures:no-common-ligatures" class="">[len | 7] x [time | 1368] x [lat | 4] x [lon | 9]<br class=""><br class=""></span></div><span style="font-variant-ligatures:no-common-ligatures" class="">prc has 3-dimensions<br class=""> </span><span style="font-variant-ligatures:no-common-ligatures" class="">[time | 1368] x [lat | 4] x [lon | 9]<br class=""><br class=""></span></div><span style="font-variant-ligatures:no-common-ligatures" class="">yyyymm has 1-dimension<br class=""> </span><span style="font-variant-ligatures:no-common-ligatures" class=""> </span><span style="font-variant-ligatures:no-common-ligatures" class="">[time | 1368]<br class=""><br class="">==============<br class=""></span></div><span style="font-variant-ligatures:no-common-ligatures" class="">The print statement you used was copied from:<br class=""> <a href="https://www.ncl.ucar.edu/Document/Functions/Built-in/dim_spi_n.shtml" target="_blank" class="">https://www.ncl.ucar.edu/Docum<wbr class="">ent/Functions/Built-in/dim_spi<wbr class="">_n.shtml</a><br class=""></span></div><div class=""><span style="font-variant-ligatures:no-common-ligatures" class=""> Example 2<br class=""></span></div><div class=""><span style="font-variant-ligatures:no-common-ligatures" class="">That was working upon a single time series prc[*]<br class=""></span></div><div class=""><span style="font-variant-ligatures:no-common-ligatures" class=""><br class=""></span><font color="#0433ff" class=""></font><span style="font-variant-ligatures:no-common-ligatures" class=""><font color="#0433ff" class=""> <br class=""><br class=""></font></span></div><span style="font-variant-ligatures:no-common-ligatures" class=""><font color="#0433ff" class="">You have a 4-D array. *You* must make the appropriate changed to handle your situation.<br class=""></font></span></div><div class=""><span style="font-variant-ligatures:no-common-ligatures" class=""><font color="#0433ff" class="">The eamples are not generic to all dimensions.<br class=""></font></span></div><div class=""><span style="font-variant-ligatures:no-common-ligatures" class=""><font color="#0433ff" class=""><br class=""></font></span></div><div class=""><span style="font-variant-ligatures:no-common-ligatures" class=""><font color="#0433ff" class=""> nlat=4<br class=""></font></span></div><div class=""><span style="font-variant-ligatures:no-common-ligatures" class=""><font color="#0433ff" class=""> mlon=9<br class=""><br class=""></font></span></div><span style="font-variant-ligatures:no-common-ligatures" class=""><font color="#0433ff" class=""> do nl=0,nlat-1<br class=""></font></span></div><span style="font-variant-ligatures:no-common-ligatures" class=""><font color="#0433ff" class=""> do ml=0,mlon-1<br class=""></font></span></div><span style="font-variant-ligatures:no-common-ligatures" class=""><font color="#0433ff" class=""> print("-----------------------<wbr class="">-------------------------")<br class=""></font></span><div class=""><div class=""><div class=""><div class=""><div class=""><div class=""><div class=""><div class=""><br class=""><div style="margin:0px;font-size:11px;line-height:normal;font-family:menlo" class=""><span style="font-variant-ligatures:no-common-ligatures" class=""><font color="#0433ff" class="">print(yyyymm+sprintf("%8.2f", prc(:,nl,ml)) \ </font></span></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:menlo" class=""><span style="font-variant-ligatures:no-common-ligatures" class=""><font color="#0433ff" class=""> +sprintf("%8.2f", spi(0,:,nl,ml))+sprintf("%8.2f<wbr class="">", spi(1,:,nl,ml)) \ </font></span></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:menlo" class=""><span style="font-variant-ligatures:no-common-ligatures" class=""><font color="#0433ff" class=""> +sprintf("%8.2f", spi(2,:,nl,ml))+sprintf("%8.2f<wbr class="">", spi(3,:,nl,ml)) \ </font></span></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:menlo" class=""><span style="font-variant-ligatures:no-common-ligatures" class=""><font color="#0433ff" class=""> +sprintf("%8.2f", spi(4,:,nl,ml))+sprintf("%8.2f<wbr class="">", spi(5,:,nl,ml)) \ </font></span></div>
<span style="font-variant-ligatures:no-common-ligatures" class=""><font color="#0433ff" class=""> +sprintf("%8.2f", spi(6,:,nl,ml)))<br class=""><br class=""></font></span></div><div class=""><span style="font-variant-ligatures:no-common-ligatures" class=""><font color="#0433ff" class=""> end do<br class=""></font></span></div><div class=""><span style="font-variant-ligatures:no-common-ligatures" class=""><font color="#0433ff" class=""> en do<br class=""></font></span></div></div></div></div></div></div></div></div></div><div class="gmail_extra"><br class=""><div class="gmail_quote">On Wed, Apr 5, 2017 at 2:20 AM, Dawit Abebe <span dir="ltr" class=""><<a href="mailto:dawit.kan@gmail.com" target="_blank" class="">dawit.kan@gmail.com</a>></span> wrote:<br class=""><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word" class=""><div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo" class=""><span style="font-variant-ligatures:no-common-ligatures" class="">Hello all,</span></div><div class=""><br class=""></div><div class="">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 class=""><br class=""></div><div class="">Greatly appreciate your help.</div><div class=""><br class=""></div><div class="">Dawit</div><div class=""><br class=""></div><div class="">…………………………………….</div><div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo" class=""><span style="font-variant-ligatures:no-common-ligatures" class=""><br class=""></span></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo" class=""><span style="font-variant-ligatures:no-common-ligatures" class="">copy_VarCoords(prc,spi(0,:,:,:<wbr class="">))</span></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo" class=""><span style="font-variant-ligatures:no-common-ligatures" class="">spi@long_name = "SPI"</span></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo" class=""><span style="font-variant-ligatures:no-common-ligatures" class="">spi!0 = "len"</span></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo" class=""><span style="font-variant-ligatures:no-common-ligatures" class="">spi&len = len</span></div><p style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo" class="">
</p><div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo" class=""><span style="font-variant-ligatures:no-common-ligatures" class="">printVarSummary(spi)</span></div><div class=""><br class=""></div><div class=""><br class=""></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo" class=""><span style="font-variant-ligatures:no-common-ligatures" class="">Variable: spi</span></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo" class=""><span style="font-variant-ligatures:no-common-ligatures" class="">Type: double</span></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo" class=""><span style="font-variant-ligatures:no-common-ligatures" class="">Total Size: 2757888 bytes</span></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo" class=""><span style="font-variant-ligatures:no-common-ligatures" class=""> 344736 values</span></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo" class=""><span style="font-variant-ligatures:no-common-ligatures" class="">Number of Dimensions: 4</span></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo" class=""><span style="font-variant-ligatures:no-common-ligatures" class="">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" class=""><span style="font-variant-ligatures:no-common-ligatures" class="">Coordinates: </span></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo" class=""><span style="font-variant-ligatures:no-common-ligatures" class=""> len: [1..36]</span></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo" class=""><span style="font-variant-ligatures:no-common-ligatures" class=""> time: [ 380..41987]</span></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo" class=""><span style="font-variant-ligatures:no-common-ligatures" class=""> lat: [3.75..5.25]</span></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo" class=""><span style="font-variant-ligatures:no-common-ligatures" class=""> lon: [36.75..40.75]</span></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo" class=""><span style="font-variant-ligatures:no-common-ligatures" class="">Number Of Attributes: 2</span></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo" class=""><span style="font-variant-ligatures:no-common-ligatures" class=""> 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" class=""><span style="font-variant-ligatures:no-common-ligatures" class=""> _FillValue :<span class="m_-3625448695840246213m_-4961508701108069603m_3985381471525000650m_-3429062055612373153Apple-tab-span" style="white-space:pre-wrap">        </span>-999</span></div><div class=""><br class=""></div><div class=""><br class=""></div><div class=""><div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo" class=""><span style="font-variant-ligatures:no-common-ligatures" class=""><font color="#0433ff" class="">yyyymm = cd_calendar(f->time, -1) </font></span></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo" class=""><span style="font-variant-ligatures:no-common-ligatures" class=""><font color="#0433ff" class=""><br class=""></font></span></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo" class=""><span style="font-variant-ligatures:no-common-ligatures" class=""><font color="#0433ff" class="">print(yyyymm+sprintf("%8.2f", prc) \ </font></span></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo" class=""><span style="font-variant-ligatures:no-common-ligatures" class=""><font color="#0433ff" class=""> +sprintf("%8.2f", spi(0,:))+sprintf("%8.2f", spi(1,:)) \ </font></span></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo" class=""><span style="font-variant-ligatures:no-common-ligatures" class=""><font color="#0433ff" class=""> +sprintf("%8.2f", spi(2,:))+sprintf("%8.2f", spi(3,:)) \ </font></span></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo" class=""><span style="font-variant-ligatures:no-common-ligatures" class=""><font color="#0433ff" class=""> +sprintf("%8.2f", spi(4,:))+sprintf("%8.2f", spi(5,:)) \ </font></span></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo" class=""><span style="font-variant-ligatures:no-common-ligatures" class=""><font color="#0433ff" class=""> +sprintf("%8.2f", spi(6,:))) </font></span></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo" class=""><span style="font-variant-ligatures:no-common-ligatures" class=""><font color="#0433ff" class="">fatal:Plus: Number of dimensions do not match, can't continue</font></span></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo" class=""><span style="font-variant-ligatures:no-common-ligatures" class=""><font color="#0433ff" class="">fatal:["Execute.c":8638]:Execu<wbr class="">te: Error occurred at or near line 37</font></span></div><div class=""><br class=""></div></div><div class=""><br class=""></div></div><br class="">______________________________<wbr class="">_________________<br class="">
ncl-talk mailing list<br class="">
<a href="mailto:ncl-talk@ucar.edu" target="_blank" class="">ncl-talk@ucar.edu</a><br class="">
List instructions, subscriber options, unsubscribe:<br class="">
<a href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk" rel="noreferrer" target="_blank" class="">http://mailman.ucar.edu/mailma<wbr class="">n/listinfo/ncl-talk</a><br class="">
<br class=""></blockquote></div><br class=""></div>
</div></div></div></blockquote></div><br class=""></div></div></blockquote></div><br class=""></div>
</div></blockquote></div><br class=""></div></div>______________________________<wbr class="">_________________<br class="">ncl-talk mailing list<br class=""><a href="mailto:ncl-talk@ucar.edu" target="_blank" class="">ncl-talk@ucar.edu</a><br class="">List instructions, subscriber options, unsubscribe:<br class=""><a href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk" target="_blank" class="">http://mailman.ucar.edu/mailma<wbr class="">n/listinfo/ncl-talk</a><br class=""></div></blockquote></div><br class=""></div></div></div></div></blockquote></div><br class=""></div></div></blockquote></div><br class=""></div></div></div></div></blockquote></div><br class=""></div>
</div></blockquote></div><br class=""></div></div></div></div></blockquote></div><br class=""></div>
</div></blockquote></div><br class=""></div></body></html>