Skip to content

Commit

Permalink
fix for UFS
Browse files Browse the repository at this point in the history
  • Loading branch information
Mariana Vertenstein committed Jun 24, 2024
1 parent a1209b8 commit d183d22
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions mediator/med_internalstate_mod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -234,23 +234,28 @@ subroutine med_internalstate_init(gcomp, rc)
integer :: num_icesheets
character(len=CL) :: atm_mesh_name
character(len=CL) :: lnd_mesh_name
logical :: isPresent, isSet
character(len=*),parameter :: subname=' (internalstate init) '
!-----------------------------------------------------------

nullify(is_local%wrap)
call ESMF_GridCompGetInternalState(gcomp, is_local, rc)
if (ChkErr(rc,__LINE__,u_FILE_u)) return


! determine if atm and lnd have the same mesh
call NUOPC_CompAttributeGet(gcomp, name='mesh_atm', value=atm_mesh_name, rc=rc)
if (ChkErr(rc,__LINE__,u_FILE_u)) return
call NUOPC_CompAttributeGet(gcomp, name='mesh_lnd', value=lnd_mesh_name, rc=rc)
call NUOPC_CompAttributeGet(gcomp, name='mesh_lnd', value=lnd_mesh_name, &
isPresent=isPresent, isSet=isSet, rc=rc)
if (ChkErr(rc,__LINE__,u_FILE_u)) return
if (trim(atm_mesh_name) == trim(lnd_mesh_name)) then
samegrid_atmlnd = .true.
if (isPresent .and. isSet) then
if (trim(atm_mesh_name) == trim(lnd_mesh_name)) then
samegrid_atmlnd = .true.
else
samegrid_atmlnd = .false.
end if
else
samegrid_atmlnd = .false.
samegrid_atmlnd = .true.
end if

! See med_fraction_mod for the following definitions
Expand Down

0 comments on commit d183d22

Please sign in to comment.