59 |
Real*8 PORT_RAND_NORM |
Real*8 PORT_RAND_NORM |
60 |
#else |
#else |
61 |
Real*8 PORT_RAND |
Real*8 PORT_RAND |
62 |
|
#undef _USE_INTEGERS |
63 |
|
#ifdef _USE_INTEGERS |
64 |
|
integer seed |
65 |
|
#else |
66 |
|
Real*8 seed |
67 |
|
#endif |
68 |
#endif |
#endif |
69 |
|
|
70 |
c == end of interface == |
c == end of interface == |
112 |
|
|
113 |
c recip_drF is in units 1/r (so if r is in m this is in 1/m) |
c recip_drF is in units 1/r (so if r is in m this is in 1/m) |
114 |
scalez=recip_drF(kp) |
scalez=recip_drF(kp) |
115 |
c We shouldn't do any special conversions for zz, since flt_trilinear |
c We should not do any special conversions for zz, since flt_trilinear |
116 |
c expects it to be just a normal kpart type variable. |
c expects it to be just a normal kpart type variable. |
117 |
zz=kpart(ip,bi,bj) |
zz=kpart(ip,bi,bj) |
118 |
call flt_trilinear(xx,yy,zz,uu,uVel,2,bi,bj) |
call flt_trilinear(xx,yy,zz,uu,uVel,2,bi,bj) |
131 |
c When using this alternative scheme the noise probably should not be added twice. |
c When using this alternative scheme the noise probably should not be added twice. |
132 |
#else |
#else |
133 |
if (iup(ip,bi,bj).ne.-2.) then |
if (iup(ip,bi,bj).ne.-2.) then |
134 |
uu = uu + uu*(PORT_RAND()-0.5)*flt_noise |
uu = uu + uu*(PORT_RAND(seed)-0.5)*flt_noise |
135 |
vv = vv + vv*(PORT_RAND()-0.5)*flt_noise |
vv = vv + vv*(PORT_RAND(seed)-0.5)*flt_noise |
136 |
#ifdef ALLOW_3D_FLT |
#ifdef ALLOW_3D_FLT |
137 |
#ifdef ALLOW_FLT_3D_NOISE |
#ifdef ALLOW_FLT_3D_NOISE |
138 |
if (iup(ip,bi,bj).eq.-1.) then |
if (iup(ip,bi,bj).eq.-1.) then |
139 |
ww = ww + ww*(PORT_RAND()-0.5)*flt_noise |
ww = ww + ww*(PORT_RAND(seed)-0.5)*flt_noise |
140 |
endif |
endif |
141 |
#endif |
#endif |
142 |
#endif |
#endif |
178 |
#endif |
#endif |
179 |
|
|
180 |
#else |
#else |
181 |
u1 = u1 + u1*(PORT_RAND()-0.5)*flt_noise |
u1 = u1 + u1*(PORT_RAND(seed)-0.5)*flt_noise |
182 |
v1 = v1 + v1*(PORT_RAND()-0.5)*flt_noise |
v1 = v1 + v1*(PORT_RAND(seed)-0.5)*flt_noise |
183 |
#ifdef ALLOW_3D_FLT |
#ifdef ALLOW_3D_FLT |
184 |
#ifdef ALLOW_FLT_3D_NOISE |
#ifdef ALLOW_FLT_3D_NOISE |
185 |
if (iup(ip,bi,bj).eq.-1.) then |
if (iup(ip,bi,bj).eq.-1.) then |
186 |
w1 = w1 + w1*(PORT_RAND()-0.5)*flt_noise |
w1 = w1 + w1*(PORT_RAND(seed)-0.5)*flt_noise |
187 |
endif |
endif |
188 |
#endif |
#endif |
189 |
#endif |
#endif |