Skip to content

Commit

Permalink
Merge tag 'alpha-ctsm5.2.mksrf.12_ctsm5.1.dev111' into checkFlag
Browse files Browse the repository at this point in the history
Change mkglacier upper tolerance from 100.000001 to 101.0

The lower tolerance caused the mpasa3.75 grid to fail while
generating an fsurdat file, while the higher tolerance worked.
  • Loading branch information
slevis-lmwg committed Nov 1, 2022
2 parents 260f545 + dd00ebb commit 483025f
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 13 deletions.
7 changes: 0 additions & 7 deletions src/main/surfrdMod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
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 483025f

Please sign in to comment.