Skip to content

Commit 8f73e87

Browse files
committed
Depths was missing from the create_particleset function, necessary for testing the PolyTEOS kernel (and for flexibility)
1 parent cf064b4 commit 8f73e87

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

plasticparcels/constructors.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -232,6 +232,11 @@ def create_particleset(fieldset, settings, release_locations):
232232
else:
233233
plastic_amounts = np.full_like(lons, np.nan)
234234

235+
if 'depths' in release_locations.keys():
236+
depths = release_locations['depths']
237+
else:
238+
depths = np.full_like(lons, 0.)
239+
235240
# Set particle properties
236241
plastic_densities = np.full(lons.shape, settings['plastictype']['plastic_density'])
237242
plastic_diameters = np.full(lons.shape, settings['plastictype']['plastic_diameter'])
@@ -254,6 +259,7 @@ def create_particleset(fieldset, settings, release_locations):
254259
PlasticParticle,
255260
lon=lons,
256261
lat=lats,
262+
depth=depths,
257263
plastic_diameter=plastic_diameters,
258264
plastic_density=plastic_densities,
259265
wind_coefficient=wind_coefficients,

0 commit comments

Comments
 (0)