gotm-model / code

Source code for the General Ocean Turbulence Model
https://gotm.net
GNU General Public License v2.0
53 stars 44 forks source link

Non-local mixing #32

Closed qingli411 closed 1 month ago

qingli411 commented 2 years ago

https://github.com/gotm-model/code/blob/f8d8f4f19f44c71f3367979ea11a4de9405acd78/include/cppdefs.h#L72

Hi, @bolding and @jornbr, since running GOTM with CVMix in the single column mode uses the non-local mixing, would it make sense to turn this on by default? I think gamh etc should be zero if CVMix is not used, right? Or is there a way to automatically turn this on when GOTM is built with CVMix?

bolding commented 2 years ago

Hi @qingli411

We are in the process of preparing for the release of the next version of GOTM - v7. One thing to do is clean up the old KPP implementation (remove) and in that respect we must carefully check that the CVMix version is still fully functioning. I think there is something wrong as it is now - for the old implementation - as I can see no place where NONLOCAL is defined. Always including the gam? terms is the easiest and it will have no impact outside GOTM as the extra term is only added inside the 4 meanflow routines.

We are going to switch 100% to TEOS-10 - I don't know if you call any density related routines inside CVMix the we must watch out as e.g. reference pressure might have changed.

The branch - gsw - is a working branch and the intention is to merge into master to be the basis for the next release. Mybe you check out if there are any issues with CVMix here - https://github.com/gotm-model/code/issues/25.

Karsten

qingli411 commented 2 years ago

Hi @bolding, yes, always including the gam? terms is what I'm proposing. In the current implementation we are using gamh and gams to save the nonlocal mixing of temperature and salinity from CVMix. So I have to manually change the line in cppdefs.h to #define NONLOCAL so that they are used in the meanflow routines.

Regarding cleaning up the old KPP implementation, there is still a limitation of the current implementation of CVMix -- there is no bottom boundary layer implementation. I have never used CVMix in that way but I can try to implement it like that in the old KPP implementation. I'm not sure if there is anyone using GOTM with CVMix in shallow waters so maybe this is not urgent for v7?

I don't think there is any calls to density related routines in CVMix. The density and stratification profiles are passed in as input. I will try the gsw branch.