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

[GEMPAK #LJG-826982]: [Fwd: running an old script but...]



Hi Gustavo,

I apologize for not responding to the email you sent yesterday.  I have been 
very
busy preparing for the Latin American Data Workshop that we are hosting at the
Universidade de Sao Paulo Institute for Astronomy, Geophysics and Atmospheric
Science on August 21-23.

re:
> A time ago you created a script for satellite IR.
> 
> This was:
> 
> [ldm@UNIDATA util]$ pwd
> /home/ldm/util
> 
> [ldm@UNIDATA util]$ ./sat-solo.sh

Yes, I remember this well.

> Yet, when running it now there is this problem:
> 
> Can not find NAWIPS distribution.
> Check Gemenviron NAWIPS definition -> /home/gempak/GEMPAK5.10.1

This sounds like a simple matter of either of the following two
possibilities:

- missing NAWIPS link in the ~gempak directory
- incomplete/incorrect PATH setting in the 'ldm' account.

I will login to your machine and see if I can figure out what is actually
happening...

OK, I see the problem:

- ~ldm/util/sat-solo.sh sources the GEMPAK environment setting file as follows:

#!/bin/sh

# Insure the script is run from the Bourne shell
SHELL=/bin/sh
export SHELL

# Set GEMPAK environment
. /home/gempak/GEMPAK5.10.2/Gemenviron.profile

- the file /home/gempak/GEMPAK5.10.2/Gemenviron.profile exists, but it is 
apparently
  one from the distribution 5.10.1:

# Gemenviron file for GEMPAK 5.8
#
#               Sets environment variables used in running GEMPAK
#               Modified  3/04 for Gempak5.7/NAWIPS (Chiz)
#---------------------------------------------------------------------
#  The command
#               . Gemenviron
#
#  or the individual lines below, must be included in your .login or 
#  .cshrc file!
#---------------------------------------------------------------------
# <<CONFIGURE>>
# To build GEMPAK on your system, you should set the NAWIPS variable 
# below to the top level of the source distribution tree on your system.
#
#  Please configure the following definitions to reflect your system:
#
# Top level directory:
NAWIPS=/home/gempak/GEMPAK5.10.1

  Notice that the last line in this listing references GEMPAK5.10.1, not
  GEMPAK 5.10.2.

Question:

- at some point in the past, you must have upgraded from GEMPAK5.10.1 to
  GEMPAK 5.10.2.

  Did the Gemenviron.profile file get copied from the old distribution
  to the new one and not get edited?

  Or, was there a problem with the 5.10.2 Gemenviron.profile file?

The reason I ask is:

- the setting of NAWIPS in the Gemenviron.profile file is incorrect for
  the GEMPAK version you have installed

- the time stamp on Gemenviron.profile is significantly older than
  the time stamp on Gemenviron:

ls -alt /home/gempak/GEMPAK5.10.2/Gemenviron*

-rw-r--r--  1 gempak gempak    7018 Feb 23  2007 Gemenviron
-rw-r--r--  1 gempak gempak    7081 Dec  6  2006 Gemenviron.profile

> Any suggestion for solving it?

The fix is to edit /home/gempak/GEMPAK5.10.2/Gemenviron.profile and
change the line defining NAWIPS to:

NAWIPS=/home/gempak/GEMPAK5.10.2

> On the other hand I would like to add it to
> crontab or something like that in order to update automatically all.
> Can you help me?

It seems that once you fix the definition of NAWIPS in Gemenviron.profile
the script should start working again.  It will be invoked automatically
upon the receipt of data through the existing LDM pqact actions:

~ldm/etc/pqact.gempak_images:

#
# Local addition(s) that run GEMPAK shell scripts to produce GIF files
#
MCIDAS  ^pnga2area Q. (U[^ACXY1]) (.*) (.*)_IMG (0.65)um (.*) (........) (....)
        EXEC
        util/sat-solo.sh /data/ldm/gempak/images/sat/\3/\5/VIS/VIS_\6_\7

MCIDAS  ^pnga2area Q. (U[^ACXY1]) (.*) (.*)_IMG (6..)um (.*) (........) (....)
        EXEC
        util/sat-solo.sh /data/ldm/gempak/images/sat/\3/\5/WV/WV_\6_\7

MCIDAS  ^pnga2area Q. (U[^ACXY1]) (.*) (.*)_IMG (10.7)um (.*) (........) (....)
        EXEC
        util/sat-solo.sh /data/ldm/gempak/images/sat/\3/\5/IR/IR_\6_\7

I think that this is the best way to run the script.  If you still want to
invoke it from cron, you will need to run it in the same sort of way that
is done from the LdM pqact.gempak_images pattern-action file.  This will be
a little hard since you must pass in the fully qualified name of the image
to be acted on.

> Thank you a lot,

No worries.

Cheers,

Tom
****************************************************************************
Unidata User Support                                    UCAR Unidata Program
(303) 497-8642                                                 P.O. Box 3000
address@hidden                                   Boulder, CO 80307
----------------------------------------------------------------------------
Unidata HomePage                       http://www.unidata.ucar.edu
****************************************************************************


Ticket Details
===================
Ticket ID: LJG-826982
Department: Support GEMPAK
Priority: Normal
Status: Closed