Problems with gribmap.exe when installing GRADS on Windows

Arlindo da Silva dasilva at ALUM.MIT.EDU
Sat Sep 22 00:49:38 EDT 2007


On 9/21/07, John Filipkowski <john.filipkowski at amec.com> wrote:
> Hi,
>
> I'm new to GRADS on Windows, but I've used GRADS on Linux for a few years.
> We're being told to do our GRADS processing on Windows platforms, so I'm
> testing GRADS 1.8SL11 on Windows XP and Windows 2003.
>
> I installed GRADS 1.8SL11 (win32e) on a Windows XP platform without a
> problem.  Perl 5.6.1 is already installed on the system.
>

Is this ActiveState perl? Chances are it will include the DOS CR/LF
junk at the end of each line which may confuse gribmap which has been
compiled with cygwin. You can learn about this issue here:

    http://cygwin.com/cygwin-ug-net/using-textbinary.html

 Here are your options:

0) Use perl shipped with cygwin

1) Post process the ctl file created by ActiveState perl to fix the
CRLF probem. Utilities dos2unix and unix2dos will do this for you;
they are available with cygwin (package cygutils), or google for
native versions, e,g.,

         http://www.bastet.com/

This may be the easiest solution.

2) Set the environment variable CYGWIN=nobinmode; this will give you
problems if you bring over a ctl from Unix/Linux. Learn more about
setting CYGWIN here:

   http://cygwin.com/cygwin-ug-net/using-cygwinenv.html

> I copied a GRIB file (GFS, GRIB1) to the win32e folder and ran
>
> perl grib2ctl.pl -verf (grib file) > XGFS.ctl
>

This may be OK, but I'd recommend grabbing the lasted grib2ctl.pl and
wgrib.c sources, specially for dealing with WRF output:

       http://www.cpc.ncep.noaa.gov/products/wesley/grib2ctl.html

> The .ctl file was created properly, and I edited it to remove the "^"
> characters which appeared.
>

Keep the "^", this is intended: it means that these data files are in
the same directory as the ctl.

> Entering
>
> gribmap.exe -e -i XGFS.ctl
>
> Produced nothing.
>
> Simlarly, entering
>
> gribmap.exe
>
> gives me back the command prompt, but nothing happened.  The %path%
> variable is correct.   Should I install cygwin?
>

Not yet. I believe I included sh.exe with the binaries. If so, start
it and enter your shell commands from there.

But if you do choose to install cygwin (it will give you a more sane
scripting environment if you are coming from Unix/Linux), search this
list for something I posted a couple of weeks ago in response to a
cygwin inquire by  B. J. Tsuang. In the very least you will need to
delete the cygwin1.dll I included with win32 GrADS to avoid conflicts
with the more recent one shipped with cygwin. Win32 grads works fine
with the current cygwin DLL, but not all cygwin utilities will work
with the old cygwin1.dll shipped with grads.

  Good Luck,

       Arlindo


--
Arlindo da Silva
dasilva at alum.mit.edu



More information about the gradsusr mailing list