<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<div class="moz-cite-prefix">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'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
cite="mid:CA+ObMND7ssNB=KxR3k5vwuChxzH3Ug7-3QCPNs-JY5ziBk2Mjw@mail.gmail.com"
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 class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
<a class="moz-txt-link-freetext" href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk">http://mailman.ucar.edu/mailman/listinfo/ncl-talk</a>
</pre>
</blockquote>
<br>
</body>
</html>