[gradsusr] pow() function with negative exponent - unusual behavior

L.B. 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.

Thanks!

*-------*
William LaForce IV
Meteorologist


On Thu, Jan 9, 2020 at 2:22 PM Jeff Duda <jeffduda319 at gmail.com> wrote:

> L.B.
> 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
> 1/term:
>
> 'd 0.1*(1 / pow(prate,0.54))'
>
> Does that give you the expected behavior?
>
> Jeff
>
> On Thu, Jan 9, 2020 at 11:50 AM L.B. <bcbass2989 at gmail.com> wrote:
>
>> Hello,
>>
>> 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
>> Meteorologist
>> _______________________________________________
>> gradsusr mailing list
>> gradsusr at gradsusr.org
>> http://gradsusr.org/mailman/listinfo/gradsusr
>>
>
>
> --
> 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
> http://gradsusr.org/mailman/listinfo/gradsusr
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://gradsusr.org/pipermail/gradsusr/attachments/20200109/baaed7e9/attachment.html>


More information about the gradsusr mailing list