<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">A simple google search would lead you to the following posts. Now is your turn .<div class=""><br class=""></div><div class=""><a href="https://code.zmaw.de/boards/1/topics/248" class="">https://code.zmaw.de/boards/1/topics/248</a></div><div class=""><br class=""></div><div class=""><a href="https://code.zmaw.de/boards/2/topics/1269" class="">https://code.zmaw.de/boards/2/topics/1269</a></div><div class=""><br class=""></div><div class=""><a href="https://code.zmaw.de/boards/1/topics/3699" class="">https://code.zmaw.de/boards/1/topics/3699</a></div><div class=""><br class=""></div><div class=""><br class=""></div><div class=""><br class=""></div><div class=""><br class=""><div class="">
<div style="color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><br class="Apple-interchange-newline">Guido Cioni</div><div style="color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><a href="http://guidocioni.altervista" class="">http://guidocioni.altervista</a>.org</div>

</div>
<br class=""><div><blockquote type="cite" class=""><div class="">On 13 Feb 2017, at 11:50, Guido Cioni &lt;<a href="mailto:guidocioni@gmail.com" class="">guidocioni@gmail.com</a>&gt; wrote:</div><br class="Apple-interchange-newline"><div class=""><meta http-equiv="Content-Type" content="text/html charset=utf-8" class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">Sorry, I didn't read carefully that you were trying to go from netcdf to grib... Just ignore the second part of the mail :)&nbsp;<br class=""><div class="">
<div style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><br class="Apple-interchange-newline">Guido Cioni</div><div style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><a href="http://guidocioni.altervista/" class="">http://guidocioni.altervista</a>.org</div>

</div>
<br class=""><div class=""><blockquote type="cite" class=""><div class="">On 13 Feb 2017, at 11:49, Guido Cioni &lt;<a href="mailto:guidocioni@gmail.com" class="">guidocioni@gmail.com</a>&gt; wrote:</div><br class="Apple-interchange-newline"><div class=""><meta http-equiv="Content-Type" content="text/html charset=utf-8" class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">Arunima, this is ncl-talk, not cdo-talk :)&nbsp;<div class=""><br class=""><div class="">If CDO and NCL are having an hard time trying to convert your file *maybe* the problem is the file itself. Please read the appropriate documentation for CDO (<a href="https://code.zmaw.de/projects/cdo/wiki" class="">https://code.zmaw.de/projects/cdo/wiki</a>).</div><div class="">By reading the CDO guide you would furthermore discover that the correct syntax of the command copy is the following:</div><div class="">
                
        
        
                <div class="page" title="Page 25">
                        <div class="layoutArea">
                                <div class="column"><p class=""><font face="Menlo" class=""><span style="font-size: 9pt;" class="">cdo -</span><span style="font-size: 9pt;" class=""></span></font><span style="font-size: 9pt;" class=""><font face="Menlo" class="">f nc copy input_file.grb output_file.nc</font><br class="">
</span></p>
                                </div>
                        </div>
                </div></div><div class="">and not the other way around. I suspect that won't fix the problem, but better starting from a clean state.&nbsp;</div><div class=""><br class=""></div><div class="">Good luck</div><div class=""><div class="">
<div style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><br class="Apple-interchange-newline">Guido Cioni</div><div style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><a href="http://guidocioni.altervista/" class="">http://guidocioni.altervista</a>.org</div>

</div>
<br class=""><div class=""><blockquote type="cite" class=""><div class="">On 13 Feb 2017, at 11:39, Arunima Singh &lt;<a href="mailto:arunima@vassarlabs.com" class="">arunima@vassarlabs.com</a>&gt; wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class=""><span style="font-size:12.8px" class="">Hi,</span><div style="font-size:12.8px" class=""><br class=""></div><div style="font-size:12.8px" class="">I am running following command -&nbsp;</div><div style="font-size:12.8px" class="">cdo -f grb setgrid,mygrid DET_10N20N_76E85E_2016111712.<wbr class="">nc DET_10N20N_76E85E_2016111712.<wbr class="">grib<br class=""></div><div style="font-size:12.8px" class=""><br class=""></div><div style="font-size:12.8px" class="">But getting following error:&nbsp;</div><span class="gmail-im" style="font-size:12.8px"><div class=""><div class="">Warning (cgribexDefGrid) : The CGRIBEX library can not store fields on the used grid!</div><div class=""><br class=""></div><div class="">Error (cgribexDefGrid) : Unsupported grid type: generic</div></div><div class=""><br class=""></div></span><div style="font-size:12.8px" class="">Am I doing something wrong, or is it because generic grid type is not supported.</div><div style="font-size:12.8px" class="">PFA files for reference.</div><div style="font-size:12.8px" class=""><br class=""></div><div style="font-size:12.8px" class="">Is there any other way to convert netcdf to grib2 format.</div><div style="font-size:12.8px" class=""><br class=""></div><div style="font-size:12.8px" class="">SAMPLE FILES:</div><div style="font-size:12.8px" class=""><b class="">mygrid</b> file ::</div><div style="font-size:12.8px" class=""><br class=""></div><div style="font-size:12.8px" class=""><div style="font-size:12.8px" class="">gridtype = generic</div><div style="font-size:12.8px" class="">xsize &nbsp; &nbsp;= 73</div><div style="font-size:12.8px" class="">ysize &nbsp; &nbsp;= 81</div><div style="font-size:12.8px" class="">xfirst &nbsp; = 76</div><div style="font-size:12.8px" class="">xinc &nbsp; &nbsp; = 0.005</div><div style="font-size:12.8px" class="">yfirst &nbsp; = 20</div><div style="font-size:12.8px" class="">yinc &nbsp; &nbsp; = 0.005</div></div><div style="font-size:12.8px" class=""><br class=""></div><div style="font-size:12.8px" class=""><b class="">cdo griddes output</b>::</div><div style="font-size:12.8px" class=""><div style="font-size:12.8px" class="">#</div><div style="font-size:12.8px" class=""># gridID 1</div><div style="font-size:12.8px" class="">#</div><div style="font-size:12.8px" class="">gridtype &nbsp;= generic</div><div style="font-size:12.8px" class="">gridsize &nbsp;= 81</div><div style="font-size:12.8px" class="">xsize &nbsp; &nbsp; = 81</div><div style="font-size:12.8px" class="">#</div><div style="font-size:12.8px" class=""># gridID 2</div><div style="font-size:12.8px" class="">#</div><div style="font-size:12.8px" class="">gridtype &nbsp;= generic</div><div style="font-size:12.8px" class="">gridsize &nbsp;= 73</div><div style="font-size:12.8px" class="">xsize &nbsp; &nbsp; = 73</div><div style="font-size:12.8px" class="">#</div><div style="font-size:12.8px" class=""># gridID 3</div><div style="font-size:12.8px" class="">#</div><div style="font-size:12.8px" class="">gridtype &nbsp;= generic</div><div style="font-size:12.8px" class="">gridsize &nbsp;= 5913</div><div style="font-size:12.8px" class="">xsize &nbsp; &nbsp; = 73</div><div style="font-size:12.8px" class="">ysize &nbsp; &nbsp; = 81</div><div style="font-size:12.8px" class="">cdo griddes: Processed 10 variables ( 0.00s )</div><div style="font-size:12.8px" class=""><br class=""></div><div style="font-size:12.8px" class=""><br class=""></div></div><div style="font-size:12.8px" class=""><b class="">NetCDF file</b>::</div><div class=""><div class=""><span style="font-size:12.8px" class="">&nbsp;latitude = 20, 19.875, 19.75, 19.625, 19.5, 19.375, 19.25, 19.125, 19,&nbsp;</span></div><div class=""><span style="font-size:12.8px" class="">&nbsp; &nbsp; 18.875, 18.75, 18.625, 18.5, 18.375, 18.25, 18.125, 18, 17.875, 17.75,&nbsp;</span></div><div class=""><span style="font-size:12.8px" class="">&nbsp; &nbsp; 17.625, 17.5, 17.375, 17.25, 17.125, 17, 16.875, 16.75, 16.625, 16.5,&nbsp;</span></div><div class=""><span style="font-size:12.8px" class="">&nbsp; &nbsp; 16.375, 16.25, 16.125, 16, 15.875, 15.75, 15.625, 15.5, 15.375, 15.25,&nbsp;</span></div><div class=""><span style="font-size:12.8px" class="">&nbsp; &nbsp; 15.125, 15, 14.875, 14.75, 14.625, 14.5, 14.375, 14.25, 14.125, 14,&nbsp;</span></div><div class=""><span style="font-size:12.8px" class="">&nbsp; &nbsp; 13.875, 13.75, 13.625, 13.5, 13.375, 13.25, 13.125, 13, 12.875, 12.75,&nbsp;</span></div><div class=""><span style="font-size:12.8px" class="">&nbsp; &nbsp; 12.625, 12.5, 12.375, 12.25, 12.125, 12, 11.875, 11.75, 11.625, 11.5,&nbsp;</span></div><div class=""><span style="font-size:12.8px" class="">&nbsp; &nbsp; 11.375, 11.25, 11.125, 11, 10.875, 10.75, 10.625, 10.5, 10.375, 10.25,&nbsp;</span></div><div class=""><span style="font-size:12.8px" class="">&nbsp; &nbsp; 10.125, 10 ;</span></div><div class=""><span style="font-size:12.8px" class=""><br class=""></span></div><div class=""><span style="font-size:12.8px" class="">&nbsp;longitude = 76, 76.125, 76.25, 76.375, 76.5, 76.625, 76.75, 76.875, 77,&nbsp;</span></div><div class=""><span style="font-size:12.8px" class="">&nbsp; &nbsp; 77.125, 77.25, 77.375, 77.5, 77.625, 77.75, 77.875, 78, 78.125, 78.25,&nbsp;</span></div><div class=""><span style="font-size:12.8px" class="">&nbsp; &nbsp; 78.375, 78.5, 78.625, 78.75, 78.875, 79, 79.125, 79.25, 79.375, 79.5,&nbsp;</span></div><div class=""><span style="font-size:12.8px" class="">&nbsp; &nbsp; 79.625, 79.75, 79.875, 80, 80.125, 80.25, 80.375, 80.5, 80.625, 80.75,&nbsp;</span></div><div class=""><span style="font-size:12.8px" class="">&nbsp; &nbsp; 80.875, 81, 81.125, 81.25, 81.375, 81.5, 81.625, 81.75, 81.875, 82,&nbsp;</span></div><div class=""><span style="font-size:12.8px" class="">&nbsp; &nbsp; 82.125, 82.25, 82.375, 82.5, 82.625, 82.75, 82.875, 83, 83.125, 83.25,&nbsp;</span></div><div class=""><span style="font-size:12.8px" class="">&nbsp; &nbsp; 83.375, 83.5, 83.625, 83.75, 83.875, 84, 84.125, 84.25, 84.375, 84.5,&nbsp;</span></div><div class=""><span style="font-size:12.8px" class="">&nbsp; &nbsp; 84.625, 84.75, 84.875, 85 ;</span></div><div style="font-size:12.8px" class=""><br class=""></div></div></div><div class="gmail_extra"><br class=""><div class="gmail_quote">On Mon, Feb 13, 2017 at 3:44 PM, Arunima Singh <span dir="ltr" class="">&lt;<a href="mailto:arunima@vassarlabs.com" target="_blank" class="">arunima@vassarlabs.com</a>&gt;</span> wrote:<br class=""><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr" class="">Hi,<div class=""><br class=""></div><div class="">I am running following command -&nbsp;</div><div class="">cdo -f grb setgrid,mygrid DET_10N20N_76E85E_2016111712.<wbr class="">nc DET_10N20N_76E85E_2016111712.<wbr class="">grib<br class=""></div><div class=""><br class=""></div><div class="">But getting following error:&nbsp;</div><span class=""><div class=""><div class="">Warning (cgribexDefGrid) : The CGRIBEX library can not store fields on the used grid!</div><div class=""><br class=""></div><div class="">Error (cgribexDefGrid) : Unsupported grid type: generic</div></div><div class=""><br class=""></div></span><div class="">Am I doing something wrong, or is it because generic grid type is not supported.</div><div class="">PFA files for reference.</div><div class=""><br class=""></div><div class="">Is there any other way to convert netcdf to grib2 format.</div><span class=""><div class=""><br class=""></div><div class="">Thanks and Regards,</div><div class="">Arunima Singh</div></span></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br class=""><div class="gmail_quote">On Mon, Feb 13, 2017 at 1:30 PM, Beáta Szábo-Takács <span dir="ltr" class="">&lt;<a href="mailto:szabo.b@czechglobe.cz" target="_blank" class="">szabo.b@czechglobe.cz</a>&gt;</span> wrote:<br class=""><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">



