code: def replace_coord(arr, old_dim, new_dim, new_coord):
      
      new_arr = arr.rename({old_dim: new_dim})
      new_arr[new_dim] = new_coord
      return new_arr
docs: Replace a coordinate with new one; new and old must have same shape.