George Britzolakis found a typo in a Makefile where $(DEFS) is defined but $(DEPS) is use in the command line for the compiler.
Here is his email:
Yesterday, I was able to find the solution to the grib2 file problem we were having. Now you can read grib2 files without getting the usual:
g2_getfld: return from g2_unpack7 = 4
GRIB2 I/O Error: g2_getfld failed, ierr=14
g2_unpack7: Data Representation Template 5.40 not yet implemented.
As you can see below:
>> import cdms2;
>> tt=cdms2.open("/home/gbritzol/judyInputs/cdas1.20140102.pgrbh.ctl")
>> vvelprs=tt.variables['vvelprs']
>> vv=vvelprs.getValue()
I can now read those problematic files.
For the UV-CDAT developers this seems to be in the g2clib version and compilation. After tracking the problem I upgraded the g2clib to version v1.4.0 and changed the makefile so the $(DEFS) (which corresponds to DEFS=-DUSE_JPEG2000 -DUSE_PNG) needs to be added to the linking step. It seems that the UV-CDAT team misspelled the $(DEFS) environment variable with $(DEPS) and this is causing this format mismatches when reading the grib2 files. This fix might fix other also problems related to g2clib library so I would recommend emailing the UV-CDAT team. If they would like me to give them the patch I can always provide them with my tar file.
Let me know if you have any questions.
Thanks,
George.
George Britzolakis found a typo in a Makefile where$(DEFS) is defined but $ (DEPS) is use in the command line for the compiler.
Here is his email: