Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions config_src/drivers/nuopc_cap/mom_cap.F90
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ module MOM_cap_mod
use ESMF, only: ESMF_END_ABORT, ESMF_Finalize
use ESMF, only: ESMF_REDUCE_MAX, ESMF_REDUCE_MIN, ESMF_VMAllReduce
use ESMF, only: operator(==), operator(/=), operator(+), operator(-)
use ESMF, only: ESMF_STATEITEM_NOTFOUND, ESMF_StateItem_Flag

! TODO ESMF_GridCompGetInternalState does not have an explicit Fortran interface.
!! Model does not compile with "use ESMF, only: ESMF_GridCompGetInternalState"
Expand Down Expand Up @@ -2281,12 +2282,18 @@ subroutine State_SetScalar(value, scalar_id, State, mytask, scalar_name, scalar_

! local variables
type(ESMF_Field) :: field
type(ESMF_StateItem_Flag) :: itemType
real(ESMF_KIND_R8), pointer :: farrayptr(:,:)
character(len=*), parameter :: subname='(MOM_cap:State_SetScalar)'
!--------------------------------------------------------

rc = ESMF_SUCCESS

call ESMF_StateGet(State, itemName=trim(scalar_name), itemType=itemType, rc=rc)
if (ChkErr(rc,__LINE__,u_FILE_u)) return

if (itemType == ESMF_STATEITEM_NOTFOUND) return

call ESMF_StateGet(State, itemName=trim(scalar_name), field=field, rc=rc)
if (ChkErr(rc,__LINE__,u_FILE_u)) return

Expand Down
Loading