<div dir="auto">I am following the second example you send to me.<div dir="auto"><br></div><div dir="auto">But can't understand how to set the loop for last 7 days files calling from list of files for weekly rainfall estimation on 7th, 8th, 9th and so and so on days..</div><div dir="auto"><br></div><div dir="auto">Thanks,</div><div dir="auto">Soma</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, May 4, 2021, 23:37 Brian Thomas <<a href="mailto:brian.thomas@washburn.edu">brian.thomas@washburn.edu</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">



<div style="word-wrap:break-word;line-break:after-white-space">
First you’ll need to be familiar with how to read CSV format.  There’s helpful info here:
<div><a href="https://www.ncl.ucar.edu/Applications/read_csv.shtml" target="_blank" rel="noreferrer">https://www.ncl.ucar.edu/Applications/read_csv.shtml</a></div>
<div><br>
</div>
<div>Then you should be able to just create a loop that cycles through the files and stores data in a single data structure (array), which you can then select from as you wish.<br>
<div><br>
<blockquote type="cite">
<div>On May 4, 2021, at 1:00 PM, <a href="mailto:ncl-talk-request@mailman.ucar.edu" target="_blank" rel="noreferrer">
ncl-talk-request@mailman.ucar.edu</a> wrote:</div>
<div>
<div><br>
<br>
----------------------------------------------------------------------<br>
<br>
Message: 1<br>
Date: Tue, 4 May 2021 19:10:18 +0530<br>
From: Soma Roy <<a href="mailto:somaroy892@gmail.com" target="_blank" rel="noreferrer">somaroy892@gmail.com</a>><br>
To: ncl-talk <<a href="mailto:ncl-talk@ucar.edu" target="_blank" rel="noreferrer">ncl-talk@ucar.edu</a>><br>
Subject: [ncl-talk] Weekly files_selection<br>
Message-ID:<br>
       <<a href="mailto:CAAJRSQdcLpuVv8RCCNPTsSNbzpkhhc8VYCaUu-U4FwHKBeKXbw@mail.gmail.com" target="_blank" rel="noreferrer">CAAJRSQdcLpuVv8RCCNPTsSNbzpkhhc8VYCaUu-U4FwHKBeKXbw@mail.gmail.com</a>><br>
Content-Type: text/plain; charset="utf-8"<br>
<br>
Hello NCL users,<br>
<br>
I am working for weekly rainfall.<br>
<blockquote type="cite">From model simulation, I am getting daily rainfall files in the directory.<br>
</blockquote>
<br>
Now, I want to select last 7 days rainfall files from directory for present<br>
date/days.<br>
<br>
Files are storing in the dir like:<br>
Day_1.csv<br>
Day_2.csv<br>
Day_3.csv<br>
.<br>
.<br>
Day_7.csv<br>
Day_8.csv<br>
And<br>
So on..<br>
<br>
On day 7th, I want to select 1st weekly rainfall (i.e. 1st 7 files avg.)<br>
And day 8th, it will take from Day_2 to Day_8 files and so on.<br>
<br>
Please kindly inform me how to do the above in NCL.<br>
<br>
Thanks in advance.<br>
<br>
Regards,<br>
Soma<br>
********************************<br>
</div>
</div>
</blockquote>
</div>
<br>
<div>
<div>
<div style="font-size:12px">@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@</div>
<div style="font-size:12px">Brian C. Thomas, PhD</div>
<div style="font-size:12px">Professor, Physics and Astronomy, Washburn University</div>
<div style="font-size:12px"><br>
</div>
<div style="font-size:12px"><a href="tel:(785)%20670-2144" value="+17856702144" target="_blank" rel="noreferrer">785-670-2144</a></div>
<div style="font-size:12px"><a href="mailto:brian.thomas@washburn.edu" target="_blank" rel="noreferrer">brian.thomas@washburn.edu</a></div>
<div style="font-size:12px"><br>
</div>
<div style="font-size:12px">Web: <a href="http://www.washburn.edu/faculty/bthomas/" target="_blank" rel="noreferrer">http://www.washburn.edu/faculty/bthomas/</a></div>
<div style="font-size:12px">
<div style="font-size:14px"><span style="font-size:12px">ORCID profile: <span style="text-align:-webkit-auto"><a href="http://orcid.org/0000-0001-9091-0830" target="_blank" rel="noreferrer">http://orcid.org/0000-0001-9091-0830</a></span></span></div>
<div>ResearchGate profile: <a href="https://www.researchgate.net/profile/Brian_Thomas" target="_blank" rel="noreferrer">https://www.researchgate.net/profile/Brian_Thomas</a></div>
</div>
<div style="font-size:12px"><br>
</div>
<div style="font-size:12px">Department of Physics and Astronomy</div>
<div style="font-size:12px">Washburn University</div>
<div style="font-size:12px"><a href="https://maps.google.com/?q=1700+SW+College+Ave.%0D+Topeka,+KS+66621&entry=gmail&source=g" target="_blank" rel="noreferrer">1700 SW College Ave.</a></div>
<div style="font-size:12px"><a href="https://maps.google.com/?q=1700+SW+College+Ave.%0D+Topeka,+KS+66621&entry=gmail&source=g" target="_blank" rel="noreferrer">Topeka, KS 66621</a></div>
<div style="font-size:12px"><br>
</div>
<div style="font-size:12px">@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@</div>
</div>
</div>
<br>
</div>
</div>

</blockquote></div>