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

20010709: gdthgt_gf does not produce output file



Robert,
It appears that the problem with gdthgt is that it does not call GSTANM
(which the other programs do (for looping when gdattim is a range) ).
In this case, the time range is a single plot- so the animation control
isn't called- but apparently, the gif driver needs this to be called when
liked directly to define the start of a new plotting sequence.

I have attatched an updated version of gdthgt.f for the
$GEMPAK/source/programs/gd/gdthgt directory.

You can build the _gf version of the program with:
cd $GEMPAK/source/programs/gd/gdthgt
make clean
make programs_gf
make clean

Steve Chiswell


>From address@hidden Sat Jul  7 15:01:32 2001
>Received: from master.nsbf.nasa.gov (IDENT:address@hidden
>[192.149.107.80])
>       by unidata.ucar.edu (UCAR/Unidata) with ESMTP id f67L1W127252
>       for <address@hidden>; Sat, 7 Jul 2001 15:01:32 -0600 (MDT)
>Organization: UCAR/Unidata
>Keywords: 200107072101.f67L1W127252
>Received: by master.nsbf.nasa.gov (Postfix, from userid 556)
>       id 1EAE314F66; Sat,  7 Jul 2001 16:10:37 -0500 (CDT)
>Received: from localhost (localhost [127.0.0.1])
>       by master.nsbf.nasa.gov (Postfix) with ESMTP id E6FFC1510
>       for <address@hidden>; Sat,  7 Jul 2001 16:10:37 -0500 (CDT)
>Date: Sat, 7 Jul 2001 16:10:37 -0500 (CDT)
>From: Robert Mullenax <address@hidden>
>To: address@hidden
>Subject: gdthgt_gf does not produce output file
>Message-ID: <address@hidden>
>MIME-Version: 1.0
>Content-Type: TEXT/PLAIN; charset=US-ASCII

I have been trying to speed up our CGI scripts by using the XXXXX_gf
programs, which I recently realized were available.  I found a problem
with gdthgt_gf as it produces no output file.  It looks like it
runs okay and issues no errors, but it does not produce a .gif file.
This is 5.6.c on our Solaris SPARC 8 boxes.  The standard gdthgt
works fine running gpend..etc.

Thanks,
Robert Mullenax

PS..

I also tried using the Unidata 5.6.c SPARC binary.  It did not
work with that either.

Thanks,
Robert Mullenax

****************************************************************************
Unidata User Support                                    UCAR Unidata Program
(303)497-8644                                                  P.O. Box 3000
address@hidden                                   Boulder, CO 80307
----------------------------------------------------------------------------
Unidata WWW Service                        http://www.unidata.ucar.edu/     
****************************************************************************
        PROGRAM  GDTHGT
C************************************************************************
C* PROGRAM GDTGHT                                                       *
C*                                                                      *
C* This program creates time height sections through scalar grids       *
C*                                                                      *
C**                                                                     *
C* Log:                                                                 *
C* T.W. Barker/WR/SSD    8/91   Created from GDCROSS                    *
C* S. Jacobs/EAI        11/92   Added call to GMESG and 'shrttl'        *
C* M. desJardins/NMC    11/92   Eliminate unused variables              *
C* S. Jacobs/EAI         2/94   Added COLADD flag to DG_OFIL            *
C* L. Williams/EAI       3/94   Clean up declarations of user input     *
C*                              variables                               *
C* S. Jacobs/NMC         6/94   Fixed typo in declarations              *
C* L. Williams/EAI       7/94   Added shrttl to the user input variables*
C* S. Jacobs/NMC         9/94   Added GR_TITL                           *
C* K. Tyle/GSC           7/96   Eliminated call to GDTXUP               *
C* D. Keiser/GSC         8/96   Added FL_MFIL to search for file type   *
C* K. Tyle/GSC           8/96   Added ER_WMSG call after FL_MFIL call,  *
C*                              use filnam in call to GDTXSP            *
C* S. Maxwell/GSC        7/97   Increased input character length        *
C* T. Lee/GSC            1/99   Increased LLMXTM to LLMXGT              *
C* S. Jacobs/NCEP        3/01   Replaced DG_OFIL with DG_MFIL           *
C* S. Chiswell/Unidata   7/01   Added GSTANM/GENANM calls for _gf       *
C************************************************************************
        INCLUDE         'GEMPRM.PRM'
