<div dir="ltr"><div>NCL's <b>systemfunc</b> is invoking the Unix/Linux system 'ls'. It is *independent* of NCL.<br></div><div><br></div><div>From directory your NCL script is located, enter the following at the command line:<br></div><div><br></div><div>%>  ls [1-2][8-9-0-1]*/*nc</div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Jun 28, 2022 at 11:46 AM Setareh Rahimi <<a href="mailto:setareh.rahimi@gmail.com">setareh.rahimi@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>Dear Dennis,</div><div>Many thanks for your email. I run the attached script and received the attached error.</div><div>What is wrong, please?<br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Jun 28, 2022 at 10:07 PM Dennis Shea <<a href="mailto:shea@ucar.edu" target="_blank">shea@ucar.edu</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>As indicated before, your path is wrong.</div><div>====</div><div>The attached works just fine.<br></div><div><br></div><div>%>  ncl NDVI_TimeSeries.ncl >&! NDVI.Daily_to_Monthly.txt<br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Jun 28, 2022 at 10:25 AM Setareh Rahimi via ncl-talk <<a href="mailto:ncl-talk@mailman.ucar.edu" target="_blank">ncl-talk@mailman.ucar.edu</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>Dear all,</div><div><br></div><div>I have downloaded <span style="background-color:rgb(241,194,50)"><font size="2"><span style="font-family:arial,sans-serif"><span style="font-weight:normal">the Normalized Difference Vegetation Index</span></span></font> (NDVI), from the Advanced Very High-Resolution Radiometer (AVHRR) s<span style="background-color:rgb(255,255,255)">ensor from the link below: </span><br></span></div><div><span style="background-color:rgb(234,153,153)"><a href="https://www.ncei.noaa.gov/metadata/geoportal/rest/metadata/item/gov.noaa.ncdc:C01558/html" target="_blank">https://www.ncei.noaa.gov/metadata/geoportal/rest/metadata/item/gov.noaa.ncdc:C01558/html</a> <br></span></div><div><span style="background-color:rgb(234,153,153)"><br></span></div><div><span style="background-color:rgb(255,255,255)">As you can see this link provides daily data. And I have downloaded daily data from 1986 to 2021. I put the daily data for each year in a separate folder. <br></span></div><div><span style="background-color:rgb(234,153,153)"><span style="background-color:rgb(255,255,255)">Now I tend to calculate the monthly anomaly of NDVI and do not know how to combine all these files. </span><br></span></div><div><span style="background-color:rgb(234,153,153)"><br></span></div><div><span style="background-color:rgb(234,153,153)"><span style="background-color:rgb(255,255,255)">I used the below commands to call the files:</span><br></span></div><div><span style="background-color:rgb(234,153,153)"><span style="background-color:rgb(255,255,255)">========================================</span><br></span></div><div><span style="background-color:rgb(234,153,153)"><span style="background-color:rgb(182,215,168)">fils = systemfunc("ls [1-2][8-9-0-1]*/*nc")<br>   print(fils)<br><br>   f   = addfiles (fils, "r")<br><br>   x   = short2flt(f[:]->NDVI)<br><br>   printVarSummary(x)</span></span></div><div><span style="background-color:rgb(234,153,153)"><span style="background-color:rgb(255,255,255)">=========================================</span><br></span></div><div><span style="background-color:rgb(255,255,255)">but got the attached error! Please have a look at the attached screenshot.</span></div><div><span style="background-color:rgb(234,153,153)"><span style="background-color:rgb(255,255,255)">How can I combine all those files together, please?</span></span></div><div><span style="background-color:rgb(255,255,255)">I really appreciate any help you can provide.</span></div><div><span style="background-color:rgb(234,153,153)"><span style="background-color:rgb(255,255,255)">Best wishes,</span><br></span></div><div><span style="background-color:rgb(241,194,50)"><br></span></div><div>-- <br><div dir="ltr">S.Rahimi<br><br></div></div></div>
_______________________________________________<br>
ncl-talk mailing list<br>
<a href="mailto:ncl-talk@mailman.ucar.edu" target="_blank">ncl-talk@mailman.ucar.edu</a><br>
List instructions, subscriber options, unsubscribe:<br>
<a href="https://mailman.ucar.edu/mailman/listinfo/ncl-talk" rel="noreferrer" target="_blank">https://mailman.ucar.edu/mailman/listinfo/ncl-talk</a><br>
</blockquote></div>
</blockquote></div><br clear="all"><br>-- <br><div dir="ltr">S.Rahimi<br><br></div>
</blockquote></div>