[ncl-talk] NETCDF to GRIB

HAVENER, KEVIN F GS-12 USAF ACC 14 WS/WXED kevin.havener at us.af.mil
Fri Feb 24 13:18:41 MST 2017


Well, I may be wrong on this, too.  But couldn't you read in a netcdf with python-netcdf4 and write it back out with pygrib?  The complexity you mention is still there, but you might be able to make a reasonable grib file with pygrib.  Also CDO should be able to do the trick.  But either way, creating grib correctly files is a tricky business.

Kevin Havener

-----Original Message-----
From: ncl-talk-bounces at ucar.edu [mailto:ncl-talk-bounces at ucar.edu] On Behalf Of Alan Brammer
Sent: Friday, February 24, 2017 3:04 PM
To: debasish mazumder <debasish at ucar.edu>
Cc: ncl-talk at ucar.edu
Subject: Re: [ncl-talk] NETCDF to GRIB

Grib files are center specific so are not something that the average user can generate from scratch.  They rely on codes and underlying tables, hence the many emails regarding new variables in forecast files that NCL struggles to read until such tables are updated.  

Existing Grib files are fairly easy to manipulate yourself, using grib_tools from ecmwf among other options and you can concatenate the files together to make large single files. But you can’t, with any tool I believe, create a grib file a netcdf however due to the basic nature of the files. 

I may be wrong on this and maybe something is out there that can force a way around.  


> On 24 Feb 2017, at 12:25, debasish mazumder <debasish at ucar.edu> wrote:
> 
> Hi All,
> 
> Is there any way in NCL to convert netcdf (.nc) file to grib (.grb) 
> file or can I write a grib file in NCL
> 
> with regards
> 
> -Deb
> 
> _______________________________________________
> ncl-talk mailing list
> ncl-talk at ucar.edu
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk

_______________________________________________
ncl-talk mailing list
ncl-talk at ucar.edu
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk


More information about the ncl-talk mailing list