ESMF_HConfigCreateR4Seq Function

private function ESMF_HConfigCreateR4Seq(content, keywordEnforcer, rc)

Arguments

Type IntentOptional Attributes Name
real(kind=ESMF_KIND_R4), intent(in) :: content(:)
type(ESMF_KeywordEnforcer), optional :: keywordEnforcer
integer, intent(out), optional :: rc

Return Value type(ESMF_HConfig)


Source Code

  function ESMF_HConfigCreateR4Seq(content, keywordEnforcer, rc)

    type(ESMF_HConfig) :: ESMF_HConfigCreateR4Seq

    real(ESMF_KIND_R4),     intent(in)            :: content(:)
type(ESMF_KeywordEnforcer), optional:: keywordEnforcer ! must use keywords below
    integer,                intent(out), optional :: rc

    integer               :: localrc        ! local return code
    integer               :: count

    ! initialize return code; assume routine not implemented
    localrc = ESMF_RC_NOT_IMPL
    if (present(rc)) rc = ESMF_RC_NOT_IMPL

    ! invalidate return value
    ESMF_HConfigCreateR4Seq%shallowMemory = 0

    count = size(content)
    if (count>0) then
      ! call into the C++ interface, which will sort out optional arguments
      call c_ESMC_HConfigCreateR4Seq(ESMF_HConfigCreateR4Seq, content(1), &
        count, localrc)
      if (ESMF_LogFoundError(localrc, ESMF_ERR_PASSTHRU, &
        ESMF_CONTEXT, rcToReturn=rc)) return
      ! Set init code
      ESMF_INIT_SET_CREATED(ESMF_HConfigCreateR4Seq)
    else
      ! empty hconfig
      ESMF_HConfigCreateR4Seq = ESMF_HConfigCreate(rc=localrc)
      if (ESMF_LogFoundError(localrc, ESMF_ERR_PASSTHRU, &
        ESMF_CONTEXT, rcToReturn=rc)) return
    endif

    ! return successfully
    if (present(rc)) rc = ESMF_SUCCESS

  end function ESMF_HConfigCreateR4Seq