compass.ocean.particles.write

compass.ocean.particles.write(init_filename, graph_filename, particle_filename, types='all', n_vert_levels=10, vert_seed_type='linear', n_buoy_surf=11, pot_dens_min=1028.5, pot_dens_max=1030.0, spatial_filter=None, downsample=0, seed_center=True, seed_vertex=False, add_noise=False, cfl_min=0.005)[source]

Write an initial condition for particles partitioned across cores

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 output netCDF particle file

  • types ({"buoyancy", "passive", "surface", "all"}, optional) – types of particles”,

  • n_vert_levels (int, optional) – number of vertical levels for passive, 3D floats

  • vert_seed_type ({"linear", "denseCenter", "log"}, optional) – method for seeding in the vertical

  • n_buoy_surf (int, optional) – number of buoyancy surfaces for isopycnally-constrained particles

  • pot_dens_min (float, optional) – minimum value of potential density surface for isopycnally-constrained particles

  • pot_dens_max (float, optional) – maximum value of potential density surface for isopycnally-constrained particles

  • spatial_filter ({"SouthernOceanPlanar", "SouthernOceanXYZ"}, optional) – apply a certain type of spatial filter

  • downsample (int, optional) – downsample particle positions using AMG a number of times

  • seed_center (bool, optional) – seed particles on cell centers

  • seed_vertex (bool, optional) – seed three particles by a fixed epsilon off each cell vertex

  • add_noise (bool, optional) – add gaussian noise to generate three particles around the cell center

  • cfl_min (float, optional) – minimum assumed CFL, which is used in perturbing particles if seed_vertex=True or add_noise=True