<div dir="ltr">ALso, the CDO (Climate Data Operators) can do this. Not sure what parameter table they use. Something like:
<br>

<br>
cdo -f grb copy <a href="http://foo.nc">foo.nc</a> foo.grb </div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Feb 29, 2016 at 3:08 AM, <a href="mailto:mamadoulamine.mbaye@ucad.edu.sn">mamadoulamine.mbaye@ucad.edu.sn</a> <span dir="ltr">&lt;<a href="mailto:mamadoulamine.mbaye@ucad.edu.sn" target="_blank">mamadoulamine.mbaye@ucad.edu.sn</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">




<div dir="ltr">
<div style="font-size:12pt;color:#000000;background-color:#ffffff;font-family:Calibri,Arial,Helvetica,sans-serif">
<p>The easiest way is to install grib_to_netcdf form ECMWF</p>
<p><a title="Ctrl+Cliquer ou appuyer pour suivre le lien" href="https://software.ecmwf.int/wiki/display/GRIB/grib_to_netcdf" target="_blank">https://software.ecmwf.int/wiki/display/GRIB/grib_to_netcdf</a></p>
<div style="margin-bottom:20px;overflow:auto;width:100%;text-indent:0px">
<table style="width:90%;background-color:rgb(255,255,255);overflow:auto;padding-top:20px;padding-bottom:20px;margin-top:20px;border-top:1px dotted rgb(200,200,200);border-bottom:1px dotted rgb(200,200,200)" cellspacing="0">
<tbody>
<tr style="border-spacing:0px" valign="top">
<td colspan="1" style="width:250px;display:table-cell;padding-right:20px">
<div style="background-color:rgb(255,255,255);min-height:24px;margin:auto;display:table;width:120px">
<a href="https://software.ecmwf.int/wiki/display/GRIB/grib_to_netcdf" style="display:table-cell;text-align:center" target="_blank"><img style="display:inline-block;margin-left:auto;margin-right:auto;max-width:250px;max-height:250px;min-height:24px;width:120px;border-width:0px;vertical-align:bottom" src="https://software.ecmwf.int/wiki/s/en_GB/5997/6f42626d00e36f53fe51440403446ca61552e2a2.108/_/images/logo/confluence-logo.png" height="24" width="120"></a></div>
</td>
<td colspan="2" style="vertical-align:top;padding:0px;display:table-cell">
<div></div>
<div style="color:rgb(0,120,215);font-weight:400;font-size:21px;font-family:&quot;wf_segoe-ui_light&quot;,&quot;Segoe UI Light&quot;,&quot;Segoe WP Light&quot;,&quot;Segoe UI&quot;,&quot;Segoe WP&quot;,Tahoma,Arial,sans-serif;line-height:21px">
<a href="https://software.ecmwf.int/wiki/display/GRIB/grib_to_netcdf" style="text-decoration:none" target="_blank">grib_to_netcdf - GRIB-API - ECMWF Confluence Wiki</a></div>
<div style="margin:10px 0px 16px;color:rgb(102,102,102);font-weight:400;font-family:&quot;wf_segoe-ui_normal&quot;,&quot;Segoe UI&quot;,&quot;Segoe WP&quot;,Tahoma,Arial,sans-serif;font-size:14px;line-height:14px">
<a href="http://software.ecmwf.int" target="_blank">software.ecmwf.int</a></div>
<div style="display:block;color:rgb(102,102,102);font-weight:400;font-family:&quot;wf_segoe-ui_normal&quot;,&quot;Segoe UI&quot;,&quot;Segoe WP&quot;,Tahoma,Arial,sans-serif;font-size:14px;line-height:20px;max-height:100px;overflow:hidden">
Produce NetCDF with data type of FLOAT (32bit floating point, for higher precision). Note these types were chosen to provide a reasonably wide range of trade-offs ...</div>
</td>
</tr>
</tbody>
</table>
</div>
<p>Best Regards,</p>
<p>Mamadou<br>
</p>
<br>
<div style="color:rgb(0,0,0)">
<hr style="display:inline-block;width:98%">
<div dir="ltr"><font style="font-size:11pt" face="Calibri, sans-serif" color="#000000"><b>De :</b> <a href="mailto:ncl-talk-bounces@ucar.edu" target="_blank">ncl-talk-bounces@ucar.edu</a> &lt;<a href="mailto:ncl-talk-bounces@ucar.edu" target="_blank">ncl-talk-bounces@ucar.edu</a>&gt; de la part de Dave Allured - NOAA Affiliate &lt;<a href="mailto:dave.allured@noaa.gov" target="_blank">dave.allured@noaa.gov</a>&gt;<br>
<b>Envoyé :</b> dimanche 28 février 2016 15:14<br>
<b>À :</b> Jaromir Jakacki<br>
<b>Cc :</b> <a href="mailto:ncl-talk@ucar.edu" target="_blank">ncl-talk@ucar.edu</a><br>
<b>Objet :</b> Re: [ncl-talk] reading ECMWF grib2 files</font>
<div> </div>
</div>
<div>
<div dir="ltr"><span class="">Jaromir,
<div><br>
</div>
<div>No, NCL does not write grib2 format, it only reads it.  This is in the documentation for supported file formats.</div>
<div><br>
</div>
</span><div><a href="http://www.ncl.ucar.edu/Document/Manuals/Ref_Manual/NclFormatSupport.shtml#GRIB" target="_blank">http://www.ncl.ucar.edu/Document/Manuals/Ref_Manual/NclFormatSupport.shtml#GRIB</a>
<div style="margin-bottom:20px;overflow:auto;width:100%;text-indent:0px">
<table style="width:90%;background-color:rgb(255,255,255);overflow:auto;padding-top:20px;padding-bottom:20px;margin-top:20px;border-top:1px dotted rgb(200,200,200);border-bottom:1px dotted rgb(200,200,200)" cellspacing="0">
<tbody>
<tr style="border-spacing:0px" valign="top">
<td colspan="1" style="width:250px;display:table-cell;padding-right:20px">
<div style="background-color:rgb(255,255,255);min-height:19px;margin:auto;display:table;width:250px">
<a href="http://www.ncl.ucar.edu/Document/Manuals/Ref_Manual/NclFormatSupport.shtml#GRIB" style="display:table-cell;text-align:center" target="_blank"><img style="display:inline-block;margin-left:auto;margin-right:auto;max-width:250px;max-height:250px;min-height:10px;width:250px;border-width:0px;vertical-align:bottom" src="http://www.ncl.ucar.edu/Images/ncl-b4.jpg" height="10" width="250"></a></div>
</td>
<td colspan="2" style="vertical-align:top;padding:0px;display:table-cell">
<div></div>
<div style="color:rgb(0,120,215);font-weight:400;font-size:21px;font-family:&quot;wf_segoe-ui_light&quot;,&quot;Segoe UI Light&quot;,&quot;Segoe WP Light&quot;,&quot;Segoe UI&quot;,&quot;Segoe WP&quot;,Tahoma,Arial,sans-serif;line-height:21px">
<a href="http://www.ncl.ucar.edu/Document/Manuals/Ref_Manual/NclFormatSupport.shtml#GRIB" style="text-decoration:none" target="_blank">NCL Language Reference Guide: FormatSupport</a></div>
<div style="margin:10px 0px 16px;color:rgb(102,102,102);font-weight:400;font-family:&quot;wf_segoe-ui_normal&quot;,&quot;Segoe UI&quot;,&quot;Segoe WP&quot;,Tahoma,Arial,sans-serif;font-size:14px;line-height:14px">
<a href="http://www.ncl.ucar.edu" target="_blank">www.ncl.ucar.edu</a></div>
<div style="display:block;color:rgb(102,102,102);font-weight:400;font-family:&quot;wf_segoe-ui_normal&quot;,&quot;Segoe UI&quot;,&quot;Segoe WP&quot;,Tahoma,Arial,sans-serif;font-size:14px;line-height:20px;max-height:100px;overflow:hidden">
NCL Home &gt; Documentation &gt; Manuals &gt; Reference Information on supported data formats. This page provides more detailed information about each of the supported data ...</div>
</td>
</tr>
</tbody>
</table>
</div>
<br>
</div><div><div class="h5">
<div><br>
</div>
<div>--Dave</div>
<div><br>
</div>
<div class="gmail_extra"><br>
<div class="gmail_quote">On Sun, Feb 28, 2016 at 3:27 PM, Jaromir Jakacki <span dir="ltr">
&lt;<a href="mailto:jjakacki@iopan.gda.pl" target="_blank">jjakacki@iopan.gda.pl</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
Hi,<br>
I do not have answer for this question - so sorry for that - i do not<br>
any experience with ncl. But i would like to create grib2 file from<br>
netcdf. Is it possible to do it using ncl?<br>
thanks,<br>
Jaromir<br>
<br>
<br>
<br>
<br>
On 28/02/16 11:10, R Phani wrote:<br>
&gt; The file prate_ecmwrf_2000_2015_reforecast_04-02_720hrs_0.5x0.5.grb has been placed on the ucar ftp server.<br>
&gt;<br>
&gt; ncl_convert2nc also doesn&#39;t work with this file.<br>
&gt;<br>
&gt; ------------<br>
&gt; $ ncl_convert2nc prate_ecmwrf_2000_2015_reforecast_04-02_720hrs_0.5x0.5.grb<br>
&gt; Processing file: prate_ecmwrf_2000_2015_reforecast_04-02_720hrs_0.5x0.5.grb...<br>
&gt;   Copyright (C) 1995-2013 - All Rights Reserved<br>
&gt;   University Corporation for Atmospheric Research<br>
&gt;   NCAR Command Language Version 6.1.2<br>
&gt;   The use of this software is governed by a License Agreement.<br>
&gt;   See <a href="http://www.ncl.ucar.edu/" rel="noreferrer" target="_blank">http://www.ncl.ucar.edu/</a> for more details.<br>
&gt; getpdstemplate: PDS Template 4.61 not defined.<br>
&gt; warning:Error unpacking GRIB record section 4.<br>
&gt; fatal:Could not open (prate_ecmwrf_2000_2015_reforecast_04-02_720hrs_0.5x0.5.grb)<br>
&gt; Segmentation fault (core dumped)<br>
&gt; -------------<br>
&gt;<br>
&gt; Why ncl_convert2nc fails for ECMWF grb2 files?<br>
&gt;<br>
&gt; Phani.<br>
&gt;<br>
&gt; ----- Original Message -----<br>
&gt; From: &quot;R Phani&quot; &lt;<a href="mailto:rphani@tropmet.res.in" target="_blank">rphani@tropmet.res.in</a>&gt;<br>
&gt; To: &quot;NCL&quot; &lt;<a href="mailto:ncl-talk@ucar.edu" target="_blank">ncl-talk@ucar.edu</a>&gt;<br>
&gt; Sent: Saturday, February 27, 2016 11:06:57 AM<br>
&gt; Subject: reading ECMWF grib2 files<br>
&gt;<br>
&gt; Hi,<br>
&gt;<br>
&gt; I am having problems in opening the S2S ECMWF files with NCL.<br>
&gt;<br>
&gt; $ module load GNU-ncl/6.3.0<br>
&gt; $ ncl<br>
&gt;   Copyright (C) 1995-2015 - All Rights Reserved<br>
&gt;   University Corporation for Atmospheric Research<br>
&gt;   NCAR Command Language Version 6.3.0<br>
&gt;   The use of this software is governed by a License Agreement.<br>
&gt;   See <a href="http://www.ncl.ucar.edu/" rel="noreferrer" target="_blank">http://www.ncl.ucar.edu/</a> for more details.<br>
&gt; ncl 0&gt; f=addfile(&quot;S2S/prate_ecmwrf_2000_2015_reforecast_04-02_720hrs_0.5x0.5.grb&quot;,&quot;r&quot;)<br>
&gt; getpdstemplate: PDS Template 4.61 not defined.<br>
&gt; warning:Error unpacking GRIB record section 4.<br>
&gt; ncl 1&gt; quit<br>
&gt; $ module load GNU-ncl/6.2.0<br>
&gt; $ ncl<br>
&gt;   Copyright (C) 1995-2014 - All Rights Reserved<br>
&gt;   University Corporation for Atmospheric Research<br>
&gt;   NCAR Command Language Version 6.2.0<br>
&gt;   The use of this software is governed by a License Agreement.<br>
&gt;   See <a href="http://www.ncl.ucar.edu/" rel="noreferrer" target="_blank">http://www.ncl.ucar.edu/</a> for more details.<br>
&gt; ncl 0&gt; f=addfile(&quot;S2S/prate_ecmwrf_2000_2015_reforecast_04-02_720hrs_0.5x0.5.grb&quot;,&quot;r&quot;)<br>
&gt; getpdstemplate: PDS Template 4.61 not defined.<br>
&gt; warning:Error unpacking GRIB record section 4.<br>
&gt; fatal:Could not open (S2S/prate_ecmwrf_2000_2015_reforecast_04-02_720hrs_0.5x0.5.grb)<br>
&gt;<br>
&gt;<br>
&gt; How to get/install PDS Template 4.61?<br>
&gt; _______________________________________________<br>
&gt; ncl-talk mailing list<br>
&gt; <a href="mailto:ncl-talk@ucar.edu" target="_blank">ncl-talk@ucar.edu</a><br>
&gt; List instructions, subscriber options, unsubscribe:<br>
&gt; <a href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk" rel="noreferrer" target="_blank">
http://mailman.ucar.edu/mailman/listinfo/ncl-talk</a><br>
<br>
_______________________________________________<br>
ncl-talk mailing list<br>
<a href="mailto:ncl-talk@ucar.edu" target="_blank">ncl-talk@ucar.edu</a><br>
List instructions, subscriber options, unsubscribe:<br>
<a href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk" rel="noreferrer" target="_blank">http://mailman.ucar.edu/mailman/listinfo/ncl-talk</a><br>
</blockquote>
</div>
<br>
</div>
</div></div></div>
</div>
</div>
</div>
</div>

<br>_______________________________________________<br>
ncl-talk mailing list<br>
<a href="mailto:ncl-talk@ucar.edu">ncl-talk@ucar.edu</a><br>
List instructions, subscriber options, unsubscribe:<br>
<a href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk" rel="noreferrer" target="_blank">http://mailman.ucar.edu/mailman/listinfo/ncl-talk</a><br>
<br></blockquote></div><br></div>