50 type(model_state_type),
target :: current_state
51 type(grid_stencil_type) :: star_stencil
52 type(prognostic_field_ptr_type),
dimension(3) :: fields
53 integer,
dimension(3, 2) :: sizes
54 type(prognostic_field_type),
dimension(:),
allocatable :: interpolated_fields
55 integer :: i,num_fields,max_y_point
56 logical,
dimension(3) :: interpolate_in_dimension
61 current_state%global_grid%size(
z_index) = 2
63 current_state%local_grid%size(
z_index)= 0
64 current_state%local_grid%size(
y_index) = 3
65 current_state%local_grid%halo_size(
y_index) = 4
67 fields(num_fields)%ptr => current_state%u
68 sizes(num_fields,:) = (/ 2, 2 /)
70 allocate(interpolated_fields(0:num_fields))
71 allocate(interpolated_fields(num_fields)%data(current_state%global_grid%size(
z_index),&
73 max_y_point = (current_state%local_grid%size(
y_index)+ &
74 current_state%local_grid%halo_size(
y_index) *2)-1
76 interpolated_fields(num_fields)%active=.true.
77 star_stencil = create_stencil(current_state%local_grid, fields, num_fields, 3, &
78 sizes,.true., .false.)
79 e_value = 10_default_precision
80 star_stencil%interpolated_fields(1,1)%data(1,1,1) = e_value
82 call calculate_interpolated_cell_value(current_state%local_grid, 1, 1, (/.true.,.true.,.true./),&
83 star_stencil%fields(1), star_stencil%interpolated_fields(1,1)%data(:,1,1))
85 r_value = star_stencil%interpolated_fields(1,1)%data(1,1,1)
87 call assert_equals(e_value, r_value,
"Test")