test_FieldAddR4_missing Subroutine

public subroutine test_FieldAddR4_missing(this)

Arguments

Type IntentOptional Attributes Name
class(MpiTestMethod), intent(inout) :: this

Calls

proc~~test_fieldaddr4_missing~~CallsGraph proc~test_fieldaddr4_missing test_FieldAddR4_missing assertequal assertequal proc~test_fieldaddr4_missing->assertequal esmf_fieldget esmf_fieldget proc~test_fieldaddr4_missing->esmf_fieldget proc~fieldadd fieldAdd proc~test_fieldaddr4_missing->proc~fieldadd proc~mapl_verify MAPL_Verify proc~test_fieldaddr4_missing->proc~mapl_verify proc~fieldadd->esmf_fieldget proc~fieldadd->proc~mapl_verify interface~assign_fptr assign_fptr proc~fieldadd->interface~assign_fptr interface~fieldsareconformable FieldsAreConformable proc~fieldadd->interface~fieldsareconformable interface~getfieldsundef GetFieldsUndef proc~fieldadd->interface~getfieldsundef interface~mapl_assert MAPL_Assert proc~fieldadd->interface~mapl_assert proc~fieldshaveundef FieldsHaveUndef proc~fieldadd->proc~fieldshaveundef proc~mapl_return MAPL_Return proc~fieldadd->proc~mapl_return proc~mapl_throw_exception MAPL_throw_exception proc~mapl_verify->proc~mapl_throw_exception proc~fieldshaveundef->proc~mapl_verify proc~fieldshaveundef->proc~mapl_return ESMF_AttributeGet 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(this)
      class(MpiTestMethod), intent(inout) :: this
      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