-
Notifications
You must be signed in to change notification settings - Fork 9
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
T28 + Python 3 support #15
Conversation
Conflicts: awot/io/flight.py modified: awot/io/flight.py
Added read_t28 call to the updated flight.py, and performed pep8 touchup.
Also did some pep8 cleanup. |
""" | ||
T-28 has enough differences from other aircraft netCDF files to | ||
warrant its own read script. | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did you try the updated NetCDF reader? It may do some of what you want if the NetCDF has a global attribute of Conventions with 'nimbus' in it. We could expand this if it works.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking at your code below, it appears to do the same stuff (mostly) as the updated netcdf reader. If we were able to generalize a couple of parts of the netcdf reader it should work.
I ordered and tried some data from the JPOLE experiment. The encouraging thing is that it appears that they use the same global attribute I mention above. But:
The reader bombs in these two spots.
-
I currently use the filename to pull out the dimension name and data acquisition rate. I'm not sure of a robust way to deal with this. We process the UWKA data anywhere between 1 - 50 Hz with many dimension included depending on if we downsample data.
-
Different
time
variables names. I guess we add a time variable flag that specifies which variable to use, otherwise attempt some common variables. The issue arises because of legacy code keeping things liketime
Time
HHMMSS
alive so that old code didn't need to be rewritten. We have some code here that has dust blown off it every few years and compiled and used.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, I agree there is code duplication. At the same time, I have effectively cordoned off the T-28 routines to their own code chunk. There is merit in just having customized read scripts since aircraft data are kind of all over the place in terms of formats.
Up to you what you want to do. All I care is the T-28 is read into flattened arrays. This io script is inelegant in some ways (not all), but it works.
I'm also okay just putting this in for now and seeing if we can manage to get the |
The recent pull request spooked me, because it altered flight.py, which I had already modified. That causes all sorts of git headaches, so I decided I should get this pull request into AWOT sooner rather than later.