> I have three NCL questions that have been bothering me for some time.
>
> Problem 1. How do I create a function that will work without passing an argument to that function?
>
function test() ; () are required
begin
a = 5
return(a*a)
end
> Problem 2. When evaluating t-test values for their probability
> under a normal distribution I have seen an example using the betainc
> function. e.g. prob = betainc(x,a,b)
> where x = df/(df+tval^2); a = df/2.0, but b remains puzzling to me.
> It appears to be the "second beta distribution parameter;
> must be > 0.0.". Given that I want to obtain a probability
> given df and tval, how do I use c?
>
alpha = betainc ( df/(df+tval**2), 0.5*df, 0.5)
A good reference is "Numerical Recipes"
Also, NCL has a ttest.
> Problem 3. Is there a function that integrates under a curve between 2 x-limits and 2 y-limits? I am integrating a portion of an area under a curve from x=1 to 36, where x represents ten day periods over which data are averaged, so 36 periods = 1 year. BUT, I only want to integrate values of y >= 0.1 over the course of 1 year. I have a function written that sums values of y >= 0.1 for periods 1 to 36; but it became obvious that the value returned is entirely dependent on the data sampling density. e.g. If I used monthly data (x ranges from 1 to 12), then the integeral returned should be approx. 3 times smaller than the integral returned when using the 10-day data (x ranges from 1 to 36).
>
Have to admit, I don't quite get this.
Regards
Dennis Shea
_______________________________________________
ncl-talk mailing list
ncl-talk@ucar.edu
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
This archive was generated by hypermail 2b29 : Mon Oct 21 2002 - 16:13:11 MDT