OpenDrift / opendrift

Open source framework for ocean trajectory modelling
https://opendrift.github.io
GNU General Public License v2.0
232 stars 113 forks source link

Allow for saving of interpolators #1228

Closed kthyng closed 4 months ago

kthyng commented 4 months ago

I made changes to structured.py to allow for saving the interpolators to save time on repeated simulations. The necessary attributes to use the save option need to be input via the reader, currently only available in the ROMS reader.

This PR also has changes that clean up the name variable in the ROMS reader. Previously there was logic to deal with name for several cases but subsequently it was overwritten to be “roms native”. Now name is used if input and otherwise set to “roms native”.

The change to allow for saving interpolators was mentioned in https://github.com/OpenDrift/opendrift/issues/1130.

kthyng commented 4 months ago

Sorry I didn't notice there were updates I hadn't incorporated into my branch.

knutfrode commented 4 months ago

Thank you, this is a useful feature.