File tree Expand file tree Collapse file tree
src/virtualship/instruments Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -120,7 +120,7 @@ def simulate(
120120
121121 def execute (self , measurements : list , out_path : str | Path ) -> None :
122122 """Run instrument simulation."""
123- TMP = False # TODO: just for dev; remove before merging
123+ TMP = True # TODO: just for dev; remove before merging
124124 instrument_name = self .__class__ .__name__ .split ("Instrument" )[0 ]
125125
126126 if not self .verbose_progress :
@@ -220,6 +220,10 @@ def _generate_fieldset(self) -> parcels.FieldSet:
220220 # TODO: I think this is potentially slowing down simulations slightly... compared to v0.3 anyway for *drifters*
221221 ds .load () # TODO: tmp step during v4 alpha stage... probably to be updated on the Parcels end
222222
223+ # negate depth and reindex (to suit Parcels XGrid strictly increasing depth convention)
224+ ds ["depth" ] = - ds ["depth" ]
225+ ds = ds .reindex (depth = ds ["depth" ][::- 1 ]) #
226+
223227 fields = {key : ds [field_var_name ]}
224228 ds_fset = parcels .convert .copernicusmarine_to_sgrid (fields = fields )
225229 fs = parcels .FieldSet .from_sgrid_conventions (ds_fset )
You can’t perform that action at this time.
0 commit comments