Converting FieldSets to xarray #1229
-
I know parcels has functions for reading xarray datasets/netcdf datasets into fieldsets, however is there functionality to export fieldsets to xarray/netcdf? At the moment I'm wanting to place particles based on some fields in the fieldset (eg. distance to coastline). I feel that exporting the fieldset would be really handy in order to inspect the fieldset using xarray without having to reconstruct it outside of parcels (re-adding the fields together etc), so that I can use it to determine my particleset. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Yes, that exists. |
Beta Was this translation helpful? Give feedback.
Yes, that exists.
FieldSet.write(filename)
andField.write(filename)
, see https://oceanparcels.org/gh-pages/html/#parcels.fieldset.FieldSet.write