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

Removed confusing warning error messages from forcing #5498

Merged
Show file tree
Hide file tree
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
6 changes: 5 additions & 1 deletion components/mpas-framework/src/framework/mpas_forcing.F
Original file line number Diff line number Diff line change
Expand Up @@ -1807,7 +1807,11 @@ subroutine setup_input_fields(&!{{{
lInputPoolCreated = .false.

nullify(forcingPoolInput)
call MPAS_pool_get_subpool(block % structs, trim(poolnameInput), forcingPoolInput)

if (MPAS_pool_exists(block % structs, trim(poolnameInput), forcingPoolInput)) then
call MPAS_pool_get_subpool(block % structs, trim(poolnameInput), forcingPoolInput)
endif

if (.not. associated(forcingPoolInput)) then
call MPAS_pool_create_pool(forcingPoolInput)
lInputPoolCreated = .true.
Expand Down
34 changes: 34 additions & 0 deletions components/mpas-framework/src/framework/mpas_pool_routines.F
Original file line number Diff line number Diff line change
Expand Up @@ -5376,6 +5376,40 @@ subroutine mpas_pool_get_subpool(inPool, key, subPool)!{{{
end subroutine mpas_pool_get_subpool!}}}


!-----------------------------------------------------------------------
! subroutine mpas_pool_exists
!
!> \brief MPAS Pool check subpool exists function
!> \author Adrian K. Turner
!> \date 03/03/2023
!> \details
!> This function returns whether a subpool named key exists within
!> inPool.
!
!-----------------------------------------------------------------------
function mpas_pool_exists(inPool, key, subPool) result(exists)!{{{

implicit none

type (mpas_pool_type), intent(in) :: inPool
character (len=*), intent(in) :: key
type (mpas_pool_type), pointer :: subPool

type (mpas_pool_data_type), pointer :: mem

logical :: exists

mem => pool_get_member(inPool, key, MPAS_POOL_SUBPOOL)

if (associated(mem)) then
exists = .true.
else
exists = .false.
end if

end function mpas_pool_exists!}}}


!-----------------------------------------------------------------------
! subroutine mpas_pool_add_package
!
Expand Down