Three NCL questions.

From: Maurice McHugh (mmchug4 AT XXXXXX)
Date: Fri Oct 18 2002 - 13:39:49 MDT


Good afternoon everyone.

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?

I have written some functions designed to read in data and return large arrays to the calling script. It appears that I have to pass a dummy argument to the function in order for the function to work, e.g. "data = getData(1.0)" . In this case 1.0 is the dummy argument which is ignored in the function, and the "data" array is filled with whatever data I have just read and processed.

Problem 2. [This may be a REALLY dumb question]. 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?

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).

Many thanks.

Maurice

Maurice McHugh, Ph.D.
mmchug4 AT lsu.edu

Department of Geography and Anthropology
Louisiana State University
Baton Rouge, LA

Phone: (225) 578-0476
Fax: (225) 578-4420

_______________________________________________
ncl-talk mailing list
ncl-talk AT ucar.edu
http://mailman.ucar.edu/mailman/listinfo/ncl-talk



This archive was generated by hypermail 2b29 : Mon Oct 21 2002 - 16:13:07 MDT