Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exposed optional parameter TO_NAME in AddExportFromChild for GOC… #1123

Merged
merged 6 commits into from
Oct 22, 2021
Merged
Show file tree
Hide file tree
Changes from 5 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
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Added

- Exposed `TO_NAME` argument in `MAPL_StateAddExportSpecFrmChld()` to
allow renaming of EXPORTS. Needed for GOCART-2G.

### Changed

### Removed
Expand Down
11 changes: 8 additions & 3 deletions generic/MAPL_Generic.F90
Original file line number Diff line number Diff line change
Expand Up @@ -3374,20 +3374,23 @@ end subroutine MAPL_StateAddExportSpec_
! !IIROUTINE: MAPL_StateAddExportSpecFrmChld --- Add \texttt{EXPORT} spec from child

!INTERFACE:
subroutine MAPL_StateAddExportSpecFrmChld ( GC, SHORT_NAME, CHILD_ID, RC )
subroutine MAPL_StateAddExportSpecFrmChld ( GC, SHORT_NAME, CHILD_ID, RC, TO_NAME )

!ARGUMENTS:
type(ESMF_GridComp), intent(INOUT) :: GC
character (len=*) , intent(IN) :: SHORT_NAME
character (len=*) , intent(IN) :: SHORT_NAME ! NAME in CHILD
integer , intent(IN) :: CHILD_ID
integer , optional , intent(OUT) :: RC
character (len=*), optional, intent(IN) :: TO_NAME ! NAME to appear is EXPORT;
! default is SHORT_NAME
Comment on lines +3377 to +3385
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we want to change the order here too, then somone must find all external calls and make sure they already have RC=.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ahh. Smart. Yeah, probably better not to break backwards compatibility until we know where they all are...and I have no idea what this call is actually called in GEOS. :)

!EOPI

character(len=ESMF_MAXSTR), parameter :: IAm="MAPL_StateAddExportSpecFrmChld"
integer :: STATUS


call MAPL_AddConnectivityE2E ( GC, SHORT_NAME, &
TO_NAME = TO_NAME, &
SRC_ID = CHILD_ID, &
TO_EXPORT = MAPL_Self, RC=STATUS )
_VERIFY(STATUS)
Expand Down Expand Up @@ -4948,10 +4951,11 @@ subroutine MAPL_AddConnectivityOld ( GC, SHORT_NAME, TO_NAME, &
end subroutine MAPL_AddConnectivityOld

subroutine MAPL_AddConnectivityE2E ( GC, SHORT_NAME, &
SRC_ID, TO_EXPORT, RC )
SRC_ID, TO_EXPORT, RC, TO_NAME )

type(ESMF_GridComp), intent(INOUT) :: GC ! Gridded component
character (len=*), intent(IN ) :: SHORT_NAME
character (len=*), optional, intent(IN) :: TO_NAME !name in TO_EXPORT
integer, intent(IN ) :: SRC_ID !FROM_EXPORT
integer, intent(IN ) :: TO_EXPORT
integer, optional, intent( OUT) :: RC ! Error code:
Expand All @@ -4964,6 +4968,7 @@ subroutine MAPL_AddConnectivityE2E ( GC, SHORT_NAME, &
_VERIFY(STATUS)

call MAPL_VarConnCreate(CONN%CONNECT, SHORT_NAME, &
TO_NAME = TO_NAME, &
FROM_EXPORT=SRC_ID, &
TO_EXPORT=TO_EXPORT, RC=STATUS )
_VERIFY(STATUS)
Expand Down