make_coupler Function

public function make_coupler(action, source, rc) result(coupler_gridcomp)

Arguments

Type IntentOptional Attributes Name
class(ExtensionAction), intent(in) :: action
type(GriddedComponentDriver), intent(in), optional, target :: source
integer, intent(out), optional :: rc

Return Value type(ESMF_GridComp)


Calls

proc~~make_coupler~~CallsGraph proc~make_coupler make_coupler ESMF_GridCompCreate ESMF_GridCompCreate proc~make_coupler->ESMF_GridCompCreate esmf_gridcompsetservices esmf_gridcompsetservices proc~make_coupler->esmf_gridcompsetservices proc~attach_coupler_meta attach_coupler_meta proc~make_coupler->proc~attach_coupler_meta proc~get_coupler_meta get_coupler_meta proc~make_coupler->proc~get_coupler_meta proc~mapl_return MAPL_Return proc~make_coupler->proc~mapl_return proc~mapl_verify MAPL_Verify proc~make_coupler->proc~mapl_verify proc~attach_coupler_meta->proc~mapl_return interface~mapl_assert MAPL_Assert proc~attach_coupler_meta->interface~mapl_assert interface~mapl_usercompsetinternalstate MAPL_UserCompSetInternalState proc~attach_coupler_meta->interface~mapl_usercompsetinternalstate proc~get_coupler_meta->proc~mapl_return proc~get_coupler_meta->interface~mapl_assert interface~mapl_usercompgetinternalstate MAPL_UserCompGetInternalState proc~get_coupler_meta->interface~mapl_usercompgetinternalstate 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

Called by

proc~~make_coupler~~CalledByGraph proc~make_coupler make_coupler none~make_extension StateItemExtension%make_extension none~make_extension->proc~make_coupler none~extend StateRegistry%extend none~extend->none~make_extension none~connect_sibling SimpleConnection%connect_sibling none~connect_sibling->none~extend none~get_coordinate_field~2 ModelVerticalGrid%get_coordinate_field none~get_coordinate_field~2->none~extend none~connect SimpleConnection%connect none~connect->none~connect_sibling proc~test_get_coordinate_field_change_units_center test_get_coordinate_field_change_units_center proc~test_get_coordinate_field_change_units_center->none~get_coordinate_field~2 proc~test_get_coordinate_field_change_units_edge test_get_coordinate_field_change_units_edge proc~test_get_coordinate_field_change_units_edge->none~get_coordinate_field~2 proc~test_get_coordinate_field_simple test_get_coordinate_field_simple proc~test_get_coordinate_field_simple->none~get_coordinate_field~2

Source Code

   function make_coupler(action, source, rc) result(coupler_gridcomp)
      type(ESMF_GridComp) :: coupler_gridcomp
      class(ExtensionAction), intent(in) :: action
      type(GriddedComponentDriver), target, optional, intent(in) :: source
      integer, optional, intent(out) :: rc

      integer :: status
      type(CouplerMetaComponent), pointer :: coupler_meta

      coupler_gridcomp = ESMF_GridCompCreate(name='coupler', contextFlag=ESMF_CONTEXT_PARENT_VM, _RC)
      call attach_coupler_meta(coupler_gridcomp, _RC)
      coupler_meta => get_coupler_meta(coupler_gridcomp, _RC)
#ifndef __GFORTRAN__
      coupler_meta = CouplerMetaComponent(action, source)
#else
      call ridiculous(coupler_meta, CouplerMetaComponent(action,source))
#endif

      call ESMF_GridCompSetServices(coupler_gridComp, setServices, _RC)

      _RETURN(_SUCCESS)

   contains

#ifdef __GFORTRAN__
      subroutine ridiculous(a, b)
         type(CouplerMetaComponent), intent(out) :: a
         type(CouplerMetaComponent), intent(in) :: b
         a = b
      end subroutine ridiculous
#endif

   end function make_coupler