test_mirror_ungridded_dims Subroutine

public subroutine test_mirror_ungridded_dims()

Arguments

None

Calls

proc~~test_mirror_ungridded_dims~~CallsGraph proc~test_mirror_ungridded_dims test_mirror_ungridded_dims assert_that assert_that proc~test_mirror_ungridded_dims->assert_that none~can_connect_to FieldSpec%can_connect_to proc~test_mirror_ungridded_dims->none~can_connect_to none~push_back~79 UngriddedDimVector%push_back proc~test_mirror_ungridded_dims->none~push_back~79 stringvector stringvector proc~test_mirror_ungridded_dims->stringvector true true proc~test_mirror_ungridded_dims->true ftn_begin ftn_begin none~can_connect_to->ftn_begin ftn_end ftn_end none~can_connect_to->ftn_end next next none~can_connect_to->next none~can_connect_to~18 StateItemAspect%can_connect_to none~can_connect_to->none~can_connect_to~18 none~get_aspect_order StateItemSpec%get_aspect_order none~can_connect_to->none~get_aspect_order none~get_aspect~2 StateItemSpec%get_aspect none~can_connect_to->none~get_aspect~2 of of none~can_connect_to->of proc~mapl_return MAPL_Return none~can_connect_to->proc~mapl_return none~capacity~469 UngriddedDimVector%capacity none~push_back~79->none~capacity~469 none~resize~158 UngriddedDimVector%resize none~push_back~79->none~resize~158 matches matches none~can_connect_to~18->matches none~is_mirror StateItemAspect%is_mirror none~can_connect_to~18->none~is_mirror none~is_time_dependent~2 StateItemAspect%is_time_dependent none~can_connect_to~18->none~is_time_dependent~2 none~supports_conversion~2 StateItemAspect%supports_conversion none~can_connect_to~18->none~supports_conversion~2 none~get_aspect_priorities~3 StateItemSpec%get_aspect_priorities none~get_aspect_order->none~get_aspect_priorities~3 push_back push_back none~get_aspect_order->push_back none~get_aspect~2->proc~mapl_return none~get_aspect AspectCollection%get_aspect none~get_aspect~2->none~get_aspect proc~mapl_verify MAPL_Verify none~get_aspect~2->proc~mapl_verify none~resize_size_kind~25 UngriddedDimVector%resize_size_kind none~resize~158->none~resize_size_kind~25 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

Source Code

   subroutine test_mirror_ungridded_dims()
      type(FieldSpec) :: import_spec
      type(FieldSpec) :: export_spec
      type(ESMF_Geom) :: geom

      type(UngriddedDims) :: export_dims
      type(UngriddedDimVector) :: ungrid_dims
      type(UngriddedDim) :: ungrid_dim

      ungrid_dim = UngriddedDim(2)
      call ungrid_dims%push_back(ungrid_dim)
      export_dims = UngriddedDims(ungrid_dims)

      ! Mirror ungrids by not specifying anything
      import_spec = FieldSpec( &
           geom=geom, vertical_grid=BasicVerticalGrid(1), vertical_dim_spec=VerticalDimSpec(), &
           typekind=ESMF_TYPEKIND_R4, &
           standard_name='A', long_name='AA', attributes=StringVector(), &
           units='m')

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

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

   end subroutine test_mirror_ungridded_dims