OpenDrift / opendrift

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

Concentration per litre #1000

Closed CaroMedel closed 1 year ago

CaroMedel commented 2 years ago

Hi

I want to validate field data versus modelling outputs. I need to express the particles from Opendrift in particles number per litre to compare both results. I am using ROMS outputs with a spatial resolution of 3km.

How can I do that? Thanks

knutfrode commented 2 years ago

Hi,

There is presently no method in OpenDrift to calculate volume concentrations, only 2D/horizontal concentrations: https://github.com/OpenDrift/opendrift/blob/master/opendrift/models/basemodel.py#L4810

We might add such a method in the future, but in the meantime it should be possible to do with e.g. Xarray by importing the netCDF file output from your simulation, and counting the number of particles in your defined bins.