test_make_lon_axis_from_hconfig Subroutine

public subroutine test_make_lon_axis_from_hconfig()

Arguments

None

Calls

proc~~test_make_lon_axis_from_hconfig~~CallsGraph proc~test_make_lon_axis_from_hconfig test_make_lon_axis_from_hconfig ESMF_HConfigCreate ESMF_HConfigCreate proc~test_make_lon_axis_from_hconfig->ESMF_HConfigCreate ESMF_HConfigDestroy ESMF_HConfigDestroy proc~test_make_lon_axis_from_hconfig->ESMF_HConfigDestroy assert_that assert_that proc~test_make_lon_axis_from_hconfig->assert_that equal_to equal_to proc~test_make_lon_axis_from_hconfig->equal_to interface~make_lonaxis make_LonAxis proc~test_make_lon_axis_from_hconfig->interface~make_lonaxis none~get_centers CoordinateAxis%get_centers proc~test_make_lon_axis_from_hconfig->none~get_centers

Source Code

   subroutine test_make_lon_axis_from_hconfig()

      type(ESMF_HConfig) :: hconfig
      type(LonAxis) :: axis
      integer :: status
      real(kind=R8), allocatable :: expected_centers(:)

      hconfig = ESMF_HConfigCreate( &
           content="{im_world: 4, jm_world: 5, nx: 1, ny: 1, dateline: DC}", &
           rc=status)
      @assert_that(status, is(0))

      axis = make_LonAxis(hconfig, rc=status)
      @assert_that(status, is(0))

      expected_centers = [-180, -90, 0, 90] 
      @assert_that(axis%get_centers(), is(equal_to(expected_centers)))
      
      call ESMF_HConfigDestroy(hconfig)
   end subroutine test_make_lon_axis_from_hconfig