comp2_init Subroutine

public subroutine comp2_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 comp2_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) :: field2
    integer :: localrc

    print *, "i am comp2_init"

    field2 = ESMF_FieldEmptyCreate(name="Comp2 Field", rc=localrc)
    
    call ESMF_StateAdd(istate, (/field2/), rc=localrc)

    rc = localrc

end subroutine comp2_init