You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Running on crunchy (there is only one file in this directory): cd /p/user_pub/work/pochedley1/cmip5/piControl/hfss/ cdscan -x test.xml *.nc
I get this error: Finding common directory ... Common directory: Scanning files ... hfss_Amon_MRI-CGCM3_piControl_r1i1p1_185101-235012.nc Setting reference time units to days since 1851-01-01 Traceback (most recent call last): File "/export_backup2/pochedley1/bin/anaconda2/envs/uvcdate/bin/cdscan", line 1684, in <module> main(sys.argv) File "/export_backup2/pochedley1/bin/anaconda2/envs/uvcdate/bin/cdscan", line 1638, in main cleanupAttrs(attrs) File "/export_backup2/pochedley1/bin/anaconda2/envs/uvcdate/bin/cdscan", line 467, in cleanupAttrs if len(numpy.array(attval))==1: TypeError: len() of unsized object
I printed out the attribute / type / value: ... _FillValue <type 'numpy.ndarray'> [ 1.00000002e+20] missing_value <type 'numpy.ndarray'> [ 1.00000002e+20] missing_value <type 'numpy.ndarray'> 1e+20
Note that the last missing value prints differently than the prior two attributes (it looks like it isn't an array). This seems to be failing despite the logic added by @painter1 in #2145. Any insight on what is going on would be appreciated! I get this error with v2.8 or a nightly build from last week.
The text was updated successfully, but these errors were encountered:
For some reason, I thought issue #2145 was closed. If I modify my cdscan function following @painter1's suggested update to cleanupAttrs(), cdscan appears to work.
I'll leave this updated function in place and this ticket can be closed as a duplicated.
Running on crunchy (there is only one file in this directory):
cd /p/user_pub/work/pochedley1/cmip5/piControl/hfss/
cdscan -x test.xml *.nc
I get this error:
Finding common directory ... Common directory: Scanning files ... hfss_Amon_MRI-CGCM3_piControl_r1i1p1_185101-235012.nc Setting reference time units to days since 1851-01-01 Traceback (most recent call last): File "/export_backup2/pochedley1/bin/anaconda2/envs/uvcdate/bin/cdscan", line 1684, in <module> main(sys.argv) File "/export_backup2/pochedley1/bin/anaconda2/envs/uvcdate/bin/cdscan", line 1638, in main cleanupAttrs(attrs) File "/export_backup2/pochedley1/bin/anaconda2/envs/uvcdate/bin/cdscan", line 467, in cleanupAttrs if len(numpy.array(attval))==1: TypeError: len() of unsized object
I printed out the attribute / type / value:
...
_FillValue <type 'numpy.ndarray'> [ 1.00000002e+20]
missing_value <type 'numpy.ndarray'> [ 1.00000002e+20]
missing_value <type 'numpy.ndarray'> 1e+20
Note that the last missing value prints differently than the prior two attributes (it looks like it isn't an array). This seems to be failing despite the logic added by @painter1 in #2145. Any insight on what is going on would be appreciated! I get this error with v2.8 or a nightly build from last week.
The text was updated successfully, but these errors were encountered: