source: LMDZ4/branches/LMDZ4V5.0-dev/libf/dyn3dpar/ran1.F @ 1299

Last change on this file since 1299 was 1299, checked in by Laurent Fairhead, 14 years ago

Nettoyage general pour se rapprocher des normes et éviter des erreurs a la
compilation:

  • tous les FLOAT() sont remplacés par des REAL()
  • tous les STOP dans phylmd sont remplacés par des appels à abort_gcm
  • le common control défini dans le fichier control.h est remplacé par le module control_mod pour éviter des messages sur l'alignement des variables dans les déclarations
  • des $Header$ remplacés par des $Id$ pour svn

Quelques remplacements à faire ont pu m'échapper


General cleanup of the code to try and adhere to norms and to prevent some
compilation errors:

  • all FLOAT() instructions have been replaced by REAL() instructions
  • all STOP instructions in phylmd have been replaced by calls to abort_gcm
  • the common block control defined in the control.h file has been replaced by the control_mod to prevent compilation warnings on the alignement of declared variables
  • $Header$ replaced by $Id$ for svn

Some changes which should have been made might have escaped me

  • 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 1299 2010-01-20 14:27:21Z fairhead $
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
2311      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.