Skip to content

Stability#656

Merged
einola merged 14 commits intodevelopfrom
stability
Oct 31, 2024
Merged

Stability#656
einola merged 14 commits intodevelopfrom
stability

Conversation

@einola
Copy link
Copy Markdown
Member

@einola einola commented Aug 10, 2024

This PR adds computation of drag coefficients based on atmospheric stability.

einola added 14 commits August 1, 2024 13:48
Just imported old code and made sure it compiles! Introduces one new
function: dragCoeff, which calculates the dynamic and thermodynamic drag
coefficients over ice, taking atmospheric stability into account.
They can then be output. Several design changes were necessary to make
this work.
Help convergence in the drag coefficient calculations by making the drag
a prognostic variable. This means it's carried in memory and advected.
We're still in the CICE spirit, but this includes some important fixes.
This way, we don't have to calculate the specific humidity too often.
It also fits better within the code.
A correct calculation of the Obukov length this time! Some minor
additional adjustments.
I multiplied the flux with cp + cpv. Not sure why, it should just be cp.
But the default is to do it. This is really only useful for debugging!
The new drag was not given correctly to the dynamics because I forgot to
multiply with wind speed and atmospheric density(!)
This moves the calculation of some of the more complex constants out of
the element loop to save time. Also adds the limiting length scale as an
option, to put a sensible limit on the Obukov length (Richard says 100 m
is good).
I missed a factor two when transcribing the equations. Fixing this
actually improves the results!
I managed to introduce a bug in the ocean drag calculation in a
misguided attempt for minor optimisation. Remember Knuth!
I went through the constants yet again, and everything looks fine. Also
changed the default Linv limit to something that makes more sense (and
what I've used for my tests the whole time).
@einola einola marked this pull request as draft August 10, 2024 04:52
@einola einola marked this pull request as ready for review October 31, 2024 07:53
@einola einola requested a review from docguibou October 31, 2024 07:53
@einola
Copy link
Copy Markdown
Member Author

einola commented Oct 31, 2024

@docguibou This is what you tried using, right? We should still merge it, even if you don't really like it :)

Copy link
Copy Markdown
Contributor

@docguibou docguibou left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have been using it, compiling and running and it does work. It's not that I dont' like it, but I have been raised with games where the point is to do high scores, and with this one does not score as high as expected ;)

@einola einola merged commit 1882328 into develop Oct 31, 2024
@einola einola deleted the stability branch November 1, 2024 10:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants