<br>The reason I am trying to write the .nc file name via a variable, while converting from .grd to .nc, is because I intend to create a loop in which variable n = n+1 can be applied so that n=20110111 will change to n=20110112 and so on, so that I can use this in while loop while n<32 to convert all the files for January from .grd into netcdf all at once. Dear GrADS users, is this possible ???<div id="yMail_cursorElementTracker_0.34738199948333204"><br></div><div id="yMail_cursorElementTracker_0.34738199948333204">Regards,</div><div id="yMail_cursorElementTracker_0.34738199948333204">Natansh Naidu</div><div id="yMail_cursorElementTracker_0.34738199948333204"><br><div><a href="https://overview.mail.yahoo.com/mobile/?.src=Android">Sent from Yahoo Mail on Android</a></div> <br> <blockquote style="margin: 0 0 20px 0;"> <header style="font-family:Roboto, sans-serif; color:#6D00F6;"> <div id="yMail_cursorElementTracker_0.8667107769288123">On Sun, 3 Jan, 2016 at 11:07, Krishnakumar AP</div><div><krishnaap7@gmail.com> wrote:</div> </header> <div style="padding: 10px 0 0 20px; margin: 10px 0 0 0; border-left: 1px solid #6D00F6;"> <div dir="ltr">so put it like this<br clear="none">' set sdfwrite -dbl ' 20110111 '.nc '<br clear="none"></div><div class="gmail_extra"><br clear="all"><div><div class="gmail_signature" id="yMail_cursorElementTracker_0.6504090391099453">By<br clear="none"> Krishnakumar.AP<br clear="none"> </div></div>
<br clear="none"><div class="gmail_quote">On Sun, Jan 3, 2016 at 12:54 AM, Natansh Naidu <span dir="ltr"><<a rel="nofollow" shape="rect" ymailto="mailto:natanshnaidu@yahoo.in" target="_blank" href="javascript:return">natanshnaidu@yahoo.in</a>></span> wrote:<br clear="none"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div class="yQTDBase yqt2758543453" id="yqt96570"><div><div style="color:#000;background-color:#fff;font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, Sans-Serif;font-size:16px;"><div>Hello everyone,</div><div dir="ltr"><br clear="none"></div><div dir="ltr">I am Natansh Naidu from India and am very new to GrADS. I am having one month's daily average data in .grd files. I have written a script file for converting a single .grd file to netcdf classic, which is as follows:</div><div dir="ltr"><br clear="none"></div><div dir="ltr">' open 4.ctl '</div><div dir="ltr">' set lat 4 26 '</div><div dir="ltr">' set lon 60 100 '</div><div dir="ltr">' set t 1 1 '</div><div dir="ltr">' define Dst = sst '</div><div dir="ltr">' define n = 20110111 '</div><div dir="ltr">' set sdfwrite -dbl ' n '.nc '</div><div dir="ltr">' sdfwrite Dst '</div><div dir="ltr">' clear sdfwrite '</div><div dir="ltr"><br clear="none"></div><div dir="ltr">I want my output file to be named as <a rel="nofollow" shape="rect" target="_blank" href="http://20110111.nc">20110111.nc</a> but instead of that it is generating <a rel="nofollow" shape="rect" target="_blank" href="http://n.nc">n.nc</a>. I know I can directly define it as <a rel="nofollow" shape="rect" target="_blank" href="http://20110111.nc">20110111.nc</a> but is there any way of defining the filename via variable? Also please guide me how can I automatically change the DSET of my ctl file since I have 30 .grd files labelled similar to 20110111.grd and I dont want to create a seperate ctl file for every .grd file.</div><div dir="ltr"><br clear="none"></div><div dir="ltr">Thanks in advance for your help.</div><div dir="ltr">Regards,</div><div dir="ltr">Natansh Naidu</div></div></div></div><br clear="none">_______________________________________________<br clear="none">
gradsusr mailing list<br clear="none">
<a rel="nofollow" shape="rect" ymailto="mailto:gradsusr@gradsusr.org" target="_blank" href="javascript:return">gradsusr@gradsusr.org</a><br clear="none">
<a rel="nofollow" shape="rect" target="_blank" href="http://gradsusr.org/mailman/listinfo/gradsusr">http://gradsusr.org/mailman/listinfo/gradsusr</a><br clear="none">
<br clear="none"></blockquote></div><br clear="none"></div> </div> </blockquote></div>