Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Filtering of squared buoyancy frequency and Richardson number #480

Merged
merged 4 commits into from
Feb 10, 2025

Conversation

matsbn
Copy link
Contributor

@matsbn matsbn commented Feb 5, 2025

Filtering of squared buoyancy frequency and Richardson number has been added to reduced noise in vertical diffusivity when using KPP. Along with the filtering, the critical gradient Richardson number for shear driven vertical mixing has also been adjusted.

This modification has been quite extensively tested in OMIP2 simulations and was also used in the simulation NorESMhub/noresm3_dev_simulations#68 based on the noresm2_5_alpha08d tag. There is no change with isopycnic vertical coordinate.

…o reduced noise in vertical diffusivity when using KPP.
… mixing (RI0) when not using isopycnic vertical coordinate.
@matsbn matsbn mentioned this pull request Feb 5, 2025
4 tasks
Copy link
Contributor

@TomasTorsvik TomasTorsvik left a comment

Choose a reason for hiding this comment

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

Looks fine to me, just one thing I suggest to change (see separate comment).

bvf_i(kk+1) = sqrt( max( bfsqi(i,j,kk+1), 0.) )
bvfsq_i(kk+1) = bvfsq_i(kk)

do n_iter = 1, 1 !n_smooth_ri
Copy link
Contributor

Choose a reason for hiding this comment

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

If I understand correctly, this loop will smooth rig_i and bvfsq_i N times (default N=1).
I would prefer either (1) to define the loop as do niter = 1, n_smooth_ri , and then define the n_smooth_ri parameter somewhere above, or (2) remove the loop if it will not be used.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks, for seeing this @TomasTorsvik. I have pushed a commit to remove these unnecessary loops.

@@ -1250,6 +1288,15 @@ subroutine difest_vertical_hyb(m,n,mm,nn,k1m,k1n)
rig_i(kk+1) = rig_i(kk)
bvfsq_i(kk+1) = bfsqi(i,j,kk+1)

do n_iter = 1, 1 !n_smooth_ri
Copy link
Contributor

Choose a reason for hiding this comment

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

Same comment as above.

@TomasTorsvik TomasTorsvik added the enhancement New feature or request label Feb 6, 2025
@TomasTorsvik TomasTorsvik added this to the release v1.7.1 tag milestone Feb 6, 2025
@matsbn matsbn merged commit d2a63e7 into NorESMhub:master Feb 10, 2025
4 checks passed
@matsbn matsbn deleted the feature-N2_Ri_smooth branch February 10, 2025 14:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

3 participants