[gradsusr] pow() function with negative exponent - unusual behavior
bcbass2989 at gmail.com
Thu Jan 9 14:41:18 EST 2020
I actually did try that, and it got rid of the constant field issue, but it
looked a bit weird, so I wrote it off. I changed the contour interval this
time and now and the values seem OK, so I guess that fixes it for now.
William LaForce IV
On Thu, Jan 9, 2020 at 2:22 PM Jeff Duda <jeffduda319 at gmail.com> wrote:
> I do not know the issue with using a negative number in the pow()
> function, but try using the assumed definition of a negative power as
> 'd 0.1*(1 / pow(prate,0.54))'
> Does that give you the expected behavior?
> On Thu, Jan 9, 2020 at 11:50 AM L.B. <bcbass2989 at gmail.com> wrote:
>> I am having an issue with the pow() function using a negative exponent.
>> It is displaying a constant field where it should be a variable field. I
>> have attached the grib file as well as the ctl file and all relevant
>> equations are below:
>> The grib file contains the precipitation rate. I am trying to create a
>> field which uses the precip rate as follows:
>> *'define prate = (pratesfc/25.4)*3600' **Converting the precip rate
>> field to in/hr*
>> Plotting this yields a varying precip rate field in inches/hour.
>> Next, I want to apply the following equation to the prate field:
>> *'d 0.1*pow(prate,-0.54)'*
>> The issue is that it creates a constant field with a value of 0.0563103
>> when it should still be a varying field. Is this a bug with pow() function,
>> or is something else going on here?
>> William LaForce IV
>> gradsusr mailing list
>> gradsusr at gradsusr.org
> Jeff Duda, Research Scientist
> University of Colorado Boulder
> Cooperative Institute for Research in Environmental Sciences
> NOAA/OAR/ESRL/Global Systems Division
> Boulder, CO
> gradsusr mailing list
> gradsusr at gradsusr.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the gradsusr