<div dir="ltr">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<div><br></div><div><div>for i in {1..9};</div><div>do</div><div><br></div><div>lats4d -i pratesfc$i.ctl -mxtimes 1220 -lat -37.33 -35.42 -lon -73.5 -69.75 -format netcdf -o pratesfc2$i</div><div>echo Converting file #######</div><div>done</div><div><br></div></div><div><br></div><div>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.</div><div><br></div><div><br></div><div><br></div></div><div class="gmail_extra"><br clear="all"><div><div class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr">Sincerely<br>***********************************************<br>Jayakrishnan.P.R<br><div>Project Scientist-C<br>National Centre for Medium Range Weather Forecasting<br>Earth System Science Organisation<br>Ministry of Earth Sciences<br>A-50, Sector 62, NOIDA -201 309, INDIA<br>Mob: 09496026547</div><div>Alternate Email: <a href="mailto:jkrishna@ncmrwf.gov.in" target="_blank">jkrishna@ncmrwf.gov.in</a><br><br>***********************************************</div></div></div></div></div></div></div></div>
<br><div class="gmail_quote">On Mon, Mar 16, 2015 at 6:08 PM, Tamara Maass <span dir="ltr"><<a href="mailto:tmaass@uc.cl" target="_blank">tmaass@uc.cl</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><p class="MsoNormal" style="font-size:12.8000001907349px"><span lang="EN-US" style="font-size:10pt;line-height:15.3333320617676px">Dear All,</span></p><p class="MsoNormal" style="font-size:12.8000001907349px"><span lang="EN-US" style="font-size:10pt;line-height:15.3333320617676px"><br></span></p><p class="MsoNormal" style="font-size:12.8000001907349px"><span lang="EN-US" style="font-size:10pt;line-height:15.3333320617676px;color:black">Could someone kindly assist</span><span lang="EN-US" style="font-size:10pt;line-height:15.3333320617676px">, <span style="color:black">this is my first time using <span>GRADS</span> and GRIB data.</span></span></p><p class="MsoNormal" style="font-size:12.8000001907349px"><span lang="EN-US" style="font-size:10pt;line-height:15.3333320617676px"><span style="color:black"><br></span></span></p><p class="MsoNormal" style="font-size:12.8000001907349px"><span lang="EN-US" style="font-size:10pt;line-height:15.3333320617676px">I have multiple data in grib2 and </span><span lang="EN-US" style="font-size:10pt;line-height:15.3333320617676px;color:black">I am trying to convert them in netcdf format. I am using Lats4d, I write this line and it´s work fine:</span></p><pre style="white-space:pre-wrap"><b><span lang="EN-US" style="font-family:Calibri,sans-serif">lats4d -i pratesfc.ctl -mxtimes 1220 -lat -37.33 -35.42 -lon -73.5 -69.75 -format <a name="14c229a04fb9d2eb_14c13064a319bf48_14c0fef5e7de98d9_</a" style="color:rgb(34,34,34)">netcdf</a> -o pratesfc2</span></b><span lang="EN-US" style="color:rgb(119,0,0)"></span></pre><p class="MsoNormal" style="font-size:12.8000001907349px"><span lang="EN-US" style="font-size:10pt;line-height:15.3333320617676px">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 <span style="color:black">script? </span></span></p><p class="MsoNormal" style="font-size:12.8000001907349px"><br></p><p class="MsoNormal" style="font-size:12.8000001907349px"><span lang="EN-US" style="font-size:10pt;line-height:15.3333320617676px;color:black">Any help greatly appreciated</span></p><p class="MsoNormal" style="font-size:12.8000001907349px"><span lang="EN-US" style="font-size:10pt;line-height:15.3333320617676px;color:black"><br></span></p><p class="MsoNormal" style="font-size:12.8000001907349px"><span lang="EN-US" style="font-size:10pt;line-height:15.3333320617676px;color:black">(I'm using the OpenGrADS <span>grads</span>-2.0.2.oga.2 superpack on Windows 7)</span><span lang="EN-US" style="font-size:10pt;line-height:15.3333320617676px;color:black"></span></p><p class="MsoNormal" style="font-size:12.8000001907349px"><span lang="EN-US" style="font-size:10pt;line-height:15.3333320617676px;color:black"><br></span></p><p class="MsoNormal" style="font-size:12.8000001907349px"><span lang="EN-US" style="font-size:10pt;line-height:15.3333320617676px;color:black">Thanks & Regards,</span></p><p class="MsoNormal" style="font-size:12.8000001907349px"><span lang="EN-US" style="font-size:10pt;line-height:15.3333320617676px;color:black"><br></span></p><p class="MsoNormal" style="font-size:12.8000001907349px"><span lang="EN-US" style="font-size:10pt;line-height:15.3333320617676px;color:black"><br></span></p><p class="MsoNormal" style="font-size:12.8000001907349px"><span lang="EN-US" style="font-size:10pt;line-height:15.3333320617676px;color:black">Tamara</span></p></div>
<br>_______________________________________________<br>
gradsusr mailing list<br>
<a 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>
<br></blockquote></div><br></div>