f_esmf_fieldgetarray Subroutine

subroutine f_esmf_fieldgetarray(field, array, rc)

Uses

  • proc~~f_esmf_fieldgetarray~~UsesGraph proc~f_esmf_fieldgetarray f_esmf_fieldgetarray ESMF_FieldGetMod ESMF_FieldGetMod proc~f_esmf_fieldgetarray->ESMF_FieldGetMod module~esmf_arraymod ESMF_ArrayMod proc~f_esmf_fieldgetarray->module~esmf_arraymod module~esmf_arrayspecmod ESMF_ArraySpecMod proc~f_esmf_fieldgetarray->module~esmf_arrayspecmod module~esmf_basemod ESMF_BaseMod proc~f_esmf_fieldgetarray->module~esmf_basemod module~esmf_fieldmod ESMF_FieldMod proc~f_esmf_fieldgetarray->module~esmf_fieldmod module~esmf_logerrmod ESMF_LogErrMod proc~f_esmf_fieldgetarray->module~esmf_logerrmod module~esmf_utiltypesmod ESMF_UtilTypesMod proc~f_esmf_fieldgetarray->module~esmf_utiltypesmod

Arguments

Type IntentOptional Attributes Name
type(ESMF_Field), intent(inout) :: field
type(ESMF_Array) :: array
integer, intent(out) :: rc

Calls

proc~~f_esmf_fieldgetarray~~CallsGraph proc~f_esmf_fieldgetarray f_esmf_fieldgetarray esmf_arraycopythis esmf_arraycopythis proc~f_esmf_fieldgetarray->esmf_arraycopythis esmf_fieldget esmf_fieldget proc~f_esmf_fieldgetarray->esmf_fieldget proc~esmf_logfounderror ESMF_LogFoundError proc~f_esmf_fieldgetarray->proc~esmf_logfounderror esmf_breakpoint esmf_breakpoint proc~esmf_logfounderror->esmf_breakpoint proc~esmf_logrc2msg ESMF_LogRc2Msg proc~esmf_logfounderror->proc~esmf_logrc2msg proc~esmf_logwrite ESMF_LogWrite proc~esmf_logfounderror->proc~esmf_logwrite c_esmc_loggeterrormsg c_esmc_loggeterrormsg proc~esmf_logrc2msg->c_esmc_loggeterrormsg c_esmc_vmwtime c_esmc_vmwtime proc~esmf_logwrite->c_esmc_vmwtime proc~esmf_logclose ESMF_LogClose proc~esmf_logwrite->proc~esmf_logclose proc~esmf_logflush ESMF_LogFlush proc~esmf_logwrite->proc~esmf_logflush proc~esmf_logopenfile ESMF_LogOpenFile proc~esmf_logwrite->proc~esmf_logopenfile proc~esmf_utiliounitflush ESMF_UtilIOUnitFlush proc~esmf_logwrite->proc~esmf_utiliounitflush proc~esmf_utilstring2array ESMF_UtilString2Array proc~esmf_logwrite->proc~esmf_utilstring2array proc~esmf_logclose->proc~esmf_logflush proc~esmf_logflush->proc~esmf_utiliounitflush proc~esmf_utilarray2string ESMF_UtilArray2String proc~esmf_logflush->proc~esmf_utilarray2string proc~esmf_logopenfile->proc~esmf_utiliounitflush proc~esmf_utiliounitget ESMF_UtilIOUnitGet proc~esmf_logopenfile->proc~esmf_utiliounitget

Source Code

  subroutine f_esmf_fieldgetarray(field, array, rc)

    use ESMF_UtilTypesMod
    use ESMF_BaseMod
    use ESMF_LogErrMod
    use ESMF_ArraySpecMod
    use ESMF_ArrayMod
    use ESMF_FieldMod
    use ESMF_FieldGetMod

    implicit none

    ! arguments
    type(ESMF_Field),intent(inout) :: field
    type(ESMF_Array)               :: array
    integer, intent(out)           :: rc              

    ! local
    type(ESMF_Array)               :: l_array

    rc = ESMF_RC_NOT_IMPL

    call ESMF_FieldGet(field, array=l_array, rc=rc)
    if (ESMF_LogFoundError(rc, ESMF_ERR_PASSTHRU, &
      ESMF_CONTEXT, rcToReturn=rc)) return

    ! because ESMF_Array.this is private, it cannot be accessed directly
    ! we use the public interface to do the ptr copy;
    ! the array object returned to the C interface must consist only of
    ! the 'this' pointer. It must not contain the isInit member.
    call ESMF_ArrayCopyThis(l_array, array, rc)
    if (ESMF_LogFoundError(rc, ESMF_ERR_PASSTHRU, &
      ESMF_CONTEXT, rcToReturn=rc)) return

    rc = ESMF_SUCCESS
  
  end subroutine f_esmf_fieldgetarray