Last change
on this file since 1042 was
868,
checked in by Laurent Fairhead, 17 years ago
|
Preparation du remplacement de la physique utilisee pour l'exercice IPCC_AR4
par la version de la physique avec thermique. On garde le repertoire phylmd
pour un petit moment pour que les utilisateurs ne soient pas trop perdus ...
phy_IPCC_AR4 = phylmd
LF
|
-
Property svn:eol-style set to
native
-
Property svn:keywords set to
Author Date Id Revision
|
File size:
727 bytes
|
Rev | Line | |
---|
[868] | 1 | ! |
---|
| 2 | ! $Header$ |
---|
| 3 | ! |
---|
| 4 | subroutine ran0_vec(npoints,idum,ran0) |
---|
| 5 | |
---|
| 6 | ! $Id: ran0_vec.F 868 2007-12-18 15:20:28Z lmdzadmin $ |
---|
| 7 | ! Platform independent random number generator from |
---|
| 8 | ! Numerical Recipies |
---|
| 9 | ! Mark Webb July 1999 |
---|
| 10 | |
---|
| 11 | implicit none |
---|
| 12 | |
---|
| 13 | integer j,npoints,idum(npoints),IA,IM,IQ,IR,k(npoints) |
---|
| 14 | real ran0(npoints),AM |
---|
| 15 | |
---|
| 16 | parameter (IA=16807, IM=2147483647, AM=1.0/IM, IQ=127773, IR=2836) |
---|
| 17 | |
---|
| 18 | c do j=1,npoints |
---|
| 19 | c if (idum(j).eq.0) then |
---|
| 20 | c write(6,*) 'idum=',idum |
---|
| 21 | c write(6,*) 'ZERO seed not allowed' |
---|
| 22 | c stop |
---|
| 23 | c endif |
---|
| 24 | c enddo |
---|
| 25 | |
---|
| 26 | do j=1,npoints |
---|
| 27 | k(j)=idum(j)/IQ |
---|
| 28 | idum(j)=IA*(idum(j)-k(j)*IQ)-IR*k(j) |
---|
| 29 | if (idum(j).lt.0) idum(j)=idum(j)+IM |
---|
| 30 | ran0(j)=AM*idum(j) |
---|
| 31 | enddo |
---|
| 32 | |
---|
| 33 | end |
---|
| 34 | |
---|
Note: See
TracBrowser
for help on using the repository browser.