C*
        LOGICAL         clear
        CHARACTER       gdfile*(LLMXLN), border*(LLMXLN),
     +                  ptype*(LLMXLN), gpoint*(LLMXLN),
     +                  taxis*(LLMXLN), gdatim*(LLMXLN),
     +                  gfunc*(LLMXLN), gvcord*(LLMXLN),
     +                  title*(LLMXLN), yaxis*(LLMXLN),
     +                  device*(LLMXLN), scale*(LLMXLN),
     +                  panel*(LLMXLN), wind*(LLMXLN),
     +                  cint*(LLMXLN), line*(LLMXLN),
     +                  text*(LLMXLN), gvect*(LLMXLN), shrttl*(LLMXLN)
C*
        REAL            grdout (LLMXGD), grdoutu (LLMXGD),
     +                  grdoutv (LLMXGD)
        REAL            rlvld (LLMXLV), rlvlc (LLMXLV), rlvlv (LLMXLV)
        REAL            xgrd (LLMXGD), x (LLMXGT), xptsc (LLMXGD),
     +                  ylbl (LLAXIS),
     +                  rgx(1), rgy(1), rlat(1), rlon(1),
     +                  vclsfc, ggrd (LLMXGD), xtlbl (LLAXIS),
     +                  grdt1 (LLMXGD)
        CHARACTER       ttlstr*72, ctlbl (LLAXIS)*40, 
     +                  trange (2)*40, timfnd (LLMXGT)*80,
     +                  timval (LLMXGT)*80, time (2)*40, fname*128
        LOGICAL         respnd, done, proces, havsfc, havvec, havcon
C*
        REAL            clvl (LLCLEV), rmargn (4)
        INTEGER         icolor (LLCLEV), iline (LLCLEV),
     +                  ilwid  (LLCLEV), labflg (LLCLEV),
     +                  levels (LLMXLV), levl (2)
C-----------------------------------------------------------------------
C*      Initialize TAE and GEMPLT.
C
        CALL IP_INIT  ( respnd, iperr )
        CALL IP_IDNT  ( 'GDTHGT', ier )
        IF ( iperr .eq. 0 )  THEN
           CALL GG_INIT  ( 0, iperr )
        END IF
        IF ( iperr .eq. 0 )  THEN
           done = .false.
        ELSE
           done = .true.
        END IF
C
C*      Main loop to read in TAE parameters and draw time section.
C
        DO WHILE  ( .not. done )
C
C*          Set flag to indicate processing will be done.
C
            proces = .true.
C
C*          Read in the variables from the TAE.
C
            CALL GDTXIN  ( gdatim, gvcord, gfunc, gvect, gpoint,
     +                     gdfile, ptype, taxis, yaxis, border,
     +                     line, cint, wind, title, clear, scale,
     +                     panel, device, text, iperr )
C
C*          Exit if there is an error.
C
            IF ( iperr .ne. 0 )  THEN
                done = .true.
            ELSE
                IF ( proces ) THEN
                    CALL ST_LCUC ( gvcord, gvcord, iret )
                    CALL LV_CORD ( gvcord, gvcord, ivcord, iret )
                    IF ( ( iret .ne. 0 ) .or. ( ivcord .eq. 0 ) )
     +                  proces = .false.
                END IF
C
C*              Set up the graphics device.
C
                IF ( proces ) THEN
                    CALL GG_SDEV  ( device, iret )
                    IF  ( iret .ne. 0 )  proces = .false.
                END IF
C
C*              Set text attributes.
C
                IF ( proces ) THEN
                    CALL IN_TEXT ( text, iret )
                    IF ( iret .ne. 0 ) proces = .false.
                END IF
C
C*              Open the grid file and set the grid navigation.  This
C*              will set the proper mode for the grid file.  The mode
C*              must be set to graph mode later.
C
                IF ( proces ) THEN
                    CALL DG_MFIL  ( gdfile, ' ', .true., gdatim,
     +                              igdfln, idum, fname, maxg, iret )
                    IF ( iret .ne. 0 )  proces = .false.
                END IF
