f_esmf_gridcompcreate Subroutine

subroutine f_esmf_gridcompcreate(gcomp, name, configFile, clock, rc)

Arguments

Type IntentOptional Attributes Name
type(ESMF_GridComp) :: gcomp
character(len=*) :: name
character(len=*) :: configFile
type(ESMF_Clock) :: clock
integer :: rc

Source Code

subroutine f_esmf_gridcompcreate(gcomp, name, configFile, clock, rc)
  use ESMF_UtilTypesMod      ! ESMF utility types
  use ESMF_BaseMod           ! ESMF base class
  use ESMF_ConfigMod
  use ESMF_ClockMod
  use ESMF_ClockTypeMod
  use ESMF_GridMod
  use ESMF_CompMod
  use ESMF_GridCompMod
  use ESMF_InitMacrosMod
  
  implicit none

  type(ESMF_GridComp)       :: gcomp
  character(len=*)          :: name
  character(len=*)          :: configFile
  type(ESMF_Clock)          :: clock
  integer                   :: rc

  type(ESMF_Clock)   :: local_clock
  type(ESMF_Pointer) :: this

  ! Initialize return code; assume routine not implemented
  rc = ESMF_RC_NOT_IMPL

  ! Construct a local copy of the incoming clock with initializers
  call ESMF_ClockGetThis(clock, this, rc=rc)
  call ESMF_ClockSetThis(local_clock, this, rc=rc)
  call ESMF_ClockSetInitCreated(local_clock)

  gcomp = ESMF_GridCompCreate(name=name, &
    configFile=configFile, clock=local_clock, rc=rc)
end subroutine f_esmf_gridcompcreate