CliMA / Oceananigans.jl

🌊 Julia software for fast, friendly, flexible, ocean-flavored fluid dynamics on CPUs and GPUs
https://clima.github.io/OceananigansDocumentation/stable
MIT License
958 stars 191 forks source link

Is it possible to add additional (passive) tracers? #369

Closed astrotuna201 closed 4 years ago

astrotuna201 commented 5 years ago

Dear Oceananigans team,

this looks like a really exciting and useful project. As an external user, how flexible is this package to add, e.g. , additional (passive) tracers to a model? I see that there is a generalised array of tracers, but temperature and salinity are hardcoded into the model initialiser. Would it be possible to add more tracers? I am asking because eventually it would be super cool to use a tool like this as the ocean circulation component in other Earth System Models. I am currently using cGenie which internally uses this ocean model : https://www.geosci-model-dev.net/4/957/2011/ ... What is the general scope to do something like this? Sorry for asking user-level questions in the Issues, but I think you are still working on some more detailed documentation ...

Many thanks! Heiko

glwagner commented 5 years ago

@astrotuna201, at the moment it is not possible to add passive tracers, but this functionality is definitely on our mind! We are currently focusing on verifying the LES model against results in the literature and from direct numerical simulation. But arbitrary systems of passive tracers is a feature we would like to add once this verification phase is complete.

As for the second part of your question: we have focused thus far on developing the model for large eddy simulation using GPUs. However, ambition does exist to develop Oceananigans into a full-fledged ocean model.

You may also be interested in the ocean model whose development is planned for the Clima project. This model will also be written in julia and will use a discontinuous Galerkin spatial discretization scheme (as opposed to the finite volume method used by Oceananigans).

glwagner commented 5 years ago

@astrotuna201 also for reference, it should be noted that salinity can be hacked to become a passive tracer by passingeos=LinearEquationOfState(βS=0.0) to the model constructor (and similarly for temperature with βT=0.0.)

ali-ramadhan commented 5 years ago

Hi @astrotuna201! We totally encourage everyone to ask questions in the issues so you're in the right place!

Adding passive tracers has been something we've been thinking about for a long time (it's one of our oldest issues: #25) but haven't gotten around to it yet.

Like @glwagner says, you could hack salinity to behave like a passive tracers (or hack both T and S to behave as passive tracers).

It probably can't do full general circulation yet as it just runs on a Cartesian grid right now, and running it on the sphere would take lots of effort to do correctly so it's not a short-term goal :(