#2560 closed Bug (fixed)
GLS Neumann Boundary Condition not Set and Velocity average to T point requires 0.5 factor
Reported by: | deazer | Owned by: | jchanut |
---|---|---|---|
Priority: | low | Milestone: | Unscheduled |
Component: | ZDF | Version: | v4.0 |
Severity: | major | Keywords: | GLS bed condition neumann v4.0 |
Cc: |
Description
Context
2 related bugs in GLS
en not set at the bed for Neumann bdy condition
velocity points not correctly scales by 0.5 to give mean at t point
Previously en in Neumann Bed Condition set directly at the bed:
390 en(ji,jj,ibot) = MAX( rc02r * ustarb2(ji,jj), rn_emin )
After this change only a local variable is set but it is never used
407 z_en = MAX( rc02r * ustar2_top(ji,jj), rn_emin ) * ( 1._wp - tmask(ji,jj,1) )
Is this on purpose. It seems it is just an unintended omission?
2nd bug is about meaning of velocity points to t points:
Uses zmasku/v:
187 zmsku = ( 2. - umask(ji-1,jj,mikt(ji,jj)) * umask(ji,jj,mikt(ji,jj)) )
will be 2 if any point sea or 1 if both sea
then means the velocity points:
189 ustar2_top(ji,jj) = - rCdU_top(ji,jj) * SQRT( ( zmsku*( ub(ji,jj,mikt(ji,jj))+ub(ji-1,jj,mikt(ji,jj)) ) )**2 & 190 & + ( zmskv*( vb(ji,jj,mikt(ji,jj))+vb(ji,jj-1,mikt(ji,jj)) ) )**2 )
but appears to miss a factor of 0.5??
e.g, 2,1 ought to be 1,0.5? Or have a missed a factor of 0.5 elsewhere?
Analysis
Tides and vertical mixing considerably affected
Intriguingly both bugs at the same time give reasonable tides but individually give poor tides.
Fix
Fixes are easy just set en at bed as before
Multiply zmsku/v by 0.5
Commit History (2)
Changeset | Author | Time | ChangeLog |
---|---|---|---|
14157 | jchanut | 2020-12-11T11:36:52+01:00 | #2560, correct bottom Neumann boundary conditions and bottom friction velocities |
14156 | jchanut | 2020-12-11T11:36:17+01:00 | #2560, correct bottom Neumann boundary conditions and bottom friction velocities |
Change History (6)
comment:1 Changed 3 years ago by jchanut
- Owner changed from systeam to jchanut
- Status changed from new to assigned
comment:2 Changed 3 years ago by deazer
Thanks Jérôme for your detailed reply,
You are right without en set at the bottom the mask should have no effect, I have ran a quick test to confirm that, and that is the case.(though the error would still stand in the Dirichlet case).
If your happy with this I can put back into 4.0.head as bug fix.. need to replicate in recent merge?
Thanks!
Enda
comment:3 Changed 3 years ago by jchanut
In 14156:
comment:4 Changed 3 years ago by jchanut
In 14157:
comment:5 Changed 3 years ago by jchanut
- Resolution set to fixed
- Status changed from assigned to closed
comment:6 Changed 2 years ago by nemo
- Keywords v4.0 added
Congrats and many thanks, these are indeed 2 big bugs !
This said, changing the bottom friction (masks) alone should not change anything as it is. Could you confirm ?
Jérôme