Skip to content

Commit

Permalink
Fix inconsistent kind types of arguments to MIN/MAX in module_map_utils
Browse files Browse the repository at this point in the history
The XL compiler identified calls to the MIN and MAX intrinsics in
module_map_utils with inconsistent kind type parameters of the arguments:

    "module_map_utils.f90", line 819.44: 1513-041 (S) Arguments of the wrong type were specified for the INTRINSIC procedure "max".
    ** map_utils   === End of Compilation 1 ===
    1501-511  Compilation failed for file module_map_utils.f90.

This commit changes the kind type parameter of the literal arguments
to MIN and MAX at line 808 of module_map_utils.F in the ijll_ps
routine to HIGH.
  • Loading branch information
mgduda committed Apr 22, 2020
1 parent b9cfb7a commit 3e530ac
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion geogrid/src/module_map_utils.F
Original file line number Diff line number Diff line change
Expand Up @@ -805,7 +805,7 @@ SUBROUTINE ijll_ps(i, j, proj, lat, lon)
ELSE
gi2 = (proj%rebydx * scale_top)**2.
lat = deg_per_rad * proj%hemi * ASIN((gi2-r2)/(gi2+r2))
arccos = ACOS(MIN(MAX(xx/SQRT(r2),-1.0),1.0))
arccos = ACOS(MIN(MAX(xx/SQRT(r2),-1.0_HIGH),1.0_HIGH))
IF (yy .GT. 0) THEN
lon = reflon + deg_per_rad * arccos
ELSE
Expand Down

0 comments on commit 3e530ac

Please sign in to comment.