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

20001215: 20001214: sfcntr bug



David,

One thing to check if you are trying to use
a satellite image as the projection is that the garea specified allows
the grid to be created within the projection.

The sfcntr.f call to OAGAGN uses ' ' as the extend area of the grid,
which will default to 2;2;2;2. If the garea is dset then the 2 grid rows
extended may be outside the projection. I may have to change the
passed parameter to '0;0;0;0' for these cases.

In general, the 2 grid rows extended past the grid allow for smoother contours
near the boundaries. But this may be a problem with satellite images.
Also, if the mean station spacing is large, then the grid
rows may extend far outside the projection causing the error.

The satellite file you specify nw_washington, I don't now what the area bounds
are so I can't make any guesses here. 

Does sfcntr work when sat isn't the projection? 

Steve Chiswell






>From: David Ovens <address@hidden>
>Organization: UCAR/Unidata
>Keywords: 200012151948.eBFJmfo17973

>Steve,
>
>The OSF1 version now produces the following error messages for Method
>1 (like the original SunOS version did and the new one still does)
>
> [GEMPLT -15]  NIPROJ - Invalid projection specified.
> [GEMPLT -12]  NIMODE - Invalid mode.
> [OA -2]  Invalid grid projection area.
> Barnes Pass:            1
> RMS:   -9999.000     Number of stations:            0
>  
> Barnes Pass:            2
> RMS:   -9999.000     Number of stations:            0
>  
> [GR -8]  Invalid data range.
>
>With the addition of this:
>    forrtl: error (75): floating point exception
>And the script gets hung on Method 1.  When I kill the gplt and sfcntr
>processes for Methods 1-3, the script then runs Method 4 and does not
>complain or die any more as it runs through Methods 1 - 4 again.
>Unfortunately, I never see any pmsl contours for any of the methods.
>
>On SunOS it behaves exactly as it did before for all Methods.
>
>David
>
>
>Unidata Support wrote:
>> 
>> 
>> 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.,  <<-- li
> ne 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 Northwe
> st
>> >Research Meteorologist
>> >Dept of Atmospheric Sciences, Box 351640
>> >University of Washington 
>> >Seattle, WA  98195
>> >
>> 
>> ****************************************************************************
>> 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/     
>> ****************************************************************************
>> 
>
>
>-- 
>
>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
>