[ncl-talk] How to convert netcdf to grib format

Beáta Szábo-Takács szabo.b at czechglobe.cz
Mon Feb 13 00:26:11 MST 2017


Hi,
According to CDO support:
The grid type generic means that the variables have either no grid information or the grid information is not supported in CDO.
In both cases it is not possible to store the data in GRIB format. Here is a list of all supported CDO GRIB grid types:

  *   Latitude/longitude grid
  *   Lambert conformal grid
  *   Gaussian latitude/longitude grid
  *   Rotated latitude/longitude grid
  *   Spherical Harmonic Coefficients
  *   Icosahedral-hexagonal GME grid
You have to add the missing grid information with setgrid if there is no grid information in your file and the variables are stored on one of the above grids:
cdo -f grb setgrid,mygrid cc.nc cc.grb
You can check the grid information of the variables with the CDO function sinfo or griddes.

I hope I could help you.

Beata


From: Arunima Singh [mailto:arunima at vassarlabs.com]
Sent: Monday, February 13, 2017 8:16 AM
To: Beáta Szábo-Takács <szabo.b at czechglobe.cz>
Cc: Barry Lynn <barry.h.lynn at gmail.com>; ncl-talk <ncl-talk at ucar.edu>
Subject: Re: [ncl-talk] How to convert netcdf to grib format

I tried cdo -
cdo -f grb copy DET_10N20N_76E85E_2016111712.nc DET_10N20N_76E85E_2016111712.grib

but i am getting following error :

Warning (cgribexDefGrid) : The CGRIBEX library can not store fields on the used grid!

Error (cgribexDefGrid) : Unsupported grid type: generic


On Mon, Feb 13, 2017 at 12:40 PM, Beáta Szábo-Takács <szabo.b at czechglobe.cz<mailto:szabo.b at czechglobe.cz>> wrote:
Hi,

I think you can convert netcdf to grib by CDO. Try the following operator:

cdo -f grb copy file.nc<http://file.nc> file.grb

I hope it helps.

Beata

From: ncl-talk-bounces at ucar.edu<mailto:ncl-talk-bounces at ucar.edu> [mailto:ncl-talk-bounces at ucar.edu<mailto:ncl-talk-bounces at ucar.edu>] On Behalf Of Arunima Singh
Sent: Monday, February 13, 2017 8:05 AM
To: Barry Lynn <barry.h.lynn at gmail.com<mailto:barry.h.lynn at gmail.com>>
Cc: ncl-talk <ncl-talk at ucar.edu<mailto:ncl-talk at ucar.edu>>
Subject: Re: [ncl-talk] How to convert netcdf to grib format

Hi,

What i want is netcdf to grib2 format instead of grib to netcdf.

Thanks and Regards,
Arunima Singh


On Mon, Feb 13, 2017 at 12:31 PM, Barry Lynn <barry.h.lynn at gmail.com<mailto:barry.h.lynn at gmail.com>> wrote:
Hi:

I believe you can find the answer here:

http://www.ncl.ucar.edu/Applications/griball.shtml

On Mon, Feb 13, 2017 at 8:56 AM, Arunima Singh <arunima at vassarlabs.com<mailto:arunima at vassarlabs.com>> wrote:
Hi,

I have one netcdf file that i want to convert to grib format.
Can we do this conversion with ncl?

If yes, how?

Thanks and Regards,
Arunima Singh

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



--
Barry H. Lynn, Ph.D
Senior Lecturer,
The Institute of the Earth Science,
The Hebrew University of Jerusalem,
Givat Ram, Jerusalem 91904, Israel
Tel: 972 547 231 170
Fax: (972)-25662581

C.E.O, Weather It Is, LTD
Weather and Climate Focus
http://weather-it-is.com
Jerusalem, Israel
Local: 02 930 9525
Cell: 054 7 231 170
Int-IS: x972 2 930 9525
US 914 432 3108


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20170213/46b979ec/attachment.html 


More information about the ncl-talk mailing list