<html><head></head><body><div style="color:#000; background-color:#fff; font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, Sans-Serif;font-size:16px"><div id="yui_3_16_0_1_1451761417562_5718">Hello everyone,</div><div id="yui_3_16_0_1_1451761417562_5718" dir="ltr"><br></div><div id="yui_3_16_0_1_1451761417562_5718" 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 id="yui_3_16_0_1_1451761417562_5718" dir="ltr"><br></div><div id="yui_3_16_0_1_1451761417562_5718" dir="ltr" class="">' open 4.ctl '</div><div id="yui_3_16_0_1_1451761417562_5718" dir="ltr" class="">' set lat 4 26 '</div><div id="yui_3_16_0_1_1451761417562_5718" dir="ltr" class="">' set lon 60 100 '</div><div id="yui_3_16_0_1_1451761417562_5718" dir="ltr" class="">' set t 1 1 '</div><div id="yui_3_16_0_1_1451761417562_5718" dir="ltr" class="">' define Dst = sst '</div><div id="yui_3_16_0_1_1451761417562_5718" dir="ltr" class="">' define n = 20110111 '</div><div id="yui_3_16_0_1_1451761417562_5718" dir="ltr" class="">' set sdfwrite -dbl ' n '.nc '</div><div id="yui_3_16_0_1_1451761417562_5718" dir="ltr" class="">' sdfwrite Dst '</div><div id="yui_3_16_0_1_1451761417562_5718" dir="ltr" class="">' clear sdfwrite '</div><div dir="ltr" id="yui_3_16_0_1_1451761417562_5819" class=""><br id="yui_3_16_0_1_1451761417562_5821" class=""></div><div dir="ltr" id="yui_3_16_0_1_1451761417562_5819" class="">I want my output file to be named as 20110111.nc but instead of that it is generating n.nc. I know I can directly define it as 20110111.nc 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" id="yui_3_16_0_1_1451761417562_5819" class=""><br></div><div dir="ltr" id="yui_3_16_0_1_1451761417562_5819" class="">Thanks in advance for your help.</div><div dir="ltr" id="yui_3_16_0_1_1451761417562_5819" class="">Regards,</div><div dir="ltr" id="yui_3_16_0_1_1451761417562_5819" class="">Natansh Naidu</div></div></body></html>