anchor.diff:         dimension (output_item_count) :: &
          output_items = (/'plate_surface__temperature'/)
   
  -  private allocate_flattened_array, convert_indices
  -
   contains
   
     ! Perform startup tasks for the model.
  
positive.code:     end select
    end function set_value_at_indices
  
    ! A helper routine to allocate a flattened array.
    subroutine allocate_flattened_array(array, n)
      real, pointer, intent (inout) :: array(:)
      integer, intent (in) :: n
  
      if (.not.associated(array)) then
         allocate(array(n))
      end if
    end subroutine allocate_flattened_array
  
    ! A helper for converting flattened to dimensional indices.
    subroutine convert_indices(k, indices, i, j, ny)
      integer :: i, j, k, indices(:), ny
  
negative.code:     select case (var_name)
      case ('plate_surface__temperature')
         n_elements = self%n_y * self%n_x
         allocate(dest(n_elements))
         dest = reshape(self%temperature, (/n_elements/))
         status = BMI_SUCCESS
      case default
         n_elements = 1
         allocate(dest(n_elements))
         dest = -1.0
         status = BMI_FAILURE
      end select
  