<html xmlns="http://www.w3.org/1999/xhtml" xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office"><head><!--[if gte mso 9]><xml><o:OfficeDocumentSettings><o:AllowPNG/><o:PixelsPerInch>96</o:PixelsPerInch></o:OfficeDocumentSettings></xml><![endif]--></head><body>
You can use CDO to do so.<div><br></div><div><br><pre style="box-sizing: border-box; margin: 1em 1em 1em 1.6em; padding: 8px; border: 1px solid rgb(226, 226, 226); border-top-left-radius: 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px; width: auto; overflow-x: auto; overflow-y: hidden;"><span style="-webkit-text-size-adjust: auto; background-color: rgba(255, 255, 255, 0);">cdo -f nc import_binary data.ctl data.nc</span></pre><br><a href="https://overview.mail.yahoo.com/?.src=iOS">Sent from Yahoo Mail for iPhone</a><br><br><p class="yahoo-quoted-begin" style="font-size: 15px; color: #715FFA; padding-top: 15px; margin-top: 0">On Saturday, November 23, 2019, 10:48 AM, lpasmanoranjan <lpasmanoranjan@gmail.com> wrote:</p><blockquote class="iosymail"><div id="yiv7857614232"><div dir="ltr">Dear Users,<br>I have a dataset 

(.DAT format with a .ctl file). I would like to write it in netcdf format. My dataset have multiple variables with various level. Following are the details in my .ctl file:<br><br>xdef  100 linear 55   0.2<br>ydef  200 linear 60   0.2<br>zdef   11 levels <a dir="ltr" href="tel:1000%C2%A0925%C2%A0900%20850%C2%A0700" x-apple-data-detectors="true" x-apple-data-detectors-type="telephone" x-apple-data-detectors-result="3">1000 925 900 850 700</a> <a dir="ltr" href="tel:500%20300%20200%20150%20100" x-apple-data-detectors="true" x-apple-data-detectors-type="telephone" x-apple-data-detectors-result="4">500 300 200 150 100</a> 50<br>tdef  120 linear 00Z15May2012     1hr<br>VARS   5<br>U             11 0  x-wind component (m s-1)<br>V             11 0  y-wind component (m s-1)<br>W             11  0  z-wind component (m s-1)<br>Q2             1  0  QV at 2 M (kg kg-1)<br>T2             1  0  TEMP at 2 M (K)<div><br></div><div>My grads script to write my data in netcdf format is:<br><br>'open data.ctl'<br>'set time 00z15May2012 23z20May2012'<br>'set gxout fwrite'<br>'define newvars=vars'<br>'set sdfwrite <a rel="nofollow" target="_blank" href="http://data.nc">data.nc</a>'<br>'sdfwrite newvars<br>'quit'</div><div><br></div><div>This script is not working.</div><div>Any help please??</div><div><br></div><div>Thank you in advance.<br>Kind Regards,<br>Mano</div></div></div>_______________________________________________<br>gradsusr mailing list<br><a ymailto="mailto:gradsusr@gradsusr.org" 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><blockquote></blockquote></blockquote></div>
</body></html>