[ncl-talk] addfiles error in ncl

Debasish Hazra debasish.hazra5 at gmail.com
Wed Nov 25 11:28:54 MST 2015


Hi,

 I am trying to read  bunch of files in ncl and at first it gave " ncl
fatal:incorrect size for list filevar subselection" error. Followed by ncl
examples I tried something like this :

 fname = systemfunc("ls -l ../../MODIS/Monthly/AOD/*.nc | awk '{print $5}'
")
       fsz = toint(fname)
       m = addfiles(fsz,"r")
       ListSetType (m, "join")

           print(fsz)
           printVarSummary(fsz)

         mod_aod = m[:]->MYD08_M3_051_Optical_Depth_Land_And_Ocean_Mean_Mean

which print outs and gave error as :

 Variable: fsz
Type: integer
Total Size: 576 bytes
            144 values
Number of Dimensions: 1
Dimensions and sizes:   [144]
Coordinates:
(0)     264160
(1)     263836
(2)     263836
(3)     263836
(4)     263836
(5)     263836
(6)     263836
(7)     263836
(8)     263836
(9)     263836
[SNIP]
(133)   522664
(134)   522664
(135)   522664
(136)   522664
(137)   522664
(138)   522668
(139)   522668
(140)   522668
(141)   522668
(142)   522664
(143)   522664

fatal:No valid instance of variable
MYD08_M3_051_Optical_Depth_Land_And_Ocean_Mean_Mean found in file list

However, ncl_filedump of this files show :
g4.subsetted.MYD08_M3_051_Optical_Depth_Land_And_Ocean_Mean_Mean.20130701.180W_90S_180E_90N.nc

shows
title : MYD08_M3_051_Optical_Depth_Land_And_Ocean_Mean_Mean
(180W_90S_180E_90N)
   dimensions:
      time = 1  // unlimited
      lat = 180
      lon = 360
   variables:
      float MYD08_M3_051_Optical_Depth_Land_And_Ocean_Mean_Mean ( time,
lat, lon )

Any help why this one is not working. Thanks.

Attached is the one of the many identical files I was trying to work on.

Debasish.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20151125/28f4cf61/attachment-0001.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: g4.subsetted.MYD08_M3_051_Optical_Depth_Land_And_Ocean_Mean_Mean.20030101.180W_90S_180E_90N.nc
Type: application/x-netcdf
Size: 264160 bytes
Desc: not available
Url : http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20151125/28f4cf61/attachment-0001.nc 


More information about the ncl-talk mailing list