Skip to content

Commit

Permalink
Add 'vm' argument to the NUOPC_AdvertiseFields entry point of the
Browse files Browse the repository at this point in the history
NUOPC_Advertise interface,
  • Loading branch information
theurich committed Sep 25, 2024
1 parent 5ea7603 commit 938b33e
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions src/addon/NUOPC/src/NUOPC_Base.F90
Original file line number Diff line number Diff line change
Expand Up @@ -623,13 +623,14 @@ subroutine NUOPC_AdvertiseField(state, StandardName, Units, &
! !INTERFACE:
! Private name; call using NUOPC_Advertise()
subroutine NUOPC_AdvertiseFields(state, StandardNames, &
TransferOfferGeomObject, SharePolicyField, SharePolicyGeomObject, rc)
TransferOfferGeomObject, SharePolicyField, SharePolicyGeomObject, vm, rc)
! !ARGUMENTS:
type(ESMF_State), intent(inout) :: state
character(*), intent(in) :: StandardNames(:)
character(*), intent(in), optional :: TransferOfferGeomObject
character(*), intent(in), optional :: SharePolicyField
character(*), intent(in), optional :: SharePolicyGeomObject
type(ESMF_VM), intent(in), optional :: vm
integer, intent(out), optional :: rc
! !DESCRIPTION:
! \label{NUOPC_AdvertiseFields}
Expand Down Expand Up @@ -668,6 +669,10 @@ subroutine NUOPC_AdvertiseFields(state, StandardNames, &
! controls the vocabulary of this attribute. Valid options are
! "share", and "not share".
! If omitted, the default is equal to {\tt SharePolicyField}.
! \item[{[vm]}]
! If present, the Field objects used during advertising are created on the
! specified {\tt ESMF\_VM} object. The default is to create the Field
! objects on the VM of the current component context.
! \item[{[rc]}]
! Return code; equals {\tt ESMF\_SUCCESS} if there are no errors.
! \end{description}
Expand All @@ -682,8 +687,9 @@ subroutine NUOPC_AdvertiseFields(state, StandardNames, &

do i=1, size(StandardNames)
call NUOPC_AdvertiseField(state, StandardName=StandardNames(i), &
TransferOfferGeomObject=TransferOfferGeomObject, SharePolicyField=SharePolicyField, &
SharePolicyGeomObject=SharePolicyGeomObject, rc=localrc)
TransferOfferGeomObject=TransferOfferGeomObject, &
SharePolicyField=SharePolicyField, &
SharePolicyGeomObject=SharePolicyGeomObject, vm=vm, rc=localrc)
if (ESMF_LogFoundError(rcToCheck=localrc, msg=ESMF_LOGERR_PASSTHRU, &
line=__LINE__, &
file=FILENAME, &
Expand Down

0 comments on commit 938b33e

Please sign in to comment.