Re: Is there Kolmogorov-Smirnov Test or Kuiper's Test in NCL?

From: Dennis Shea (shea AT XXXXXX)
Date: Sat Mar 15 2003 - 20:46:37 MST

  • Next message: Amit Kulkarni: "problems installing NCL"

    >> 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
    >> functions.
    >One of the advantages of ncl is that it is easy to use
    >your Fortran 77 subroutines.


    ==> [1] 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 "./" ; it could be in any directory
          dd = 0.
          pr = 0.
          KST::kstwo (x1, dimsizes(x1), x2, dimsizes(x2), dd, pr)

    [2] 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)
    implicit none
    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
         real arg2
         double precision arg3(n3)

         call foo90 (arg1,arg2,arg3,n3)
         WRAPIT -n foo foo77.f foo90.f90
    [C] In your NCL script

        external FOO "./" ; it could be in any directory
          FOO::foo77 (a1, a2, a3, n )
    Dennis Shea

    ncl-talk mailing list
    ncl-talk AT

    This archive was generated by hypermail 2b29 : Sun Mar 16 2003 - 09:00:23 MST