>> I want do use ncl to do Kolmogorov-Smirnov Test or
>> Kuiper's Test, but I couldn't find these build-in test
>> functions, so I doubt whether there are these build-in
>One of the advantages of ncl is that it is easy to use
>your Fortran 77 subroutines.
==>  Yes, that is a major advantage of NCL. It is quite easy.
eg: if you have purchased the Numerical Recipes book
then type the routine or get one of the electronic versions.
[a] call the file KST.f
subroutine kstwo (data1,n1,data2,n2,d,prob)
dimension data1(n1), data2(n2)
[rest of code]
[b] WRAPIT KST.f
Note: WRAPIT understands fortrans default typing.
[c] In your NCL script
external KST "./KST.so" ; it could be in any directory
dd = 0.
pr = 0.
KST::kstwo (x1, dimsizes(x1), x2, dimsizes(x2), dd, pr)
 NCL can also be use shared objects from C and f90/f95 codes.
Say you have a f90 code (foo90.f90) that contains the following:
subroutine foo90 (arg1,arg2,arg3,n3)
integer :: arg1, n3
real :: arg2
double, dimension(n3) :: arg3
NCL's WRAPIT does not 'understand' f90 syntax. The user
need only create a simple fortran 77 subroutine that
calls the f90 code.
subroutine foo77 (arg1,arg2,arg3,n3)
integer arg1, n3
double precision arg3(n3)
call foo90 (arg1,arg2,arg3,n3)
WRAPIT -n foo foo77.f foo90.f90
[C] In your NCL script
external FOO "./foo.so" ; it could be in any directory
FOO::foo77 (a1, a2, a3, n )
ncl-talk mailing list
ncl-talk AT ucar.edu
This archive was generated by hypermail 2b29 : Sun Mar 16 2003 - 09:00:23 MST