Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

read error with 2110 ngv file #15

Open
fearon10 opened this issue Aug 13, 2018 · 0 comments
Open

read error with 2110 ngv file #15

fearon10 opened this issue Aug 13, 2018 · 0 comments

Comments

@fearon10
Copy link

Hi Ag,
Just installed nappy with my conda py2.7.14 as I would like to read some 2110 FFI files. Nappy imports fine, however, I receive the following error when trying to open a 2110 FFI file. Was curious if there is a workaround. I apologize if the answer is posted elsewhere, I did search around without success. I get a similar problem when running na2nc to convert to netcdf. I posted a snippet of the header and each error below. Would be great to get your feedback as you have time.

thanks,
Matt

----MP20140613.NGV
64 2110
Julie Haggerty ([email protected])
NCAR, Boulder, CO
NGV Microwave Temperature Profiler (MTP/NGV)
DEEPWAVE Production Data
1 1
2014 06 13 2015 04 24 20140008 {FLT DATE, REDUCTION DATE & FLIGHT NUMBER}
0.0 0.0

---error with na2nc

na2nc -t "seconds since 1999-01-01 00:00:00" -i /scratch/fearon/deepwave/temperature_profiler/MP20140613.NGV -o test.nc
Traceback (most recent call last):
File "/users/fearon/.conda/envs/pyn_env/bin/na2nc", line 11, in
load_entry_point('nappy==1.1.4', 'console_scripts', 'na2nc')()
File "/users/fearon/.conda/envs/pyn_env/lib/python2.7/site-packages/nappy-1.1.4-py2.7.egg/nappy/script/na2nc.py", line 120, in na2nc
nc_file = apply(nappy.convertNAToNC, [na_file], arg_dict)
File "/users/fearon/.conda/envs/pyn_env/lib/python2.7/site-packages/nappy-1.1.4-py2.7.egg/nappy/nappy_api.py", line 206, in convertNAToNC
convertor = apply(nappy.nc_interface.na_to_nc.NAToNC, [], arg_dict)
File "/users/fearon/.conda/envs/pyn_env/lib/python2.7/site-packages/nappy-1.1.4-py2.7.egg/nappy/nc_interface/na_to_nc.py", line 54, in init
na_file_obj = nappy.openNAFile(na_file_obj)
File "/users/fearon/.conda/envs/pyn_env/lib/python2.7/site-packages/nappy-1.1.4-py2.7.egg/nappy/nappy_api.py", line 164, in openNAFile
return apply(getNAFileClass(ffi), (filename, mode))
File "/users/fearon/.conda/envs/pyn_env/lib/python2.7/site-packages/nappy-1.1.4-py2.7.egg/nappy/na_file/na_file.py", line 70, in init
self.readHeader()
File "/users/fearon/.conda/envs/pyn_env/lib/python2.7/site-packages/nappy-1.1.4-py2.7.egg/nappy/na_file/na_file_2110.py", line 32, in readHeader
self._readCommonHeader()
File "/users/fearon/.conda/envs/pyn_env/lib/python2.7/site-packages/nappy-1.1.4-py2.7.egg/nappy/na_file/na_file.py", line 183, in _readCommonHeader
dates = nappy.utils.text_parser.readItemsFromLine(self.file.readline(), 6, int)
File "/users/fearon/.conda/envs/pyn_env/lib/python2.7/site-packages/nappy-1.1.4-py2.7.egg/nappy/utils/text_parser.py", line 44, in readItemsFromLine
raise "Incorrect number of items (%s) found in line: \n'%s'" % (nitems, line)
TypeError: exceptions must be old-style classes or derived from BaseException, not str

---error with nappy within python

python 2.7.14 |Anaconda, Inc.| (default, Dec 7 2017, 17:05:42)
[GCC 7.2.0] on linux2
Type "help", "copyright", "credits" or "license" for more information.

import nappy
myfile = nappy.openNAFile('/scratch/fearon/deepwave/temperature_profiler/MP20140624.NGV')
Traceback (most recent call last):
File "", line 1, in
File "/users/fearon/.conda/envs/pyn_env/lib/python2.7/site-packages/nappy-1.1.4-py2.7.egg/nappy/nappy_api.py", line 164, in openNAFile
return apply(getNAFileClass(ffi), (filename, mode))
File "/users/fearon/.conda/envs/pyn_env/lib/python2.7/site-packages/nappy-1.1.4-py2.7.egg/nappy/na_file/na_file.py", line 70, in init
self.readHeader()
File "/users/fearon/.conda/envs/pyn_env/lib/python2.7/site-packages/nappy-1.1.4-py2.7.egg/nappy/na_file/na_file_2110.py", line 32, in readHeader
self._readCommonHeader()
File "/users/fearon/.conda/envs/pyn_env/lib/python2.7/site-packages/nappy-1.1.4-py2.7.egg/nappy/na_file/na_file.py", line 183, in _readCommonHeader
dates = nappy.utils.text_parser.readItemsFromLine(self.file.readline(), 6, int)
File "/users/fearon/.conda/envs/pyn_env/lib/python2.7/site-packages/nappy-1.1.4-py2.7.egg/nappy/utils/text_parser.py", line 44, in readItemsFromLine
raise "Incorrect number of items (%s) found in line: \n'%s'" % (nitems, line)
TypeError: exceptions must be old-style classes or derived from BaseException, not str
myfile = nappy.openNAFile('/scratch/fearon/deepwave/temperature_profiler/MP20140624.NGV')
Traceback (most recent call last):
File "", line 1, in
File "/users/fearon/.conda/envs/pyn_env/lib/python2.7/site-packages/nappy-1.1.4-py2.7.egg/nappy/nappy_api.py", line 164, in openNAFile
return apply(getNAFileClass(ffi), (filename, mode))
File "/users/fearon/.conda/envs/pyn_env/lib/python2.7/site-packages/nappy-1.1.4-py2.7.egg/nappy/na_file/na_file.py", line 70, in init
self.readHeader()
File "/users/fearon/.conda/envs/pyn_env/lib/python2.7/site-packages/nappy-1.1.4-py2.7.egg/nappy/na_file/na_file_2110.py", line 32, in readHeader
self._readCommonHeader()
File "/users/fearon/.conda/envs/pyn_env/lib/python2.7/site-packages/nappy-1.1.4-py2.7.egg/nappy/na_file/na_file.py", line 183, in _readCommonHeader
dates = nappy.utils.text_parser.readItemsFromLine(self.file.readline(), 6, int)
File "/users/fearon/.conda/envs/pyn_env/lib/python2.7/site-packages/nappy-1.1.4-py2.7.egg/nappy/utils/text_parser.py", line 44, in readItemsFromLine
raise "Incorrect number of items (%s) found in line: \n'%s'" % (nitems, line)
TypeError: exceptions must be old-style classes or derived from BaseException, not str

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant