[gradsusr] convert multiple grib files to netcdf files
Natansh Naidu
natanshnaidu at yahoo.in
Sat Jan 2 14:24:47 EST 2016
Hello everyone,
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:
' open 4.ctl '' set lat 4 26 '' set lon 60 100 '' set t 1 1 '' define Dst = sst '' define n = 20110111 '' set sdfwrite -dbl ' n '.nc '' sdfwrite Dst '' clear sdfwrite '
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.
Thanks in advance for your help.Regards,Natansh Naidu
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://gradsusr.org/pipermail/gradsusr/attachments/20160102/bf2ec8cd/attachment.html
More information about the gradsusr
mailing list