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

20050517: segmentation fault in sfgram_gf



Clint,

The basic problem is the the plotting of the letter "G" in
the routine for Gust symbols.

I have a source fix below, or can repack the 5.8.2a binary for you either way.

Basically, Its not a problem when using the gplt (message queue) version since
the data gets copied to a variable through the mail box. The problem exists for
the "_gf" version because GTEXT is called with a constant character string 'G'
to be plotted, and down in the $GEMPAK/source/device/plot/dtext.f routine,
the variable gets copied out to temporary variables and then rewritten
to the variable that was passed in- and g77 does not like having the
constant string pointer overwritten.

Anyhow, if you are using source, change the routine:
$GEMPAK/source/programs/sf/sfgram/sfxgst.f
Add a CHARACTER variable to hold the 'G' string......

The GTEXT call was:
CALL GTEXT  ( 'M', xval (i), data (i), 'G', 0., 0, 0,
     +                                  ier )

And I changed this here to have:
CHARACTER       condtn*8, ppp*4, gchar*1
C*
        INCLUDE         'ERMISS.FNC'
C*
        DATA            gchar / 'G' /

and then

                CALL GTEXT  ( 'M', xval (i), data (i), gchar, 0., 0, 0,
     +                                  ier )

Chiz




Steve Chiswell
Unidata User SUpport




>From: Clint Rowe <address@hidden>
>Organization: University of Nebraska Geosciences
>Keywords: 200505171418.j4HEIoP3022638

>
>--=-C583FuRyvDtf0Vo7CSRe
>Content-Type: text/plain
>Content-Transfer-Encoding: 7bit
>
>Chiz,
>
>Were you ever able to resolve David Ovens' problem with sfgram_gf
>(20041229: 20041229: 20041222: GEMPAK 5.7.4 sfgram_gf local 
>modification trouble)?  I'm seeing the same thing here, without
>having mad any local mods.  I've attached a script I'm using.
>
>If I run sfgram with the same settings and using the gf driver,
>it works fine.  It only has a problem when I use sfgram_gf.
>I'm seeing this in both GEMPAK5.7.3 and GEMPAK5.8.1.
>
>Clint
>-- 
>====================================================================
>Clinton M. Rowe
>Associate Professor
>Meteorology/Climatology Program                  phone:(402)472-1946
>Department of Geosciences                          fax:(402)472-4917
>University of Nebraska-Lincoln                        address@hidden
>
>--=-C583FuRyvDtf0Vo7CSRe
>Content-Disposition: attachment; filename=meteograms
>Content-Type: text/x-csh; name=meteograms; charset=
>Content-Transfer-Encoding: 7bit
>
>#! /bin/csh
>
>if (! $?GEMEXE ) source /apps/nawips/NAWIPS/Gemenviron
>setenv DISPLAY `hostname`:1.0
>
>cd $HOME/WX/scripts/sfc/grams
>
>set imgpath=$HOME/WX/images/sfc/grams
>if (! -d ${imgpath} ) mkdir ${imgpath}
>
>set present = `date -u +%y%m%d/%H%M`
>
>#foreach loc( LNK BIE OMA FNB HJH OLU OFK AUH ONL EAR BBW ANW LBF MCK OGA SNY 
> BFF CDR )
>foreach loc ( LNK )
>
>sfgram_gf << sfgram_stop
>sffile = metar
>dattim = 010101/0000-${present}
>station = ${loc}
>trace1 = tmpf;dwpf/30;21
>trace2 = gust;brbk:0.75/1
>trace3 = pmsl;wsym/14;9 ! alti/28/29.0;31.0;0.5
>trace4 = p01i/20/0.0;1.0;0.2 ! snow/14/0.0;24.0;2.0
>ntrace = 4
>taxis = first-last-1
>border = 1
>marker = 0
>title = 1
>clear = y
>panel = 0
>text = 0.8
>DEVICE   = GF | ${imgpath}/${loc}.gif | 800;600
>di
>
>RUN
>
>
>EXIT
>sfgram_stop
>
>end
>
>--=-C583FuRyvDtf0Vo7CSRe--
>
--
NOTE: All email exchanges with Unidata User Support are recorded in the
Unidata inquiry tracking system and then made publicly available
through the web.  If you do not want to have your interactions made
available in this way, you must let us know in each email you send to us.