Adds variable Cd and Manning's n values #389
Conversation
|
Note, need to remove RK4 fixes by Michael and need to squash commits. Can do this after folks have a chance to review the code. |
|
Could potentially use a function pointer to make things simpler @mark-petersen but kept standard approach we've been using and duplicated function but with need high-level key terms to keep functionality with switch outside any main loops for performance reasons. |
|
@mark-petersen, can you please review? The "Don't Merge" label is just to point out that I have Michael's RK4 fix (needs removed since that will be merged into dev) and need to squash commits prior to the merge. |
|
@pwolfram Please run your standard cases to exercise this code with gnu and intel compilers, using DEBUG=true. |
fc492c6 to
de0516b
Compare
There was a problem hiding this comment.
@caozd999, here is the selection of different types of bottom drag you can use as an example to build your own transect and variable drag.
There was a problem hiding this comment.
https://github.com/MPAS-Dev/MPAS-Model/pull/389/files#diff-6270014bc9ae9b8554f8af50127caf5fL242 above shows bottom depth that needs modified.
I recommend building your own new src/core_ocean/mode_init/mpas_ocn_init_tidal_transect.F case.
There was a problem hiding this comment.
We'll merge this PR here and you can do a new PR on top of this merged one.
1982e88 to
41ce7aa
Compare
|
@mark-petersen, here are the tests you've requested. Testingintel-debugintel-releaseGnu to follow later... |
|
@mark-petersen and @sbrus89, I'm planning to merge because everything checks out. If you both could approve before I do this I would appreciate it. |
|
@pwolfram, the only comment I have would be that the existing constant bottom drag could be fit into this framework by just setting the Just a thought and definitely not an issue that should be addressed by this PR. |
|
Thanks @sbrus89! I'll let @mark-petersen comment here, but believe we should skip that because it would modify the E3SM runtime and not necessarily be BFB. Minimally, it would change performance for large-scale runs with constant Cd. But, I agree, we are adding complexity via leaving that additional option in, which your approach would remove. |
mark-petersen
left a comment
There was a problem hiding this comment.
Glancing through, this looks fine. I don't have time to actually test, but I'm happy trusting your tests.
41ce7aa to
655bd9d
Compare
Adds spatially-variable Cd and Mannings n drag capabilities. Adds comparison of different use for Cd: ocean/drying_slope/zstar_variableCd/1km Adds variable Manning's n drying slope: ocean/drying_slope/zstar_variableManningn/1km
655bd9d to
99d14c7
Compare
Adds spatially variable drag coefficient capability based on Cd and n.
|
Thanks @mark-petersen, double-checked it worked on the merge commit I just pushed. Thanks also @sbrus89 |
|
@caozd999, PR is now merged. |
|
@pwolfram great! Thank you. |
| end do | ||
|
|
||
| ! average cell-based implicit bottom drag to edges and convert Mannings n to Cd | ||
| implicitCd = gravity*(0.5_RKIND*(bottomDrag(cell1) + bottomDrag(cell2)))**2.0 * & |
There was a problem hiding this comment.
@caozd999, here is the example of how I converted Manning's n into Cd for computation in the momentum equations.






Adds variable bottom drag capability as well as Manning's n values
for variable drag in coastal areas.
Note, equation for Manning's n conversion to Cd is
Cd=g*n^2*h^(-1/3), wherenis Manning's coefficient,gis gravity, andhis the total water depth.Testing is against the drying slope case.