MAPL_pybridge_gcinit Subroutine

public subroutine MAPL_pybridge_gcinit(pypkg_name, mapl, import, export)

Arguments

Type IntentOptional Attributes Name
character(len=*), intent(in) :: pypkg_name
type(MAPL_MetaComp), intent(inout), target :: mapl
type(ESMF_State), intent(inout), target :: import
type(ESMF_State), intent(inout), target :: export

Source Code

   subroutine MAPL_pybridge_gcinit(pypkg_name, mapl, import, export)
      ! -----------------------------
      ! Call the python integration by marhshalling Fortran object/memory
      ! into C compatible memory
      ! Will trigger the `GEOSInterfaceCode.init` python function on the user code
      ! -----------------------------
      character(len=*), intent(in) :: pypkg_name
      type(MAPL_MetaComp), intent(inout), target :: mapl ! MAPL state
      type(ESMF_State), intent(inout), target :: import ! Import state
      type(ESMF_State), intent(inout), target :: export ! Export state

#ifdef PYTHONBRIDGE_INTEGRATION
      pygeosbridge_name_buffer = pypkg_name // C_NULL_CHAR
      call mapl_fortran_python_bridge_user_init( &
           c_loc(pygeosbridge_name_buffer), &
           c_loc(mapl), c_loc(import), c_loc(export))
#endif
   end subroutine MAPL_pybridge_gcinit