Skip to content

Commit

Permalink
Update mkglacier upper tolerance from 100.000001 to 101.0
Browse files Browse the repository at this point in the history
Original tolerance caused mpasa3.75 grid to fail while generating the
fsurdat file, so relaxing the tolerance. Keeping a warning for when
glac_o(no) > 100.000001 and truncating values > 100 back to 100.
  • Loading branch information
slevis-lmwg committed Oct 28, 2022
1 parent 2e4dbfd commit dd00ebb
Showing 1 changed file with 11 additions and 6 deletions.
17 changes: 11 additions & 6 deletions tools/mksurfdata_esmf/src/mkglcmecMod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -590,13 +590,18 @@ subroutine mkglacier(file_mesh_i, file_data_i, mesh_o, glac_o, rc)
call regrid_rawdata(mesh_i, mesh_o, routehandle, glac_i, glac_o, rc=rc)
if (ChkErr(rc,__LINE__,u_FILE_u)) return
do no = 1,ns_o
if (glac_o(no) < 1.) glac_o(no) = 0.
enddo
do no = 1,ns_o
if ((glac_o(no)) > 100.000001_r8) then
write (6,*) 'MKGLACIER error: glacier = ',glac_o(no), &
' greater than 100.000001 for column, row = ',no
if (glac_o(no) < 1._r8) then
glac_o(no) = 0._r8
else if ((glac_o(no)) > 101._r8) then
write(6,*) 'MKGLACIER error: glacier = ', glac_o(no), &
' > 101 for no = ', no
call shr_sys_abort()
else if ((glac_o(no)) > 100._r8) then
if ((glac_o(no)) > 100.000001_r8) then
write(6,*) 'MKGLACIER warning: glacier = ', glac_o(no), &
' > 100.000001 for no = ', no, ' Changing glacier > 100 to 100.'
end if
glac_o(no) = 100._r8
end if
enddo

Expand Down

0 comments on commit dd00ebb

Please sign in to comment.