[ncl-talk] How to combine many separate nc files together and convert them to monthly?

Setareh Rahimi setareh.rahimi at gmail.com
Tue Jun 28 11:46:03 MDT 2022


Dear Dennis,
Many thanks for your email. I run the attached script and received the
attached error.
What is wrong, please?

On Tue, Jun 28, 2022 at 10:07 PM Dennis Shea <shea at ucar.edu> wrote:

> As indicated before, your path is wrong.
> ====
> The attached works just fine.
>
> %>  ncl NDVI_TimeSeries.ncl >&! NDVI.Daily_to_Monthly.txt
>
> On Tue, Jun 28, 2022 at 10:25 AM Setareh Rahimi via ncl-talk <
> ncl-talk at mailman.ucar.edu> wrote:
>
>> Dear all,
>>
>> I have downloaded the Normalized Difference Vegetation Index (NDVI),
>> from the Advanced Very High-Resolution Radiometer (AVHRR) sensor from
>> the link below:
>>
>> https://www.ncei.noaa.gov/metadata/geoportal/rest/metadata/item/gov.noaa.ncdc:C01558/html
>>
>> 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.
>> Now I tend to calculate the monthly anomaly of NDVI and do not know how
>> to combine all these files.
>>
>> I used the below commands to call the files:
>> ========================================
>> fils = systemfunc("ls [1-2][8-9-0-1]*/*nc")
>>    print(fils)
>>
>>    f   = addfiles (fils, "r")
>>
>>    x   = short2flt(f[:]->NDVI)
>>
>>    printVarSummary(x)
>> =========================================
>> but got the attached error! Please have a look at the attached screenshot.
>> How can I combine all those files together, please?
>> I really appreciate any help you can provide.
>> Best wishes,
>>
>> --
>> S.Rahimi
>>
>> _______________________________________________
>> ncl-talk mailing list
>> ncl-talk at mailman.ucar.edu
>> List instructions, subscriber options, unsubscribe:
>> https://mailman.ucar.edu/mailman/listinfo/ncl-talk
>>
>

-- 
S.Rahimi
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.ucar.edu/pipermail/ncl-talk/attachments/20220628/ff0291b2/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Screen Shot 1401-04-07 at 10.14.13 PM.png
Type: image/png
Size: 97395 bytes
Desc: not available
URL: <https://mailman.ucar.edu/pipermail/ncl-talk/attachments/20220628/ff0291b2/attachment-0001.png>


More information about the ncl-talk mailing list