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

Add horizontal tapering function to mesoscale eddy parameterizations (AMOC PR 2/6) #4864

Merged
merged 29 commits into from
May 25, 2022

Conversation

darincomeau
Copy link
Member

@darincomeau darincomeau commented Mar 30, 2022

This PR adds a new 'RossbyRadius' option to the horizontal tapering of GM and Redi, which is based on Hallberg (2013) - https://doi.org/10.1016/j.ocemod.2013.08.007, which turns the parameterization on if the Rossby Radius is resolved by at least two cells. These flags are:

config_Redi_horizontal_taper = 'ramp' (default), 'none', 'RossbyRadius' (new) 
config_GM_horizontal_taper = 'ramp' (default), 'none', 'RossbyRadius' (new) 

This PR replaces the variable gmResolutionTaper, which was used for both GM and Redi, to the separate variables RediHorizontalTaper and gmHorizontalTaper so that Redi and GM tapering can be chosen separately, and it is clear in the code. Logic was added to the GM and Redi schemes so that the there is a base value in the arrays for Redi Kappa and GM Kappa. The base value is then multiplied by the taper array, which has a value between 0 and 1. Arrays that are static in time are computed on init. Under the following conditions, the arrays are recomputed at every time step:

config_Redi_horizontal_taper = 'RossbyRadius' (recompute RediHorizontalTaper and RediKappa)
config_GM_horizontal_taper =  'RossbyRadius' (recompute gmHorizontalTaper)

[NML] adds MPAS-Ocean namelist options
[BFB]

@jonbob
Copy link
Contributor

jonbob commented Mar 30, 2022

@darincomeau -- I'll run the scripts that automatically update the bld files to reflect Registry changes for this PR and make sure it's all consistent, unless that's what you've already done.

@darincomeau
Copy link
Member Author

@jonbob I haven't - the bld file changes were added manually.

@jonbob
Copy link
Contributor

jonbob commented Mar 30, 2022

Thanks for getting back to me so quickly @darincomeau. I'll run the scripts and update the files if anything turns up

@jonbob
Copy link
Contributor

jonbob commented Mar 31, 2022

@darincomeau - this PR looks like it also includes the changes from PR #4835? That PR has not been merged to the repo yet...

@darincomeau
Copy link
Member Author

@jonbob yes, this PR started from the head of that branch in #4835 , to avoid merge conflicts later. I'll rebase once that gets merged.

@darincomeau
Copy link
Member Author

5 year tests with config_gm_enable_horizontal_resolution_function = .true. compared against baselines with option off:

ECwISC30to60E2r1
This branch with flag on
Baseline

SOwISC12to60E2r4
This branch with flag on
Baseline

@mark-petersen
Copy link
Contributor

Passes MPAS-O nightly regression suite with config_gm_enable_horizontal_resolution_function = true with debug using gnu and intel.

@mark-petersen mark-petersen changed the title Add GM horizontal resolution function Add GM horizontal resolution function (AMOC PR 2/6) Apr 5, 2022
Copy link
Contributor

@vanroekel vanroekel left a comment

Choose a reason for hiding this comment

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

changes look consistent with what I implemented previously so approving on visual inspection and final approval from @jonbob on the supporting changes.

Copy link
Contributor

@mark-petersen mark-petersen left a comment

Choose a reason for hiding this comment

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

Approved, based on my testing and E3SM simulations by others.

@darincomeau darincomeau force-pushed the darincomeau/ocn/gm-horizontal-resolution-function branch from c744e64 to e7f21ab Compare April 6, 2022 18:36
@darincomeau
Copy link
Member Author

darincomeau commented Apr 6, 2022

Rebased after #4835 was merged to master.

@darincomeau darincomeau force-pushed the darincomeau/ocn/gm-horizontal-resolution-function branch from e7f21ab to c744e64 Compare April 6, 2022 18:58
@milenaveneziani
Copy link
Contributor

That works for me.

@xylar
Copy link
Contributor

xylar commented May 18, 2022

@milenaveneziani, could you make that name change, too? (It needs to happen in various places.)

@milenaveneziani
Copy link
Contributor

@xylar: sure. Is that OK if I do it manually though?

@xylar
Copy link
Contributor

xylar commented May 18, 2022

Yeah, do it manually. @jonbob will check our work in any case.

@milenaveneziani
Copy link
Contributor

ok, done. @mark-petersen: you can go ahead and use this branch for the BFB tests. And please do double-check my changes.

*(dcEdge(iEdge) - config_eddying_resolution_ramp_min) &
/(config_eddying_resolution_ramp_max - config_eddying_resolution_ramp_min)
*(dcEdge(iEdge) - config_Redi_horizontal_ramp_min) &
/(config_Redi_horizontal_ramp_max - config_Redi_horizontal_ramp_min)
Copy link
Contributor

Choose a reason for hiding this comment

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

This fixed the BFB mismatch. I had to put this block of code in the same order as before, with the operations in the same order as before. Now it is BFB in E3SM tests (it was BFB in stand-alone tests before, which is partly what took me so long to find it).

Copy link
Contributor

Choose a reason for hiding this comment

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

yay, @mark-petersen, that's great!

@mark-petersen
Copy link
Contributor

mark-petersen commented May 19, 2022

Now passes compare against branch point 4435bfa for:

