Last change
on this file since 1436 was
1391,
checked in by emillour, 10 years ago
|
Common dynamical core:
Updates in the dynamics to keeup up with updates in LMDZ5
(up to LMDZ5 trunk rev 2200):
- compilation:
- create_make_gcm : added processing of .f & .f90 files (not just .F and .F90)
- makelmdz: add "mix" option for -io (ouptut with both IOIPSL and XIOS)
- makelmdz_fcm: add "mix" option for -io
- filtrez:
- acc.F and eigen.F : add "implicit none" and variable declarations
- bibio:
- handle_err_m.F90: replace "stop" with call to abort_gcm()
- i1mach.F, j4save.F: add "implicit none" and variable declarations
- xercnt.F, xermsg.F, xerprn.F, xersve.F, xgetua.F: add "implicit none"
and variable declarations
- dyn3d_common:
- disvert.F90 : added comments on meaning of "pa" variable
- grid_atob.F : better control on level of default ouputs
- infotrac.F90: update Earth-specific stuff (nqo water tracers)
- interpre.F: correction on the size of input array w
- juldate.F, massbar.F, ppm3d.F, ran1.F: add "implicit none"
and variable declarations
- sortvarc.F: code cleanup
- iniacademic.F90: cleanup and extra sanity check.
- dyn3d:
- abort_gcm.F: additions for XIOS
- conf_gcm.F90: transformed to free form from conf_gcm.F
- gcm.F: added test to check that iphysiq is a multiple of iperiod
- getparam.F90, guidz_mod.F: update from LMDZ5
- integrd.F: replace stop with call_abort()
- dyn3dpar:
- abort_gcm.F: minor cleanup
- gcm.F: added test to check that iphysiq is a multiple of iperiod
- getparam.F90, guide_p_mod.F90: update from LMDZ5
- integrd_p.F: abort with call_abort when there is negative surface pressure
- leapfrog_p.F: add INCA specific stuff to keep up with current LMDZ5
- conf_gcm.F90: transformed to free form from conf_gcm.F
EM
|
File size:
1.0 KB
|
Line | |
---|
1 | ! |
---|
2 | ! $Id: ran1.F 2197 2015-02-09 07:13:05Z emillour $ |
---|
3 | ! |
---|
4 | FUNCTION RAN1(IDUM) |
---|
5 | IMPLICIT NONE |
---|
6 | REAL RAN1 |
---|
7 | REAL,SAVE :: R(97) |
---|
8 | REAL,PARAMETER :: RM1=3.8580247E-6,RM2=7.4373773E-6 |
---|
9 | INTEGER,SAVE :: IFF=0 |
---|
10 | integer,save :: ix1,ix2,ix3 |
---|
11 | INTEGER,PARAMETER :: M1=259200,IA1=7141,IC1=54773 |
---|
12 | INTEGER,PARAMETER :: M2=134456,IA2=8121,IC2=28411 |
---|
13 | INTEGER,PARAMETER :: M3=243000,IA3=4561,IC3=51349 |
---|
14 | INTEGER :: IDUM,J |
---|
15 | |
---|
16 | IF (IDUM.LT.0.OR.IFF.EQ.0) THEN |
---|
17 | IFF=1 |
---|
18 | IX1=MOD(IC1-IDUM,M1) |
---|
19 | IX1=MOD(IA1*IX1+IC1,M1) |
---|
20 | IX2=MOD(IX1,M2) |
---|
21 | IX1=MOD(IA1*IX1+IC1,M1) |
---|
22 | IX3=MOD(IX1,M3) |
---|
23 | DO 11 J=1,97 |
---|
24 | IX1=MOD(IA1*IX1+IC1,M1) |
---|
25 | IX2=MOD(IA2*IX2+IC2,M2) |
---|
26 | R(J)=(REAL(IX1)+REAL(IX2)*RM2)*RM1 |
---|
27 | 11 CONTINUE |
---|
28 | IDUM=1 |
---|
29 | ENDIF |
---|
30 | IX1=MOD(IA1*IX1+IC1,M1) |
---|
31 | IX2=MOD(IA2*IX2+IC2,M2) |
---|
32 | IX3=MOD(IA3*IX3+IC3,M3) |
---|
33 | J=1+(97*IX3)/M3 |
---|
34 | IF(J.GT.97.OR.J.LT.1) stop 1 |
---|
35 | RAN1=R(J) |
---|
36 | R(J)=(REAL(IX1)+REAL(IX2)*RM2)*RM1 |
---|
37 | RETURN |
---|
38 | END |
---|
Note: See
TracBrowser
for help on using the repository browser.