C
C*              Get time information 
C
                IF ( proces ) THEN
                    CALL GDTXTM ( igdfln, gdatim, ntdata, timfnd,
     +                            trange, iret )
                    IF ( iret .ne. 0 ) proces = .false.
                END IF
                IF ( ntdata .gt. 0 ) THEN
                    DO i = 1, ntdata
                        CALL TG_VALD ( timfnd(i), timval(i), iret )
                        IF ( iret .ne. 0 ) proces = .false.
                    END DO
                END IF
C
C*              Get y-axis parameters
C
                IF ( proces ) THEN
                    CALL GDTXYY( ptype, yaxis, ivcord, iyaxis, ratio,
     +                           ystrt, ystop, ylbl, nylbl, rmargn,
     +                           ilbfrq, iglfrq, itmfrq, iret )
                    IF ( iret .ne. 0 ) THEN
                        CALL ER_WMSG( 'GDTHGT', iret, ' ', ier )
                        proces = .false.
                    END IF
                END IF
C
C*              Get x-axis parameters
C
                IF ( proces ) THEN
                    CALL GDTXTA ( taxis, LLAXIS, ntdata, timval, x,
     +                            xstrt, xstop, xtlbl, ctlbl, nxlbl,
     +                            xmndst, itlbfr, itglfr, ittmfr,
     +                            iret )
                    IF ( iret .ne. 0 ) proces = .false.
                END IF
C
C*              Get levels for all times
C
                IF ( proces ) THEN
                    CALL GDTXGL ( igdfln, timfnd, ntdata, ystrt, ystop,
     +                            ivcord, levels, nlev, iret )
                    IF ( iret .ne. 0 ) proces = .false.
                END IF
C
C*              Get even levels
C
                IF ( proces ) THEN
                    DO i = 1, nlev
                        rlvld (i) = float (levels (i))
                    END DO
                    CALL GDTXEV ( rlvld, nlev, iyaxis, rlvlc, nlvlc,
     +                            iret )
                    CALL GDTXEV ( rlvld, nlev, 1, rlvlv, nlvlv, iret )
                    IF ( iret .ne. 0 ) proces = .false.
                END IF
                IF ( proces ) THEN
                    CALL GDTXEV ( x, ntdata, 1, xptsc, nptsc, iret)
                    IF ( iret .ne. 0 ) proces = .false.
                END IF
C
C*              Find plotting location
C
                IF ( proces ) THEN
                    CALL GR_PLOC ( gpoint, rgx (1), rgy (1), rlat (1),
     +                             rlon (1), iret )
                    IF ( iret .ne. 0) THEN
                        CALL ER_WMSG ( 'GR', iret, ' ', ier )
                        proces = .false.
                    END IF
                END IF
C
C*              Set subset region to speed calculations
C
                IF ( proces ) THEN
                    imin = int ( rgx (1) ) - 2
                    imax = imin + 5
                    jmin = int (rgy (1) ) - 2
                    jmax = jmin + 5
                    CALL DG_AREA ( imin, imax, jmin, jmax, iret )
                    IF ( iret .ne. 0) THEN
                        CALL ER_WMSG( 'DG', iret, ' ', ier )
                        proces = .false.
                    END IF
                END IF
C
C*              Get data for this list of times and levels
C
                havcon = .false.
                IF ( proces ) THEN
                    havcon = .true.
                    CALL GDTXDA ( igdfln, timfnd, ntdata, gvcord,
     +                            ystrt, ystop, iyaxis, gfunc, ivcord,
     +                            rgx, rgy, levels, nlev, grdt1, rlvlc,
     +                            nlvlc, iret )
                    IF ( iret .eq. 7 ) havcon = .false.
                    IF ( iret .lt. 0 ) proces = .false.
                END IF
C
C*              Put contour data in evenly spaced grid
C
                IF ( proces .and. havcon ) THEN
                    CALL GDTXTI( grdt1, ntdata, nlvlc, x, xptsc, nptsc,
     +                           grdout, iret)
                    IF ( iret .ne. 0) proces = .false.
                END IF
