<div dir="ltr"><div>The following is a brute force approach.</div><div><br></div><div><br></div><div>;========================================================<br></div><div>; I would like to select special dates: </div><div>; 11 Feb 1985 to 11 July 2015. but only dates in feb-mar-apr-may-jun-jul</div><div>;========================================================</div><div><br></div><div>;--- Big 'ymdh' subset selection<br></div>it =<b> ind</b>(ymdh(:,0).ge.1985.and.ymdh(:,0).le.2015 .and. \<br> ymdh(:,1).ge.2 .and.ymdh(:,1).le.7 ) <br>it@_FillValue = -999<br><div><br></div><div>;--- Identify 'it' indices [subscripts] to eliminate<br></div>it = <b>where</b>(ymdh(it,0).eq.1985.and.ymdh(it,1).eq.2.and.ymdh(it,2).lt.15 .or. \<br> ymdh(it,0).eq.2015.and.ymdh(it,1).eq.7.and.ymdh(it,2).gt.11 \<br><div> ,it@_FillValue, it)</div><div><br></div><div>;--- identify non_FillValue indices<br></div><div>jt =<b> ind</b>(<b><span style="color:rgb(255,0,0)">.not.</span>ismissing</b>(it)) <br></div><div><br></div><div>;---Extract the desired indices [Use reassignment syntax<span style="color:rgb(0,0,255)"><b> :=</b></span> ]<br></div><div>it <span style="color:rgb(0,0,255)"><b>:=</b></span> it(jt)</div><div><br></div><div>printVarSummary(it)<br></div><div>print("===")<br></div><div>print(ymdh(it,0)+" "+ymdh(it,1)" "+ymdh(it,2))</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Jan 20, 2020 at 6:53 AM Sancta Fun via ncl-talk <<a href="mailto:ncl-talk@ucar.edu">ncl-talk@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>No It doesn't work if iI select first the range 11Feb1985 to 11July2015 (I have only date 11 for Feb and july in each year not dates between them).<br></div><div><br></div><div>And I test also the "or" suggested by BARRY LYNN but not working.</div><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Le lun. 20 janv. 2020 à 14:03, 时光足迹 via ncl-talk <<a href="mailto:ncl-talk@ucar.edu" target="_blank">ncl-talk@ucar.edu</a>> a écrit :<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><p>Hi, I suggest you first select the time range 11Feb1985 to 11July2015. Then you can select again from the data which had been selected in the first step.</p>
<br><br>------------------ 原始邮件 ------------------<br><div style="font-size:12px;background:rgb(239,239,239) none repeat scroll 0% center;padding:8px"><div id="gmail-m_-3272483112213300748gmail-m_-2128443753370812550menu_sender"><b>发件人:</b> "Sancta Fun via ncl-talk" <<a href="mailto:ncl-talk@ucar.edu" target="_blank">ncl-talk@ucar.edu</a>>;</div><div><b>发送时间:</b> 2020年1月20日(星期一) 20:47</div><div><b>收件人:</b> "ncl-talk" <<a href="mailto:ncl-talk@ucar.edu" target="_blank">ncl-talk@ucar.edu</a>>;</div><div><b>主题:</b> [ncl-talk] Select dates range in time calendar</div></div><br><br><div dir="ltr"><div>Hi,</div><div>I would like to select special dates: 11Feb1985 to 11 July 2015. but only dates in feb-mar-apr-may-jun-jul.</div><div><br></div><div>My code is below:</div><div><br></div><div>ymdh = ut_calendar(time, 0)<br></div><div> y =ind(ymdh(:,1).ge.2.and.ymdh(:,2).ge.11 .and. ymdh(:,1).le.7.and.ymdh(:,2).le.11 .and. ymdh(:,0).ge.1985 .and. ymdh(:,0).le.2015 )</div><div><br></div><div>What's wrong?<br></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></blockquote></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></blockquote></div>