new_ExtData_DriverGridComp Function

public function new_ExtData_DriverGridComp(root_set_services, configFileName, name) result(cap)

Arguments

Type IntentOptional Attributes Name
procedure :: root_set_services
character(len=*), intent(in), optional :: configFileName
character(len=*), intent(in), optional :: name

Return Value type(ExtData_DriverGridComp)


Calls

proc~~new_extdata_drivergridcomp~~CallsGraph proc~new_extdata_drivergridcomp new_ExtData_DriverGridComp ESMF_GridCompCreate ESMF_GridCompCreate proc~new_extdata_drivergridcomp->ESMF_GridCompCreate ESMF_UserCompSetInternalState ESMF_UserCompSetInternalState proc~new_extdata_drivergridcomp->ESMF_UserCompSetInternalState proc~mapl_verify MAPL_Verify proc~new_extdata_drivergridcomp->proc~mapl_verify proc~mapl_throw_exception MAPL_throw_exception proc~mapl_verify->proc~mapl_throw_exception

Called by

proc~~new_extdata_drivergridcomp~~CalledByGraph proc~new_extdata_drivergridcomp new_ExtData_DriverGridComp proc~run~12 ExtDataDriver%run proc~run~12->proc~new_extdata_drivergridcomp program~extdata_driver ExtData_Driver program~extdata_driver->proc~run~12

Source Code

  function new_ExtData_DriverGridComp(root_set_services, configFileName, name) result(cap)
    procedure() :: root_set_services
    character(len=*), optional, intent(in) :: name
    character(len=*), optional, intent(in) :: configFileName
    type(ExtData_DriverGridComp) :: cap

    type(ExtData_DriverGridComp_Wrapper) :: cap_wrapper
    type(MAPL_MetaComp_Wrapper) :: meta_comp_wrapper

    integer :: status, rc

    cap%root_set_services => root_set_services

    if (present(name)) then
       allocate(cap%name, source=name)
    else
       allocate(cap%name, source='CAP')
    end if

    if (present(configFileName)) then
       allocate(cap%configFile, source=configFileName)
    else
       allocate(cap%configFile, source='CAP.rc')
    end if

    cap%gc = ESMF_GridCompCreate(name='ExtData_DriverGridComp', rc = status)
    _VERIFY(status)

    allocate(cap_wrapper%ptr)
    cap_wrapper%ptr = cap
    call ESMF_UserCompSetInternalState(cap%gc, internal_cap_name, cap_wrapper, status)
    _VERIFY(status)

    allocate(meta_comp_wrapper%ptr)
    call ESMF_UserCompSetInternalState(cap%gc, internal_meta_comp_name, meta_comp_wrapper, status)
    _VERIFY(status)

  end function new_ExtData_DriverGridComp