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

20011130: 20011129: Computing the standard deviation




Andy,

start by forgetting about gdgsfc to start.

After you create "b" which you know works, you should be able to use
gdlist or gdcntr etc to view it.

Now, if you create "c", you should still be able to view it. Verify that
first- before doing anything with gdgsfc,

What I see in your previous message is that your terms are small. And when you 
square them, they of course get smaller. The SFLIST output will be
truncated to 2 decimal places which does create a display problem, unless you
scale the values with SFPARM=sstdv*100 for example.

If you are using gdgsfc to write the output to the surface file, then the
packing information for the surface file must correspond to the
resolution of the data (see $GEMTBL/pack for examples). 

Anyhow, let me know first if you see C in the grid file before the gdgsfc
interpolation to a surface file. If that is the case, then we can focus on what
you need to use with gdgsfc. As I mentioned yesterday, I didn't see
any problem here with gddiag.

Steve Chiswell
Unidata User Support




>From: "Siffert, Andy" <address@hidden>
>Organization: UCAR/Unidata
>Keywords: 200111301327.fAUDRTN10376

>Steve good morning.
>We are running a newer version of Red Hat Linux and using GEMPACK 5.6.c.1 
>(I think c.1) 
>
> MRF ensemble grid I'm using. 
>GRID NAVIGATION: 
>     PROJECTION:          CED                 
>     GRID SIZE:          144  73
>     LL CORNER:             -90.00      0.00
>     UR CORNER:              90.00     -2.50
>
>First using a series of gddiag commands I create an average using all the
>members.  
>The average is then stored in the same .gem as the 10 members. 
>Next I individually take the members and compute the variance, from the
>variance you take the sqrt to obtain the standard deviation. 
>
>The problem is in the calculation of the variance.
>as noted in my previous e-mail.
>
>As far as viewing the output. Once, all the calculation for all the members
>and all forecast hours, are computed in gddiag. I then use gdgsfc to write
>the selected surface that were written to file in the gddiag commands. Then
>using gdgsfc I write everything to a .txt file. 
>
>P.S. I know that GEMPAK knows what b is because if I
>for example use the 11/30 00z, TMPKC001 member from SAC 
>The:
>AVG (of all the members) = 43.76
>TMPKC001 = 43.46
>AVG - TMPKC001 = .30 (b)
>mul(b,b)= .25
>exp(b,2)= -9999 (however for some other STN ID's I do not get -9999).
>exp(.30,2)= .09
>mul(.30,.30)= .09 which is what I want but since .30 is just one example of
>many members I need to use (b).
>
>Hope this additional information helps.
>Thanks for your help.
>Andy
>
>
>
>-----Original Message-----
>From: Unidata Support [mailto:address@hidden]
>Sent: Thursday, November 29, 2001 3:33 PM
>To: Siffert, Andy
>Cc: address@hidden
>Subject: 20011129: Computing the standard deviation 
>
>
>
>Andy,
>
>I cannot duplicate your problem here using GEMPAK 5.6.E.1 on my SGI
>with the 00Z ensemble grids on the 1x1 degree output today.
>What platform combination are you using?.
>
>Where is your "example of output" coming from? GDLIST? GDPLOT2?
>
>Steve Chiswell
>
>
>
>>From: "Siffert, Andy" <address@hidden>
>>Organization: UCAR/Unidata
>>Keywords: 200111291537.fATFbvN06225
>
>>
>>Steve
>>I Think?
>>
>>I'm not sure how large or small my problem is. However, I hope I made my
>>problem clear below.
>>What I'm trying to do in gempak is take the square of small number and
>store
>>it in a .gem file using GDDIAG. 
>>
>>What I'm trying to do is compute the standard deviation in 2 m temperature
>>from the MRF ensembles 
>>
>>here is the part of interest.
>>
>>#converts member to degrees F
>>gddiag<<EOF
>>GDFILE   = /home/met-user/andy/$file
>>GDOUTF   = /home/met-user/andy/$file
>>GFUNC    = add(mul(sub(TMPKC001,273),1.8),32)))
>>GDATTIM  = $YY$MM$DD/${cycle}00F$zero$fff
>>GLEVEL   = 2
>>GVCORD   = hght
>>GRDNAM  = a
>>GPACK    = 
>>run
>>
>>EOF
>>
>>#Subtract avg from a member of the ensembles
>>gddiag<<EOF
>>GDFILE   = /home/met-user/andy/$file
>>GDOUTF   = /home/met-user/andy/$file
>>GFUNC    = sub(avg,a)
>>GDATTIM  = $YY$MM$DD/${cycle}00F$zero$fff
>>GLEVEL   = 2
>>GVCORD   = hght
>>GRDNAM   = b
>>GPACK    =
>>run
>>
>>EOF
>>
>>gddiag<<EOF
>>GDFILE   = /home/met-user/andy/$file
>>GDOUTF   = /home/met-user/andy/$file
>>GFUNC    = expi(b,2)
>>GDATTIM  = $YY$MM$DD/${cycle}00F$zero$fff
>>GLEVEL   = 2
>>GVCORD   = hght
>>GRDNAM   = c
>>GPACK    =
>>run
>>
>>EOF
>>
>>This is where the problem is: I want to take the square of b (b^2).
>>The output is wrong. 
>>
>>I have even try doing
>>    GFUNC = mul (b,b) 
>>which should be the same as b^2?
>>If I use 
>>   GFUNC = EXP(b,2)  
>>I get -9999 or the wrong answer also.
>>
>>Example of output
>>  Avg -  a  =  b^2  =    c       The output I recive from C in gempak
>>43.31-42.82 = .49 ^2 = .2401      .27
>>53.56-53.54 = .02 ^2 = .0004      -9999
>>
>>Thanks for your help.
>>Andy 
>>
>>
>>
>>****************************************
>>               Andy Siffert                  
>>        Aquila Weather Desk           
>>     Research and Development     
>>  1100 Walnut Street, Suite 3300  
>>      Kansas City, MO 64106         
>>             816-527-1247                 
>>          Fax: 816-527-4247            
>>****************************************
>>
>
>****************************************************************************
><
>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/
><
>****************************************************************************
><
>