[gradsusr] .ctl file of gribs2 file

Arlindo da Silva dasilva at alum.mit.edu
Wed Apr 18 21:33:52 EDT 2012


On Tue, Apr 10, 2012 at 11:08 AM, Rowell, Mason D.
<Mason.D.Rowell-1 at ou.edu>wrote:

>  Hello,
>
> Well I don't ever remember corresponding with anyone on the grads boards
> about this, but I think I know the problem. I don't think you can run the
> script to produce your .ctl file from within the grads environment, you
> need to do so outside of this on the operating system where you have
> installed grads. I'm going to guess from the below that you have some linux
> operating system.
>


Actually, it looks like he is running Windows. Yes, g2ctl.pl is a perl
script and as such should be run outside grads. Because perl does not comes
with windows you need to install it separately, say,

      http://www.activestate.com/activeperl/downloads

Once you install perl, open a command window and run

C:\> perl g2ctl.pl ...

      I haven't used perl on Windows in a very long time, perhaps others in
the list can help if you ran into problems.

         Arlindo


You need to look at the documentation on how to run this g2ctl script,
> which you seem to know of given the command you tried in grads, and instead
> do so from the linux environment with perl in your path. If perl was
> installed in the standard place /usr/bin (as is assumed in the perl script)
> it should be in the path from where you would type the command. If it is
> not then you will need to specify the path to perl before running the perl
> script with the appropriate command on that same line as specified by the
> documentation (and also change this line in the perl script, i.e.
> #!/usr/bin/perl -w, the the correct path). At this point, you would need to
> run gribmap outside of grads as well to get the .idx file. There should be
> documentation on this as well. It is my experience these need be paired in
> the same directory when opening the .ctl, which is where you would then
> want to use grads (i.e. you can open the .ctl in grads with the open
> command).
>
> Also, please send out these emails to gradsusr at gradsusr.org instead of
> individuals. You will get more potential responders and I could have any of
> my mistakes checked by those individuals as well. Good luck.
>
> PS- Others, have I made a mistake? I never once tried to run g2ctl or the
> other grib version from within grads.
>  ------------------------------
> *From:* Ato Akorful [aakorful at gmail.com]
> *Sent:* Tuesday, April 10, 2012 3:59 AM
> *To:* Rowell, Mason D.
> *Subject:* .ctl file of gribs2 file
>
>   Hi Rowell,
>
>  I am a new user of GrADS with very little programming experience. I use
> the grads-2.0.1.oga.1. I have downloaded the g2ctl script (from
> ftp://ftp.cpc.ncep.noaa.gov/wd51we/g2ctl/g2ctl and pasted it in the
> scripts folder: C:\OpenGrADS\Contents\Resources\Scripts, installed Perl 5
> (ie strawberry) and wgribs2 as you directed on this page:
> http://www.cpc.ncep.noaa.gov/products/wesley/g2ctl.html.
>
>  However, when I try to run the script in the GrADS console, I get this
> error: "Unexpected else. Incorrect if block nesting. Error occurred at line
> 275." Please check the details in the image:
>
>  [image: Inline image 2]
>
>
>
>  Could you please help me around this?
>
>  Best Regards
>
>  S. A. Andam-Akorful
> PhD. Student
> Hohai University, China.
>
>
> _______________________________________________
> gradsusr mailing list
> gradsusr at gradsusr.org
> http://gradsusr.org/mailman/listinfo/gradsusr
>
>


-- 
Arlindo da Silva
*dasilva at alum.mit.edu*
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://gradsusr.org/pipermail/gradsusr/attachments/20120418/b0f8a097/attachment-0003.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: image/png
Size: 82529 bytes
Desc: not available
Url : http://gradsusr.org/pipermail/gradsusr/attachments/20120418/b0f8a097/attachment-0003.png 


More information about the gradsusr mailing list