LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 07-14-2008, 08:44 AM   #1
iandroul
Member
 
Registered: Feb 2007
Posts: 32

Rep: Reputation: 15
How can I read and write in ASCII format grib files?


How can I read grib files and convert them in ASCII format ?

Thanx

Last edited by iandroul; 07-14-2008 at 08:45 AM.
 
Old 07-14-2008, 09:19 AM   #2
colucix
LQ Guru
 
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,509

Rep: Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983
You can try the grib decoder wgrib from the Climate Prediction Center of NOAA. It can read and convert grib data to pure binary, IEEE or ASCII text. For example:
Code:
wgrib -s infile | grep ":UGRD:" | wgrib -i -text infile -o outfile
will extract the variable UGRD (zonal winds) and will write it to a text file. Anyway, the conversion to text is very slow and consumes a lot of disk space. Better to convert them to binary and use some high level language (e.g. Fortran) for further processing.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Read and Write MS Publisher (.pub) files lqbob Linux - Software 4 10-03-2010 08:43 PM
how to read/write files from windows in fedora ksr Fedora 4 02-26-2006 02:38 PM
how to write to and read from files in C sachitha Programming 1 02-04-2006 06:40 AM
read the input file and write in the given format suchi_s Programming 8 12-17-2004 01:12 AM
Anyone know about GRIB Files clowns119 Programming 1 10-28-2003 02:56 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 04:22 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration