Skip to content

Commit d17ec9c

Browse files
committed
Fixing constructor to use different dict
1 parent 5023c99 commit d17ec9c

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

plasticparcels/constructors.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -172,16 +172,16 @@ def create_copernicus_hydrodynamic_fieldset(settings):
172172
if 'bathymetry' in ocean_dict['dataset_id'].keys():
173173

174174
data_request = {
175-
'dataset_id': settings['bathymetry']['dataset_id']['bathymetry'],
175+
'dataset_id': settings['ocean']['dataset_id']['bathymetry'],
176176
'longitude': settings['simulation']['boundingbox'][:2],
177177
'latitude': settings['simulation']['boundingbox'][2:],
178178
'depth': settings['simulation']['depth_range'],
179-
'variables': [settings['bathymetry']['variables']['bathymetry']],
179+
'variables': [settings['ocean']['bathymetry_variables']['bathymetry']],
180180
'time': [settings['simulation']['startdate'],
181181
settings['simulation']['startdate'] + settings['simulation']['runtime']]
182182
}
183183
ds_bathymetry = create_copernicusmarine_dataset(data_request)
184-
fieldset_bathymetry = parcels.FieldSet.from_xarray_dataset(ds_bathymetry,settings['bathymetry']['variables'], settings['bathymetry']['dimensions'], mesh='spherical')
184+
fieldset_bathymetry = parcels.FieldSet.from_xarray_dataset(ds_bathymetry,settings['ocean']['bathymetry_variables'], settings['ocean']['bathymetry_dimensions'], mesh='spherical')
185185
fieldset.add_constant('z_start', 0.5)
186186
fieldset.add_field(fieldset_bathymetry.bathymetry) # type: ignore
187187

0 commit comments

Comments
 (0)