C
C*              Get Vector data for this list of times and levels
C
                havvec = .false.
                IF ( proces ) THEN
                    havvec = .true.
                    CALL GDTXVV ( igdfln, timfnd, ntdata, gvcord,
     +                            ystrt, ystop, iyaxis, gvect, ivcord,
     +                            rgx, rgy, levels, nlev, grdoutu,
     +                            grdoutv, rlvlv, nlvlv ,iret )
                    IF ( iret .eq. 7 ) havvec = .false.
                    IF ( iret .lt. 0 ) proces = .false.
                END IF
C
                IF ( proces .and. havcon ) THEN
                    CALL GDTXLV( line, cint, scale, nptsc, nlvlc, 1, 1,
     +                           nptsc, nlvlc, grdout, icolor, iline,
     +                           ilwid, labflg, iscale, dmin, dmax,
     +                           clvl, nlvl, iret )
                    IF ( iret .ne. 0 ) proces = .false.
                ELSE
                    dmin = 0.0
                    dmax = 0.0
                    nlvl = 0
                END IF
C
                IF ( proces ) THEN
                    CALL GDTXSP ( gdfile, gfunc, ntdata, iscale,
     +                            gdatim, gvcord, nlvl, clvl, dmin,
     +                            dmax, icolor, iline, ilwid, labflg,
     +                            device, panel, gvect, wind, havcon,
     +                            havvec, iret )
                    IF ( iret .ne. 0 ) proces = .false.
                END IF

                IF ( proces ) THEN
                    CALL GSTANM ( ier )
                    CALL GQMODE ( mode, ier )
                    CALL GSMODE ( 2, ier )
                    IF ( clear ) CALL GCLEAR ( ier )
                    CALL GG_PANL ( panel, ier )
C
                    havsfc = .false.
                    CALL GDTXPL( border, iyaxis, ystrt, ystop, vclsfc,
     +                           havsfc, ylbl, nylbl, xstrt, xstop,
     +                           xtlbl, ctlbl, nxlbl, ntdata, itlbfr,
     +                           itglfr, ittmfr, ratio, rmargn, ilbfrq,
     +                           iglfrq, itmfrq, iret )
C
                    CALL GSGGRF ( 1, iyaxis, nptsc, nlvlc, xptsc (1),
     +                            ystrt, xptsc (nptsc), ystop, iret )
                    IF ( havcon ) THEN
                        CALL GCLGRN ( nptsc, nlvlc, grdout, 0, 0, 0,
     +                                nlvl, clvl, icolor, iline, ilwid,
     +                                labflg, iret )
                    END IF
                    IF ( havvec ) THEN
                        indx = 1
                        DO k = 1, nlvlv
                            DO i = 1, ntdata
                                xgrd (indx) = x (i)
                                ggrd (indx) = rlvlv (k)
                                indx = indx + 1
                            END DO
                        END DO
                        CALL GDTXPV ( gvect, grdoutu, grdoutv, xgrd,
     +                                ggrd, ntdata, nlvlv, wind,
     +                                points, ier )
                    END IF
C
C*                  Write the title.
C
                    CALL IN_TITL ( title, 0, ititl, linttl, ttlstr,
     +                             ier )
                    levl (1) = -1
                    levl (2) = -1
                    time (1) = trange (1)
                    time (2) = ' '
                    CALL GR_TITL  ( ttlstr, time, .false.,
     +                              levl, ivcord, gfunc, iscale,
     +                              gpoint, ttlstr, shrttl, iret )
                    IF ( clear ) CALL GMESG ( shrttl, ier )
                    IF ( ititl .ne. 0 ) THEN
                        CALL GSCOLR ( ititl, ier )
                        CALL GG_WSTR ( ttlstr, linttl, ier )
                    END IF
C
                    CALL GSMODE ( mode, ier )
                END IF
                CALL GEPLOT ( ier )
                CALL GENANM ( ier )
                CALL IP_DYNM ( done, ier )
            END IF
        END DO
        CALL GENDP ( 0, iret )
        CALL IP_EXIT ( iret )

        END