<html xmlns="http://www.w3.org/1999/xhtml" xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office"><head><!--[if gte mso 9]><xml><o:OfficeDocumentSettings><o:AllowPNG/><o:PixelsPerInch>96</o:PixelsPerInch></o:OfficeDocumentSettings></xml><![endif]--></head><body><div style="font-family:verdana, helvetica, sans-serif;font-size:16px;"><div>Dear Rashed,</div><div>sorry I attached a wrong script. Anyway thank you so much for your advices and for your time. I will try to run my script with yearly data. It is more appropriate. </div><div><br></div><div>Kindest regards,</div><div><br><div><br></div><div class="ydpb5ae7081signature">-----------------------------<br>GUIGMA</div></div>
            <div><br></div><div><br></div>
            
            <div id="yahoo_quoted_2816921753" class="yahoo_quoted">
                <div style="font-family:'Helvetica Neue', Helvetica, Arial, sans-serif;font-size:13px;color:#26282a;">
                    
                    <div>
                        On Tuesday, 27 March 2018, 18:09:38 GMT+1, Rashed Mahmood <rashidcomsis@gmail.com> wrote:
                    </div>
                    <div><br></div>
                    <div><br></div>
                    <div><div id="yiv4370141098"><div><div dir="ltr"><div><div><div><div><br clear="none">Are you sure there is no error message? when I run your script I get this error message:<br clear="none"><br clear="none">fatal:Subscript out of range, error in subscript #0<br clear="none">fatal:An error occurred reading wakato<br clear="none">fatal:["Execute.c":8640]:Execute: Error occurred at or near line 89 in file IND1_ERA_1_1_Tn_4d.ncl<br clear="none"><br clear="none"></div><div>I am using NCL 6.4 and if you are not already using 6.4 then you should consider upgrading to 6.4.<br clear="none"></div><div><br clear="none"></div><div>Reason for error:<br clear="none"></div><br clear="none">Line 89 is:<br clear="none"><br clear="none">mmm:=wakato(ind(.not.ismissing(wakato)))<br clear="none"></div><br clear="none">and the error message is caused by "wakato" which is missing due to your conditional statements in previous lines.<br clear="none"><br clear="none"></div>So to check this I added an if statement (see in the attached script) to see if "wakato" is always missing or not, and it seems that it is missing, here is part of the output message I get:<br clear="none"><br clear="none"> Copyright (C) 1995-2017 - All Rights Reserved<br clear="none"> University Corporation for Atmospheric Research<br clear="none"> NCAR Command Language Version 6.4.0<br clear="none"> The use of this software is governed by a License Agreement.<br clear="none"> See <a rel="nofollow" shape="rect" target="_blank" href="http://www.ncl.ucar.edu/">http://www.ncl.ucar.edu/</a> for more details.<br clear="none">(0)     missing ...<br clear="none">(0)     missing ...<br clear="none">(0)     missing ...<br clear="none">(0)     missing ...<br clear="none">(0)     missing ...<br clear="none">(0)     missing ...<br clear="none">(0)     missing ...<br clear="none">(0)     missing ...<br clear="none">(0)     missing ...<br clear="none">(0)     missing ...<br clear="none">(0)     missing ...<br clear="none">(0)     missing ...<br clear="none">(0)     missing ...<br clear="none">(0)     missing ...<br clear="none"></div>.... so on<br clear="none"><div><br clear="none"><br clear="none"></div><div>It would be better if you can check carefully the logic for each conditional statement and the output from it, to see if that is what you want.<br clear="none"><br clear="none"></div><div><div>Note that as I had mentioned in my first message that I would not be able to test the code for 3D data sets since this requires lots of time to get the conditional statements right, and I am quite busy these days. <br clear="none"></div><div>I hope this gives you start.<br clear="none"><br clear="none"></div><div>By the way, please consider making the script read easy, your script had no indentation, and no loop structure, which makes it difficult to understand which loop ends where especially when there are many nested loops.<br clear="none"><br clear="none"></div><div>Cheers,<br clear="none"></div><div>Rashed<br clear="none"></div><div><br clear="none"><br clear="none"><br clear="none"><br clear="none"></div><div><br clear="none"><br clear="none"></div><div><br clear="none"><br clear="none"></div><div>  <br clear="none"><div><div><br clear="none"><br clear="none"><br clear="none"><br clear="none"></div></div></div></div></div><div class="yiv4370141098yqt5881017195" id="yiv4370141098yqt90816"><div class="yiv4370141098gmail_extra"><br clear="none"><div class="yiv4370141098gmail_quote">On Tue, Mar 27, 2018 at 12:51 AM, Kiswendsida Hyacinthe GUIGMA <span dir="ltr"><<a rel="nofollow" shape="rect" ymailto="mailto:karongseba@gmail.com" target="_blank" href="mailto:karongseba@gmail.com">karongseba@gmail.com</a>></span> wrote:<br clear="none"><blockquote class="yiv4370141098gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div><div style="font-family:verdana, helvetica, sans-serif;font-size:16px;"><div>please find data in this link : <a rel="nofollow" shape="rect" class="yiv4370141098m_-2788157640334770866enhancr_card_2964969280" target="_blank" href="https://drive.google.com/open?id=1semO2FGV60dLKjHha1oNG607zvlKA8Uf">ERA-I_1_1_1979-2017_Tmax_Tmin_ NTA.nc</a>  </div><div><br clear="none"></div><div class="yiv4370141098m_-2788157640334770866ydp5e86ee2eyahoo-link-enhancr-card yiv4370141098m_-2788157640334770866ydp5e86ee2eyahoo-link-enhancr-not-allow-cover yiv4370141098m_-2788157640334770866ydp5e86ee2eymail-preserve-class yiv4370141098m_-2788157640334770866ydp5e86ee2eymail-preserve-style" id="yiv4370141098m_-2788157640334770866ydp5e86ee2eenhancr_card_2964969280" style="max-width:400px;"><a rel="nofollow" shape="rect" class="yiv4370141098m_-2788157640334770866ydp5e86ee2eyahoo-enhancr-cardlink" target="_blank" href="https://drive.google.com/open?id=1semO2FGV60dLKjHha1oNG607zvlKA8Uf" style="text-decoration:none!important;color:#000!important;"><table class="yiv4370141098m_-2788157640334770866ydp5e86ee2ecard-wrapper yiv4370141098m_-2788157640334770866ydp5e86ee2eyahoo-ignore-table" style="max-width:400px;" cellspacing="0" cellpadding="0" border="0"><tbody><tr><td colspan="1" rowspan="1" width="400"><table class="yiv4370141098m_-2788157640334770866ydp5e86ee2ecard yiv4370141098m_-2788157640334770866ydp5e86ee2eyahoo-ignore-table" style="max-width:400px;border-width:1px;border-style:solid;border-color:rgb(224,228,233);border-radius:2px;" cellspacing="0" cellpadding="0" width="100%" border="0"><tbody><tr><td colspan="1" rowspan="1"><table class="yiv4370141098m_-2788157640334770866ydp5e86ee2ecard-info yiv4370141098m_-2788157640334770866ydp5e86ee2eyahoo-ignore-table" style="background-color:rgb(255,255,255);background-image:none;background-repeat:repeat;background-size:auto auto;width:100%;max-width:400px;border-radius:0px 0px 2px 2px;border-top:1px solid rgb(224,228,233);" cellspacing="0" cellpadding="0" border="0"><tbody><tr><td colspan="1" rowspan="1" style="background-color:#ffffff;padding:16px 0 16px 12px;vertical-align:top;border-radius:0 0 0 2px;"><img style="min-width:36px;margin-top:3px;" class="yiv4370141098ycb6855019647" height="36"></td><td colspan="1" rowspan="1" style="vertical-align:middle;padding:12px 24px 16px 12px;width:99%;"><h2 class="yiv4370141098m_-2788157640334770866ydp5e86ee2ecard-title" style="font-size:14px;line-height:19px;margin:0 0 6px 0;">ERA-I_1_1_1979-2017_Tmax_Tmin_ NTA.nc</h2><p class="yiv4370141098m_-2788157640334770866ydp5e86ee2ecard-description" style="font-size:12px;line-height:16px;margin:0px;color:#979ba7;"></p></td></tr></tbody></table></td></tr></tbody></table></td></tr></tbody></table></a></div><div><br clear="none"></div><div><br clear="none"></div><div>Actually there isn't any error message. It just kills the script and shows up this message:"killed".<br clear="none"><div><br clear="none"></div><div><br clear="none"></div><div class="yiv4370141098m_-2788157640334770866ydpf4d1f7cesignature">-----------------------------<br clear="none">GUIGMA</div></div><div><div class="yiv4370141098h5">
            <div><br clear="none"></div><div><br clear="none"></div>
            
            <div class="yiv4370141098m_-2788157640334770866yahoo_quoted" id="yiv4370141098m_-2788157640334770866yahoo_quoted_2965673414">
                <div style="font-family:'Helvetica Neue', Helvetica, Arial, sans-serif;font-size:13px;color:#26282a;">
                    
                    <div>
                        On Monday, 26 March 2018, 23:09:03 GMT+1, Rashed Mahmood <<a rel="nofollow" shape="rect" ymailto="mailto:rashidcomsis@gmail.com" target="_blank" href="mailto:rashidcomsis@gmail.com">rashidcomsis@gmail.com</a>> wrote:
                    </div>
                    <div><br clear="none"></div>
                    <div><br clear="none"></div>
                    <div><div id="yiv4370141098m_-2788157640334770866yiv3612014882"><div><div dir="ltr">Sorry I meant to send it to ncl-talk. here it is:<br clear="none"><div><div class="yiv4370141098m_-2788157640334770866yiv3612014882yqt4352960357" id="yiv4370141098m_-2788157640334770866yiv3612014882yqtfd02696"><div class="yiv4370141098m_-2788157640334770866yiv3612014882gmail_quote">---------- Forwarded message ----------<br clear="none">From: <b class="yiv4370141098m_-2788157640334770866yiv3612014882gmail_sendername">Rashed Mahmood</b> <span dir="ltr"><<a rel="nofollow" shape="rect" ymailto="mailto:rashidcomsis@gmail.com" target="_blank" href="mailto:rashidcomsis@gmail.com">rashidcomsis@gmail.com</a>></span><br clear="none">Date: Mon, Mar 26, 2018 at 3:02 PM<br clear="none">Subject: Re: [ncl-talk] Sequences of values<br clear="none">To: Kiswendsida Hyacinthe GUIGMA <<a rel="nofollow" shape="rect" ymailto="mailto:karongseba@gmail.com" target="_blank" href="mailto:karongseba@gmail.com">karongseba@gmail.com</a>><br clear="none"><br clear="none"><br clear="none"><div dir="ltr">That's too many loops! ...I can not test without data set, what error messages you get when you run this?<br clear="none"></div><div class="yiv4370141098m_-2788157640334770866yiv3612014882HOEnZb"><div class="yiv4370141098m_-2788157640334770866yiv3612014882h5"><div class="yiv4370141098m_-2788157640334770866yiv3612014882gmail_extra"><br clear="none"><div class="yiv4370141098m_-2788157640334770866yiv3612014882gmail_quote">On Mon, Mar 26, 2018 at 1:20 PM, Kiswendsida Hyacinthe GUIGMA <span dir="ltr"><<a rel="nofollow" shape="rect" ymailto="mailto:karongseba@gmail.com" target="_blank" href="mailto:karongseba@gmail.com">karongseba@gmail.com</a>></span> wrote:<br clear="none"><blockquote class="yiv4370141098m_-2788157640334770866yiv3612014882gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div><div style="font-family:verdana, helvetica, sans-serif;font-size:16px;"><div><div>Please find attached an example of a code. </div><div>My data spans 0 to 35N and 20W to 50E with resolution in both directions of 1*1. It is too big to be uploaded in NCL_talk<br clear="none"></div><div><br clear="none"></div><div>Kindest regards<br clear="none"></div><div><br clear="none"></div><div class="yiv4370141098m_-2788157640334770866yiv3612014882m_1897331985444617648m_3166969670626823163ydp1275d4d9signature">-----------------------------<br clear="none">GUIGMA</div></div>
            <div><br clear="none"></div><div><br clear="none"></div>
            
            <div class="yiv4370141098m_-2788157640334770866yiv3612014882m_1897331985444617648m_3166969670626823163yahoo_quoted" id="yiv4370141098m_-2788157640334770866yiv3612014882m_1897331985444617648m_3166969670626823163yahoo_quoted_2571667525">
                <div style="font-family:'Helvetica Neue', Helvetica, Arial, sans-serif;font-size:13px;color:#26282a;"><span>
                    
                    </span><div>
                        On Monday, 26 March 2018, 20:40:32 GMT+1, Rashed Mahmood <<a rel="nofollow" shape="rect" ymailto="mailto:rashidcomsis@gmail.com" target="_blank" href="mailto:rashidcomsis@gmail.com">rashidcomsis@gmail.com</a>> wrote:
                    </div>
                    <div><br clear="none"></div>
                    <div><br clear="none"></div>
                    <div><div id="yiv4370141098m_-2788157640334770866yiv3612014882m_1897331985444617648m_3166969670626823163yiv5187759884"><div><span></span><div dir="ltr">How does your script look like? and what is the size of input data?<br clear="none"></div><div class="yiv4370141098m_-2788157640334770866yiv3612014882m_1897331985444617648m_3166969670626823163yiv5187759884yqt1965475992" id="yiv4370141098m_-2788157640334770866yiv3612014882m_1897331985444617648m_3166969670626823163yiv5187759884yqt40086"><div class="yiv4370141098m_-2788157640334770866yiv3612014882m_1897331985444617648m_3166969670626823163yiv5187759884gmail_extra"><br clear="none"><div class="yiv4370141098m_-2788157640334770866yiv3612014882m_1897331985444617648m_3166969670626823163yiv5187759884gmail_quote"><span>On Mon, Mar 26, 2018 at 8:45 AM, Kiswendsida Hyacinthe GUIGMA <span dir="ltr"><<a rel="nofollow" shape="rect" ymailto="mailto:karongseba@gmail.com" target="_blank" href="mailto:karongseba@gmail.com">karongseba@gmail.com</a>></span> wrote:<br clear="none"></span><blockquote class="yiv4370141098m_-2788157640334770866yiv3612014882m_1897331985444617648m_3166969670626823163yiv5187759884gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div><div style="font-family:verdana, helvetica, sans-serif;font-size:16px;"><span></span><div>Hi Rashed and everyone,</div><div>Thank you for your suggestion.</div><div>I also had the idea of using many loops. It works perfectly for no large data. But when it comes to apply it to a 3D data covering half of the Africa domain, it slows down the execution and ends up killing the process. That's why I was thinking that there exist an other way to do that using not as much iterations.</div><div><br clear="none"></div><div>Best<br clear="none"><div><br clear="none"></div><div><br clear="none"></div><div class="yiv4370141098m_-2788157640334770866yiv3612014882m_1897331985444617648m_3166969670626823163yiv5187759884m_6032098021478253683ydpdd8a04cfsignature">-----------------------------<br clear="none">GUIGMA</div></div><div><div class="yiv4370141098m_-2788157640334770866yiv3612014882m_1897331985444617648m_3166969670626823163yiv5187759884h5">
            <div><br clear="none"></div><div><br clear="none"></div>
            
            <div class="yiv4370141098m_-2788157640334770866yiv3612014882m_1897331985444617648m_3166969670626823163yiv5187759884m_6032098021478253683yahoo_quoted" id="yiv4370141098m_-2788157640334770866yiv3612014882m_1897331985444617648m_3166969670626823163yiv5187759884m_6032098021478253683yahoo_quoted_3048719941">
                <div style="font-family:'Helvetica Neue', Helvetica, Arial, sans-serif;font-size:13px;color:#26282a;"><span>
                    
                    </span><div>
                        On Saturday, 24 March 2018, 18:30:38 GMT, Rashed Mahmood <<a rel="nofollow" shape="rect" ymailto="mailto:rashidcomsis@gmail.com" target="_blank" href="mailto:rashidcomsis@gmail.com">rashidcomsis@gmail.com</a>> wrote:
                    </div>
                    <div><br clear="none"></div>
                    <div><br clear="none"></div>
                    <div><div id="yiv4370141098m_-2788157640334770866yiv3612014882m_1897331985444617648m_3166969670626823163yiv5187759884m_6032098021478253683yiv0791746430"><div><div dir="ltr"><div><div><div><span></span><div>Hi Guigma,<br clear="none"></div>For 1 dimensional series you can use the following. however, you would need to adapt this to your 3D data sets through loops/ind function and need to do TESTING, this is a very time consuming process.<br clear="none">begin<br clear="none">;  X1 = (/0,1,0,0,1,1,1,1,1,0,0,1,0,1, 1,1,1,0,0,1,0/) ; orignal <br clear="none">   X1 = (/0,1,0,0,1,1,1,1,1,0,0,1,0,1, 1,1,1,0,0,1,0,1,1,0,0,1,0,1,0, 1,1/) ; for testing<div><div class="yiv4370141098m_-2788157640334770866yiv3612014882m_1897331985444617648h5"><br clear="none"><br clear="none">   X2 = new(dimsizes(X1),integer)<br clear="none"><br clear="none"> do n=0,dimsizes(X1)-1<br clear="none">     if(n.eq.0)<br clear="none">       if(X1(n).eq.1.and.X1(n+1).eq. 0)<br clear="none">         X2(n) = 0<br clear="none">        else<br clear="none">         X2(n) = X1(n)<br clear="none">       end if<br clear="none">     end if<br clear="none"><br clear="none">    if(n.gt.0.and.n.lt.dimsizes( X1)-1)<br clear="none">      if(X1(n).eq.1)<br clear="none">         if(X1(n-1).eq.0.and.X1(n+1). eq.0)<br clear="none">            X2(n) = 0<br clear="none">          else<br clear="none">            X2(n) = X1(n)<br clear="none">         end if<br clear="none">       else<br clear="none">          X2(n) = X1(n)<br clear="none">      end if<br clear="none"><br clear="none">    end if<br clear="none"><br clear="none">    if(n.eq.dimsizes(X1)-1)<br clear="none">      if(X1(n).eq.1.and.X1(n-1).eq. 1)<br clear="none">        X2(n) = X1(n)<br clear="none">       else<br clear="none">        X2(n) = 0<br clear="none">      end if<br clear="none">    end if<br clear="none"> end do<br clear="none">    print(X1+" ... "+X2)<br clear="none"><br clear="none">end<br clear="none"><br clear="none"><br clear="none"></div></div></div><div><div class="yiv4370141098m_-2788157640334770866yiv3612014882m_1897331985444617648h5">Note I have NOT tested it as much one should so I would let you to test and find out if that is what you are looking for.<br clear="none"><br clear="none"></div></div></div>Cheers,<br clear="none"></div>Rashed<br clear="none"><div><div><br clear="none"><br clear="none"><div><br clear="none"><br clear="none"><br clear="none"><br clear="none"></div></div></div></div><div><div class="yiv4370141098m_-2788157640334770866yiv3612014882m_1897331985444617648h5"><div class="yiv4370141098m_-2788157640334770866yiv3612014882m_1897331985444617648m_3166969670626823163yiv5187759884m_6032098021478253683yiv0791746430gmail_extra"><br clear="none"><div class="yiv4370141098m_-2788157640334770866yiv3612014882m_1897331985444617648m_3166969670626823163yiv5187759884m_6032098021478253683yiv0791746430gmail_quote">On Sat, Mar 24, 2018 at 6:44 AM, Kiswendsida Hyacinthe GUIGMA <span dir="ltr"><<a rel="nofollow" shape="rect" ymailto="mailto:karongseba@gmail.com" target="_blank" href="mailto:karongseba@gmail.com">karongseba@gmail.com</a>></span> wrote:<br clear="none"><blockquote class="yiv4370141098m_-2788157640334770866yiv3612014882m_1897331985444617648m_3166969670626823163yiv5187759884m_6032098021478253683yiv0791746430gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div class="yiv4370141098m_-2788157640334770866yiv3612014882m_1897331985444617648m_3166969670626823163yiv5187759884m_6032098021478253683yiv0791746430yqt3038823429" id="yiv4370141098m_-2788157640334770866yiv3612014882m_1897331985444617648m_3166969670626823163yiv5187759884m_6032098021478253683yiv0791746430yqt43503"><div><div style="font-family:verdana, helvetica, sans-serif;font-size:16px;"><div>Thank you for your reply and for your help. </div><div>Actually, before to post my question, I tried to make a use of dim_numrun_n but it didn't solve my problem.</div><div><br clear="none"></div><div>You misunderstood a bit my [1]. I said that I successfully did that... So it is OK for that.</div><div> </div><div><br clear="none"></div><div>For [2] , what the dim_numrun_n  function allows is just to do a count. What me I'd rather like is to set to _FillValue (or to 0 if use of where function) all values that are not in a sequence of at least 04 days. As an example I would like to have something as follows:</div><div>X1=(/0,1,0,0,1,1,1,1,1,0,0,1, 0,1,1,1,1,0,0,1,0,/) ==========> X2= (/0,<b>0</b>,0,0,1,1,1,1,1,0,0,<b>0</b>,0,1, 1,1,1,0,0,<b>0</b>,0,/).</div><div>In other words it is to replace all "isolated" 1s by 0.</div><div><br clear="none"></div><div>Kindest regards<br clear="none"><pre><b></b><br clear="none"></pre><br clear="none"><div><br clear="none"></div><div><br clear="none"></div><div class="yiv4370141098m_-2788157640334770866yiv3612014882m_1897331985444617648m_3166969670626823163yiv5187759884m_6032098021478253683yiv0791746430m_-12244688286929487ydp2124e450signature">-----------------------------<br clear="none">GUIGMA</div></div>
            <div><br clear="none"></div><div><br clear="none"></div><div>
            
            </div><div class="yiv4370141098m_-2788157640334770866yiv3612014882m_1897331985444617648m_3166969670626823163yiv5187759884m_6032098021478253683yiv0791746430m_-12244688286929487yahoo_quoted" id="yiv4370141098m_-2788157640334770866yiv3612014882m_1897331985444617648m_3166969670626823163yiv5187759884m_6032098021478253683yiv0791746430m_-12244688286929487yahoo_quoted_2361277437">
                <div style="font-family:'Helvetica Neue', Helvetica, Arial, sans-serif;font-size:13px;color:#26282a;">
                    
                    <div>
                        On Friday, 23 March 2018, 22:17:11 GMT, Dennis Shea <<a rel="nofollow" shape="rect" ymailto="mailto:shea@ucar.edu" target="_blank" href="mailto:shea@ucar.edu">shea@ucar.edu</a>> wrote:
                    </div>
                    <div><br clear="none"></div>
                    <div><br clear="none"></div>
                    <div><div id="yiv4370141098m_-2788157640334770866yiv3612014882m_1897331985444617648m_3166969670626823163yiv5187759884m_6032098021478253683yiv0791746430m_-12244688286929487yiv0687598992"><div><div dir="ltr"><div><div><div><div><div><div><div><div>Sorry, I'm I am not looking at any code.<br clear="none"></div><div><br clear="none"></div>   tcrit = 30.<br clear="none"><br clear="none"></div>   f  = addfile(...)<br clear="none"></div>  T = f->T                  ; (time,lat,lon)<br clear="none"><br clear="none"><br clear="none">[1] "setting
 values below the threshold to _FillValue" is simple.<br clear="none"><br clear="none"><a rel="nofollow" shape="rect" target="_blank" href="https://www.ncl.ucar.edu/Document/Functions/Built-in/where.shtml">https://www.ncl.ucar.edu/ Document/Functions/Built-in/ where.shtml</a><br clear="none"><br clear="none"></div>   Tcrit = where(T.ge.tcrit, T, T@_FillValue)<br clear="none"></div>   copy_VarMeta(T, Tcrit)<br clear="none">===========<br clear="none"></div><div>[2] You do not need to do [1]<br clear="none"><br clear="none"></div><div>Maybe you could use the following function:<br clear="none"><br clear="none"></div><div>=========<br clear="none"><div><a rel="nofollow" shape="rect" target="_blank" href="http://www.ncl.ucar.edu/Document/Functions/Built-in/dim_numrun_n.shtml">http://www.ncl.ucar.edu/ Document/Functions/Built-in/ dim_numrun_n.shtml</a><br clear="none"></div><b>***Look at the examples***</b><br clear="none">=========<br clear="none"><br clear="none"></div>  T10= where(T.ge.tcrit,1, 0)  <br clear="none"></div><div>  T10@long_name = "Exceed=1; No=0"<br clear="none"></div>  copy_VarCoords(T, T10)<br clear="none"></div>  printVarSummary(T10)<br clear="none"><div><div><pre> r0 = <b>dim_numrun_n</b> (T10, <b>0</b>, 0)  ; (ntim,nlat,mlon)
 r1 = <b>dim_numrun_n</b> (T10, <b>1</b>, 0)  
