Skip to content

Commit

Permalink
added more error information
Browse files Browse the repository at this point in the history
  • Loading branch information
weiyuan-jiang committed Oct 4, 2024
1 parent 7637bd1 commit 7db8a1e
Showing 1 changed file with 5 additions and 13 deletions.
18 changes: 5 additions & 13 deletions base/Base/Base_Base_implementation.F90
Original file line number Diff line number Diff line change
Expand Up @@ -2896,20 +2896,12 @@ function grid_is_ok(grid) result(OK)
accurate_lon = 1.750d0*MAPL_PI_R8 - shift0
accurate_lat = [(-alpha + (j-1)*dalpha, j = j1, j2)]

if (any(abs(accurate_lon - lonRe) > 2.0* tolerance)) then
print*, "accurate_lon: ", accurate_lon
print*, "corner_lon : ", lonRe
print*, "Error: Grid should have pi/18 shift"
OK = .false.
return
endif

if ( any(abs(accurate_lat - latRe) > 2.0*tolerance)) then
print*, "accurate_lat: ", accurate_lat
print*, "edge_lat : ", latRe
if (any(abs(accurate_lon - lonRe) > 2.0* tolerance) .or. any(abs(accurate_lat - latRe) > 2.0*tolerance)) then
print*, "Error: It could be "
print*, " 1)Grid is NOT gnomonic_ed;"
print*, " 2)lats lons from MAPL_GridGetCorners are NOT accurate (single precision from ESMF)"
print*, " 1) grid may not have pi/18 Japan mountain shift"
print*, " 2) grid is NOT gnomonic_ed;"
print*, " 3) lats lons from MAPL_GridGetCorners are NOT accurate (single precision from ESMF)"
print*, " 4) strtech grid rotates north pole"
OK = .false.
return
endif
Expand Down

0 comments on commit 7db8a1e

Please sign in to comment.