<p><b>duda</b> 2011-12-19 18:05:47 -0700 (Mon, 19 Dec 2011)</p><p>BRANCH COMMIT<br>
<br>
Correct a few other kind-type issues in initialization core caught by the xlf compiler<br>
<br>
<br>
M src/core_init_nhyd_atmos/mpas_init_atm_llxy.F<br>
M src/core_init_nhyd_atmos/mpas_init_atm_hinterp.F<br>
M src/core_init_nhyd_atmos/mpas_init_atm_test_cases.F<br>
</p><hr noshade><pre><font color="gray">Modified: branches/cam_mpas_nh/src/core_init_nhyd_atmos/mpas_init_atm_hinterp.F
===================================================================
--- branches/cam_mpas_nh/src/core_init_nhyd_atmos/mpas_init_atm_hinterp.F        2011-12-20 00:06:23 UTC (rev 1262)
+++ branches/cam_mpas_nh/src/core_init_nhyd_atmos/mpas_init_atm_hinterp.F        2011-12-20 01:05:47 UTC (rev 1263)
@@ -545,10 +545,10 @@
ify = floor(yy)
icy = ceiling(yy)
- fxfy = max(0., 1.0 - sqrt((xx-real(ifx))**2+(yy-real(ify))**2))
- fxcy = max(0., 1.0 - sqrt((xx-real(ifx))**2+(yy-real(icy))**2))
- cxfy = max(0., 1.0 - sqrt((xx-real(icx))**2+(yy-real(ify))**2))
- cxcy = max(0., 1.0 - sqrt((xx-real(icx))**2+(yy-real(icy))**2))
+ fxfy = max(0.0_RKIND, 1.0 - sqrt((xx-real(ifx))**2+(yy-real(ify))**2))
+ fxcy = max(0.0_RKIND, 1.0 - sqrt((xx-real(ifx))**2+(yy-real(icy))**2))
+ cxfy = max(0.0_RKIND, 1.0 - sqrt((xx-real(icx))**2+(yy-real(ify))**2))
+ cxcy = max(0.0_RKIND, 1.0 - sqrt((xx-real(icx))**2+(yy-real(icy))**2))
! First, make sure that the point is contained in the source array
if (ifx < start_x .or. icx > end_x .or. &
@@ -744,13 +744,13 @@
if (array(ifx+3-i, ify+3-j, izz) == msgval .or. mask_array(ifx+3-i, ify+3-j) == maskval) then
weights(i,j) = 0.0
else
- weights(i,j) = max(0., 2.0 - sqrt((xx-real(ifx+3-i))**2+(yy-real(ify+3-j))**2))
+ weights(i,j) = max(0.0_RKIND, 2.0 - sqrt((xx-real(ifx+3-i))**2+(yy-real(ify+3-j))**2))
end if
else
if (array(ifx+3-i, ify+3-j, izz) == msgval) then
weights(i,j) = 0.0
else
- weights(i,j) = max(0., 2.0 - sqrt((xx-real(ifx+3-i))**2+(yy-real(ify+3-j))**2))
+ weights(i,j) = max(0.0_RKIND, 2.0 - sqrt((xx-real(ifx+3-i))**2+(yy-real(ify+3-j))**2))
end if
end if
Modified: branches/cam_mpas_nh/src/core_init_nhyd_atmos/mpas_init_atm_llxy.F
===================================================================
--- branches/cam_mpas_nh/src/core_init_nhyd_atmos/mpas_init_atm_llxy.F        2011-12-20 00:06:23 UTC (rev 1262)
+++ branches/cam_mpas_nh/src/core_init_nhyd_atmos/mpas_init_atm_llxy.F        2011-12-20 01:05:47 UTC (rev 1263)
@@ -1156,10 +1156,10 @@
! intersects the Earth's surface at each of the distinctly different
! latitudes
IF (ABS(truelat1-truelat2) .GT. 0.1) THEN
- cone = ALOG10(COS(truelat1*rad_per_deg)) - &
- ALOG10(COS(truelat2*rad_per_deg))
- cone = cone /(ALOG10(TAN((45.0 - ABS(truelat1)/2.0) * rad_per_deg)) - &
- ALOG10(TAN((45.0 - ABS(truelat2)/2.0) * rad_per_deg)))
+ cone = LOG10(COS(truelat1*rad_per_deg)) - &
+ LOG10(COS(truelat2*rad_per_deg))
+ cone = cone /(LOG10(TAN((45.0 - ABS(truelat1)/2.0) * rad_per_deg)) - &
+ LOG10(TAN((45.0 - ABS(truelat2)/2.0) * rad_per_deg)))
ELSE
cone = SIN(ABS(truelat1)*rad_per_deg )
ENDIF
@@ -1222,9 +1222,9 @@
! Longitude
lon = proj%stdlon + deg_per_rad * ATAN2(proj%hemi*xx,yy)/proj%cone
# if ( defined (G95) && ( DA_CORE == 1 ) )
- lon = DMOD(lon+360., 360.)
+ lon = DMOD(lon+360., 360.0_RKIND)
# else
- lon = AMOD(lon+360., 360.)
+ lon = MOD(lon+360., 360.0_RKIND)
# endif
! Latitude. Latitude determined by solving an equation adapted
@@ -1325,7 +1325,7 @@
proj%rsw = 0.
IF (proj%lat1 .NE. 0.) THEN
- proj%rsw = (ALOG(TAN(0.5*((proj%lat1+90.)*rad_per_deg))))/proj%dlon
+ proj%rsw = (LOG(TAN(0.5*((proj%lat1+90.)*rad_per_deg))))/proj%dlon
ENDIF
RETURN
@@ -1349,7 +1349,7 @@
IF (deltalon .LT. -180.) deltalon = deltalon + 360.
IF (deltalon .GT. 180.) deltalon = deltalon - 360.
i = proj%knowni + (deltalon/(proj%dlon*deg_per_rad))
- j = proj%knownj + (ALOG(TAN(0.5*((lat + 90.) * rad_per_deg)))) / &
+ j = proj%knownj + (LOG(TAN(0.5*((lat + 90.) * rad_per_deg)))) / &
proj%dlon - proj%rsw
RETURN
@@ -1533,7 +1533,7 @@
! Try to determine whether this domain has global coverage
if (abs(proj%lat1 - proj%latinc/2. + 90.) < 0.001 .and. &
- abs(mod(proj%lon1 - proj%loninc/2. - proj%stdlon,360.)) < 0.001) then
+ abs(mod(proj%lon1 - proj%loninc/2. - proj%stdlon,360.0_RKIND)) < 0.001) then
global_domain = .true.
else
global_domain = .false.
Modified: branches/cam_mpas_nh/src/core_init_nhyd_atmos/mpas_init_atm_test_cases.F
===================================================================
--- branches/cam_mpas_nh/src/core_init_nhyd_atmos/mpas_init_atm_test_cases.F        2011-12-20 00:06:23 UTC (rev 1262)
+++ branches/cam_mpas_nh/src/core_init_nhyd_atmos/mpas_init_atm_test_cases.F        2011-12-20 01:05:47 UTC (rev 1263)
@@ -1200,7 +1200,7 @@
temp = p(k,i)*thi(k,i)
pres = p0*p(k,i)**(1./rcp)
qvs = 380.*exp(17.27*(temp-273.)/(temp-36.))/pres
- scalars(index_qv,k,i) = amin1(0.014,rh(k,i)*qvs)
+ scalars(index_qv,k,i) = min(0.014_RKIND,rh(k,i)*qvs)
end do
end do
@@ -1826,7 +1826,7 @@
temp = p(k,i)*t(k,i)
pres = p0*p(k,i)**(1./rcp)
qvs = 380.*exp(17.27*(temp-273.)/(temp-36.))/pres
- scalars(index_qv,k,i) = amin1(0.014,rh(k,i)*qvs)
+ scalars(index_qv,k,i) = min(0.014_RKIND,rh(k,i)*qvs)
end do
do k=1,nz1
</font>
</pre>