Dear all, <br>I am computing the vertical integrated moisture transport (this is not the point) and get the right code for that. But now I meet with one problem. The data I use now are rhum.****.nc uwnd.****.nc vwnd.****.nc yearly data.(60 nc files for each one so 180 nc files totally) The below code is useful for one year data so the code is absolutely right. But now I want to compute the moisture transport over 60 years (1948-2007). At first I used the ncrcat command in linux to integrate the 60 nc files into one file but when I run the code it displayed the segmentation fault. And then I used the command systemfunc and addfiles in ncl to process that and also show some errors. So the only reason is there are too many files and the software can not see them as one big file to process. Now I am stuck here and don&#39;t know how to write one loop to solve that. Please your response will be appreciated! Thank u! <br>
<br>;***********************************************<br>load &quot;$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl&quot;<br>load &quot;$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl&quot;<br>load &quot;$NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl&quot;<br>
;***********************************************<br>;begin<br>;***********************************************<br>;read in netCDF file<br>;***********************************************<br>f1 = addfiles(&quot;<a href="http://rhum.1977.nc">rhum.1977.nc</a>&quot;,&quot;r&quot;)<br>
f2 = addfiles(&quot;<a href="http://uwnd.1977.nc">uwnd.1977.nc</a>&quot;,&quot;r&quot;)<br>f3 = addfiles(&quot;<a href="http://vwnd.1977.nc">vwnd.1977.nc</a>&quot;,&quot;r&quot;)<br>rhum = f1-&gt;rhum(:,:,:,:)<br>q = rhum/100+302.66<br>
copy_VarCoords(rhum,q)<br>uwnd = f2-&gt;uwnd(:,0:7,:,:)<br>u = uwnd/100+202.66<br>copy_VarCoords(uwnd,u)<br>vwnd = f3-&gt;vwnd(:,0:7,:,:)<br>v = vwnd/100+202.66<br>copy_VarCoords(vwnd,v)<br><br>qu=q*u<br>qv=q*v<br>copy_VarCoords(q,qu)<br>
copy_VarCoords(q,qv)<br><br>g = 9.81<br>q = qu+qv<br>copy_VarCoords(qu,q)<br><br>qint = dim_sum_Wrap(q(time|:,lat|:,lon|:,level|:))  ;*integration*******<br>Qint = dim_sum_Wrap(qint(lat|:,lon|:,time|:))<br>Qint = (Qint/g)            ;***********weight by gravity****************<br>
Qint@units = &quot;kg/ms&quot;<br>;************************************<br>;  create the plot1<br>;************************************<br>wks=gsn_open_wks(&quot;ps&quot;,&quot;q&quot;)<br><br>res                      = True               ; plot mods desired<br>
res@tiMainString         = &quot;vertical integrated moisture transport&quot;    ; main title<br>res@cnFillOn             = True               ; turn on color fill<br>plot = gsn_csm_contour_map(wks,Qint(:,:),res)<br><br>end<br>
<br><br><br><br>