comp1_init Subroutine

public subroutine comp1_init(gcomp, istate, ostate, clock, rc)

Arguments

Type IntentOptional Attributes Name
type(ESMF_GridComp) :: gcomp
type(ESMF_State) :: istate
type(ESMF_State) :: ostate
type(ESMF_Clock) :: clock
integer, intent(out) :: rc

Source Code

subroutine comp1_init(gcomp, istate, ostate, clock, rc)
    type(ESMF_GridComp)  :: gcomp
    type(ESMF_State)     :: istate, ostate
    type(ESMF_Clock)     :: clock
    integer, intent(out) :: rc

    type(ESMF_Field) :: field1
    integer :: localrc

    print *, "i am comp1_init"

    field1 = ESMF_FieldEmptyCreate(name="Comp1 Field", rc=localrc)
  
    call ESMF_StateAdd(istate, (/field1/), rc=localrc)
    
    rc = localrc

end subroutine comp1_init