source: LMDZ6/branches/IPSLCM6.0.15/libf/filtrez/eigen_sort.F @ 3306

Last change on this file since 3306 was 1907, checked in by lguez, 11 years ago

Added a copyright property to every file of the distribution, except
for the fcm files (which have their own copyright). Use svn propget on
a file to see the copyright. For instance:

$ svn propget copyright libf/phylmd/physiq.F90
Name of program: LMDZ
Creation date: 1984
Version: LMDZ5
License: CeCILL version 2
Holder: Laboratoire de m\'et\'eorologie dynamique, CNRS, UMR 8539
See the license file in the root directory

Also added the files defining the CeCILL version 2 license, in French
and English, at the top of the LMDZ tree.

  • Property copyright set to
    Name of program: LMDZ
    Creation date: 1984
    Version: LMDZ5
    License: CeCILL version 2
    Holder: Laboratoire de m\'et\'eorologie dynamique, CNRS, UMR 8539
    See the license file in the root directory
  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 538 bytes
Line 
1!
2! $Header$
3!
4          SUBROUTINE eigen_sort(d,v,n,np)
5          INTEGER n,np
6          REAL d(np),v(np,np)
7          INTEGER i,j,k
8          REAL p
9
10       DO i=1,n-1
11          k=i
12          p=d(i)
13        DO j=i+1,n
14           IF(d(j).ge.p) THEN
15            k=j
16            p=d(j)
17           ENDIF
18        ENDDO
19         
20        IF(k.ne.i) THEN
21          d(k)=d(i)
22          d(i)=p
23         DO j=1,n
24          p=v(j,i)
25          v(j,i)=v(j,k)
26          v(j,k)=p
27         ENDDO
28        ENDIF
29       ENDDO
30
31        RETURN
32        END
Note: See TracBrowser for help on using the repository browser.