Last change
on this file since 1915 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:
889 bytes
|
Line | |
---|
1 | ! |
---|
2 | ! $Id: ran1.F 1907 2013-11-26 13:10:46Z musat $ |
---|
3 | ! |
---|
4 | FUNCTION RAN1(IDUM) |
---|
5 | DIMENSION R(97) |
---|
6 | save r |
---|
7 | save iff,ix1,ix2,ix3 |
---|
8 | PARAMETER (M1=259200,IA1=7141,IC1=54773,RM1=3.8580247E-6) |
---|
9 | PARAMETER (M2=134456,IA2=8121,IC2=28411,RM2=7.4373773E-6) |
---|
10 | PARAMETER (M3=243000,IA3=4561,IC3=51349) |
---|
11 | DATA IFF /0/ |
---|
12 | IF (IDUM.LT.0.OR.IFF.EQ.0) THEN |
---|
13 | IFF=1 |
---|
14 | IX1=MOD(IC1-IDUM,M1) |
---|
15 | IX1=MOD(IA1*IX1+IC1,M1) |
---|
16 | IX2=MOD(IX1,M2) |
---|
17 | IX1=MOD(IA1*IX1+IC1,M1) |
---|
18 | IX3=MOD(IX1,M3) |
---|
19 | DO 11 J=1,97 |
---|
20 | IX1=MOD(IA1*IX1+IC1,M1) |
---|
21 | IX2=MOD(IA2*IX2+IC2,M2) |
---|
22 | R(J)=(REAL(IX1)+REAL(IX2)*RM2)*RM1 |
---|
23 | 11 CONTINUE |
---|
24 | IDUM=1 |
---|
25 | ENDIF |
---|
26 | IX1=MOD(IA1*IX1+IC1,M1) |
---|
27 | IX2=MOD(IA2*IX2+IC2,M2) |
---|
28 | IX3=MOD(IA3*IX3+IC3,M3) |
---|
29 | J=1+(97*IX3)/M3 |
---|
30 | IF(J.GT.97.OR.J.LT.1)PAUSE |
---|
31 | RAN1=R(J) |
---|
32 | R(J)=(REAL(IX1)+REAL(IX2)*RM2)*RM1 |
---|
33 | RETURN |
---|
34 | END |
---|
Note: See
TracBrowser
for help on using the repository browser.