-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi all,
We are in the process of migrating some of our software from the grib1 to the
grib2 format, and thus are looking for some solutions involving python.
Now, we have two possibilities: GDAL and PyGRIB2, which are based on the NCEP's API.
The problem is that in our tests, NCEP's API cannot read OSISAF grib2 files for
example, due to missing templates. It seems moreover that the templates are hard
coded in NCEP's API.
Hence we are considering writing a small python wrapper around the ECMWF grib2
API (small since we just need reading).
Have any of you been facing this problem ?
Are you aware of other possibilities ?
Any suggestions ?
Thanks,
Martin Raspaud, SMHI
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org/
iQEcBAEBAgAGBQJLXZZHAAoJEBdvyODiyJI4wGMIAKc8KzOHvvQwHM+vGG1Wc6PA
UI8OH0sH7wi2dTKr/gC3JygnLaZ/DZi637oNsMSRFjDxqQwkzEfLT3cb5o0r06Dh
R/HSHgzaP5ajeGI/8ks3sUvbRNhtvXTzCg+QePKsX2iOoXtTYvR6KNWMHKHfVl9F
1NINoLX+dCR9DO82vWfOK5IjSBIs4kh+h+ga+whoTGxk57FpagE5glStDX57pn/n
n9HOwtDa06ZTn4t7sO9UqEr2r8oUQdvk+rtA+nYYpyQgr0+6k8wzhArTrNuJN2F4
d8Q4SoM/GuZ7mOrTMeWZ7C5yCZXxOOBalSgSuu6YjIJvFbgWQIKFmpxdZC38N4A=
=cD59
-----END PGP SIGNATURE-----
in stead of writing a wrapper, you could consider taking the f2py tool
and let it generate the wrapper for you. I did this for the ECMWF BUFR
library (see http://code.google.com/p/pybufr-ecmwf/) and at least for
all fortran routines this seems to work just fine.
I am having some trouble interfacing with the pb-routines for reading
the raw data (since they are implemented in c), but these are fairly
easy to re-implement in python.
If you are using numerical data in python you will have numpy
installed anyway I guess, and this f2py tools comes along with this
library, so chances are that you have it already installed as well.
I would be happy to give you a hand if you wish to follow this
approach.
Best regards,
Jos de Kloe, KNMI.
Hi,
Isn't the "new" ECMWF Grib API written in C?
Best
Adam
If that's the case, then you can probably use SWIG to generate an
interface for it.
Best,
Maarten
> JdeKloe wrote:
> > in stead of writing a wrapper, you could consider taking the f2py tool
> > and let it generate the wrapper for you. I did this for the ECMWF BUFR
> > library (seehttp://code.google.com/p/pybufr-ecmwf/) and at least for
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Maarten skrev:
> On Jan 26, 2:49 pm, "Dybbroe Adam" <Adam.Dybb...@smhi.se> wrote:
>> Hi,
>>
>> Isn't the "new" ECMWF Grib API written in C?
>
> If that's the case, then you can probably use SWIG to generate an
> interface for it.
Hi,
This is probably what we will do.
Thanks for the answers,
Martin
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org/
iQEcBAEBAgAGBQJLXwrRAAoJEBdvyODiyJI47R0H/iu0228Ghjr5LmW7qfWBYgOY
4heFzQ4OYvKSrPvoM2RAJo4gWVmwgUoZtr31oWE996pp9yGEwm7hlq9EO9hPI0rZ
k71191JilDnf6nRDnWMmgtdAksxXu1sxyrJpAQK0+N1Fyx+OqPsjhcg7NuPVec1l
7ZCT9CncLHBojgvhq8zuiG032aTZaFttweYhtxT7xbjbTXz3zvgJ89Byv/GdIEy2
SNPPzFcKRUUiDDR8+dRRyBnVyXjleDZ9dnZ4ST6DyaBdYFtRPk2AWGvwYcc9ex77
ZoTqmgRLTKClUbpmstsX7sPHwaaizTwWh2xLlvoUpAeET5aiPj/YPQyPQZ08kW0=
=IhvQ
-----END PGP SIGNATURE-----
yes you are right, I overlooked that. It has been some years since I
last used grib, and at that time the gribex fortran library was the
only available one at ECMWF. Sorry for this confusion.
Best regards,
Jos.