ESMF_StateClassValidate Subroutine

public subroutine ESMF_StateClassValidate(sc, rc)

Arguments

Type IntentOptional Attributes Name
type(ESMF_StateClass), intent(in) :: sc
integer, intent(out), optional :: rc

Source Code

  subroutine ESMF_StateClassValidate(sc, rc)
!
! !ARGUMENTS:
    type(ESMF_StateClass), intent(in)              :: sc
    integer,          intent(out),  optional  :: rc  
!         
!
! !DESCRIPTION:
!      Validates that the {\tt StateClass} is internally consistent.
!      The method returns an error code if problems are found.  
!
!     The arguments are:
!     \begin{description}
!     \item[sc] 
!          Specified {\tt ESMF\_StateClass} object.
!     \item[{[rc]}] 
!          Return code; equals {\tt ESMF\_SUCCESS} if there are no errors.
!     \end{description}
!
!EOPI
!------------------------------------------------------------------------------
    integer :: localrc                        ! local return code

    ! Assume failure until success
    if (present(rc)) rc = ESMF_RC_NOT_IMPL
    localrc = ESMF_RC_NOT_IMPL
    
    ! Check init status of arguments
    ESMF_INIT_CHECK_DEEP(ESMF_StateClassGetInit, sc, rc)
      
    ! Return success
    if (present(rc)) rc = ESMF_SUCCESS
    
  end subroutine ESMF_StateClassValidate