<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">
Hi Dale Zuri,
<div class=""><br class="">
</div>
<div class="">Looking at your loop construction, you go through every i,j pair and make it 0. Then you go through every i,j pair, and make it 1… your end answer should be for every i,j pair should be 8242. </div>
<div class=""><br class="">
</div>
<div class="">-Jonathan</div>
<div class=""><br class="">
</div>
<div class=""><br class="">
<div><br class="">
<blockquote type="cite" class="">
<div class="">On Apr 29, 2020, at 5:15 AM, dale zuri via ncl-talk <<a href="mailto:ncl-talk@ucar.edu" class="">ncl-talk@ucar.edu</a>> wrote:</div>
<br class="Apple-interchange-newline">
<div class="">
<div dir="ltr" class="">Hi NCL user,<br class="">
<div class=""> I have been trying to assign number 1,2, 3 etc, for the specific locations. But this piece of code seems to break and not producing any results. I would appreciate any help to fix this problem. </div>
<div class=""><br class="">
</div>
<div class="">Thanks in advance!</div>
<div class=""><span style="font-variant-ligatures:no-common-ligatures;color:rgb(206,121,36)" class="">do</span><span style="font-variant-ligatures:no-common-ligatures" class=""> k=</span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(195,55,32)" class="">0,
8242</span><br class="">
</div>
<div class="">
<div style="margin: 0px; font-variant-numeric: normal; font-variant-east-asian: normal; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo;" class="">
<span style="font-variant-ligatures:no-common-ligatures;color:rgb(206,121,36)" class=""> do</span><span style="font-variant-ligatures:no-common-ligatures" class=""> i=</span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(195,55,32)" class="">0</span><span style="font-variant-ligatures:no-common-ligatures" class="">,(</span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(52,187,199)" class="">dimsizes</span><span style="font-variant-ligatures:no-common-ligatures" class="">(lat2d(:,</span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(195,55,32)" class="">0</span><span style="font-variant-ligatures:no-common-ligatures" class="">))-</span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(195,55,32)" class="">1</span><span style="font-variant-ligatures:no-common-ligatures" class="">)</span></div>
<div style="margin: 0px; font-variant-numeric: normal; font-variant-east-asian: normal; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo;" class="">
<span style="font-variant-ligatures:no-common-ligatures" class=""><span class="">
</span></span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(206,121,36)" class="">do</span><span style="font-variant-ligatures:no-common-ligatures" class=""> j=</span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(195,55,32)" class="">0</span><span style="font-variant-ligatures:no-common-ligatures" class="">,(</span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(52,187,199)" class="">dimsizes</span><span style="font-variant-ligatures:no-common-ligatures" class="">(lon2d(</span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(195,55,32)" class="">0</span><span style="font-variant-ligatures:no-common-ligatures" class="">,:))-</span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(195,55,32)" class="">1</span><span style="font-variant-ligatures:no-common-ligatures" class="">)</span></div>
<div style="margin: 0px; font-variant-numeric: normal; font-variant-east-asian: normal; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo;" class="">
<span style="font-variant-ligatures:no-common-ligatures" class=""><span class="">
</span></span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(206,121,36)" class="">if</span><span style="font-variant-ligatures:no-common-ligatures" class=""> (</span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(206,121,36)" class="">.not.</span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(52,187,199)" class="">ismissing</span><span style="font-variant-ligatures:no-common-ligatures" class="">(M(i,j))
</span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(206,121,36)" class="">.eq.</span><span style="font-variant-ligatures:no-common-ligatures" class="">
</span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(195,55,32)" class="">1</span><span style="font-variant-ligatures:no-common-ligatures" class="">)</span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(206,121,36)" class="">then</span></div>
<div style="margin: 0px; font-variant-numeric: normal; font-variant-east-asian: normal; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo;" class="">
<span style="font-variant-ligatures:no-common-ligatures" class=""><span class=""> M</span>(i,j)=<span class=""> k </span></span></div>
<div style="margin: 0px; font-variant-numeric: normal; font-variant-east-asian: normal; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo;" class="">
<span style="font-variant-ligatures:no-common-ligatures" class=""><span class="">
</span></span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(206,121,36)" class="">end</span><span style="font-variant-ligatures:no-common-ligatures" class="">
</span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(206,121,36)" class="">if</span></div>
<div style="margin: 0px; font-variant-numeric: normal; font-variant-east-asian: normal; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo;" class="">
<span style="font-variant-ligatures:no-common-ligatures" class=""><span class="">
</span></span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(206,121,36)" class="">end</span><span style="font-variant-ligatures:no-common-ligatures" class="">
</span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(206,121,36)" class="">do</span></div>
<div style="margin: 0px; font-variant-numeric: normal; font-variant-east-asian: normal; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(206, 121, 36);" class="">
<span style="font-variant-ligatures:no-common-ligatures" class=""> end</span><span style="font-variant-ligatures: no-common-ligatures;" class="">
</span><span style="font-variant-ligatures:no-common-ligatures" class="">do</span></div>
<div style="margin: 0px; font-variant-numeric: normal; font-variant-east-asian: normal; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(206, 121, 36);" class="">
<span style="font-variant-ligatures:no-common-ligatures" class="">end do</span></div>
<div style="margin: 0px; font-variant-numeric: normal; font-variant-east-asian: normal; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(206, 121, 36);" class="">
<span style="font-variant-ligatures:no-common-ligatures" class=""><br class="">
</span></div>
<div style="margin: 0px; font-variant-numeric: normal; font-variant-east-asian: normal; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(206, 121, 36);" class="">
<span style="font-variant-ligatures:no-common-ligatures" class=""><br class="">
</span></div>
</div>
</div>
_______________________________________________<br class="">
ncl-talk mailing list<br class="">
<a href="mailto:ncl-talk@ucar.edu" class="">ncl-talk@ucar.edu</a><br class="">
List instructions, subscriber options, unsubscribe:<br class="">
http://mailman.ucar.edu/mailman/listinfo/ncl-talk</div>
</blockquote>
</div>
<br class="">
</div>
</body>
</html>