Skip to content
This repository has been archived by the owner on Oct 23, 2020. It is now read-only.

Adds Richardson number smoothing to CVMix #1219

Merged
merged 3 commits into from
Feb 13, 2017

Conversation

vanroekel
Copy link
Contributor

This PR implements smoothing of the Richardson number profile prior to computing
LMD94 shear instability mixing. This reduces the frequency of 2 dz (grid-scale) noise
in viscosity/diffusivity profiles

A flag for the number of smoothing loops is also implemented, but should not normally need to be changed from the default in registry.

Finally the limiting of the Ri profile to be positive is removed as this check is also performed in CVMix.

This PR implements smoothing of the Richardson number profile prior to computing
LMD94 shear instability mixing.  This reduces the frequency of 2 dz (grid-scale) noise
in viscosity/diffusivity profiles
@vanroekel
Copy link
Contributor Author

This has been tested in G and B cases within ACME. Both have run for 5 years. The zonal velocity cross-section along the equator is shown below for the un changed B (averaged over year 1)

screen shot 2017-02-06 at 12 37 37 pm

with the changes in this PR, the result is (again averaged over year 1)

screen shot 2017-02-06 at 12 37 29 pm

The observations are

screen shot 2017-02-06 at 2 07 32 pm

Similar improvements are seen in temperature cross sections and meridional cross-sections of T and U.

@mark-petersen
Copy link
Contributor

@vanroekel, thanks for your hard work on this. I tested with gnu and intel (debug) on wolf. Nightly regression suite is bfb on tests without cvmix, like the baroclinic channel. Global cases with cvmix on are not bfb, but differ by max 0.7 C in temperature between previous HEAD and this PR. I tried both 1 and 2 iterations. Looking at the code, I see there was no smoothing before, so there is no way to make a bfb match with the previous with any choice of the flag. That's fine.

@mark-petersen
Copy link
Contributor

@vanroekel could you please delint? The easiest way is to open all the files you edited for this PR, and use the vi commands:

:%s/ *$//g
:%s/\t*$//g

to get rid of trailing white space and tabs. Then try (on IC)

wf-fe2.lanl.gov> alias linter
/turquoise/usr/projects/climate/mpeterse/repos/MPAS-Tools/MPAS-Tools/python_scripts/mpas_source_linter/mpas_source_linter.py
wf-fe2.lanl.gov> linter -f src/core_ocean/shared/mpas_ocn_vmix_cvmix.F

It will put the lint messages in the file src/core_ocean/shared/mpas_ocn_vmix_cvmix.F.e if there is any. I tried it and only saw two white spaces.

@mark-petersen
Copy link
Contributor

@vanroekel good catch on that last commit. I agree that you should use all 'old' values when you smooth, not one new and two old.

@vanroekel
Copy link
Contributor Author

@mark-petersen I think delint is done, let me know what else you need.

@mark-petersen
Copy link
Contributor

Yes, thanks. Just trying to get people in the habit.

@mark-petersen
Copy link
Contributor

@vanroekel and @jonbob: I am happy to merge this PR in as I think it has been sufficiently tested. However, because this is non-bfb, we need to consider when to merge it into MPAS, and if it should have a single commit into ACME.

@mark-petersen
Copy link
Contributor

@vanroekel and @jonbob: Is this the final version you are happy with? If so, I will merge to ocean/develop locally, do a final test, and push it up.

@jonbob
Copy link
Contributor

jonbob commented Feb 13, 2017

@mark-petersen - I believe so, but we'll wait for Luke to weigh in. It's what I used for my tests on anvil anyway

@vanroekel
Copy link
Contributor Author

@jonbob and @mark-petersen , yes this is the final one I've been using in all testing.

@mark-petersen mark-petersen merged commit ffe3795 into MPAS-Dev:ocean/develop Feb 13, 2017
@mark-petersen mark-petersen deleted the ocean/CVMix_SmoothRi branch February 13, 2017 22:56
@mark-petersen
Copy link
Contributor

I tested one last time on the merge, everything looked fine. This also was tested in ACME for another 12 years starting at year 90 on an EC60to30v3 run on eos at:

/lustre/atlas1/cli115/scratch/mpetersen/a16q/run

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants