<div dir="ltr"><div><div><div><div><font><span style="font-family:arial,helvetica,sans-serif">Hi,<br></span></font></div><font><span style="font-family:arial,helvetica,sans-serif">First, you will have to create a CONTROL file to read your GRIB data.<br>
e.g. my GRIB data file is named as ifile.grb<br>So I am creating a ifile.ctl which looks as <span class=""> </span><span class=""> <br></span><span class="">   </span><span class="">DSET</span><span class="">^</span><span class=""></span><span class=""></span><span class="">ifile</span><span class="">.</span><span class="">grb</span><span class=""></span><br>
<span class=""></span><span class=""> </span><span class=""> </span><span class=""> </span><span class="">OPTIONS</span><span class=""> </span><span class="">sequential</span><span class=""> </span><br><span class=""></span><span class=""> </span><span class=""> </span><span class=""> </span><span class="">UNDEF</span><span class=""> </span><span class=""> </span><span class="">-</span><span class="">9</span><span class="">.99e</span><span class="">+36</span><span class=""> </span><br>
<span class=""></span><span class=""> </span><span class=""> </span><span class=""> </span><span class="">XDEF</span><span class=""> </span><span class="">360</span><span class=""> </span><span class="">LINEAR</span><span class=""> </span><span class="">-</span><span class="">179.5</span><span class=""> </span><span class="">1</span><span class=""> </span><br>
<span class=""></span><span class=""> </span><span class=""> </span><span class=""> </span><span class="">YDEF</span><span class=""> </span><span class="">180</span><span class=""> </span><span class="">LINEAR</span><span class=""> </span><span class=""> </span><span class="">-</span><span class="">89.5</span><span class=""> </span><span class="">1</span><span class=""> </span><br>
<span class=""></span><span class=""> </span><span class=""> </span><span class=""> </span><span class="">ZDEF</span><span class=""> </span><span class=""> </span><span class=""> </span><span class="">1</span><span class=""> </span><span class="">LINEAR</span><span class=""> </span><span class="">1</span><span class=""> </span><span class="">1</span><span class=""> </span><br>
<span class=""></span><span class=""> </span><span class=""> </span><span class=""> </span><span class="">TDEF</span><span class=""> </span><span class=""> </span><span class=""> </span><span class="">1</span><span class=""> </span><span class="">LINEAR</span><span class=""> </span><span class="">00:00</span><span class="">Z15jun1990</span><span class=""> </span><span class="">1mo</span><span class=""></span><span class=""> </span><br>
<span class=""></span><span class=""> </span><span class=""> </span><span class=""> </span><span class="">VARS</span><span class=""> </span><span class=""> </span><span class=""> </span><span class="">1</span><span class=""> </span><br>
<span class=""></span><span class=""> </span><span class=""> </span><span class=""> </span><span class="">ps</span><span class=""> </span><span class=""> </span><span class="">1</span><span class=""> </span><span class=""> </span><span class="">99</span><span class=""> </span><span class=""> </span><span class="">description</span><span class=""> </span><span class="">of</span><span class=""> </span><span class="">the</span><span class=""> </span><span class="">variable</span><span class=""> </span><br>
<span class=""></span><span class=""> </span><span class=""> </span><span class=""> </span><span class="">ENDVARS</span><br><br></span></font></div><div><font><span style="font-family:arial,helvetica,sans-serif">or you can prepare CONTROL file with the following command provided <a href="http://grib2ctl.pl">grib2ctl.pl</a> and wgrib is installed in your Linux /UNIX machine<br>
</span></font><pre><font><span style="font-family:arial,helvetica,sans-serif"><a href="http://grib2ctl.pl">grib2ctl.pl</a> ifile.grb &gt; ifile.ctl</span></font></pre></div><div><font><span style="font-family:arial,helvetica,sans-serif"><br>
Finally use CDO<br><span class="">cdo</span><span class=""> </span><span class="">-</span><span class="">f</span><span class=""> </span><span class="">nc</span><span class=""> </span><span class="">import_binary</span><span class=""> </span><span class="">ifile</span><span class="">.</span><span class="">ctl</span><span class=""> </span><span class="">ofile</span><span class="">.</span><span class="">nc<br>
<br></span></span></font></div><span class="">Hope it will help you.<br><br></span></div><span class="">Kind Regards<br></span></div><span class="">Sridhara<br></span></div><div class="gmail_extra"><br><br><div class="gmail_quote">
On Tue, Dec 24, 2013 at 7:37 PM, fereshteh komijani <span dir="ltr">&lt;<a href="mailto:fereshtehkomijani@gmail.com" target="_blank">fereshtehkomijani@gmail.com</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><div><div><div>dear friends<br></div>i have Grib file (a.grib) that what to convert it to netcdf files . <br></div>would you please tell me which command in CDO can do it.<br></div>many thanks in advance<br>

</div>fereshte<span class="HOEnZb"><font color="#888888"><br clear="all"><div><div><div><div><div><br>-- <br><div style="text-align:center"><font style="background-color:#cc33cc" color="#ffffff" face="comic sans ms,sans-serif" size="4"><b>**Angel**</b></font></div>


<div style="text-align:center"> </div>
<div style="text-align:center"><span><b><u><font style="background-color:#3333ff" color="#ffff33" face="Arial Narrow" size="4"></font></u></b></span> </div>
</div></div></div></div></div></font></span></div>
<br>_______________________________________________<br>
gradsusr mailing list<br>
<a href="mailto:gradsusr@gradsusr.org">gradsusr@gradsusr.org</a><br>
<a href="http://gradsusr.org/mailman/listinfo/gradsusr" target="_blank">http://gradsusr.org/mailman/listinfo/gradsusr</a><br>
<br></blockquote></div><br><br clear="all"><br>-- <br>Sridhara Nayak, PhD Student;<br>Centre for Oceans, Rivers, Atmosphere and Land Sciences;<br>Indian Institute of Technology Kharagpur; Kharagpur; West Bengal; India.
</div>