I am posting this on a 'for-the-record' basis.
===
NCL is distributed with *all* LAPACK [Linear Algebra Package]
subroutines. All are double precision. Users can access these
subroutines by creating a simple fortran style driver subroutine
that calls the LAPACK subroutine.
The attached example uses LAPACK's "dgels" subroutine to
compute the least squares solution to the overdetermined linear
system A*X = B
Ideally, the user would test the function with some known solution.
Sometimes it may require that the arrays be reordered [transposed].
Typically, there is only one interface subroutine.
However, there are 2 interface subroutines for illustration:
(a) f90 style dynamic allocation; (b) f77 style where the user
creates a work array in NCL and passes this to
the fortran interface.
The example is from:
http://software.intel.com/sites/products/documentation/hpc/mkl/lapack/mkl_lapack_examples/dgels_ex.f.htm
===
To create the .so
%> WRAPIT -L $NCARG_ROOT/lib -l lapack_ncl dgels_interface.f
To run the f77 style example
%> ncl tst_dgels_so.ncl_2a
To run the f90 style example
%> ncl tst_dgels_so.ncl_2
The NCL differences are trivial.
===
Good luck
-- ====================================================== Dennis J. Shea tel: 303-497-1361 | P.O. Box 3000 fax: 303-497-1333 | Climate Analysis Section | Climate & Global Dynamics Div. | National Center for Atmospheric Research | Boulder, CO 80307 | USA email: shea 'at' ucar.edu | ======================================================
_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
This archive was generated by hypermail 2.1.8 : Tue Aug 03 2010 - 15:09:38 MDT