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