-
Notifications
You must be signed in to change notification settings - Fork 25
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
Opening GDAS BUFR files with the python API #577
Comments
The python wrapper you are using is now included in nceplib-bufr itself,
you should probably use that version as the code you are using is very old.
If you are feeling very patient you could try this one:
https://github.com/NOAA-EMC/bufr-query
|
Thank you very much for the quick response Ron! I've tried both nceplib-bufr and the new bufr-query repo. For nceplib-bufr I tried downloading the release from https://github.com/NOAA-EMC/NCEPLIBS-bufr/releases then For bufr-query is there any documentation available for installation? |
Hi @rmclaren, and thanks for the quick reply! Also copying in @jbathegit who discussed a similar issue (#530) and may know more about this. Just to add to @annavaughan's issue: it seems that (as discussed in issue #530, see this comment and following comments) when running
With my conda virtual environment enabled, I then run
At this point, one of the messages from
In my local machine, the download works fine, and I can see the files under
seems to work fine except
And then try to load it in python:
So |
@annavaughan The python path should be extended with the the site-packages directory that appears in the NCEPLIB-bufr install directory. So for example /lib/python3.12/site-packages (path will vary depending on the version of python you are using). You can either extend it on the command line ( The bufr-query thing has a lot of dependencies which might be hard for you to build (JCSDA oops, ioda, etc...) which I'm working to remove (uuuugggg)... So might want to hold off for now. |
@stratisMarkou I'm going to let the NCEPLIB-bufr maintainers answer your question. |
Sorry, but for my part I'm afraid I don't have much to contribute. The python binding and associated modules is the part of the library I'm least knowledgeable about personally (I'm more of a Fortran and C person myself w.r.t. code development, in addition to being the overall library manager :-) But what I can do is bring a few other folks into this discussion (@AlexanderRichert-NOAA, @jswhit, @climbfuji, @edwardhartnett, @aerorahul) who might be able to help. That said, please note that #530 was specifically related to the new Intel oneAPI compilers, and Alex in particular has been working further on that in #538, but it's still not resolved. Otherwise, the only way I can see that either of those might be related to this issue is in the aspect of being able to download the test tarfile, which was really just a side part of the discussion in #530. So if you're still having that problem(?), could you please specify which particular release version of the code you were trying to download from https://github.com/NOAA-EMC/NCEPLIBS-bufr/releases? If it was 11.5.0 or older, then that might well explain that issue, and I would respectfully suggest you to try downloading a newer release as noted in #530. |
No further responses received, so closing this issue. |
In HPC You can use following procedure -: ncepbufr installation -: |
Is it possible to open GDAS files using the python API?
We are trying to open GDAS AMSU-A files (e.g https://data.rda.ucar.edu/ds735.0/1bamua/2005/1bamua.20050109.tar.gz) and extract data
We have tried:
git clone https://github.com/EXWEXs/py-ncepbufr.git
cd py-ncepbufr
python setup.py build
python setup.py install
And then running (from the notebook found at https://github.com/NOAA-EMC/NCEPLIBS-bufr/blob/develop/python/test/Python_tutorial_bufr.ipynb)
import ncepbufr
bufr = ncepbufr.open("gdas.1bamua.t12z.20210107.bufr")
bufr.advance()
bufr.load_subset()
Which fails on bufr.load_subset() with exit code -1. It looks like py-ncepbufr is unmaintained, is there another way to do this within NCEPLIBS-bufr? Thanks!
The text was updated successfully, but these errors were encountered: