test_FieldAddR4_missing Subroutine

public subroutine test_FieldAddR4_missing()

Arguments

None

Calls

proc~~test_fieldaddr4_missing~~CallsGraph proc~test_fieldaddr4_missing Test_FieldArithmetic::test_FieldAddR4_missing assertequal assertequal proc~test_fieldaddr4_missing->assertequal esmf_fieldget esmf_fieldget proc~test_fieldaddr4_missing->esmf_fieldget proc~fieldadd MAPL_FieldBinaryOperations::fieldAdd proc~test_fieldaddr4_missing->proc~fieldadd proc~mapl_verify MAPL_ErrorHandlingMod::MAPL_Verify proc~test_fieldaddr4_missing->proc~mapl_verify proc~fieldadd->esmf_fieldget proc~fieldadd->proc~mapl_verify interface~assign_fptr MAPL_FieldPointerUtilities::assign_fptr proc~fieldadd->interface~assign_fptr interface~fieldsareconformable MAPL_FieldPointerUtilities::FieldsAreConformable proc~fieldadd->interface~fieldsareconformable interface~getfieldsundef MAPL_FieldPointerUtilities::GetFieldsUndef proc~fieldadd->interface~getfieldsundef interface~mapl_assert MAPL_ErrorHandlingMod::MAPL_Assert proc~fieldadd->interface~mapl_assert proc~fieldshaveundef MAPL_FieldPointerUtilities::FieldsHaveUndef proc~fieldadd->proc~fieldshaveundef proc~mapl_return MAPL_ErrorHandlingMod::MAPL_Return proc~fieldadd->proc~mapl_return proc~mapl_throw_exception MAPL_ThrowMod::MAPL_throw_exception proc~mapl_verify->proc~mapl_throw_exception proc~fieldshaveundef->proc~mapl_verify proc~fieldshaveundef->proc~mapl_return ESMF_AttributeGet ESMF::ESMF_AttributeGet proc~fieldshaveundef->ESMF_AttributeGet proc~mapl_return->proc~mapl_throw_exception at at proc~mapl_return->at insert insert proc~mapl_return->insert

Source Code

   subroutine test_FieldAddR4_missing
      type(ESMF_Field) :: x
      type(ESMF_Field) :: y
      real(kind=ESMF_KIND_R4), pointer :: x_ptr(:,:), y_ptr(:,:)
      real(kind=ESMF_KIND_R4), allocatable :: result_array(:,:)
      integer :: status, rc

      x = XR4
      y = YR4
      call ESMF_FieldGet(x , farrayPtr = x_ptr, _RC)
      call ESMF_FieldGet(y , farrayPtr = y_ptr, _RC)

      x_ptr = reshape(source=[2.0,2.0,2.0,undef],shape=[2,2])
      y_ptr = reshape(source=[undef,3.0,3.0,undef],shape=[2,2])
      result_array = x_ptr
      result_array = reshape(source=[undef,5.0,5.0,undef],shape=[2,2])
      call FieldAdd(y, x, y, _RC)
      @assertEqual(y_ptr, result_array)
   end subroutine test_FieldAddR4_missing