Re: Continued: NCL versions of Numerical Recipes?

From: Dennis Shea <shea_at_nyahnyahspammersnyahnyah>
Date: Thu May 06 2010 - 15:57:06 MDT

ludcmp: does an LU decomposition of the input matrix.
lubksb: returns the "answer"

===

NCL's solve_linsys uses the LAPACK subroutine "DGESV".

http://www.netlib.org/lapack/double/dgesv.f

DGSEV uses singular value decomposition which is more
robust then the method below.

Good luck
D

On 05/06/2010 01:41 PM, Bridget Thrasher wrote:
> Sorry, I accidentally hit send! To continue my thought, does this
> fortran routine equate to built-in NCL functions? (FYI, n = 722 & na =
> 30.) The calls to ludcmp and lubksb are to those routines taken from
> Numerical Recipes. (I can send the code for those if anyone's
> interested.) I'm not sure what those do. Perhaps they equate to
> solve_linsys? Does anyone know?
>
>
> subroutine zinvza(n,na,zq,za,zt)
> dimension za(n,na+1),zq(na+1,na+1)
> dimension zt(na+1,n)
> integer idx(na+1)
> do i=1,na+1
> do j=1,n
> zt(i,j)=za(j,i)
> enddo
> enddo
> call ludcmp(zq,na,idx,d)
> do j=1,n
> call lubksb(zq,na,idx,zt(1,j))
> enddo
> return
> end
>
>
> -Bridget
>
>
> --
> Bridget Thrasher, PhD
> Postdoctoral Researcher
> Climate Central
> www.climatecentral.org <http://www.climatecentral.org>
>
>
>
>
> _______________________________________________
> ncl-talk mailing list
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk

-- 
======================================================
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
Received on Thu May 6 15:57:13 2010

This archive was generated by hypermail 2.1.8 : Fri May 07 2010 - 10:36:00 MDT