Opened 18 months ago

Last modified 5 weeks ago

#2237 new Bug

no/partial/strong slip condition is actually free slip in one-point straits

Reported by: davestorkey Owned by: davestorkey
Priority: low Milestone: Unscheduled
Component: LBC Version: 4.0-HEAD
Severity: minor Keywords: momentum boundary slip
Cc:

Description (last modified by nicolasmartin)

BE CAREFUL !!! Due to dynamic behaviour of this ticket creation page, it is highly recommend to set first all other fields before writing the ticket description below.
If you have lost your draft after an unwanted reload, you can click on the link 'Restore Form' in the contextual menu upper right to recover it.
Remove these lines after reading.

Context

Analysis

The boundary condition on velocities tangential to topography is set via the value of fmask initialised in dom_msk as follows (NEMO 4 code):

Calculate from tmask:

               fmask(ji,jj,jk) = tmask(ji,jj  ,jk) * tmask(ji+1,jj  ,jk)   &
                  &            * tmask(ji,jj+1,jk) * tmask(ji+1,jj+1,jk)

Apply slip condition:

      IF( rn_shlat /= 0 ) THEN      ! Not free-slip lateral boundary condition
         !
         ALLOCATE( zwf(jpi,jpj) )
         !
         DO jk = 1, jpk
            zwf( : , : ) = fmask(:,:,jk)         
            DO jj = 2, jpjm1
               DO ji = fs_2, fs_jpim1   ! vector opt.
                  IF( fmask(ji,jj,jk) == 0._wp ) THEN
                     fmask(ji,jj,jk) = rn_shlat * MIN( 1._wp , MAX( zwf(ji+1,jj), zwf(ji,jj+1),   &
                        &                                           zwf(ji-1,jj), zwf(ji,jj-1)  )  )
                  ENDIF
               END DO
            END DO

This selects fmask points at the topography-sea boundary by looking for points where fmask is zero but has a neighbouring fmask which is one. But this criterion doesn't work for single-point channels. A better criterion would be to check the neighbouring umask and vmask values:

Instead of:

MAX( zwf(ji+1,jj), zwf(ji,jj+1),zwf(ji-1,jj), zwf(ji,jj-1) )

this would be better:

MAX( umask(ji,jj,jk), umask(ji,jj+1,jk), vmask(ji,jj,jk), vmask(ji+1,jj,jk) )

Maybe this was deliberate? But if you want no-slip with free-slip in channels it is probably better to do that explicitly via a spatially varying shlat parameter.

Fix


Commit History (3)

ChangesetAuthorTimeChangeLog
13271clem2020-07-08T16:53:09+02:00

counterpart of ticket #2237 for sea-ice

13270clem2020-07-08T16:41:20+02:00

should solve ticket #2237

10648davestorkey2019-02-07T16:57:16+01:00

UKMO dev_r10037_shlat2d branch: bug fix - make sure modified shlat values are applied to single-point channels. (This fix relates to ticket #2237).

Change History (7)

comment:1 Changed 18 months ago by nicolasmartin

  • Description modified (diff)

comment:2 Changed 18 months ago by davestorkey

In 10648:

UKMO dev_r10037_shlat2d branch: bug fix - make sure modified shlat values are applied to single-point channels. (This fix relates to ticket #2237).

comment:3 Changed 18 months ago by nicolasmartin

  • Version set to release-4.0

comment:4 Changed 5 months ago by clevy

  • Version changed from release-4.0 to 4.0-HEAD

comment:5 Changed 5 weeks ago by gm

Yes Dave, I agree. I never though of having a at least 2 ocean grid point channel since I don't think its a good idea to have such a channel.
Nevertheless, it may occur in a user configuration. Your solution is the one to be implemented.

Gurvan

Note that using usrdef_fmask you can always set the boundary condition you want.

comment:6 Changed 5 weeks ago by clem

In 13270:

should solve ticket #2237

comment:7 Changed 5 weeks ago by clem

In 13271:

counterpart of ticket #2237 for sea-ice

Note: See TracTickets for help on using tickets.