This subroutine returns a pointer of mpas_pool_type
to the named pool.
Supported pool names include: "all", "cfg", "dim", and a subset of the
var_struct
elements in MPAS registry.
It is mostly used by the dyn_mpas_get_variable_{pointer,value}_*
subroutines to draw a variable from a pool.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(mpas_dynamical_core_type), | intent(in) | :: | self | |||
type(mpas_pool_type), | intent(out), | pointer | :: | pool_pointer | ||
character(len=*), | intent(in) | :: | pool_name |
Type | Visibility | Attributes | Name | Initial | |||
---|---|---|---|---|---|---|---|
character(len=*), | private, | parameter | :: | subname | = | 'dyn_mpas_subdriver::dyn_mpas_get_pool_pointer' |
subroutine dyn_mpas_get_pool_pointer(self, pool_pointer, pool_name) ! Module(s) from MPAS. use mpas_derived_types, only: mpas_pool_type use mpas_pool_routines, only: mpas_pool_get_subpool class(mpas_dynamical_core_type), intent(in) :: self type(mpas_pool_type), pointer, intent(out) :: pool_pointer character(*), intent(in) :: pool_name character(*), parameter :: subname = 'dyn_mpas_subdriver::dyn_mpas_get_pool_pointer' nullify(pool_pointer) select case (trim(adjustl(pool_name))) case ('all') pool_pointer => self % domain_ptr % blocklist % allfields case ('cfg') pool_pointer => self % domain_ptr % configs case ('dim') pool_pointer => self % domain_ptr % blocklist % dimensions case ('diag', 'mesh', 'state', 'tend', 'tend_physics') call mpas_pool_get_subpool(self % domain_ptr % blocklist % allstructs, trim(adjustl(pool_name)), pool_pointer) case default call self % model_error('Unsupported pool name "' // trim(adjustl(pool_name)) // '"', subname, __LINE__) end select if (.not. associated(pool_pointer)) then call self % model_error('Failed to find pool "' // trim(adjustl(pool_name)) // '"', subname, __LINE__) end if end subroutine dyn_mpas_get_pool_pointer