[ncl-talk] problem dimension size when reading in files - a bug in NCL6.5?

Anne anne.seidenglanz at unive.it
Fri Aug 2 04:10:56 MDT 2019


Hi,

I want to read in and append multiple files using NCL's 'systemfunc'
function, like so:

1   VAR = 1         ; 1-ICE  2-T2M  3-SHF  4-Z500  5-U250
2    Field = "ICE"
3
4   do i=0,dimsizes(years)-1
5            dir_s ="/work/as10017/CESM/archive/Data_ICEFREE/Grid_all/"
6           dir_c ="/work/as10017/SPS_hindcast/Control_of_ICEFREE/Grid_all/"
7            fil_s1 = systemfunc("ls
"+dir_s+"/sps_"+years(i)+"11_0??_icef.cam.h0.6mth_grid.all.nc_"+Field+"_BK_avg")
  ; "+years(i)+"
8            fil_c1 = systemfunc("ls
"+dir_c+"/sps_"+years(i)+"11_0??.cam.h0.6mth_grid.all.nc_"+Field+"_BK_avg")
    ; "+years(i)+"
9            f_s1 = addfiles(fil_s1,"r")
10            f_c1 = addfiles(fil_c1, "r")
11
12        if (VAR.eq.1)
13          varS = f_s1[:]->ICEFRAC(:,0,0)
14          varC = f_c1[:]->ICEFRAC(:,0,0)
15
16  end if

I have run this script one million times before, all of a sudden NCL
complains 'Dimension sizes of left hand side and right hand side of
assignment do not match' in line 7 above  (where fil_s1 is defined for the
first time) but I have not defined this variable anywhere before as it's
really the beginning of the script..   Interestingly, this error message
disappears when I comment 'end' at the end of the script and also
apparently it depends where I insert 'exit' for testing the script.. Could
there be a bug in NCL 6.5 ? I attach the full script. I'm running NCL 6.5.

Thanks
Anne

-- 
Nota automatica aggiunta dal sistema di posta.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20190802/8ad87d09/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: scatter_timeseries.test.ncl
Type: application/octet-stream
Size: 7814 bytes
Desc: not available
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20190802/8ad87d09/attachment.obj>


More information about the ncl-talk mailing list