<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div class="">Dear Ioannis,</div><div class=""><br class=""></div>I think sometimes it is better if you just show the error message instead of asking people to download the data. For example your script simply generates the following error;<br class=""><div class=""><div class="">;=====</div><div class="">fatal:Number of subscripts do not match number of dimensions of variable,(2) Subscripts used, (1) Subscripts expected</div><div class="">fatal:["Execute.c":8575]:Execute: Error occurred at or near line 77 in file readwrite_dust_all_2.ncl</div><div class="">;=====</div><div class="">which should be a clear message and indicating where the error occurs.</div><div class=""><br class=""></div><div class="">Anyway, since you are only interested in the numbers, I think you would understandably do away with the outer loop and try something like;</div><div class=""><br class=""></div><div class="">;=====</div><div class="">&nbsp; &nbsp; &nbsp;aJ = addfile(FILES(0)+".nc","r")</div><div class="">&nbsp; &nbsp; &nbsp;bJ = addfile(FILES(1)+".nc","r")</div><div class="">&nbsp; &nbsp; &nbsp;…</div><div class="">&nbsp; &nbsp; &nbsp;dustJ1 &nbsp;= (/wrf_user_getvar(aJ,"DUST_1",it), wrf_user_getvar(bJ,"DUST_1",it)/)</div><div class="">&nbsp; &nbsp; &nbsp;.</div><div class="">&nbsp; &nbsp; &nbsp;.</div><div class="">&nbsp; &nbsp; &nbsp;.</div><div class="">&nbsp; &nbsp; &nbsp;dustJ5 &nbsp;= …</div><div class=""><br class=""></div><div class="">&nbsp; &nbsp; &nbsp;dustnew = dim_avg_n(dust_tot, (/0,1,2/))&nbsp;</div><div class="">&nbsp; &nbsp; &nbsp;.</div><div class="">&nbsp; &nbsp; &nbsp;.</div><div class="">&nbsp; &nbsp; &nbsp;.</div><div class="">;=====</div><div class=""><br class=""></div><div class="">See the attached script with such lines(modified from your original script).</div><div class=""><br class=""></div><div class="">Jack</div><div class=""><br class=""></div><div class=""></div></div></body></html>