create_uniform_coord Function

private function create_uniform_coord(k, finish, start, ncells)

Arguments

Type IntentOptional Attributes Name
integer :: k
real(kind=ESMF_KIND_R8) :: finish
real(kind=ESMF_KIND_R8) :: start
integer :: ncells

Return Value real(kind=esmf_kind_r8)


Called by

proc~~create_uniform_coord~~CalledByGraph proc~create_uniform_coord create_uniform_coord proc~create_coord create_coord proc~create_coord->proc~create_uniform_coord proc~create_grid_from_distgrid create_grid_from_distgrid proc~create_grid_from_distgrid->proc~create_coord proc~field_redist_test field_redist_test proc~field_redist_test->proc~create_grid_from_distgrid proc~field_regrid_test field_regrid_test proc~field_regrid_test->proc~create_grid_from_distgrid proc~runtests RunTests proc~runtests->proc~field_redist_test proc~runtests->proc~field_regrid_test

Source Code

  real(ESMF_KIND_R8) function create_uniform_coord(k, finish, start, ncells)
  !-----------------------------------------------------------------------------
  ! define the coordinate for a uniform grid in terms of the global index k,
  ! the top and bottom of the range (finish and start), and the total number
  ! of cells.
  ! create_uniform_coord(1) = start
  ! create_uniform_coord(ncells) = finish
  !-----------------------------------------------------------------------------
  integer :: k, ncells
  real(ESMF_KIND_R8) :: finish, start
  !-----------------------------------------------------------------------------
  create_uniform_coord =  (k-1)*(finish-start)/(ncells-1) +start

  !-----------------------------------------------------------------------------
  end function create_uniform_coord