<br clear="none"> copy_VarCoords(T, r0)<br clear="none"> copy_VarCoords(T, r1)<br clear="none"><br clear="none"></pre><pre>;---Pick one grid point to see what is happening<br clear="none"><br clear="none"></pre><pre>  LAT = ..<br clear="none">  LON = ..<br clear="none">  print(T(:,{LAT},{LON})+"  "+Tcrit(:,{LAT},{LON})+"  "+T10(:,{LAT},{LON}) \<br clear="none">                        +"  "r0(:,{LAT},{LON})+"   "+r1(:,{LAT},{LON})</pre><div><div>    <br clear="none"></div></div></div></div></div><div class="yiv4370141098m_-2788157640334770866yiv3612014882m_1897331985444617648m_3166969670626823163yiv5187759884m_6032098021478253683yiv0791746430m_-12244688286929487yiv0687598992gmail_extra"><br clear="none"><div class="yiv4370141098m_-2788157640334770866yiv3612014882m_1897331985444617648m_3166969670626823163yiv5187759884m_6032098021478253683yiv0791746430m_-12244688286929487yiv0687598992gmail_quote">On Fri, Mar 23, 2018 at 3:29 PM, Kiswendsida Hyacinthe GUIGMA <span dir="ltr"><<a rel="nofollow" shape="rect" ymailto="mailto:karongseba@gmail.com" target="_blank" href="mailto:karongseba@gmail.com">karongseba@gmail.com</a>></span> wrote:<br clear="none"><blockquote class="yiv4370141098m_-2788157640334770866yiv3612014882m_1897331985444617648m_3166969670626823163yiv5187759884m_6032098021478253683yiv0791746430m_-12244688286929487yiv0687598992gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div class="yiv4370141098m_-2788157640334770866yiv3612014882m_1897331985444617648m_3166969670626823163yiv5187759884m_6032098021478253683yiv0791746430m_-12244688286929487yiv0687598992yqt6827108155" id="yiv4370141098m_-2788157640334770866yiv3612014882m_1897331985444617648m_3166969670626823163yiv5187759884m_6032098021478253683yiv0791746430m_-12244688286929487yiv0687598992yqt42772"><div><div style="font-family:verdana, helvetica, sans-serif;font-size:16px;"><div style="font-family:verdana, helvetica, sans-serif;font-size:16px;"><div style="font-family:verdana, helvetica, sans-serif;font-size:16px;"><div><div>Dear NCL users,</div><div>I have 3D (time,lat,lon) array of 
temperature from which I would like to keep only sequences (consecutive 
days) exceeding a certain threshold.  This consist concretely in setting
 values below the threshold to _FillValue.  The length of sequence is 
set to 4. So far,  have been able  to set to _FillValu only individual 
days that exceed the threshold. Then I would be pleased if you could 
provide me with a method to also set to _FillValue values that are not 
into sequences of at least 04 days.</div><div><br clear="none"></div><div>Please find attached my data and my code.<br clear="none"></div><div><br clear="none"></div>Regards<div><br clear="none"></div><div><br clear="none"></div><div class="yiv4370141098m_-2788157640334770866yiv3612014882m_1897331985444617648m_3166969670626823163yiv5187759884m_6032098021478253683yiv0791746430m_-12244688286929487yiv0687598992m_7026875322926614417ydp786f0203signature">-----------------------------<br clear="none">GUIGMA</div></div></div></div></div></div></div><br clear="none">______________________________ _________________<br clear="none">
ncl-talk mailing list<br clear="none">
<a rel="nofollow" shape="rect" ymailto="mailto:ncl-talk@ucar.edu" target="_blank" href="mailto:ncl-talk@ucar.edu">ncl-talk@ucar.edu</a><br clear="none">
List instructions, subscriber options, unsubscribe:<br clear="none">
<a rel="nofollow" shape="rect" target="_blank" href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk">http://mailman.ucar.edu/ mailman/listinfo/ncl-talk</a><br clear="none">
<br clear="none"></blockquote></div><br clear="none"></div></div></div></div>
                </div>
            </div></div></div></div><br clear="none">______________________________ _________________<br clear="none">
ncl-talk mailing list<br clear="none">
<a rel="nofollow" shape="rect" ymailto="mailto:ncl-talk@ucar.edu" target="_blank" href="mailto:ncl-talk@ucar.edu">ncl-talk@ucar.edu</a><br clear="none">
List instructions, subscriber options, unsubscribe:<br clear="none">
<a rel="nofollow" shape="rect" target="_blank" href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk">http://mailman.ucar.edu/ mailman/listinfo/ncl-talk</a><br clear="none">
<br clear="none"></blockquote></div><br clear="none"></div></div></div></div></div></div>
                </div>
            </div></div></div></div></div></blockquote></div><br clear="none"></div></div></div></div></div>
                </div>
            </div></div></div></blockquote></div><br clear="none"></div>
</div></div></div><br clear="none"></div></div></div></div></div></div>
                </div>
            </div></div></div></div></div></blockquote></div><br clear="none"></div></div></div></div></div>
                </div>
            </div></div></body></html>