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

more Momentum options, mostly related to hFac #809

Open
wants to merge 17 commits into
base: master
Choose a base branch
from

Conversation

jm-c
Copy link
Member

@jm-c jm-c commented Feb 4, 2024

To be filled later (work-in-progress)
To do next:

  1. working on simple test
  2. config_chek.F, config_summary.F, docs

Plus may be:

  1. add diagnostic for metric-terms tendency
  2. evaluate how well this works ?

What changes does this PR introduce?

(Bug fix, feature, docs update, ...)

What is the current behaviour?

(You can also link to an open issue here)

What is the new behaviour

(if this is a feature change)?

Does this PR introduce a breaking change?

(What changes might users need to make in their application due to this PR?)

Other information:

Suggested addition to tag-index

(To avoid unnecessary merge conflicts, please don't update tag-index. One of the admins will do that when merging your pull request.)

This switch allows to compute Coriolis terms, both horizontal (in 2.Omega.sin(Phi))
and NH (in 2.Omega.cos(Phi)), using the averaged transport (with face edge length
and hFac factor), as done previously in V.I. for horizontal Coriolis.
For deep-model, absorb the NH-metric terms w.(u,v)/r into vertical advection
by advecting the product "deepFac x (u,v)" (instead of just u,v).
- Add recip_hFacW/S (previously commented out) in new expression
  (selectCoriScheme=4) of NH coriolis f'*W term
- remove hFacW/S from gW-Cori in selectCoriScheme=4 code and keep previous
  selectCoriScheme=4 code (with hFacW/S) under selectCoriScheme=6 block
- New Spherical-Metric term form using grid-spacing finite differences (instead
  of analytical tan(Phi)/rSphere), supposed to improve both AM and KE conservation.
  Used (turned on) when selectVortScheme=1,2.
- Add option to absorb the spherical-metric terms uMetricTerms = u.v.tanPhi/r
  into meridional advection by advecting the product "dxC x u" (instead of just u).
  Used (turned on) when selectVortScheme=2.
Note: for now, re-cycle Flux-Form unused param "selectVortScheme" for this.
This option (selectCoriScheme=6, in mom_w_coriolis_nh.F) was left from early
test, with hFacW/S multiplying uVel,vVel, but without scaling by any recip_hFac.
The changes here fix this issue as the gW-Cori term is now divided by the
grid-cell thickness at the wVel location (new argument recip_rThickC).
Two improvements:
- single CPP option "MOM_USE_OLD_DEEP_VERT_ADV" in MOM_COMMON_OPTIONS.h to
  disable changes to vertical advection for deepAtmosphere=T
- fix for the case useNHTerms=F with deepAtmosphere=T.
Done by keeping a local copy of deepFacC in MOM_VISC.h, and adding 1 new
argument to S/R mom_u_adv_wu.F, mom_v_adv_wv.F, mom_vi_{u,v}_vertshear.F
This new option (with selectCortScheme=4) skip the division of vorticity
by hFacZ and replace it with tendency scaling by recip_hFacW/S
Also:
 - remove code related to "upwindVort3" (was hard-coded to FALSE)
 - add some missing "_d 0" ; + minor indentation changes
no need to hack selectCoriScheme params and leave mom_vi_coriolis.F unchanged
- no need to hack selectVortScheme param
- compute advection tendency in separated block if selectMetricTerms
  This makes sure results will not be affected (at trucation level)
  with current default metric-terms.
- minor cleaning in mom_u/v_coriolis.F and mom_u/v_adv_wu/v.F
@jm-c jm-c added work in progress Should not be merged until this label is removed adjoint Affects the adjoint model; label triggers full OpenAD test labels Feb 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
adjoint Affects the adjoint model; label triggers full OpenAD test work in progress Should not be merged until this label is removed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant