@@ -26,12 +26,9 @@ def make_standard_plastictype_settings():
2626
2727def make_standard_particleset (fieldset , settings ):
2828 # Generate a particleset that has particles in the test domain
29- settings ['release' ] = {'initialisation_type' : 'fisheries' , 'country' : 'Malta' }
30- pset = pp .constructors .create_particleset_from_map (fieldset , settings )
31-
32- # Only keep particles in the test domain
33- keep_particles = (pset .lon > 17 ) & (pset .lon < 20 ) & (pset .lat < 36 ) & (pset .lat > 34 )
34- pset .remove_booleanvector (~ keep_particles )
29+ release_locations = {'lons' : [18 , 18.25 , 18.5 ], 'lats' : [35 , 35 , 35 ],
30+ 'plastic_amount' : [1 , 1 , 1 ]}
31+ pset = pp .constructors .create_particleset (fieldset , settings , release_locations )
3532
3633 return pset
3734
@@ -40,7 +37,6 @@ def make_standard_particleset(fieldset, settings):
4037def test_advection_only (use_3D ):
4138 settings_file = 'tests/test_data/test_settings.json'
4239 settings = pp .utils .load_settings (settings_file )
43- settings = pp .utils .download_plasticparcels_dataset ('NEMO0083' , settings , 'input_data' )
4440
4541 settings ['simulation' ] = make_standard_simulation_settings ()
4642 settings ['plastictype' ] = make_standard_plastictype_settings ()
@@ -75,7 +71,6 @@ def test_advection_only(use_3D):
7571def test_settling_velocity ():
7672 settings_file = 'tests/test_data/test_settings.json'
7773 settings = pp .utils .load_settings (settings_file )
78- settings = pp .utils .download_plasticparcels_dataset ('NEMO0083' , settings , 'input_data' )
7974
8075 settings ['simulation' ] = make_standard_simulation_settings ()
8176 settings ['plastictype' ] = make_standard_plastictype_settings ()
@@ -108,7 +103,6 @@ def test_settling_velocity():
108103def test_biofouling ():
109104 settings_file = 'tests/test_data/test_settings.json'
110105 settings = pp .utils .load_settings (settings_file )
111- settings = pp .utils .download_plasticparcels_dataset ('NEMO0083' , settings , 'input_data' )
112106
113107 settings ['simulation' ] = make_standard_simulation_settings ()
114108 settings ['plastictype' ] = make_standard_plastictype_settings ()
@@ -141,6 +135,8 @@ def test_biofouling():
141135def test_Stokes ():
142136 settings_file = 'tests/test_data/test_settings.json'
143137 settings = pp .utils .load_settings (settings_file )
138+
139+ # Required for the unbeaching kernel
144140 settings = pp .utils .download_plasticparcels_dataset ('NEMO0083' , settings , 'input_data' )
145141
146142 settings ['simulation' ] = make_standard_simulation_settings ()
@@ -157,7 +153,7 @@ def test_Stokes():
157153
158154 fieldset = pp .constructors .create_fieldset (settings )
159155
160- kernels = [pp .kernels .StokesDrift , pp .kernels .deleteParticle ]
156+ kernels = [pp .kernels .StokesDrift , pp .kernels .unbeaching , pp . kernels . periodicBC , pp . kernels . deleteParticle ]
161157
162158 pset = make_standard_particleset (fieldset , settings )
163159
@@ -173,6 +169,8 @@ def test_Stokes():
173169def test_wind ():
174170 settings_file = 'tests/test_data/test_settings.json'
175171 settings = pp .utils .load_settings (settings_file )
172+
173+ # Required for the unbeaching kernel
176174 settings = pp .utils .download_plasticparcels_dataset ('NEMO0083' , settings , 'input_data' )
177175
178176 settings ['simulation' ] = make_standard_simulation_settings ()
@@ -205,7 +203,6 @@ def test_wind():
205203def test_mixing ():
206204 settings_file = 'tests/test_data/test_settings.json'
207205 settings = pp .utils .load_settings (settings_file )
208- settings = pp .utils .download_plasticparcels_dataset ('NEMO0083' , settings , 'input_data' )
209206
210207 settings ['simulation' ] = make_standard_simulation_settings ()
211208 settings ['plastictype' ] = make_standard_plastictype_settings ()
0 commit comments