compass.ocean.particles.remap_particles

compass.ocean.particles.remap_particles(init_filename, particle_filename, graph_filename)[source]

Remap particles onto a new grid decomposition.

Load in particle positions, locations of grid cell centers, and decomposition corresponding to init_filename.

The goal is to update particle field currentBlock to comply with the new grid as defined by init_filename and particle_filename. NOTE: init_filename and graph_filename must be compatible!

We assume that all particles will be within the domain such that a nearest neighbor search is sufficient to make the remap.

Parameters
  • init_filename (str) – path of netCDF init/mesh file

  • graph_filename (str) – path of graph partition file of form /.info.part

  • particle_filename (str) – path of input/output netCDF particle file