Thank you Mr. Saurabh,After a long fight, your solution is what I need.Best,Saat M.On Tue, Jul 23, 2019 at 9:47 AM saurabh rathore <rohitsrb2020@xxxxxxxxx> wrote:Hi Saat,G'dayThere is a function in CDO called as "ensmean" which can solve your problem if you want to average (ensemble mean) the variable/s.you can do like this using the wild card in CDO.cdo -r -f nc4 ensmean sst*.nc ensemble_mean_output.nchere *.nc covers all the files that you want to average with the help of * wild card. You have to be careful while using wild card " * " because if you are using *.nc it will take all the netcdf files present in the folder. So better that you make a separate folder that contains only those files that you want to use for a particular operation.this is the direct way to do mean of variable/s across multiple files.let me know if this doesn't work. we will try something else also with the help of ferret.cheers, saurabhOn Tue, Jul 23, 2019 at 10:21 AM Saat Mubarrok <saatmubarrok@xxxxxxxxx> wrote:Dear Satyesh,Thank you very much for your reply.But if I have more variables like 30 or even 100, should I do manually also?Best regards,Saat M.On Mon, Jul 22, 2019 at 8:00 PM Satyesh Ghetiya <satyeshghetiya@xxxxxxxxx> wrote:Following types of expressions are not allowed in Ferret unlike other programming languages : "let ave=ave+2"For the loop, you may do this:repeat/name=me/range=1:6 (\)let sst_ave=(sst[d=1]+sst[d=2]+sst[d=3]+sst[d=4]+sst[d=5]+sst[d=6])/6This is usual way for limited number of variables (e.g. here 6)Regards,G SatyeshOn Mon, Jul 22, 2019 at 2:24 PM Saat Mubarrok <saatmubarrok@xxxxxxxxx> wrote:Dear community,I am new to ferret and trying to do a summation using repeat. Let say I have 6 datasets with same variable on it (sst). I want to averaging those variables. What is the best method to do that in ferret?set region/x=20e:120e/y=30s:30n/k=1let temp= {"2002","2003","2004","2006","2007","2010"}let ave`me`=sst[d=`me`];\let ave=ave+ave`me`;\)fill/nolab/lev=(-inf)(23,32,2)(inf) ave/6
the error I get is
**ERROR: stack overflowAny lead is much appreciate. Thank you
Saat M.--REGARDSSaurabh RathoreResearch Scholar (PhD.)Centre For Oceans, Rivers, Atmosphere & Land Science TechnologyIndian Institute Of Technology, Kharagpurcontact :- 91- 8345984434