[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GEMPAK #SBY-446537]: gfunc equations error within gddiag
- Subject: [GEMPAK #SBY-446537]: gfunc equations error within gddiag
- Date: Fri, 09 Sep 2011 18:10:02 -0600
Lines 149 and 161 of your script need to reference the second GDFILE defintion
with a '+2':
148: gdfile = ${grid} + turbc.grd
149:
gfunc=mul(log(quo(evap+2,6.112)),quo(243.5,(sub(17.67,log(quo(evap+2,6.112))))))
160: gdfile = ${grid} + turbc.grd
161: gfunc=quo(mul(237.7,gamma+2),sub(17.271,gamma+2))
make these edits and it should run without error.
Michael
> I have several gridded functions that I cannot seem to get working while
> using a combination of gdcfil and gddiag.
>
> I am using the 1.0 degree GFS as my grid file.
>
>
>
> Attached is my C-shell script.
>
>
>
> Please note that I am having problems only with calculating and using the
> custom grid parms: tdp@1000, evap, gamma, and tdp2.
>
>
>
> gfunc=add(1.001,mul(.0034,quo(sub(pres,100.0),900.0))
>
> grdnam=evap
>
> r
>
>
>
> gdfile = ${grid} + turbc.grd
>
> gfunc=mul(log(quo(evap,6.112)),quo(243.5,(sub(17.67,log(quo(evap,6.112))))))
>
> grdnam=tdp@1000
>
> r
>
>
>
> gdfile = ${grid}
>
> gfunc=add(quo(mul(17.271,tmpc),add(237.7,tmpc)),log(quo(relh,100)))
>
> grdnam=gamma@1000
>
> r
>
>
>
> gdfile = ${grid} + turbc.grd
>
> gfunc=quo(mul(237.7,gamma),sub(17.271,gamma))
>
> grdnam=tdwp2@1000
>
> r
>
> The evap and tdp are equations from
> /usr/nawips/GEMPAK/source/diaglib/pd/pddwpt.c:
>
> ratio = rmix [i];
>
> if ( ratio > .05F ) ratio /= 1000.0F;
>
>
>
> /*
>
> * Calculate vapor pressure from mixing ratio and pressure.
>
> */
>
> e = ( pres [i] * ratio ) / ( .62197F + ratio );
>
>
>
> /*
>
> * Correct vapor pressure.
>
> */
>
> e /= ( 1.001F + ((pres [i] - 100.0F) / 900.0F) * .0034F );
>
>
>
> /*
>
> * Calculate dewpoint.
>
> */
>
> dwpc [i] = log (e/6.112F) * 243.5F / (17.67F - log (e/6.112F));
>
>
>
> Gamma is calculated using the equation below; where a=17.271 and b=237.7 °C
>
>
>
>
>
> Tdp2 is calculated using the result of gamma:
>
>
>
>
>
> After running my script, I am getting these errors within gddiag:
>
> GEMPAK-GDDIAG> [DG -7] Input grid EVAP ^110907/1200F006 @1000 %PRES in QUO
> cannot be found.
>
> GEMPAK-GDDIAG> [DG -7] Input grid EVAP ^110907/1200F006 @1000 %PRES in QUO
> cannot be found.
>
>
>
> I am gridding these individually because I want to run gdinfo or gdpoint to
> lookup a value for each grdnam.
>
>
>
> Any help would be greatly appreciated.
>
>
>
> Thanks.
>
>
>
> Andrew Little
>
> Weather Systems Analyst
>
> Universal Weather & Aviation
>
> 8787 Tallyho Road
>
> Houston, Texas 77061
>
> (713) 947-5633
>
> (713) 504-2719
>
>
>
> address@hidden
>
>
>
> Success from the word GO.
>
>
>
Ticket Details
===================
Ticket ID: SBY-446537
Department: Support GEMPAK
Priority: Normal
Status: Open