[Dart-dev] DART/branches Revision: 11983
dart at ucar.edu
dart at ucar.edu
Fri Oct 13 14:22:35 MDT 2017
nancy at ucar.edu
2017-10-13 14:22:35 -0600 (Fri, 13 Oct 2017)
268
replace the fortran intrinsic dble() with either _r8
(for constants), with real(x,r8) (for variables which
aren't declared as r8), or just remove it for vars
which are already declared as r8. then this code
compiles correctly when r8 is defined as single precision.
Modified: DART/branches/rma_trunk/models/bgrid_solo/model_mod.f90
===================================================================
--- DART/branches/rma_trunk/models/bgrid_solo/model_mod.f90 2017-10-13 19:59:06 UTC (rev 11982)
+++ DART/branches/rma_trunk/models/bgrid_solo/model_mod.f90 2017-10-13 20:22:35 UTC (rev 11983)
@@ -324,7 +324,7 @@
do j = lbound(Var_dt%t, 2), ubound(Var_dt%t, 2)
do k = lbound(Var_dt%t, 3), ubound(Var_dt%t, 3)
Var_dt%t(i, j, k) = &
- (1.0_r8 + random_gaussian(randnoise, 0.0_r8, dble(noise_sd))) * Var_dt%t(i, j, k)
+ (1.0_r8 + random_gaussian(randnoise, 0.0_r8, noise_sd)) * Var_dt%t(i, j, k)
end do
end do
end do
Modified: DART/branches/rma_trunk/models/lorenz_96_2scale/model_mod.f90
===================================================================
--- DART/branches/rma_trunk/models/lorenz_96_2scale/model_mod.f90 2017-10-13 19:59:06 UTC (rev 11982)
+++ DART/branches/rma_trunk/models/lorenz_96_2scale/model_mod.f90 2017-10-13 20:22:35 UTC (rev 11983)
@@ -228,7 +228,7 @@
jm1 = j - 1
if(jm1 < 1) jm1 = y_per_x
tmp_dt(j) = c1 * tmp_Y(jp1) * (tmp_Y(jm1)-tmp_Y(jp2)) - c2 * tmp_Y(j) &
- + c3 * x(idint(dble(jk+j-1-ys)/dble(y_per_x))+1)
+ + c3 * x(idint(real(jk+j-1-ys,r8)/real(y_per_x,r8))+1)
enddo
dt(jk:jk+y_per_x-1) = tmp_dt
enddo
@@ -246,7 +246,7 @@
jm1 = j - 1
if(jm1 < ys) jm1 = ye
dt(j) = c1 * x(jp1) * (x(jm1)-x(jp2)) - c2 * x(j) &
- + c3 * x(idint(dble(j-ys)/dble(y_per_x))+1)
+ + c3 * x(idint(real(j-ys,r8)/real(y_per_x,r8))+1)
enddo
endif
More information about the Dart-dev
mailing list