<div dir="ltr"><div>Thanks so much and I've attached my data ncdump -h .nc output here but somehow lost at the original dimension of the code "spi(nrun,time,lat,lon)" that is leading to an error. <br></div><div><br></div><div>Thanks so much again.<br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Apr 16, 2019 at 3:34 AM Dennis Shea <<a href="mailto:shea@ucar.edu">shea@ucar.edu</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div dir="ltr"><div>When you pose a 'help' question, you should <b>always</b> provide the output from:</div><div><br></div><div>%> ncdump -h SPI,nc</div><div><br></div><div>or, equivalently,</div><div><br></div><div>%> ncl_filedump SPI.nc</div><div><br></div><div>or</div><div><br></div><div> f = addfile(....")</div><div> spi = f->SPI</div><div> printVarSummary(spi)</div><div> pritMinMax(spi,0)</div><div><br></div><div>otherwise, people are guessing. <br></div><div>=================</div><div> nrun = 3 ; 3, 6, 12</div><div> nmos = 12 ; number of months/year<br></div><div> NYRS = 90<br></div><div> NTIM =NYRS*nmos ; TOTAL # of months</div><div><br></div><div> NYR30 = 30</div><div> NTM30 = NYR30*nmos</div><div> NSG30 = 3 ; # of 30-year segments<br></div><div><br></div><div>Original dimensions:</div><div><br></div><div> spi(nrun,time) ; station or location<br></div><div>or <br></div><div> spi(nrun,time,lat,lon) ; grid<br></div><div><br></div><div>;-----</div><div> KNT = new((/nrun,NSG30/),"integer")</div><div>or</div><div> KNT = new((/nrun,NSG30,nlat,mlon/),"integer")</div><div><br><div> spiCrit = -1.0 ; <br></div><div> ntStrt = 0</div><div> ntLast = NTM30 -1 ; 360 months [30 years]; -1 is for NCL index</div><div><br></div></div><div> do ns=0,NSG30-1<br></div><div> KNT(:, ns) = dim_num_n( spi(:,<b>ntStrt:ntLast</b>).le.spiCrit, 1)</div><div>or <br></div><div> KNT(:, ns,:,:) = dim_num_n( spi(:,<b>ntStrt:ntLast,</b>:,:).le.spiCrit, 1)</div><div> ntStrt = ntStrt + NSG30</div><div> ntLast = ntLast + NSG30</div><div> end do</div><div><br></div><div> printVarSummary(KNT)</div><div> printMinMax(KNT,0)</div><div> print("=====")<br></div><div><br></div><div> <br></div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Apr 15, 2019 at 4:35 AM Oluwaseun Ilori <<a href="mailto:wilseun@gmail.com" target="_blank">wilseun@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Thanks, I'll check them out. <br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Apr 15, 2019 at 2:39 AM Md. Jalal Uddin <<a href="mailto:dmjalal90@gmail.com" target="_blank">dmjalal90@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>You can look at two functions that might help you. </div><div><h1 style="padding:5px;font-size:20pt;line-height:22pt;font-family:"lucida sans",verdana,arial,sans-serif;color:rgb(2,83,143);clear:both">count_unique_values</h1></div><a href="https://www.ncl.ucar.edu/Document/Functions/Built-in/count_unique_values.shtml" target="_blank">https://www.ncl.ucar.edu/Document/Functions/Built-in/count_unique_values.shtml</a> <div><br></div><div><h1 style="padding:5px;font-size:20pt;line-height:22pt;font-family:"lucida sans",verdana,arial,sans-serif;color:rgb(2,83,143);clear:both">where</h1><div> <a href="https://www.ncl.ucar.edu/Document/Functions/Built-in/where.shtml" target="_blank">https://www.ncl.ucar.edu/Document/Functions/Built-in/where.shtml</a><br></div></div><div><br></div><div>Good luck!</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Apr 15, 2019 at 2:35 AM Oluwaseun Ilori <<a href="mailto:wilseun@gmail.com" target="_blank">wilseun@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="auto">Good day,<div dir="auto">Please I need help to perform drought classification base on McKee et., 1993. I'm having SPI.nc file that contain 3, 6, and 12months time scales for the period of 90 years (2011-2100). I want to use spi < - 1.0 to determine drought frequency for the first 30 years, second 30 years and the third 30 years and save it as nc file. I've been looking for any function that I could use to perform this task but none yet. Pleas could someone put me through cos I'm not so good in this but I love the output of ncl.</div><div dir="auto">Thanks in advance </div></div>
_______________________________________________<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/mailman/listinfo/ncl-talk</a><br>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail-m_-3685944488833992764gmail-m_1514837218257098628gmail-m_-1056508896889618927gmail-m_-1284952950533690176gmail-m_-8194669651610697770gmail-m_-1011441228239880285gmail_signature"><div dir="ltr"><div><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><font size="2" color="#000000"><b>Md. Jalal Uddin</b></font></div><div dir="ltr">MSc in Applied Meteorology (English Language)<br>Nanjing University of Information, Science and Technology, China</div><div dir="ltr"><span style="letter-spacing:0.2px">B.Sc. in Disaster Management (Hons.) </span><br></div><div dir="ltr"><span style="letter-spacing:0.2px">Patuakhali Science and Technology University, Bangladesh.</span></div><div dir="ltr">Cell: +8613260859092, <span style="letter-spacing:0.2px">+8801792052662</span></div><div dir="ltr"><font size="2">Web: <a href="http://www.dmjalal90.weebly.com" target="_blank">www.dmjalal90.weebly.com</a> <br>Facebook: jalal.hossen.39 <br>LinkedIn: <a href="https://bd.linkedin.com/in/md-jalal-uddin-80a026b0" target="_blank">https://bd.linkedin.com/in/md-jalal-uddin-80a026b0</a> <br>Twitter: dmjalal90 <br>Skype: dmjalal90</font><br></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div>
</blockquote></div><br clear="all"><br>-- <br><div dir="ltr" class="gmail-m_-3685944488833992764gmail-m_1514837218257098628gmail-m_-1056508896889618927gmail-m_-1284952950533690176gmail-m_-8194669651610697770gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><span style="font-family:monospace,monospace"><span style="background-color:rgb(243,243,243)"><span style="color:rgb(0,0,255)"><i>OLUWASEUN ILORI</i></span></span></span></div><div><span style="font-family:monospace,monospace"><i>B.Tech(Hons) in Meteorology</i></span></div><div><span style="font-family:monospace,monospace"><i>M.Tech in Meteorology and climate science</i></span></div><div><span style="font-family:monospace,monospace"><i>Phone: +2347031000687 +2348069154213<br></i></span></div><div><span style="font-family:monospace,monospace"><i>Federal University of Technology Akure. Nigeria.</i></span></div><div><span style="font-family:monospace,monospace"><i>Facebook: </i></span><span><a href="https://www.facebook.com/hilorywilson" target="_blank"><span><span>http://facebook.com/</span><span></span>hilorywilson</span></a><br></span></div><div>linkedln: <a href="https://www.linkedin.com/in/wilson-ilori-447952108" target="_blank">https://www.linkedin.com/in/wilson-ilori-447952108</a></div><div>Twitter: HiloryW<br></div><div><span></span></div></div></div></div></div>
_______________________________________________<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/mailman/listinfo/ncl-talk</a><br>
</blockquote></div>
</blockquote></div><br clear="all"><br>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><span style="font-family:monospace,monospace"><span style="background-color:rgb(243,243,243)"><span style="color:rgb(0,0,255)"><i>OLUWASEUN ILORI</i></span></span></span></div><div><span style="font-family:monospace,monospace"><i>B.Tech(Hons) in Meteorology</i></span></div><div><span style="font-family:monospace,monospace"><i>M.Tech in Meteorology and climate science</i></span></div><div><span style="font-family:monospace,monospace"><i>Phone: +2347031000687 +2348069154213<br></i></span></div><div><span style="font-family:monospace,monospace"><i>Federal University of Technology Akure. Nigeria.</i></span></div><div><span style="font-family:monospace,monospace"><i>Facebook: </i></span><span><a href="https://www.facebook.com/hilorywilson" target="_blank"><span><span>http://facebook.com/</span><span></span>hilorywilson</span></a><br></span></div><div>linkedln: <a href="https://www.linkedin.com/in/wilson-ilori-447952108" target="_blank">https://www.linkedin.com/in/wilson-ilori-447952108</a></div><div>Twitter: HiloryW<br></div><div><span></span></div></div></div></div></div>