[Thread Prev][Thread Next][Index]

Re: How can get the square of a variable



Hi all,
The square root external function is linked to the Ferret External Functions web
page.  Look for it at the very bottom of
http://www.ferret.noaa.gov/Ferret/External_Functions/ferret_EF.html

but it really is just a demonstration function. There is no reason to use anything
but the exponent 0.5. This can apply to any variable, from a scalar value to
a multi-dimensional variable.  In my mail tool, it was hard to see the syntax of
the previous answers.  You use the carat symbol,
yes? let S = var^0.5

Please see the index entry "Operators" in the index the Ferret Users Guide
for a list of all the operators available in Ferret:
http://www.ferret.noaa.gov/Ferret/Documentation/Users_Guide/current/fer_html.htm

Jaison Kurian wrote:
Hi,
    You can find the sqare root of a variable xx in ferret as xx^0.5.

       yes? let xx = 100
       yes? let yy = xx^0.5
       yes? list yy
                   VARIABLE : XX^0.5
              10.00

    An external function (fortran subroutine, sqrt.F) is given at 
http://ferret.wrc.noaa.gov/Ferret/External_Functions/contributions/sqrt.F.
But that external function is not there with FERRET v5.53/v.5.5. May be
somebody else can help you to use that subroutine as an external function.   


With Regards 

Jason

  

[Thread Prev][Thread Next][Index]

Dept of Commerce / NOAA / OAR / PMEL / TMAP

Contact Us | Privacy Policy | Disclaimer | Accessibility Statement