... | ... | @@ -26,19 +26,42 @@ mesh = pre_data_dir+"mesh.msh" |
|
|
path_bathy = pre_data_dir_base+"bathymetry_smooth/bathymetry_smooth.idx"
|
|
|
```
|
|
|
|
|
|
Create the reef map with the following arguments
|
|
|
- .msh file with the mesh
|
|
|
- .msh file whose field value is 1 at reefs and 0 elsewhere
|
|
|
- Mesh projection
|
|
|
- Data projection
|
|
|
- Output name of the reefs coordinate
|
|
|
- Output name of the .msh reef map file
|
|
|
|
|
|
```python
|
|
|
reef_map = "reef_map.msh"
|
|
|
slimPost.create_reef_map(mesh, reef_mesh, '+proj=utm +ellps=WGS84 +zone=17 +north', '+proj=latlong +ellps=WGS84', 'output/particles/coord.dat', reef_map)
|
|
|
```
|
|
|
|
|
|
Create a diffusivity map based on the Okubo parametrisation with the following arguments
|
|
|
- .msh file with the mesh
|
|
|
- Output name of the .msh diffusivity map file
|
|
|
- Coefficient for Okubo scheme (default: 2e^-4 m^0.85 /s)
|
|
|
|
|
|
```python
|
|
|
slimPost.create_okubo_map(mesh, 'okubo_map', 2e-4)
|
|
|
```
|
|
|
|
|
|
Create a ```Particle_tracker``` object with the following arguments
|
|
|
- Path to the mesh (here ```mesh```)
|
|
|
- Path to the hydrodynamic run output files (here: ```output```)
|
|
|
- Path to the hydrodynamic run output files (here: ```"output"```)
|
|
|
- Path to the bathymetry map (here ```path_bathy```)
|
|
|
- The index of the first iteration (here ```50```)
|
|
|
- The number of iterations (here ```118```)
|
|
|
- The number of period (if the hydrodynamic is periodic, here ```1```)
|
|
|
- Time step between each iteration of the particle tracker (here ```1800```)
|
|
|
- Time step between each iteration of the hydrodynamic model (here ```3600``` because we exported the results 1 times out of 4 time steps during the hydrodynamic run)
|
|
|
- Diffusivity map
|
|
|
- Path for the output files
|
|
|
|
|
|
```python
|
|
|
tracker = slimPost.Particle_tracker(mesh, "output", path_bathy, 50, 118 ,1, 1800, 3600, path_output = "output/particles")
|
|
|
tracker = slimPost.Particle_tracker(mesh, "output", path_bathy, 50, 118 ,1, 1800, 3600, diffusivity = 'okubo_map.msh', path_output = "output/particles/")
|
|
|
```
|
|
|
|
|
|
Set the open boundaries
|
... | ... | @@ -47,16 +70,8 @@ Set the open boundaries |
|
|
tracker.set_open_boundary_condition(["mexico","atlantic_east","atlantic_north"])
|
|
|
```
|
|
|
|
|
|
Create the reef map with the following arguments
|
|
|
- Mesh file whose field value is 1 at reefs and 0 elsewhere
|
|
|
- mesh and data projection
|
|
|
|
|
|
```python
|
|
|
tracker.create_reef_map(self,reef_mesh, '+proj=utm +ellps=WGS84 +zone=17 +north', '+proj=latlong +ellps=WGS84', 'output/particles/coord.dat', 'output/particles/')
|
|
|
```
|
|
|
|
|
|
Add particles with a map
|
|
|
- The reef map created with tracker.create_reef_map
|
|
|
- The reef map created with create_reef_map
|
|
|
- The number of particles seeded per km^2
|
|
|
- The minimum number of particle per reef
|
|
|
- Index of the time step at which the particle is seeded
|
... | ... | |