[gradsusr] Convert multiple data to netcdf fromat
Jayakrishnan P.R
prjayakrishnan at gmail.com
Tue Mar 17 00:47:08 EDT 2015
You have to write a shell script for this thing. First of all the input
data or input folder should be in the name order like file1.ctl, file2.ctl
etc file n.ctl. Then you can convert the file by writing a for loop as below
for i in {1..9};
do
lats4d -i pratesfc$i.ctl -mxtimes 1220 -lat -37.33 -35.42 -lon -73.5 -69.75
-format netcdf -o pratesfc2$i
echo Converting file #######
done
Where pratesfc$i.ctl is the input file and it should be as pratesfc1.ctl,
pratesfc2.ctl etc so that we can read it using a for loop and convert
multiple files.
Sincerely
***********************************************
Jayakrishnan.P.R
Project Scientist-C
National Centre for Medium Range Weather Forecasting
Earth System Science Organisation
Ministry of Earth Sciences
A-50, Sector 62, NOIDA -201 309, INDIA
Mob: 09496026547
Alternate Email: jkrishna at ncmrwf.gov.in
***********************************************
On Mon, Mar 16, 2015 at 6:08 PM, Tamara Maass <tmaass at uc.cl> wrote:
> Dear All,
>
>
> Could someone kindly assist, this is my first time using GRADS and GRIB
> data.
>
>
> I have multiple data in grib2 and I am trying to convert them in netcdf
> format. I am using Lats4d, I write this line and it´s work fine:
>
> *lats4d -i pratesfc.ctl -mxtimes 1220 -lat -37.33 -35.42 -lon -73.5 -69.75 -format netcdf -o pratesfc2*
>
> But i need to do it for many data. How can I do it? Can i do it from the
> command windows? I need to create a script?
>
>
> Any help greatly appreciated
>
>
> (I'm using the OpenGrADS grads-2.0.2.oga.2 superpack on Windows 7)
>
>
> Thanks & Regards,
>
>
>
> Tamara
>
> _______________________________________________
> gradsusr mailing list
> gradsusr at gradsusr.org
> http://gradsusr.org/mailman/listinfo/gradsusr
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://gradsusr.org/pipermail/gradsusr/attachments/20150317/3dfbf2a7/attachment.html
More information about the gradsusr
mailing list