diff --git a/src/main/surfrdMod.F90 b/src/main/surfrdMod.F90 index a8bbf17ec7..426a07256d 100644 --- a/src/main/surfrdMod.F90 +++ b/src/main/surfrdMod.F90 @@ -120,13 +120,6 @@ subroutine surfrd_get_data (begg, endg, ldomain, lfsurdat, actual_numcft) call getfil( lfsurdat, locfn, 0 ) call ncd_pio_openfile (ncid, trim(locfn), 0) - ! Read in patch mask - this variable is only on the surface dataset - but not - ! on the domain dataset - - call ncd_io(ncid=ncid, varname= 'PFTDATA_MASK', flag='read', data=ldomain%pftm, & - dim1name=grlnd, readvar=readvar) - if (.not. readvar) call endrun( msg=' ERROR: pftm NOT on surface dataset'//errMsg(sourcefile, __LINE__)) - ! Cmopare surfdat_domain attributes to ldomain attributes call check_var(ncid=ncid, varname='xc', readvar=readvar) diff --git a/tools/mksurfdata_esmf/src/mkglcmecMod.F90 b/tools/mksurfdata_esmf/src/mkglcmecMod.F90 index d3bec92b15..9a20388023 100644 --- a/tools/mksurfdata_esmf/src/mkglcmecMod.F90 +++ b/tools/mksurfdata_esmf/src/mkglcmecMod.F90 @@ -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