test_matched_attribute Subroutine

public subroutine test_matched_attribute()

Arguments

None

Calls

proc~~test_matched_attribute~~CallsGraph proc~test_matched_attribute test_matched_attribute assert_that assert_that proc~test_matched_attribute->assert_that none~can_connect_to~14 FieldSpec%can_connect_to proc~test_matched_attribute->none~can_connect_to~14 push_back push_back proc~test_matched_attribute->push_back true true proc~test_matched_attribute->true interface~are_convertible are_convertible none~can_connect_to~14->interface~are_convertible of of none~can_connect_to~14->of proc~mapl_return MAPL_Return none~can_connect_to~14->proc~mapl_return proc~mapl_verify MAPL_Verify none~can_connect_to~14->proc~mapl_verify at at proc~mapl_return->at insert insert proc~mapl_return->insert proc~mapl_throw_exception MAPL_throw_exception proc~mapl_return->proc~mapl_throw_exception proc~mapl_verify->proc~mapl_throw_exception

Source Code

   subroutine test_matched_attribute()
      type(FieldSpec) :: import_spec
      type(FieldSpec) :: export_spec
      type(StringVector) :: import_attributes, export_attributes

      call import_attributes%push_back('radius')
      call export_attributes%push_back('radius')
      call export_attributes%push_back('other')

      import_spec = FieldSpec( &
           geom=geom, vertical_grid=BasicVerticalGrid(1), vertical_dim_spec=VerticalDimSpec(), &
           typekind=ESMF_TYPEKIND_R4, &
           ungridded_dims = UngriddedDims(), &
           standard_name='A', long_name='AA', units='m', &
           attributes=import_attributes)
      export_spec = FieldSpec( &
           geom=geom, vertical_grid=BasicVerticalGrid(1), vertical_dim_spec=VerticalDimSpec(), &
           typekind=ESMF_TYPEKIND_R4, &
           ungridded_dims = UngriddedDims(), &
           standard_name='A', long_name='AA', units='m', &
           attributes=export_attributes)

      @assert_that(import_spec%can_connect_to(export_spec), is(true()))

   end subroutine test_matched_attribute