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

20001214: sfcntr bug



David,

I found two type definitions that were erroneous, and were likely causing
trouble, especially with the Alpha where type sizes are different and
in Linux where the g77 compiler is producing the intermediary code.

In $GEMPAK/source/programs/sf/sfcntr:

The routine sfminp.f, should add cntrprm to the list of characetr variables, eg:
     +                  cint, cntrprm       <<--- line 37, add cntrprm


In the routine sfcntr.f, the call to OAGAGN, change FALSE to .false., eg:
                       CALL OAGAGN(gltln,' ',deltax,deltay,.false.,  <<-- line 
432

After making these changes,
cd $GEMPAK/source/programs/sf/sfcntr
make clean
rm $GEMLIB/sfcntr.a
make all
make install
make clean

Let me know if you still see strange behaviour.

Thanks,

Steve Chiswell
Unidata User Support


>From: David Ovens <address@hidden>
>Organization: UCAR/Unidata
>Keywords: 200012142326.eBENQ8o22284

>To: Unidata Support
>RE: sfctnr bug
>
>Hello,
>
>I have run into extremely puzzling behavior with sfcntr (GEMPAK 5.6)
>on both SunOS 5.8 and OSF1 V5.1.
>
>In the following script the Sun produces error messages of the sort
>
> [GEMPLT -15]  NIPROJ - Invalid projection specified.
> [GEMPLT -12]  NIMODE - Invalid mode.
> [OA -2]  Invalid grid projection area.
> Barnes Pass:   1
> RMS:    -9999.00 Number of stations:   0
>  
> Barnes Pass:   2
> RMS:    -9999.00 Number of stations:   0
>  
> [GR -8]  Invalid data range.
>
>when sfcntr runs and no contours of pmsl are plotted.  After I run
>Method 4, all of the scripts magically work and plot pmsl contours.
>On the COMPAQ OSF1 v5.1 I never get any errors, but then I never see
>any contours!  Behavior is even more peculiar when I use an IR
>satellite picture, but I won't even go into that now.
>
>Note that I remove the gemglb.nts and last.nts files before each
>Method, so that doesn't explain the behavior on the Suns.  The message
>queue is what is enabling it to work the second time around, but I
>don't know how or why.
>
>This script is self-contained.  If you do not have lwp-download,
>you'll need to manually retrieve the files that are indicated in the 
>script.
>
>Please let me know what you find out about this as it is very puzzling
>and annoying.
>
>Thank you,
>
>David
>============================ sfcntr_bug.csh =======================
>#!/bin/csh
>
>set the_sfc_file = "20001213_uw.gem"
>set the_sat_file = "nw_namerica"
>set the_lut_file = "topo_ltgray2.tbl"
>
>echo " Making sure these files exist... "
>echo " $the_sfc_file"
>echo " $the_sat_file"
>echo " $the_lut_file"
>
>if (! -e $the_sat_file) then
>  echo "attempting to retrieve $the_sat_file ..."
>  lwp-download "http://www.atmos.washington.edu/~ovens/sfcntr_bug/$the_sat_fil
> e.gz" $the_sat_file.gz
>  gunzip $the_sat_file.gz
>endif
>if (! -e $the_lut_file) then
>  echo "attempting to retrieve $the_lut_file ..."
>  lwp-download "http://www.atmos.washington.edu/~ovens/sfcntr_bug/$the_lut_fil
> e" $the_lut_file
>endif
>if (! -e $the_sfc_file) then
>  echo "attempting to retrieve $the_sfc_file ..."
>  lwp-download "http://www.atmos.washington.edu/~ovens/sfcntr_bug/$the_sfc_fil
> e.gz" $the_sfc_file.gz
>  gunzip $the_sfc_file.gz
>endif
>
>echo " ok, ready to continue..."
>
>## 
>echo "running gpend to ensure that the scripts fail at first..."
>gpend
>
>## Method 1
>/bin/rm gemglb.nts last.nts
>echo ""
>echo "Method 1 does not work at first..."
>set return = RETURN1
>goto METHOD1
>RETURN1:
>
>## Method 2
>/bin/rm gemglb.nts last.nts
>echo ""
>echo "Method 2 fails at first even doing a run twice in sfcntr..."
>set return = RETURN2
>goto METHOD2
>RETURN2:
>
>## Method 3
>/bin/rm gemglb.nts last.nts
>echo ""
>echo "Method 3 runs sfcntr first and it also fails at first..."
>set return = RETURN3
>goto METHOD3
>RETURN3:
>
>## Method 4 -- THIS WORKS!!
>/bin/rm gemglb.nts last.nts
>echo ""
>echo "Method 4 runs sfcntr first and starts with proj = mer it works..."
>set return = RETURN4
>goto METHOD4
>RETURN4:
>
>echo ""
>echo "Now that we successfully added PMSL contours once, all those"
>echo " scripts will now work....Watch..."
>echo ""
>
>## Method 1
>/bin/rm gemglb.nts last.nts
>echo "Method 1 now works..."
>set return = RETURN11
>goto METHOD1
>RETURN11:
>
>## Method 2
>/bin/rm gemglb.nts last.nts
>echo ""
>echo "Method 2 now works..."
>set return = RETURN12
>goto METHOD2
>RETURN12:
>
>## Method 3
>/bin/rm gemglb.nts last.nts
>echo ""
>echo "Method 3 now works..."
>set return = RETURN13
>goto METHOD3
>RETURN13:
>
>## Method 4 -- STILL WORKS!!
>/bin/rm gemglb.nts last.nts
>echo ""
>echo "Method 4 still works..."
>set return = RETURN14
>goto METHOD4
>RETURN14:
>
>echo ""
>echo " What in the world is going on here? "
>echo ""
>exit
>
>METHOD1:
>sfmap <<EOF > /dev/null
> DEVICE   = xw
> DATTIM   = 0
> SFFILE   = $the_sfc_file
> TITLE    = 1/-2/00Z Obs -- Method 1
> 
> GAREA    = 44.75;-125;50.8;-116.75
> SATFIL   = $the_sat_file
> LUTFIL   = $the_lut_file
> RADFIL   =  
> MAP      = 1/1/1
> LATLON   = 0
> PANEL    = 0
> PROJ     = SAT
> STNPLT   =  
> CLRBAR   = 1/V/LL/.9;.1/.75;.05
>
> CLEAR    = y
> FILTER   = no
> AREA     = &garea
> SFPARM   = skyc:.75;tmpf;wsym:.75;smsl;ptnd;dwpf;spri<4;brbk:1:1;mark:2
> COLORS   = 32;2;7;23;23;4;0;32
> TEXT     = 1/2//hw
> FILTER   = 1.5
> run
>
>exit
>EOF
>sfcntr <<EOF
> SFPARM   = pmsl
> COLORS   = 0
> CNTRPRM  = pmsl
> LINE     = 32
> AREA     = dset
> CINT     = 2
> WEIGHT   = 30
> GAMMA    = 0.3
> CONTUR   = 0
> NPASS    = 2
> CLEAR    = no
> TITLE    = 0
>run
>
>exit
>EOF
>goto $return
>
>METHOD2:
>sfmap <<EOF > /dev/null
> DEVICE   = xw
> DATTIM   = 0
> SFFILE   = $the_sfc_file
> TITLE    = 1/-2/00Z Obs -- Method 2
> 
> GAREA    = 44.75;-125;50.8;-116.75
> SATFIL   = $the_sat_file
> LUTFIL   = $the_lut_file
> RADFIL   =  
> MAP      = 1/1/1
> LATLON   = 0
> PANEL    = 0
> PROJ     = SAT
> STNPLT   =  
> CLRBAR   = 1/V/LL/.9;.1/.75;.05
>
> CLEAR    = y
> FILTER   = no
> AREA     = &garea
> SFPARM   = skyc:.75;tmpf;wsym:.75;smsl;ptnd;dwpf;spri<4;brbk:1:1;mark:2
> COLORS   = 32;2;7;23;23;4;0;32
> TEXT     = 1/2//hw
> FILTER   = 1.5
> run
>
>exit
>EOF
>sfcntr <<EOF
> SFPARM   = pmsl
> COLORS   = 0
> CNTRPRM  = pmsl
> LINE     = 32
> AREA     = dset
> CINT     = 2
> WEIGHT   = 30
> GAMMA    = 0.3
> CONTUR   = 0
> NPASS    = 2
> CLEAR    = no
> TITLE    = 0
>run
>
>run
>
>exit
>EOF
>goto $return
>
>METHOD3:
>sfcntr <<EOF > /dev/null
> DEVICE   = xw
> DATTIM   = 0
> SFFILE   = $the_sfc_file
> TITLE    = 1/-2/00Z Obs -- Method 3
> 
> GAREA    = 44.75;-125;50.8;-116.75
> SATFIL   = $the_sat_file
> LUTFIL   = $the_lut_file
> RADFIL   =  
> MAP      = 1/1/1
> LATLON   = 0
> PANEL    = 0
> PROJ     = SAT
> STNPLT   =  
> CLRBAR   = 1/V/LL/.9;.1/.75;.05
>
> FILTER   = no
> SFPARM   = pmsl
> COLORS   = 0
> CNTRPRM  = pmsl
> LINE     = 32
> AREA     = dset
> CINT     = 2
> WEIGHT   = 30
> GAMMA    = 0.3
> CONTUR   = 0
> NPASS    = 2
> CLEAR    = yes
> TITLE    = 0
>run
>
>exit
>EOF
>sfmap <<EOF
> DEVICE   = xw
> DATTIM   = 0
> SFFILE   = $the_sfc_file
> TITLE    = 1/-2/00Z Obs -- Method 3
> 
> GAREA    = 44.75;-125;50.8;-116.75
> SATFIL   = $the_sat_file
> LUTFIL   = $the_lut_file
> RADFIL   =  
> MAP      = 1/1/1
> LATLON   = 0
> PANEL    = 0
> PROJ     = SAT
> STNPLT   =  
> CLRBAR   = 1/V/LL/.9;.1/.75;.05
>
> CLEAR    = n
> FILTER   = no
> AREA     = &garea
> SFPARM   = skyc:.75;tmpf;wsym:.75;smsl;ptnd;dwpf;spri<4;brbk:1:1;mark:2
> COLORS   = 32;2;7;23;23;4;0;32
> TEXT     = 1/2//hw
> FILTER   = 1.5
> run
>
>exit
>EOF
>goto $return
>
>METHOD4:
>sfcntr <<EOF > /dev/null
> DEVICE   = xw
> DATTIM   = 0
> SFFILE   = $the_sfc_file
> 
> GAREA    = 44.75;-125;50.8;-116.75
> SATFIL   = $the_sat_file
> LUTFIL   = $the_lut_file
> RADFIL   =  
> MAP      = 1/1/1
> LATLON   = 0
> PANEL    = 0
> STNPLT   =  
> CLRBAR   = 1/V/LL/.9;.1/.75;.05
>
> FILTER   = no
> SFPARM   = pmsl
> COLORS   = 0
> CNTRPRM  = pmsl
> LINE     = 32
> AREA     = dset
> CINT     = 2
> WEIGHT   = 30
> GAMMA    = 0.3
> CONTUR   = 0
> NPASS    = 2
> CLEAR    = yes
> TITLE    = 0
>
> PROJ     = mer
>run
>
> PROJ     = SAT
>run
>
>exit
>EOF
>sfmap <<EOF > /dev/null
> DEVICE   = xw
> DATTIM   = 0
> SFFILE   = $the_sfc_file
> TITLE    = 1/-2/00Z Obs -- Method 4
> 
> GAREA    = 44.75;-125;50.8;-116.75
> SATFIL   = $the_sat_file
> LUTFIL   = $the_lut_file
> RADFIL   =  
> MAP      = 1/1/1
> LATLON   = 0
> PANEL    = 0
> PROJ     = SAT
> STNPLT   =  
> CLRBAR   = 1/V/LL/.9;.1/.75;.05
>
> CLEAR    = n
> FILTER   = no
> AREA     = &garea
> SFPARM   = skyc:.75;tmpf;wsym:.75;smsl;ptnd;dwpf;spri<4;brbk:1:1;mark:2
> COLORS   = 32;2;7;23;23;4;0;32
> TEXT     = 1/2//hw
> FILTER   = 1.5
> run
>
>exit
>EOF
>goto $return
>============================ sfcntr_bug.csh =======================
>
>-- 
>
>David Ovens            e-mail: address@hidden
>(206) 685-8108          plan: Real-time MM5 forecasting for Pacific Northwest
>Research Meteorologist
>Dept of Atmospheric Sciences, Box 351640
>University of Washington 
>Seattle, WA  98195
>