gradsdods & dap 3.5.3

Graziano Giuliani giuliani at LAMMA.RETE.TOSCANA.IT
Fri Nov 4 05:43:54 EST 2005


Hello everybody on the list,
I have managed to compile Grads on my Debian box using sources, compiling also 
all the other software needed. As I have faced a problem with gradsdods and 
dap server, I post the solution I have found.

Environment

- GrADS source code 1.9b4
- gcc (GCC) 4.0.3 20051023 (prerelease) (Debian 4.0.2-3)
- g++ (GCC) 4.0.3 20051023 (prerelease) (Debian 4.0.2-3) (dods interface link)
- NetCDF 3.6.0p1 (udunits 1.12.4)
- HDF 4.2r1 hrepack patched
- Image Magick 6.2.3.6
- GD libraries 2.0.33
- Readline 5.0-11
- OpenDAP sdk 3.5.3
- OpenDAP NetCDF interface 3.5.2
- SX library (freq for GUI) 2.04

Problem
-------

Compilation is successful, but upon opening a NetCDF via a dap server, 
gradsdods says it can not find any discernable X coordinate (same file 
locally opens with gradsnc having latitude/longitude dimensions and variables 
with the right units...).

Solution
--------

Seems that in gasdf.c the NetCDF V2 ncattget interface used in the code at 
line 5843 does not work through the nc-dap interface, and the units attribute 
value from the file is not retrieved. Simple change from NetCDF V2 calls to 
V3 call nc_get_att_* works (attributes are now OK) and the file content is 
correctly displayed.

-----------------------------------

Hope to help any other finding this behaviour out there, I post a patch 
against V 1.9b4 with other small bugfixes to make gcc 4 happy and minor 
interface changes for (used by someone?) gui via libsx and wi via 
ImageMagick.

Graziano.

-- 
                             \ | /
                             (@ @)
 -------------------------o00-(_)-00o -----------------------------

 LaMMA - Laboratorio per la Meteorologia e la Modellistica Ambientale
         Laboratory for Meteorology and Environmental Modelling
 Via Madonna del Piano, 50019 Sesto Fiorentino (FI)

     tel: + 39 055 4483049
     fax: + 39 055 444083
     web: www.lamma.rete.toscana.it
  e-mail: giuliani at lamma.rete.toscana.it
-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch
Type: text/x-diff
Size: 12380 bytes
Desc: not available
Url : http://gradsusr.org/pipermail/gradsusr/attachments/20051104/88e66668/attachment.bin 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://gradsusr.org/pipermail/gradsusr/attachments/20051104/88e66668/attachment-0001.bin 


More information about the gradsusr mailing list