<div dir="ltr"><div dir="ltr"><div dir="ltr"><div class="gmail_default" style="font-family:verdana,sans-serif">Dear All<br></div><div class="gmail_default" style="font-family:verdana,sans-serif"><br></div><div class="gmail_default" style="font-family:verdana,sans-serif">I need one help related to Do loop in NCL. </div><div class="gmail_default" style="font-family:verdana,sans-serif"><br></div><div class="gmail_default" style="font-family:verdana,sans-serif">I have attached a code, the target of the code is to take data for few lat, long points represented by Do loops of j and k. Collected data values for the desired lat long need to put in the variable temp_file. Therefore, what I expect temp_file should be populated with all the data values(from spd variable) corresponding to the lat long in 'loc' variable. Here the loop of j and k completes when j and k run from loc(1,0) to loc(1,1) and loc(0,0) to loc(0,1). Once the data has been collected in temp_file, next target is to take average of all the data and put it in the variable final_spd. Here average value is put in the variable temp_avg. The same iteration needs to do for 48 different times. </div><div class="gmail_default" style="font-family:verdana,sans-serif"><br></div><div class="gmail_default" style="font-family:verdana,sans-serif">Here what I noticed the loop of j and k each time filled the temp_file with a single value upto its dimension 30 and each iteration of j and k did the same task. Therefore, instead of taking average over various data value corresponding to different lat long it takes average on a single value that arises during the last iteration and put it in the final_spd variable. </div><div class="gmail_default" style="font-family:verdana,sans-serif"><br></div><div class="gmail_default" style="font-family:verdana,sans-serif">What I want is to take all the data corresponds to the j and k loop corresponding to a particular time (represented by i loop) and take the average over those data and put it in the final_spd variable and need to do the same task for next 47 hours and put the average in final_spd variable. So what I expect the final_spd variable should have 1 column and 48 different row. </div><div class="gmail_default" style="font-family:verdana,sans-serif"><br></div><div class="gmail_default" style="font-family:verdana,sans-serif">Please suggest me how to do the same. </div><div class="gmail_default" style="font-family:verdana,sans-serif"><br></div><div class="gmail_default" style="font-family:verdana,sans-serif"><br></div><div class="gmail_default" style="font-family:verdana,sans-serif">Thanks & Regards</div><div class="gmail_default" style="font-family:verdana,sans-serif">Trisanu</div><div class="gmail_default" style="font-family:verdana,sans-serif"><br></div><div><div dir="ltr"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div style="text-align:center"><div style="text-align:left"><b><font face="verdana, sans-serif">Trisanu Banik,PhD</font></b></div><div style="text-align:left"><b><font face="verdana, sans-serif">Research Scientist<br></font></b></div><div>
</div><div style="text-align:left"><b><font face="verdana, sans-serif">North Eastern Space Applications Centre (NESAC)<br></font></b></div><div style="text-align:left"><font face="verdana, sans-serif"><b style="font-size:12.8px"><span style="font-size:12.8px">Government of India</span></b><br></font></div><div style="text-align:left"><font face="verdana, sans-serif"><b style="font-size:12.8px"><span style="font-size:12.8px">Department of Space</span></b><b style="font-size:12.8px"><span style="font-size:12.8px"><br></span></b></font></div><div style="text-align:left"><b><font face="verdana, sans-serif"><span style="font-size:12.8px">Umiam-793103, Meghalaya</span><br></font></b></div><div style="text-align:left"><b><font face="verdana, sans-serif">Mobile-9774837581</font></b></div><div style="text-align:left"><br></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div>