diff --git a/generic3g/RestartHandler.F90 b/generic3g/RestartHandler.F90 index 32e45683327..d5c2c91fa70 100644 --- a/generic3g/RestartHandler.F90 +++ b/generic3g/RestartHandler.F90 @@ -71,7 +71,7 @@ subroutine write(this, state_type, state, rc) ! TODO: the file_name should come from OuterMetaComponents's hconfig file_name = trim(this%gc_name) // "_" // trim(state_type) // "_checkpoint.nc4" call this%lgr%info("Writing checkpoint: %a", trim(file_name)) - out_bundle = MAPL_StateGet(state, _RC) !get_bundle_from_state_(state, _RC) + out_bundle = MAPL_StateGet(state, _RC) call this%write_bundle_(out_bundle, file_name, rc) end if @@ -107,39 +107,6 @@ subroutine read(this, state_type, state, rc) _RETURN(_SUCCESS) end subroutine read - ! type(ESMF_FieldBundle) function get_bundle_from_state_(state, rc) result(bundle) - ! ! Arguments - ! type(ESMF_State), intent(in) :: state - ! integer, optional, intent(out) :: rc - - ! ! Locals - ! character(len=ESMF_MAXSTR), allocatable :: item_name(:) - ! type (ESMF_StateItem_Flag), allocatable :: item_type(:) - ! type(ESMF_Field) :: field - ! type(ESMF_FieldStatus_Flag) :: field_status - ! integer :: item_count, idx, status - - ! ! bundle to pack fields in - ! bundle = ESMF_FieldBundleCreate(_RC) - ! call ESMF_StateGet(state, itemCount=item_count, _RC) - ! allocate(item_name(item_count), _STAT) - ! allocate(item_type(item_count), _STAT) - ! call ESMF_StateGet(state, itemNameList=item_name, itemTypeList=item_type, _RC) - ! do idx = 1, item_count - ! if (item_type(idx) /= ESMF_STATEITEM_FIELD) then - ! _FAIL("FieldBundle has not been implemented yet") - ! end if - ! call ESMF_StateGet(state, item_name(idx), field, _RC) - ! call ESMF_FieldGet(field, status=field_status, _RC) - ! if (field_status == ESMF_FIELDSTATUS_COMPLETE) then - ! call ESMF_FieldBundleAdd(bundle, [field], _RC) - ! end if - ! end do - ! deallocate(item_name, item_type, _STAT) - - ! _RETURN(_SUCCESS) - ! end function get_bundle_from_state_ - subroutine write_bundle_(this, bundle, file_name, rc) ! Arguments class(RestartHandler), intent(in) :: this