test_full_run_sequence Subroutine

public subroutine test_full_run_sequence(this)

Uses

  • proc~~test_full_run_sequence~~UsesGraph proc~test_full_run_sequence test_full_run_sequence iso_fortran_env iso_fortran_env proc~test_full_run_sequence->iso_fortran_env module~scratchpad scratchpad proc~test_full_run_sequence->module~scratchpad

Arguments

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

Calls

proc~~test_full_run_sequence~~CallsGraph proc~test_full_run_sequence test_full_run_sequence ESMF_GridCompInitialize ESMF_GridCompInitialize proc~test_full_run_sequence->ESMF_GridCompInitialize ESMF_GridCreateNoPeriDim ESMF_GridCreateNoPeriDim proc~test_full_run_sequence->ESMF_GridCreateNoPeriDim ESMF_HConfigCreate ESMF_HConfigCreate proc~test_full_run_sequence->ESMF_HConfigCreate NUOPC_FieldDictionarySetup NUOPC_FieldDictionarySetup proc~test_full_run_sequence->NUOPC_FieldDictionarySetup assert_that assert_that proc~test_full_run_sequence->assert_that esmf_statecreate esmf_statecreate proc~test_full_run_sequence->esmf_statecreate esmf_stateget esmf_stateget proc~test_full_run_sequence->esmf_stateget generic_init_phase_sequence generic_init_phase_sequence proc~test_full_run_sequence->generic_init_phase_sequence mapl_gridcompsetgeom mapl_gridcompsetgeom proc~test_full_run_sequence->mapl_gridcompsetgeom proc~mapl_gridcompsetverticalgrid MAPL_GridCompSetVerticalGrid proc~test_full_run_sequence->proc~mapl_gridcompsetverticalgrid proc~setup setup proc~test_full_run_sequence->proc~setup interface~mapl_gridcompgetoutermeta MAPL_GridCompGetOuterMeta proc~mapl_gridcompsetverticalgrid->interface~mapl_gridcompgetoutermeta none~set_vertical_grid OuterMetaComponent%set_vertical_grid proc~mapl_gridcompsetverticalgrid->none~set_vertical_grid proc~mapl_return MAPL_Return proc~mapl_gridcompsetverticalgrid->proc~mapl_return proc~mapl_verify MAPL_Verify proc~mapl_gridcompsetverticalgrid->proc~mapl_verify proc~setup->assert_that ESMF_ClockCreate ESMF_ClockCreate proc~setup->ESMF_ClockCreate ESMF_TimeIntervalSet ESMF_TimeIntervalSet proc~setup->ESMF_TimeIntervalSet ESMF_TimeSet ESMF_TimeSet proc~setup->ESMF_TimeSet esmf_gridcompsetservices esmf_gridcompsetservices proc~setup->esmf_gridcompsetservices interface~create_grid_comp create_grid_comp proc~setup->interface~create_grid_comp interface~user_setservices user_setservices proc~setup->interface~user_setservices proc~clear_log clear_log proc~setup->proc~clear_log at at proc~mapl_return->at insert insert proc~mapl_return->insert proc~mapl_throw_exception MAPL_throw_exception proc~mapl_return->proc~mapl_throw_exception proc~mapl_verify->proc~mapl_throw_exception

Source Code

   subroutine test_full_run_sequence(this)
      use scratchpad
      use iso_fortran_env
      class(MpiTestMethod), intent(inout) :: this
      type(ESMF_HConfig) :: config

      integer :: status, userrc
      type(ESMF_GridComp) :: outer_gc

      type(ESMF_Clock) :: clock
      type(ESMF_State) :: importState, exportState
      integer :: i
      type(ESMF_Field) :: f
      type(ESMF_Grid) :: grid
      type(BasicVerticalGrid) :: vertical_grid

      call NUOPC_FieldDictionarySetup('./scenarios/FieldDictionary.yml', rc=status)
      @assert_that(status, is(0))

      config = ESMF_HConfigCreate(filename='./scenarios/leaf_A.yaml')
      @assert_that(status, is(0))

      call setup(outer_gc, config, status)
      @assert_that(status, is(0))

      grid = ESMF_GridCreateNoPeriDim(maxIndex=[4,4], name='I_AM_GROOT', rc=status)
      @assert_that(status, is(0))
      vertical_grid = BasicVerticalGrid(4)
      call MAPL_GridCompSetGeom(outer_gc, grid, rc=status)
      @assert_that(status, is(0))
      call MAPL_GridCompSetVerticalGrid(outer_gc, vertical_grid, rc=status)
      @assert_that(status, is(0))

      importState = ESMF_StateCreate(stateIntent=ESMF_STATEINTENT_IMPORT, rc=status)
      @assert_that(status, is(0))
      exportState = ESMF_StateCreate(stateIntent=ESMF_STATEINTENT_EXPORT, rc=status)
      @assert_that(status, is(0))

      do i = 1, size(GENERIC_INIT_PHASE_SEQUENCE)
         associate (phase => GENERIC_INIT_PHASE_SEQUENCE(i))
           call ESMF_GridCompInitialize(outer_gc, &
                importState=importState, exportState=exportState, clock=clock, &
                phase=phase, userRC=userRC, rc=status)
         end associate
         @assert_that(userRC, is(0))
         @assert_that(status, is(0))
      end do

      call ESMF_StateGet(importState, 'I_1', f, rc=status)
      @assert_that(status, is(0))

      call ESMF_StateGet(exportState, 'E_1', f, rc=status)
      @assert_that(status, is(0))

      if(.false.) print*,shape(this)
   end subroutine test_full_run_sequence