SMS_Ln9.T62_EC30to60E2r2.GMPAS-IAF.chrysalis_gnu
SMS_Ln9.T62_EC30to60E2r2.GMPAS-IAF.chrysalis_intel
PEM_Ln9.ne30pg2_EC30to60E2r2.WCYCL1850.chrysalis_gnu
PEM_Ln9.ne30pg2_EC30to60E2r2.WCYCL1850.chrysalis_intel

@jonbob please proceed with your tests.

@mark-petersen
Copy link
Contributor

I also tested stand-alone and E3SM with the new flag settings for this PR

config_GM_horizontal_taper = 'RossbyRadius'
config_Redi_horizontal_taper = 'RossbyRadius'

in E3SM, passes

PEM_Ln9.ne30pg2_EC30to60E2r2.WCYCL1850.chrysalis_gnu

in stand-alone nightly suite with all three: config_GM_closure = 'N2_dependent', Visbeck, EdenGreatbatch with gnu debug, and all pass.

@mark-petersen
Copy link
Contributor

Any other comments on this one, or is it ready for final testing before the merge? @xylar you still have a red on the approval, can you approve if you agree?

@milenaveneziani
Copy link
Contributor

milenaveneziani commented May 19, 2022

@mark-petersen, as I mentioned (somewhere) above, my latest test is behaving as expected. The taper looks consistent with the Rossby Radius size, and everything worked without further problems.
So, yes, this can be merged from my point of view (double green check).

Copy link
Contributor

@xylar xylar left a comment

Choose a reason for hiding this comment

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

@milenaveneziani did a ton of work to address my concerns so thanks for the coding and testing!

@vanroekel
Copy link
Contributor

I'm also happy with all the changes. Thanks for the great discussion and thorough testing. I'll give you my second green check!

@jonbob
Copy link
Contributor

jonbob commented May 23, 2022

The automated scripts found no discrepancies in the bld files

@jonbob jonbob added the BFB PR leaves answers BFB label May 23, 2022
jonbob added a commit that referenced this pull request May 23, 2022
… next (PR #4864)

Add horizontal tapering function to mesoscale eddy parameterizations

This PR adds a new 'RossbyRadius' option to the horizontal tapering of
GM and Redi, which is based on Hallberg (2013) -
https://doi.org/10.1016/j.ocemod.2013.08.007, which turns the
parameterization on if the Rossby Radius is resolved by at least two
cells. These flags are:
* config_Redi_horizontal_taper = 'ramp' (def), 'none', 'RossbyRadius'
* config_GM_horizontal_taper   = 'ramp' (def), 'none', 'RossbyRadius'
This PR replaces the variable `gmResolutionTaper`, which was used for
both GM and Redi, to the separate variables `RediHorizontalTaper` and
`gmHorizontalTaper` so that Redi and GM tapering can be chosen
separately, and it is clear in the code. Logic was added to the GM and
Redi schemes so that the there is a base value in the arrays for Redi
Kappa and GM Kappa. The base value is then multiplied by the taper
array, which has a value between 0 and 1. Arrays that are static in time
are computed on init. Under the following conditions, the arrays are
recomputed at every time step:
* config_Redi_horizontal_taper = 'RossbyRadius' (recompute
  RediHorizontalTaper and RediKappa)
* config_GM_horizontal_taper =  'RossbyRadius' (recompute
  gmHorizontalTaper)

[NML] adds MPAS-Ocean namelist options
[BFB]
@jonbob
Copy link
Contributor

jonbob commented May 23, 2022

Passes:

  • ERS.ne11_oQU240.WCYCL1850NS.chrysalis_intel
  • SMS_D_Ld1.ne30pg2_r05_EC30to60E2r2.WCYCL1850.chrysalis_intel
  • PEM_Ln9.ne30pg2_EC30to60E2r2.WCYCL1850.chrysalis_intel
  • SMS_D_Ld3.T62_oQU120.CMPASO-IAF.chrysalis_intel

with expected NML DIFFs.

Merged to next

@xylar
Copy link
Contributor

xylar commented May 24, 2022

Thanks @jonbob. Assuming all goes well, I'm sure everyone in E3SM land will be happy to have this thread silenced (at only 155 comments).

@jonbob
Copy link
Contributor

jonbob commented May 24, 2022

@darincomeau - the SMS_PS.northamericax4v1pg2_WC14to60E2r3.WCYCL1850.allactive-wcprodrrm prod test failed on all platforms due to the user_nl_mpaso settings in the testmod definition:

 config_gm_closure = 'constant'
 config_eddying_resolution_taper = 'ramp'
 config_use_redi = .true.

I assume we mostly need to replace "config_eddying_resolution_taper" with "config_Redi_horizontal_taper" and "config_GM_horizontal_taper"?

@darincomeau
Copy link
Member Author

@jonbob yes, I agree. The config_eddying_resolution_taper namelist option is removed in this PR, so that should be replaced as you suggested.

jonbob added a commit that referenced this pull request May 24, 2022
…nto next (PR #4864)

Re-merge to fix testdefs issue causing failures
@jonbob
Copy link
Contributor

jonbob commented May 24, 2022

re-merged to next with testmods update

@jonbob jonbob merged commit ba16635 into master May 25, 2022
@jonbob
Copy link
Contributor

jonbob commented May 25, 2022

merged to master and expected NML DIFFs blessed

@jonbob jonbob deleted the darincomeau/ocn/gm-horizontal-resolution-function branch May 25, 2022 18:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
BFB PR leaves answers BFB enhancement mpas-ocean NML Stealth PR has feature which, if turned on, could change climate. fka FCC
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants