<br><br>On Friday, November 14, 2014, Ipshita Majhi &lt;<a href="mailto:ipmajhi@alaska.edu">ipmajhi@alaska.edu</a>&gt; wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi<div>I want to extract years with 52 weeks and yeara with 53 weeks</div><div>I have a matrix going from 1968 to 2013 and that is year_52</div><div>Then i have few years which I have stored in week_53 </div></blockquote><div>I want to remove the years with 53 weeks from year_ 52 and then use those indices to extract snow cover extent</div><div>Thank you dor help<span></span> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><br><br>On Friday, November 14, 2014, Walter Kolczynski &lt;<a href="javascript:_e(%7B%7D,&#39;cvml&#39;,&#39;walter.kolczynski@noaa.gov&#39;);" target="_blank">walter.kolczynski@noaa.gov</a>&gt; wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
  
    
  
  <div text="#000000" bgcolor="#FFFFFF">
    <div>There are a several problems:<br>
      <br>
      1) Every time through the loop, you are overwriting your existing
      Year_52, so only the last iteration will control the end result.<br>
      2) Week_same(i) contains the index where the two weeks are the
      same, but then the equality in the where statement is checking for
      equality of that *index* with the *values* of year_52. Unless the
      values of year_52 are equal to the index, this is probably not
      what you want.<br>
      3) This code will fail if more than one value in week_52 and
      week_53 match.<br>
      <br>
      I&#39;m not sure exactly what you are trying to do, but I believe this
      structure is either wrong or just more complicated than you need.
      Can you tell us what you are trying to accomplish (i.e., what you
      expect Week_52 and Week_53 to be at the end)?<br>
      <br>
      - Walter Kolczynski<br>
      <br>
      On 14-Nov-14 17:35, Ipshita Majhi wrote:<br>
    </div>
    <blockquote type="cite">Hi
      <div>I am replacing indices that match with indices but the whole
        array gets replaced by fill values</div>
      <div><br>
      </div>
      do i = 0,9-1
      <div>Week_53=year_53(i)</div>
      <div>Week_same(i)=ind(year_52.eq.week_53)</div>
      <div>Year_52=where(year_52.eq.week_same(i),year_52,year_52@fillvalue)</div>
      end do
      <div><br>
      </div>
      It will be great if someone can help<span></span>
      <br>
      <fieldset></fieldset>
      <br>
      <pre>_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
<a href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk" target="_blank">http://mailman.ucar.edu/mailman/listinfo/ncl-talk</a>
</pre>
    </blockquote>
    <br>
  </div>

</blockquote></div></blockquote><div> </div>