[gdal-dev] netCDF to GRIB 1

John L. Craddock john.craddock at xitech.com.au
Wed Jan 9 06:12:50 EST 2008


Hello Bas,
I did discover the read only attribute. Your response is most helpful. Thank you.
Kind regards
John C

-----Original Message-----
From: Bas Retsios [mailto:retsios at itc.nl]
Sent: 08 January 2008 03:21
To: John L. Craddock
Cc: gdal-dev at lists.osgeo.org
Subject: Re: [gdal-dev] netCDF to GRIB 1


Hello,

The GDAL-GRIB driver mentioned will read GRIB files (not write them), therefore it can not be directly used for converting netCDF to GRIB files.
However, this information might help:
For saving time when I was working on this driver, I implemented it as a "wrapper" around a full GRIB library written by Mr. Arthur Taylor.
The SVN link below contains both the "wrapper" that gives GDAL "GRIB-read" capabilities (which is file gribdataset.cpp), and the full GRIB library (which is all other files).
The GRIB library can both read and write GRIB files, but I only called the functions for reading (because that is what I was interested in).
With some effort you would be able to extend gribdataset.cpp so that it can also write back a GRIB file. This link http://www.gdal.org/gdal_drivertut.html describes how to proceed, at section "File Creation".

Cheers,

Bas.

-- 

Ir. V. (Bas) Retsios

Software Developer

Geo-information Processing Department

International Institute for Geo-information Science and Earth Observation (ITC)

P.O. Box 6,  7500 AA Enschede, The Netherlands

Phone +31 (0)53 4874 573, telefax +31 (0)53 4874 335

E-mail  retsios at itc.nl, Internet  http://www.itc.nl


John L. Craddock wrote:


Many thanks for your help Mateusz, I will give it a try.

Regards

John C



  

-----Original Message-----

From: Mateusz Loskot [ mailto:mateusz at loskot.net]

Sent: 02 January 2008 06:43

To: John L. Craddock

Cc: gdal

Subject: Re: [gdal-dev] netCDF to GRIB 1





Mateusz Loskot wrote:

    

John L. Craddock wrote:

      

Hello all,

Been scanning the ether for windows code to convert ocean 

        

current files

    

in netCDF format to GRIB version 1. I know about GRADS and 

        

the lats4d

    

script. Thought I would ask here if anyone knows of a less 

        

circuitous

    

way of converting. I see GDAL reads netCDF. Is there a 

        

driver to output

    

GRIB?

        

John,



There is GRIB driver in the GDAL spike repository:



https://svn.osgeo.org/gdal/spike/grib/



You may try to checkout it and build into GDAL.

      

BTW, here you can find short instructions how to build GDAl with GRIB

support (the SVN URL given there is not active anymore, use 

the new one

above):



http://lists.osgeo.org/pipermail/gdal-dev/2007-February/011663.html



-- 

Mateusz Loskot

http://mateusz.loskot.net



    

_______________________________________________

gdal-dev mailing list

gdal-dev at lists.osgeo.org

http://lists.osgeo.org/mailman/listinfo/gdal-dev

  


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/gdal-dev/attachments/20080109/ecbb462f/attachment.html


More information about the gdal-dev mailing list