[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

19990125: SFLIST question



>From: Robert Ballentine <address@hidden>
>Organization: .
>Keywords: 199901250507.WAA00110

>Support/Steve:
>  I would like to modify the GEMPAK SFLIST program slightly so that it prints
>out the surface data in f7.1 format instead of f8.2 format.  I went to the
>directory /gempak5.4/source/programs/sf/sflist and found the program sfllis.f
>that has the f8.2 format.  I changed that line to f7.1 format, compiled, and
>ran the Makefile, but it didn't make any difference in the output when I
>ran SFLIST (even after re-sourcing Gemenviron).  Clearly I am overlooking at
>least one step in making this change.  Is there a reasonably simple way to
>do this without completely reinstalling gempak?
>   Thanks,
>   Bob
>

Bob,

You have found the appropriate routine.  After editing the file,
you only need to remake in that directory (and install the executable).

To rebuild sflist:
cd $GEMPAKHOME/src/programs/sf/sflist
make clean
make all
make install
make clean

The make install will copy the sflist program to the $GEMEXE
directory (which sourcing Gemenviron adds to your path).

It may be that either you missed the make clean, so that the
updated library routine was not used, or that tha new
executable wasn't istalled or not in your path. I'm not
sure...but I made your change here and recompiled and it worked.

You could modify the source to chage the format based on an environmental
variable, so you could modify the format without recompiling each time.
The GETENV() routine is used to obtain the value from an environmental
variable. You can have a default to 7.1 or 8.2, or if the variable
is set, generate the appropriate output format.

Steve Chiswell