<div class="">

<div id="m_3386678340777264504m_-1243268538325276327divtagdefaultwrapper" style="font-size: 12pt; font-family: Calibri, Arial, Helvetica, sans-serif;" dir="ltr" class=""><div class=""><br class="webkit-block-placeholder"></div>
<div class=""><p style="margin-bottom:0in;line-height:100%" class="">Hi,</p><p style="margin-bottom:0in;line-height:100%" class=""><br class="">
</p><p style="margin-bottom:0in;line-height:100%" class="">It hard to see the grid type by ncdump results. Can you apply Climate Data Operator (CDO)? If yes, you can see the grid coordinates with the sinfo or griddes operators:</p><p style="margin-bottom:0in;line-height:100%" class=""><br class="">
</p><p style="margin-bottom:0in;line-height:100%" class="">cdo sinfo <a href="http://file.nc/" target="_blank" class="">file.nc</a> </p><p style="margin-bottom:0in;line-height:100%" class=""><br class="">
</p><p style="margin-bottom:0in;line-height:100%" class="">cdo griddes <a href="http://file.nc/" target="_blank" class="">file.nc</a></p><p style="margin-bottom:0in;line-height:100%" class=""><br class="">
</p><p style="margin-bottom:0in;line-height:100%" class="">You can create mygrid file by the following way:</p><p style="margin-bottom:0in;line-height:100%" class=""><br class="">
</p>
<pre class="m_3386678340777264504m_-1243268538325276327western">cat &gt; mygrid &lt;&lt; EOF</pre>
<pre class="m_3386678340777264504m_-1243268538325276327western">gridtype = 
</pre>
<pre class="m_3386678340777264504m_-1243268538325276327western">xsize    = 
</pre>
<pre class="m_3386678340777264504m_-1243268538325276327western">ysize    = 
</pre>
<pre class="m_3386678340777264504m_-1243268538325276327western">xfirst   = 
</pre>
<pre class="m_3386678340777264504m_-1243268538325276327western">xinc     = 
</pre>
<pre class="m_3386678340777264504m_-1243268538325276327western">yfirst   = 
</pre>
<pre class="m_3386678340777264504m_-1243268538325276327western">yinc     = 
</pre>
<pre class="m_3386678340777264504m_-1243268538325276327western" style="margin-bottom:0.2in">EOF</pre><span class=""><p style="margin-bottom:0in;line-height:100%" class="">I hope I could help you.</p><p style="margin-bottom:0in;line-height:100%" class=""><br class="">
</p><p style="margin-bottom:0in;line-height:100%" class="">Beata</p>
</span></div>
<br class=""><div class=""><br class="webkit-block-placeholder"></div>
</div>
<hr style="display:inline-block;width:98%" class="">
<div id="m_3386678340777264504m_-1243268538325276327divRplyFwdMsg" dir="ltr" class=""><font face="Calibri, sans-serif" style="font-size:11pt" class=""><b class="">From:</b> Arunima Singh &lt;<a href="mailto:arunima@vassarlabs.com" target="_blank" class="">arunima@vassarlabs.com</a>&gt;<br class="">
<b class="">Sent:</b> Monday, February 13, 2017 8:32:49 AM<br class="">
<b class="">To:</b> Beáta Szábo-Takács<br class="">
<b class="">Cc:</b> Barry Lynn; ncl-talk<div class=""><div class="m_3386678340777264504h5"><br class="">
<b class="">Subject:</b> Re: [ncl-talk] How to convert netcdf to grib format</div></div></font>
<div class="">&nbsp;</div>
</div><div class=""><div class="m_3386678340777264504h5">
<div class="">
<div dir="ltr" class="">Hi,
<div class=""><br class="">
</div>
<div class="">Thanks .</div>
<div class="">Can you please tell me what to have in mygrid ?</div>
<div class=""><br class="">
</div>
<div class="">My netcdf file has following variables :&nbsp;</div>
<div class="">
<div class="">netcdf DET_10N20N_76E85E_2016111712 {</div>
<div class="">dimensions:</div>
<div class=""><span class="m_3386678340777264504m_-1243268538325276327gmail-Apple-tab-span" style="white-space:pre-wrap"></span>lat = 81 ;</div>
<div class=""><span class="m_3386678340777264504m_-1243268538325276327gmail-Apple-tab-span" style="white-space:pre-wrap"></span>lon = 73 ;</div>
<div class=""><span class="m_3386678340777264504m_-1243268538325276327gmail-Apple-tab-span" style="white-space:pre-wrap"></span>time = 41 ;</div>
<div class="">variables:</div>
<div class=""><span class="m_3386678340777264504m_-1243268538325276327gmail-Apple-tab-span" style="white-space:pre-wrap"></span>float latitude(lat) ;</div>
<div class=""><span class="m_3386678340777264504m_-1243268538325276327gmail-Apple-tab-span" style="white-space:pre-wrap"></span>latitude:units = "degrees_north" ;</div>
<div class=""><span class="m_3386678340777264504m_-1243268538325276327gmail-Apple-tab-span" style="white-space:pre-wrap"></span>float longitude(lon) ;</div>
<div class=""><span class="m_3386678340777264504m_-1243268538325276327gmail-Apple-tab-span" style="white-space:pre-wrap"></span>longitude:units = "degrees_east" ;</div>
<div class=""><span class="m_3386678340777264504m_-1243268538325276327gmail-Apple-tab-span" style="white-space:pre-wrap"></span>float time(time) ;</div>
<div class=""><span class="m_3386678340777264504m_-1243268538325276327gmail-Apple-tab-span" style="white-space:pre-wrap"></span>time:units = "hours since 2016-11-17 12Z" ;</div>
<div class=""><span class="m_3386678340777264504m_-1243268538325276327gmail-Apple-tab-span" style="white-space:pre-wrap"></span>float \2m_temperature(time, lat, lon) ;</div>
<div class=""><span class="m_3386678340777264504m_-1243268538325276327gmail-Apple-tab-span" style="white-space:pre-wrap"></span>\2m_temperature:units = "C" ;</div>
<div class=""><span class="m_3386678340777264504m_-1243268538325276327gmail-Apple-tab-span" style="white-space:pre-wrap"></span>float \2m_relative_humidity(time, lat, lon) ;</div>
<div class=""><span class="m_3386678340777264504m_-1243268538325276327gmail-Apple-tab-span" style="white-space:pre-wrap"></span>\2m_relative_humidity:units = "%" ;</div>
<div class=""><span class="m_3386678340777264504m_-1243268538325276327gmail-Apple-tab-span" style="white-space:pre-wrap"></span>float mean_sea_level_pressure(time, lat, lon) ;</div>
<div class=""><span class="m_3386678340777264504m_-1243268538325276327gmail-Apple-tab-span" style="white-space:pre-wrap"></span>mean_sea_level_pressure:units = "Pa" ;</div>
<div class=""><span class="m_3386678340777264504m_-1243268538325276327gmail-Apple-tab-span" style="white-space:pre-wrap"></span>float \6hr_accumulated_precip(time, lat, lon) ;</div>
<div class=""><span class="m_3386678340777264504m_-1243268538325276327gmail-Apple-tab-span" style="white-space:pre-wrap"></span>\6hr_accumulated_precip:units = "mm" ;</div>
<div class=""><span class="m_3386678340777264504m_-1243268538325276327gmail-Apple-tab-span" style="white-space:pre-wrap"></span>float \10m_U_wind(time, lat, lon) ;</div>
<div class=""><span class="m_3386678340777264504m_-1243268538325276327gmail-Apple-tab-span" style="white-space:pre-wrap"></span>\10m_U_wind:units = "m/s" ;</div>
<div class=""><span class="m_3386678340777264504m_-1243268538325276327gmail-Apple-tab-span" style="white-space:pre-wrap"></span>float \10m_V_wind(time, lat, lon) ;</div>
<div class=""><span class="m_3386678340777264504m_-1243268538325276327gmail-Apple-tab-span" style="white-space:pre-wrap"></span>\10m_V_wind:units = "m/s" ;</div>
<div class=""><span class="m_3386678340777264504m_-1243268538325276327gmail-Apple-tab-span" style="white-space:pre-wrap"></span>float wind_magnitude(time, lat, lon) ;</div>
<div class=""><span class="m_3386678340777264504m_-1243268538325276327gmail-Apple-tab-span" style="white-space:pre-wrap"></span>wind_magnitude:units = "m/s" ;</div>
<div class=""><span class="m_3386678340777264504m_-1243268538325276327gmail-Apple-tab-span" style="white-space:pre-wrap"></span>float wind_direction(time, lat, lon) ;</div>
<div class=""><span class="m_3386678340777264504m_-1243268538325276327gmail-Apple-tab-span" style="white-space:pre-wrap"></span>wind_direction:units = "degrees" ;</div>
<div class="">}</div>
</div>
<div class=""><br class="">
</div>
</div>
<div class="gmail_extra"><br class="">
<div class="gmail_quote">On Mon, Feb 13, 2017 at 12:56 PM, Beáta Szábo-Takács <span dir="ltr" class="">
&lt;<a href="mailto:szabo.b@czechglobe.cz" target="_blank" class="">szabo.b@czechglobe.cz</a>&gt;</span> wrote:<br class="">
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div lang="HU" link="blue" vlink="purple" class="">
<div class="m_3386678340777264504m_-1243268538325276327m_-5894225414625747602WordSection1"><p class="MsoNormal">Hi, <u class=""></u><u class=""></u></p><p class="MsoNormal">According to CDO support:<u class=""></u><u class=""></u></p><p class="MsoNormal">The grid type <i class="">generic</i> means that the variables have either no grid information or the grid information is not supported in CDO.<br class="">
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:<u class=""></u><u class=""></u></p>
<ul type="disc" class="">
<li class="MsoNormal">Latitude/longitude grid<u class=""></u><u class=""></u></li><li class="MsoNormal">Lambert conformal grid<u class=""></u><u class=""></u></li><li class="MsoNormal">Gaussian latitude/longitude grid<u class=""></u><u class=""></u></li><li class="MsoNormal">Rotated latitude/longitude grid<u class=""></u><u class=""></u></li><li class="MsoNormal">Spherical Harmonic Coefficients<u class=""></u><u class=""></u></li><li class="MsoNormal">Icosahedral-hexagonal GME grid<u class=""></u><u class=""></u></li></ul><p class="MsoNormal">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:<u class=""></u><u class=""></u></p><p class="MsoNormal"><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;" class="">cdo -f grb setgrid,mygrid
<a href="http://cc.nc/" target="_blank" class="">cc.nc</a> cc.grb<u class=""></u><u class=""></u></span></p><p class="MsoNormal">You can check the grid information of the variables with the CDO function sinfo or griddes.<u class=""></u><u class=""></u></p><p class="MsoNormal"><u class=""></u>&nbsp;<u class=""></u></p><p class="MsoNormal">I hope I could help you.<u class=""></u><u class=""></u></p><p class="MsoNormal"><u class=""></u>&nbsp;<u class=""></u></p><p class="MsoNormal">Beata<u class=""></u><u class=""></u></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,sans-serif;color:#1f497d" class=""><u class=""></u>&nbsp;<u class=""></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,sans-serif;color:#1f497d" class=""><u class=""></u>&nbsp;<u class=""></u></span></p><p class="MsoNormal"><b class=""><span lang="EN-US" style="font-size:11.0pt;font-family:&quot;Calibri&quot;,sans-serif" class="">From:</span></b><span lang="EN-US" style="font-size:11.0pt;font-family:&quot;Calibri&quot;,sans-serif" class=""> Arunima Singh [mailto:<a href="mailto:arunima@vassarlabs.com" target="_blank" class="">arunima@vassarlabs.com</a><wbr class="">]
<br class="">
<b class="">Sent:</b> Monday, February 13, 2017 8:16 AM<br class="">
<b class="">To:</b> Beáta Szábo-Takács &lt;<a href="mailto:szabo.b@czechglobe.cz" target="_blank" class="">szabo.b@czechglobe.cz</a>&gt;<br class="">
<b class="">Cc:</b> Barry Lynn &lt;<a href="mailto:barry.h.lynn@gmail.com" target="_blank" class="">barry.h.lynn@gmail.com</a>&gt;; ncl-talk &lt;<a href="mailto:ncl-talk@ucar.edu" target="_blank" class="">ncl-talk@ucar.edu</a>&gt;</span></p>
<div class="">
<div class="m_3386678340777264504m_-1243268538325276327h5"><br class="">
<b class="">Subject:</b> Re: [ncl-talk] How to convert netcdf to grib format<u class=""></u><u class=""></u></div>
</div><div class=""><br class="webkit-block-placeholder"></div>
<div class="">
<div class="m_3386678340777264504m_-1243268538325276327h5"><p class="MsoNormal"><u class=""></u>&nbsp;<u class=""></u></p>
<div class=""><p class="MsoNormal">I tried cdo -&nbsp;<u class=""></u><u class=""></u></p>
<div class=""><p class="MsoNormal">cdo -f grb copy DET_10N20N_76E85E_2016111712.n<wbr class="">c DET_10N20N_76E85E_2016111712.g<wbr class="">rib<u class=""></u><u class=""></u></p>
</div>
<div class=""><p class="MsoNormal"><u class=""></u>&nbsp;<u class=""></u></p>
</div>
<div class=""><p class="MsoNormal">but i am getting following error :<u class=""></u><u class=""></u></p>
</div>
<div class="">
<div class=""><p class="MsoNormal"><u class=""></u>&nbsp;<u class=""></u></p>
<div class="">
<div class="">
<div class=""><p class="MsoNormal">Warning (cgribexDefGrid) : The CGRIBEX library can not store fields on the used grid!<u class=""></u><u class=""></u></p>
</div>
<div class=""><p class="MsoNormal"><u class=""></u>&nbsp;<u class=""></u></p>
</div>
<div class=""><p class="MsoNormal">Error (cgribexDefGrid) : Unsupported grid type: generic<u class=""></u><u class=""></u></p>
</div>
</div>
</div>
<div class=""><p class="MsoNormal"><u class=""></u>&nbsp;<u class=""></u></p>
</div>
</div>
</div>
</div>
<div class=""><p class="MsoNormal"><u class=""></u>&nbsp;<u class=""></u></p>
<div class=""><p class="MsoNormal">On Mon, Feb 13, 2017 at 12:40 PM, Beáta Szábo-Takács &lt;<a href="mailto:szabo.b@czechglobe.cz" target="_blank" class="">szabo.b@czechglobe.cz</a>&gt; wrote:<u class=""></u><u class=""></u></p>
<blockquote style="border:none;border-left:solid #cccccc 1.0pt;padding:0cm 0cm 0cm 6.0pt;margin-left:4.8pt;margin-right:0cm" class="">
<div class="">
<div class=""><p class="MsoNormal">Hi,<u class=""></u><u class=""></u></p><p class="MsoNormal">&nbsp;<u class=""></u><u class=""></u></p><p class="MsoNormal">I think you can convert netcdf to grib by CDO. Try the following operator:<u class=""></u><u class=""></u></p><p class="MsoNormal">&nbsp;<u class=""></u><u class=""></u></p><p class="MsoNormal">cdo -f grb copy <a href="http://file.nc/" target="_blank" class="">file.nc</a> file.grb<u class=""></u><u class=""></u></p><p class="MsoNormal">&nbsp;<u class=""></u><u class=""></u></p><p class="MsoNormal">I hope it helps.<u class=""></u><u class=""></u></p><p class="MsoNormal">&nbsp;<u class=""></u><u class=""></u></p><p class="MsoNormal">Beata<u class=""></u><u class=""></u></p><p class="MsoNormal"><b class=""><span lang="EN-US" style="font-size:11.0pt;font-family:&quot;Calibri&quot;,sans-serif" class="">&nbsp;</span></b><u class=""></u><u class=""></u></p><p class="MsoNormal"><b class=""><span lang="EN-US" style="font-size:11.0pt;font-family:&quot;Calibri&quot;,sans-serif" class="">From:</span></b><span lang="EN-US" style="font-size:11.0pt;font-family:&quot;Calibri&quot;,sans-serif" class="">
<a href="mailto:ncl-talk-bounces@ucar.edu" target="_blank" class="">ncl-talk-bounces@ucar.edu</a> [mailto:<a href="mailto:ncl-talk-bounces@ucar.edu" target="_blank" class="">ncl-talk-bounces@ucar.<wbr class="">edu</a>]
<b class="">On Behalf Of </b>Arunima Singh<br class="">
<b class="">Sent:</b> Monday, February 13, 2017 8:05 AM<br class="">
<b class="">To:</b> Barry Lynn &lt;<a href="mailto:barry.h.lynn@gmail.com" target="_blank" class="">barry.h.lynn@gmail.com</a>&gt;<br class="">
<b class="">Cc:</b> ncl-talk &lt;<a href="mailto:ncl-talk@ucar.edu" target="_blank" class="">ncl-talk@ucar.edu</a>&gt;<br class="">
<b class="">Subject:</b> Re: [ncl-talk] How to convert netcdf to grib format</span><u class=""></u><u class=""></u></p>
<div class="">
<div class=""><p class="MsoNormal">&nbsp;<u class=""></u><u class=""></u></p>
<div class="">
<div class=""><p class="MsoNormal">Hi,<u class=""></u><u class=""></u></p>
</div>
<div class=""><p class="MsoNormal">&nbsp;<u class=""></u><u class=""></u></p>
</div>
<div class=""><p class="MsoNormal">What i want is netcdf to grib2 format instead of grib to netcdf.<u class=""></u><u class=""></u></p>
</div>
<div class=""><p class="MsoNormal">&nbsp;<u class=""></u><u class=""></u></p>
</div>
<div class=""><p class="MsoNormal">Thanks and Regards,<u class=""></u><u class=""></u></p>
</div>
<div class=""><p class="MsoNormal">Arunima Singh<u class=""></u><u class=""></u></p>
</div>
<div class=""><p class="MsoNormal">&nbsp;<u class=""></u><u class=""></u></p>
</div>
</div>
<div class=""><p class="MsoNormal">&nbsp;<u class=""></u><u class=""></u></p>
<div class=""><p class="MsoNormal">On Mon, Feb 13, 2017 at 12:31 PM, Barry Lynn &lt;<a href="mailto:barry.h.lynn@gmail.com" target="_blank" class="">barry.h.lynn@gmail.com</a>&gt; wrote:<u class=""></u><u class=""></u></p>
<blockquote style="border:none;border-left:solid #cccccc 1.0pt;padding:0cm 0cm 0cm 6.0pt;margin-left:4.8pt;margin-top:5.0pt;margin-right:0cm;margin-bottom:5.0pt" class="">
<div class=""><p class="MsoNormal">Hi:<u class=""></u><u class=""></u></p>
<div class=""><p class="MsoNormal">&nbsp;<u class=""></u><u class=""></u></p>
</div>
<div class=""><p class="MsoNormal">I believe you can find the answer here:<u class=""></u><u class=""></u></p>
</div>
<div class=""><p class="MsoNormal">&nbsp;<u class=""></u><u class=""></u></p>
</div>
<div class=""><p class="MsoNormal"><a href="http://www.ncl.ucar.edu/Applications/griball.shtml" target="_blank" class="">http://www.ncl.ucar.edu/Applic<wbr class="">ations/griball.shtml</a><u class=""></u><u class=""></u></p>
</div>
</div>
<div class=""><p class="MsoNormal">&nbsp;<u class=""></u><u class=""></u></p>
<div class="">
<div class="">
<div class=""><p class="MsoNormal">On Mon, Feb 13, 2017 at 8:56 AM, Arunima Singh &lt;<a href="mailto:arunima@vassarlabs.com" target="_blank" class="">arunima@vassarlabs.com</a>&gt; wrote:<u class=""></u><u class=""></u></p>
</div>
</div>
<blockquote style="border:none;border-left:solid #cccccc 1.0pt;padding:0cm 0cm 0cm 6.0pt;margin-left:4.8pt;margin-top:5.0pt;margin-right:0cm;margin-bottom:5.0pt" class="">
<div class="">
<div class="">
<div class=""><p class="MsoNormal">Hi,<u class=""></u><u class=""></u></p>
<div class=""><p class="MsoNormal">&nbsp;<u class=""></u><u class=""></u></p>
</div>
<div class=""><p class="MsoNormal">I have one netcdf file that i want to convert to grib format.<u class=""></u><u class=""></u></p>
</div>
<div class=""><p class="MsoNormal">Can we do this conversion with ncl?<u class=""></u><u class=""></u></p>
</div>
<div class=""><p class="MsoNormal">&nbsp;<u class=""></u><u class=""></u></p>
</div>
<div class=""><p class="MsoNormal">If yes, how?<u class=""></u><u class=""></u></p>
</div>
<div class=""><p class="MsoNormal">&nbsp;<u class=""></u><u class=""></u></p>
</div>
<div class=""><p class="MsoNormal">Thanks and Regards,<u class=""></u><u class=""></u></p>
</div>
<div class=""><p class="MsoNormal">Arunima Singh<u class=""></u><u class=""></u></p>
</div>
</div><p class="MsoNormal">&nbsp;<u class=""></u><u class=""></u></p>
</div>
</div><p class="MsoNormal" style="margin-bottom:12.0pt">______________________________<wbr class="">_________________<br class="">
ncl-talk mailing list<br class="">
<a href="mailto:ncl-talk@ucar.edu" target="_blank" class="">ncl-talk@ucar.edu</a><br class="">
List instructions, subscriber options, unsubscribe:<br class="">
<a href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk" target="_blank" class="">http://mailman.ucar.edu/mailma<wbr class="">n/listinfo/ncl-talk</a><u class=""></u><u class=""></u></p>
</blockquote>
</div><p class="MsoNormal"><br class="">
<br clear="all" class="">
<u class=""></u><u class=""></u></p>
<div class=""><p class="MsoNormal">&nbsp;<u class=""></u><u class=""></u></p>
</div><p class="MsoNormal">-- <u class=""></u><u class=""></u></p>
<div class="">
<div class=""><p class="MsoNormal">Barry H. Lynn, Ph.D<u class=""></u><u class=""></u></p>
<div class="">
<div class=""><p class="MsoNormal">Senior Lecturer,<u class=""></u><u class=""></u></p>
</div>
<div class="">
<div class=""><p class="MsoNormal"><span style="color:#888888" class="">The Institute of the Earth Science,&nbsp;<br class="">
The Hebrew University of Jerusalem,&nbsp;<br class="">
Givat Ram, Jerusalem 91904, Israel&nbsp;</span><u class=""></u><u class=""></u></p>
</div><p class="MsoNormal"><span style="color:#888888" class="">Tel: 972 547 231 170<br class="">
Fax: (972)-25662581</span><u class=""></u><u class=""></u></p>
</div>
</div>
<div class=""><p class="MsoNormal">&nbsp;<u class=""></u><u class=""></u></p>
</div>
<div class=""><p class="MsoNormal">C.E.O, Weather It Is, LTD<br class="">
Weather and Climate Focus<br class="">
<a href="http://weather-it-is.com/" target="_blank" class="">http://weather-it-is.com</a><br class="">
Jerusalem, Israel<br class="">
Local: 02 930 9525<br class="">
Cell: 054 7 231 170<br class="">
Int-IS: x972 2 930 9525<br class="">
US 914 432 3108<u class=""></u><u class=""></u></p>
</div>
</div>
</div>
</div>
</blockquote>
</div><p class="MsoNormal">&nbsp;<u class=""></u><u class=""></u></p>
</div>
</div>
</div>
</div>
</div>
</blockquote>
</div><p class="MsoNormal"><u class=""></u>&nbsp;<u class=""></u></p>
</div>
</div>
</div>
</div>
</div>
</blockquote>
</div>
<br class="">
</div>
</div>
</div></div></div>

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