test_created_fields_have_num_levels Subroutine

public subroutine test_created_fields_have_num_levels(this)

Arguments

Type IntentOptional Attributes Name
class(ESMF_TestMethod), intent(inout) :: this

Calls

proc~~test_created_fields_have_num_levels~~CallsGraph proc~test_created_fields_have_num_levels test_created_fields_have_num_levels add_to_state add_to_state proc~test_created_fields_have_num_levels->add_to_state assert_that assert_that proc~test_created_fields_have_num_levels->assert_that equal_to equal_to proc~test_created_fields_have_num_levels->equal_to esmf_fieldget esmf_fieldget proc~test_created_fields_have_num_levels->esmf_fieldget esmf_stateget esmf_stateget proc~test_created_fields_have_num_levels->esmf_stateget none~get_primary_extension StateRegistry%get_primary_extension proc~test_created_fields_have_num_levels->none~get_primary_extension none~get_spec StateItemExtension%get_spec proc~test_created_fields_have_num_levels->none~get_spec proc~mapl_verify MAPL_Verify proc~test_created_fields_have_num_levels->proc~mapl_verify proc~setup~6 setup proc~test_created_fields_have_num_levels->proc~setup~6 none~get_primary_extension->proc~mapl_verify interface~mapl_assert MAPL_Assert none~get_primary_extension->interface~mapl_assert none~at~337 VirtualPtFamilyMap%at none~get_primary_extension->none~at~337 none~get_primary ExtensionFamily%get_primary none~get_primary_extension->none~get_primary none~has_virtual_pt StateRegistry%has_virtual_pt none~get_primary_extension->none~has_virtual_pt proc~mapl_return MAPL_Return none~get_primary_extension->proc~mapl_return proc~mapl_throw_exception MAPL_throw_exception proc~mapl_verify->proc~mapl_throw_exception proc~setup~6->none~get_primary_extension proc~setup~6->none~get_spec proc~setup~6->proc~mapl_verify create create proc~setup~6->create proc~setup~6->interface~mapl_assert none~add_primary_spec StateRegistry%add_primary_spec proc~setup~6->none~add_primary_spec none~add_short_name ModelVerticalGrid%add_short_name proc~setup~6->none~add_short_name none~set_active StateItemSpec%set_active proc~setup~6->none~set_active none~set_registry ModelVerticalGrid%set_registry proc~setup~6->none~set_registry proc~make_geom~3 make_geom proc~setup~6->proc~make_geom~3 proc~make_itemspec make_itemSpec proc~setup~6->proc~make_itemspec set_geometry set_geometry proc~setup~6->set_geometry

Source Code

   subroutine test_created_fields_have_num_levels(this)
      class(ESMF_TestMethod), intent(inout) :: this
      type(ModelVerticalGrid) :: vgrid
      integer :: rank
      integer, allocatable :: localElementCount(:)
      type(VirtualConnectionPt) :: ple_pt
      class(StateItemSpec), pointer :: spec
      type(MultiState) :: multi_state
      type(StateItemExtension), pointer :: extension
      type(ESMF_Field) :: ple
      integer :: rc, status

      call setup("PLE", vgrid, _RC)

      ple_pt = VirtualConnectionPt(state_intent="export", short_name="PLE")
      extension => r%get_primary_extension(ple_pt, _RC)
      spec => extension%get_spec()

      multi_state = MultiState()
      call spec%add_to_state(multi_state, ActualConnectionPt(ple_pt), _RC)
      call ESMF_StateGet(multi_state%exportState, itemName="PLE", field=ple, _RC)
      call ESMF_FieldGet(ple, rank=rank, _RC)
      allocate(localElementCount(rank))
      call ESMF_FieldGet(ple, localElementCount=localElementCount, _RC)
      @assert_that(localElementCount, is(equal_to([IM,JM,LM+1])))
      _UNUSED_DUMMY(this)
   end subroutine test_created_fields_have_num_levels