-
Notifications
You must be signed in to change notification settings - Fork 390
Internal wave drag implementation #607
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
Internal wave drag implementation #607
Conversation
025c036 to
acea49c
Compare
|
This is going to be canceled following advice from @nairita87, a new PR will be submitted. |
340cf8f to
51e4825
Compare
4c5e30e to
8084b70
Compare
8084b70 to
db86687
Compare
|
Rebased to head of ocean/develop. Passes nightly test suite. |
|
@nairita87: I think this is ready to merge? We just need @mark-petersen to review? |
… compilation bug)
The wave drag is read from the HYCOM file in subroutine src/core_ocean/shared/mpas_ocn_vel_forcing_topographic_drag.F
3edb6bd to
0b04b8a
Compare
be0bcf3 to
0084cdc
Compare
0084cdc to
a2242cd
Compare
| ! du/dt = ... (1.0/topographic_wave_drag_rinv) * u | ||
| ! topographic_wave_drag_rinv is the e-folding time which is read from a file | ||
| tend(k,iEdge) = tend(k,iEdge) - topographicWaveDragCoeff & | ||
| /(0.5_RKIND*(topographic_wave_drag_rinv(cell1)+topographic_wave_drag_rinv(cell2)))*normalVelocity(k,iEdge) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@nairita87 on these lines we have a divide and average from cell to edge every time step. It makes a lot more sense compute rinv in your original python interpolation to edges, and save a field which is 1/rinv at the edges. Call it topographic_wave_drag. Then these lines would simply be
131 tend(k,iEdge) = tend(k,iEdge) - topographicWaveDragCoeff * &
topographic_wave_drag(iEdge)*normalVelocity(k,iEdge)
ab35511 to
e51fae3
Compare
6a49d30 to
52dfe32
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@philipwjones the boundary edges between water and land (i.e. no cells) have maxLevelEdgeTop(iEdge)=0, so this if statement was needed within the edge loop to prevent accessing k=0. Is there a more performant way to do this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably not worth worrying about for this small loop and the alternatives are probably less robust, so I think ok to keep here.
d7cce4a to
554a53e
Compare
Internal wave drag implementation #607
Merge PR #607 'nairita87/topographic_wave_drag' into ocean/develop
…xt (PR #4255) Update mpas-source: ocean drag parameterizations Brings in a new mpas-source submodule with changes only to the ocean core, along with correspodning updates to the mpas-ocean bld scripts. It adds wave drag parameterization and bottom roughness, which are by default off and should not impact E3SM. See MPAS-Dev/MPAS-Model#607 [NML] [BFB]
mark-petersen
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. @nairita87 thanks for your work.
Update mpas-source: ocean drag parameterizations Brings in a new mpas-source submodule with changes only to the ocean core, along with correspodning updates to the mpas-ocean bld scripts. It adds wave drag parameterization and bottom roughness, which are by default off and should not impact E3SM. See MPAS-Dev/MPAS-Model#607 [NML] [BFB]
Merge PR MPAS-Dev#607 'nairita87/topographic_wave_drag' into ocean/develop






Topographic wave drag term added to the momentum equation.
When
config_use_topographic_wave_drag = .true.we add a drag termdu/dt= -(1/rinv)*u, where 'rinv' is the e-folding time-scale. The e-folding time-scale is read from a map (in this case from the HYCOM data)When
config_use_implicit_bottom_roughness = .trueuse the bottom drag formulationmax(cbmin, (vonk/log(0.5*depth(i,j)/z0))**2 ))from NCOM.