<table cellspacing="0" cellpadding="0" border="0" ><tr><td valign="top" style="font: inherit;">Thaks lee for your help, now the script works but it does not put all the records of the parameter, how can i do to put all the records of the displayed parameters<br>rgds<br>kai<br><br>--- On <b>Sat, 3/9/13, gradsusr-request@gradsusr.org <i><gradsusr-request@gradsusr.org></i></b> wrote:<br><blockquote style="border-left: 2px solid rgb(16, 16, 255); margin-left: 5px; padding-left: 5px;"><br>From: gradsusr-request@gradsusr.org <gradsusr-request@gradsusr.org><br>Subject: gradsusr Digest, Vol 37, Issue 20<br>To: gradsusr@gradsusr.org<br>Date: Saturday, March 9, 2013, 8:18 AM<br><br><div class="plainMail">Send gradsusr mailing list submissions to<br> <a ymailto="mailto:gradsusr@gradsusr.org" href="/mc/compose?to=gradsusr@gradsusr.org">gradsusr@gradsusr.org</a><br><br>To subscribe or unsubscribe via the World Wide Web,
visit<br> <a href="http://gradsusr.org/mailman/listinfo/gradsusr" target="_blank">http://gradsusr.org/mailman/listinfo/gradsusr</a><br>or, via email, send a message with subject or body 'help' to<br> <a ymailto="mailto:gradsusr-request@gradsusr.org" href="/mc/compose?to=gradsusr-request@gradsusr.org">gradsusr-request@gradsusr.org</a><br><br>You can reach the person managing the list at<br> <a ymailto="mailto:gradsusr-owner@gradsusr.org" href="/mc/compose?to=gradsusr-owner@gradsusr.org">gradsusr-owner@gradsusr.org</a><br><br>When replying, please edit your Subject line so it is more specific<br>than "Re: Contents of gradsusr digest..."<br><br><br>Today's Topics:<br><br> 1. text file (kombo kai)<br> 2. Re: text file (Lee Byerle)<br> 3. FW: How to generate .ctl from a .grb file in a grads under<br> windows (T.
haghroosta)<br><br><br>----------------------------------------------------------------------<br><br>Message: 1<br>Date: Sat, 9 Mar 2013 06:00:42 -0800 (PST)<br>From: kombo kai <<a ymailto="mailto:kaikombo@yahoo.com" href="/mc/compose?to=kaikombo@yahoo.com">kaikombo@yahoo.com</a>><br>Subject: [gradsusr] text file<br>To: <a ymailto="mailto:gradsusr@gradsusr.org" href="/mc/compose?to=gradsusr@gradsusr.org">gradsusr@gradsusr.org</a><br>Message-ID:<br> <<a ymailto="mailto:1362837642.67317.YahooMailClassic@web164005.mail.gq1.yahoo.com" href="/mc/compose?to=1362837642.67317.YahooMailClassic@web164005.mail.gq1.yahoo.com">1362837642.67317.YahooMailClassic@web164005.mail.gq1.yahoo.com</a>><br>Content-Type: text/plain; charset="iso-8859-1"<br><br>Hi Grads users<br>I have calculated the area and time average of my variables, noe I want to write the out put results in output.txt my codes are as follows<br>'reinit'<br>'c'<br>'open
d:/vorticity/data2_extraction.ctl'<br>'set lon 0 360'<br>'set lat? -90 90'<br>'set t 1 47'<br>'set z 3'<br>'define vort=hcurl(uwnd1,vwnd2)'<br>'set lon 40'<br>'set lat -22.5'<br>'set z 3'<br>'set t 1 47'<br>*defining the area average vorticity<br>'define avvort=aave(vort,lon=40,lon=70,lat=-22.5,lat=-5)'<br>*dining time average vorticiy va<br>'define mvort=ave(vort,t=1,t=47)'<br>* printing and writing the the text files of the out puts<br>'set gxout print'<br>'set prnopts %10.3e 5 1'<br>*'set prnopts %g 1 1'<br>'d avvort'<br>'d mvort'<br>'retcode1=write('d;/avvort.txt', avvort, 0)'<br>'retcode2=write('d;/mvort.txt', mvort,0)'<br>'retcode1=close(avort.txt)'<br>'retcode2=close(mvort.txt)'<br>but when I run the script I get error in line whcih defines the recode1.<br>I tried several options bur i havent get the output writen to the file I want <br>please any one can help this <br>regards<br>kaikombo<br><br>-------------- next part --------------<br>An HTML
attachment was scrubbed...<br>URL: <a href="http://gradsusr.org/pipermail/gradsusr/attachments/20130309/4d0f4fe1/attachment-0001.html" target="_blank">http://gradsusr.org/pipermail/gradsusr/attachments/20130309/4d0f4fe1/attachment-0001.html</a> <br><br>------------------------------<br><br>Message: 2<br>Date: Sat, 9 Mar 2013 10:15:39 -0600<br>From: Lee Byerle <<a ymailto="mailto:lbyerle@yahoo.com" href="/mc/compose?to=lbyerle@yahoo.com">lbyerle@yahoo.com</a>><br>Subject: Re: [gradsusr] text file<br>To: GrADS Users Forum <<a ymailto="mailto:gradsusr@gradsusr.org" href="/mc/compose?to=gradsusr@gradsusr.org">gradsusr@gradsusr.org</a>><br>Message-ID: <<a ymailto="mailto:8948EDC2-C1B6-4CF3-9057-C1938ACB6E61@yahoo.com" href="/mc/compose?to=8948EDC2-C1B6-4CF3-9057-C1938ACB6E61@yahoo.com">8948EDC2-C1B6-4CF3-9057-C1938ACB6E61@yahoo.com</a>><br>Content-Type: text/plain; charset="us-ascii"<br><br>Kaikombo,<br><br>I was able to run your script
after a few modifications. After displaying avvort and mvort, you can define the output using sublin(result,2). Also, I did not use quotes for the write statements.<br><br>.<br>.<br>.<br>'set gxout print'<br>'set prnopts %10.3e 5 1'<br>'d avvort'<br>var1=sublin(result,2)<br>'d mvort'<br>var2=sublin(result,2)<br>retcode1=write(avvort.txt, var1, 0)<br>retcode2=close(avvort.txt)<br><br>retcode2=write(mvort.txt, var2 ,0)<br>retcode2=close(mvort.txt)<br><br>good luck,<br>Lee<br><br>On Mar 9, 2013, at 8:00 AM, kombo kai wrote:<br><br>> Hi Grads users<br>> I have calculated the area and time average of my variables, noe I want to write the out put results in output.txt my codes are as follows<br>> 'reinit'<br>> 'c'<br>> 'open d:/vorticity/data2_extraction.ctl'<br>> 'set lon 0 360'<br>> 'set lat -90 90'<br>> 'set t 1 47'<br>> 'set z 3'<br>> 'define vort=hcurl(uwnd1,vwnd2)'<br>> 'set lon 40'<br>> 'set lat
-22.5'<br>> 'set z 3'<br>> 'set t 1 47'<br>> *defining the area average vorticity<br>> 'define avvort=aave(vort,lon=40,lon=70,lat=-22.5,lat=-5)'<br>> *dining time average vorticiy va<br>> 'define mvort=ave(vort,t=1,t=47)'<br>> * printing and writing the the text files of the out puts<br>> 'set gxout print'<br>> 'set prnopts %10.3e 5 1'<br>> *'set prnopts %g 1 1'<br>> 'd avvort'<br>> 'd mvort'<br>> 'retcode1=write('d;/avvort.txt', avvort, 0)'<br>> 'retcode2=write('d;/mvort.txt', mvort,0)'<br>> 'retcode1=close(avort.txt)'<br>> 'retcode2=close(mvort.txt)'<br>> but when I run the script I get error in line whcih defines the recode1.<br>> I tried several options bur i havent get the output writen to the file I want <br>> please any one can help this <br>> regards<br>> kaikombo<br>> <br>> _______________________________________________<br>> gradsusr mailing list<br>> <a
ymailto="mailto:gradsusr@gradsusr.org" href="/mc/compose?to=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>-------------- next part --------------<br>An HTML attachment was scrubbed...<br>URL: <a href="http://gradsusr.org/pipermail/gradsusr/attachments/20130309/b88c6b7e/attachment-0001.html" target="_blank">http://gradsusr.org/pipermail/gradsusr/attachments/20130309/b88c6b7e/attachment-0001.html</a> <br><br>------------------------------<br><br>Message: 3<br>Date: Sat, 9 Mar 2013 16:18:26 +0000<br>From: "T. haghroosta" <<a ymailto="mailto:haghroosta@hotmail.com" href="/mc/compose?to=haghroosta@hotmail.com">haghroosta@hotmail.com</a>><br>Subject: [gradsusr] FW: How to generate .ctl from a .grb file in a<br> grads under windows<br>To: <<a ymailto="mailto:spc_meteor@yahoo.com.br"
href="/mc/compose?to=spc_meteor@yahoo.com.br">spc_meteor@yahoo.com.br</a>>, <<a ymailto="mailto:gradsusr@gradsusr.org" href="/mc/compose?to=gradsusr@gradsusr.org">gradsusr@gradsusr.org</a>><br>Message-ID: <<a ymailto="mailto:DUB121-W15E723083A32C5EF157DC7DDE70@phx.gbl" href="/mc/compose?to=DUB121-W15E723083A32C5EF157DC7DDE70@phx.gbl">DUB121-W15E723083A32C5EF157DC7DDE70@phx.gbl</a>><br>Content-Type: text/plain; charset="windows-1256"<br><br><br>Dear Saulo, My problem was solved. No need to reply. I just did the job again. Thank you Regards, T.<br> From: <a ymailto="mailto:haghroosta@hotmail.com" href="/mc/compose?to=haghroosta@hotmail.com">haghroosta@hotmail.com</a><br>To: <a ymailto="mailto:spc_meteor@yahoo.com.br" href="/mc/compose?to=spc_meteor@yahoo.com.br">spc_meteor@yahoo.com.br</a>; <a ymailto="mailto:gradsusr@gradsusr.org" href="/mc/compose?to=gradsusr@gradsusr.org">gradsusr@gradsusr.org</a><br>Subject: RE: [gradsusr] How to
generate .ctl from a .grb file in a grads under windows<br>Date: Sat, 9 Mar 2013 05:22:04 +0000<br><br><br><br><br><br>Dear Saulo,<br> <br>Sorry to get your time. I don't know what happened to my files. At first when I used "q file" command I saw 145 variables in the file, but right now, I just see 95 variables! Could you please tell me what happened and what should I do to solve this problem? Because I lost exactly the variables that I would like to study.<br> <br>I have attached both cases to the email. <br> <br>I am looking forward to hearing from side of you.<br> <br>Regards,<br> <br>Tahereh<br> <br>Date: Thu, 7 Mar 2013 09:15:59 -0800<br>From: <a ymailto="mailto:spc_meteor@yahoo.com.br" href="/mc/compose?to=spc_meteor@yahoo.com.br">spc_meteor@yahoo.com.br</a><br>Subject: Re: [gradsusr] How to generate .ctl from a .grb file in a grads under windows<br>To: <a ymailto="mailto:haghroosta@hotmail.com"
href="/mc/compose?to=haghroosta@hotmail.com">haghroosta@hotmail.com</a><br><br>You're welcome, T.Great it worked fine. Regards ________________________________________<br>Saulo Carvalho<br><br> De: T. haghroosta <<a ymailto="mailto:haghroosta@hotmail.com" href="/mc/compose?to=haghroosta@hotmail.com">haghroosta@hotmail.com</a>><br> Para: <a ymailto="mailto:spc_meteor@yahoo.com.br" href="/mc/compose?to=spc_meteor@yahoo.com.br">spc_meteor@yahoo.com.br</a>; <a ymailto="mailto:gradsusr@gradsusr.org" href="/mc/compose?to=gradsusr@gradsusr.org">gradsusr@gradsusr.org</a> <br><br> Enviadas: Quinta-feira, 7 de Mar?o de 2013 14:08<br> Assunto: RE: [gradsusr] How to generate .ctl from a .grb file in a grads under windows<br> <br><br><br><br><br>Dear Saulo,<br> <br>Thank you very much, it is working. Thank for your help again.<br> <br>Best regards,<br> <br>T.<br> <br>Date: Thu, 7 Mar 2013 06:02:35 -0800<br>From: <a
ymailto="mailto:spc_meteor@yahoo.com.br" href="/mc/compose?to=spc_meteor@yahoo.com.br">spc_meteor@yahoo.com.br</a><br>Subject: Re: [gradsusr] How to generate .ctl from a .grb file in a grads under windows<br>To: <a ymailto="mailto:haghroosta@hotmail.com" href="/mc/compose?to=haghroosta@hotmail.com">haghroosta@hotmail.com</a><br><br>Dear T. Ok, let's do it! - Paste script g2ctl.pl in unit c:. After that, paste grib2 file. - Click "Start>Run>cmd" or<br> open "Windows Prompt". - change directory to c:\ - Type "perl g2ctl.pl 'file'.grib2 >'file'.ctl" (That's not on GRADS, it's on prompt)> A file called 'file'.ctl will be created. - Run Grads and type "!gribmap -iv 'file'.ctl"> A file 'file'.idx will be created *Inside .ctl file, lines "dset" and "index" must be in the proper path. Try it and reply me<br> later. Regards ________________________________________<br>Saulo Carvalho<br><br> De: T. haghroosta <<a
ymailto="mailto:haghroosta@hotmail.com" href="/mc/compose?to=haghroosta@hotmail.com">haghroosta@hotmail.com</a>><br> Para: <a ymailto="mailto:spc_meteor@yahoo.com.br" href="/mc/compose?to=spc_meteor@yahoo.com.br">spc_meteor@yahoo.com.br</a> <br> Enviadas: Quinta-feira, 7 de Mar?o de 2013 10:26<br> Assunto: RE: [gradsusr] How to generate .ctl from a .grb file in a grads under windows<br> <br> <br><br><br><br><br>Dear Saulo,<br> <br>I also have Strawberry. In fact, I don't know in which window I should write the commends, in Grads, or other window. Could you please lead me? How can I start from the first step, I got confused completely.<br> <br>Regards,<br> <br>T.<br> <br>Date: Thu, 7 Mar 2013 05:12:56 -0800<br>From: <a ymailto="mailto:spc_meteor@yahoo.com.br" href="/mc/compose?to=spc_meteor@yahoo.com.br">spc_meteor@yahoo.com.br</a><br>Subject: Re: [gradsusr] How to generate .ctl from a .grb file in a grads under windows<br>To: <a
ymailto="mailto:haghroosta@hotmail.com" href="/mc/compose?to=haghroosta@hotmail.com">haghroosta@hotmail.com</a>; <a ymailto="mailto:gradsusr@gradsusr.org" href="/mc/compose?to=gradsusr@gradsusr.org">gradsusr@gradsusr.org</a><br><br>Dear T., The script g2ctl.pl (or<br> grib2ctl) and grib file must be in the same folder. In case of drive c:\, run command prompt, then you can make: C:\> perl g2ctl.pl file.grib2 >file.ctl .ctl file will be in unit c: I'm using strawberry perl on a windows 7 Regards, ________________________________________<br>Saulo Carvalho<br><br> De: T. haghroosta<br> <<a ymailto="mailto:haghroosta@hotmail.com" href="/mc/compose?to=haghroosta@hotmail.com">haghroosta@hotmail.com</a>><br> Para: <a ymailto="mailto:spc_meteor@yahoo.com.br" href="/mc/compose?to=spc_meteor@yahoo.com.br">spc_meteor@yahoo.com.br</a>; <a ymailto="mailto:gradsusr@gradsusr.org"
href="/mc/compose?to=gradsusr@gradsusr.org">gradsusr@gradsusr.org</a> <br> Enviadas: Quinta-feira, 7 de Mar?o de 2013 9:59<br> Assunto: RE: [gradsusr] How to generate .ctl from a .grb file in a grads under windows<br> <br><br><br><br><br>Dear Saulo,<br> <br>I did it but I just got some errors such as, unknown command, while I have the perl in drive C, I don't know how can I solve my problem.<br> <br>Again I am working in windows system.<br> <br>Regards,<br> <br>T.<br> <br>Date: Thu, 7 Mar 2013 03:43:04 -0800<br>From: <a ymailto="mailto:spc_meteor@yahoo.com.br" href="/mc/compose?to=spc_meteor@yahoo.com.br">spc_meteor@yahoo.com.br</a><br>Subject: Enc: [gradsusr] How to generate .ctl from a .grb file in a grads under windows<br>To: <a ymailto="mailto:gradsusr@gradsusr.org" href="/mc/compose?to=gradsusr@gradsusr.org">gradsusr@gradsusr.org</a>; <a ymailto="mailto:haghroosta@hotmail.com"
href="/mc/compose?to=haghroosta@hotmail.com">haghroosta@hotmail.com</a><br><br>Dear T. All you have to do<br> is: 1- Download and install perl language program;2- Download the grib2 file of your interest;3- Put grib2ctl.pl or g2ctl.pl in a folder, or c:\;4- Type perl grib2ctl.pl filename.grib2 >file.ctl;5- Use !gribmap (on GrADS) to make .idx file. Best Regards, ________________________________________<br>Saulo Carvalho<br><br> ----- Mensagem encaminhada -----<br> De: T. haghroosta <<a ymailto="mailto:haghroosta@hotmail.com" href="/mc/compose?to=haghroosta@hotmail.com">haghroosta@hotmail.com</a>><br> Para: <a ymailto="mailto:gradsusr@gradsusr.org" href="/mc/compose?to=gradsusr@gradsusr.org">gradsusr@gradsusr.org</a> <br> Enviadas: Quinta-feira, 7 de Mar?o de 2013 3:27<br> Assunto: [gradsusr] How to generate .ctl from a .grb file in a grads under windows<br> <br><br><br><br><br><br><br><br>Dear All,<br>
<br>I have a .grb (grib 1) file, I would like to generate a .ctl file and after that .idx file.<br> <br>I did grib2ctl.pl filename.grb > filename.ctl, but I got this error : unknown command<br> <br>I also used this command : g2ctl but I got the error again. How can I do that in windows system?<br> <br>Regards,<br> <br>T.<br> <br><br>_______________________________________________<br>gradsusr mailing list<br><a ymailto="mailto:gradsusr@gradsusr.org" href="/mc/compose?to=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><br> <br><br><br>
<br><br><br> <br><br><br> <br>-------------- next part --------------<br>An HTML attachment was scrubbed...<br>URL: <a href="http://gradsusr.org/pipermail/gradsusr/attachments/20130309/28fba7cf/attachment.html" target="_blank">http://gradsusr.org/pipermail/gradsusr/attachments/20130309/28fba7cf/attachment.html</a>
<br><br>------------------------------<br><br>_______________________________________________<br>gradsusr mailing list<br><a ymailto="mailto:gradsusr@gradsusr.org" href="/mc/compose?to=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><br>End of gradsusr Digest, Vol 37, Issue 20<br>****************************************<br></div></blockquote></td></tr></table>