Opened 10 months ago

Closed 10 months ago

Last modified 10 months ago

#2318 closed Bug (fixed)

bug in Smagorinsky formulation at 4.0

Reported by: davestorkey Owned by: davestorkey
Priority: normal Milestone: Unscheduled
Component: LDF Version: release-4.0
Severity: minor Keywords:
Cc:

Description (last modified by davestorkey)

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

The bilaplacian Smagorinsky formulation at 4.0 gives much smaller viscosity values than the bilaplacian Smagorinsky formulation at 3.6 for same "C" value and the same velocity field in tests with ORCA025 and GYRE. There is about an order of magnitude difference.

Analysis

The main issue appears to be a missing factor of 2 in the definition of esqt and esqf in ldf_dyn_init:

      DO jj = 1, jpj             ! Set local gridscale values
        DO ji = 1, jpi
           esqt(ji,jj) = ( e1e2t(ji,jj) / ( e1t(ji,jj) + e2t(ji,jj) ) )**2 
           esqf(ji,jj) = ( e1e2f(ji,jj) / ( e1f(ji,jj) + e2f(ji,jj) ) )**2      
        END DO
      END DO

instead should be:

      DO jj = 1, jpj             ! Set local gridscale values
        DO ji = 1, jpi
           esqt(ji,jj) = ( 2._wp * e1e2t(ji,jj) / ( e1t(ji,jj) + e2t(ji,jj) ) )**2 
           esqf(ji,jj) = ( 2._wp * e1e2f(ji,jj) / ( e1f(ji,jj) + e2f(ji,jj) ) )**2      
        END DO
      END DO

Then for the special case e1t = e2t = dx we have esqt = dx^2 and esqt corresponds to Delta^2 in the Griffies and Hallberg (2000) MWR paper. This length scale is raised to the power of 4 in the definition of the bilaplacian viscosity, so a missing factor of 2 would give a bilaplacian viscosity 16x smaller at 4.0 than at 3.6 which is roughly what I see in my tests.

Fix

I have tested this change and the values at 3.6 and 4.0 are now the same order of magnitude but it seems that the 4.0 values are still systematically a bit smaller than the 3.6 values.

Commit History (2)

ChangesetAuthorTimeChangeLog
11653davestorkey2019-10-04T14:34:02+02:00

Fix for bug in Smagorinsky scheme #2318.

11651davestorkey2019-10-04T12:07:53+02:00

UKMO/NEMO_4.0_GO8_package : Apply Smagorinsky bug fix (#2318) in GO8 package branch as temporary measure before we pick it up from trunk.

Change History (6)

comment:1 Changed 10 months ago by davestorkey

  • Description modified (diff)

comment:2 Changed 10 months ago by davestorkey

  • Resolution set to fixed
  • Status changed from new to closed

In 11651:

UKMO/NEMO_4.0_GO8_package : Apply Smagorinsky bug fix (#2318) in GO8 package branch as temporary measure before we pick it up from trunk.

comment:3 Changed 10 months ago by smasson

Should we report this bugfix in the trunk (alias NEMO 4.0.1)?
It looks like a good and strait forward solution, no?

comment:4 Changed 10 months ago by davestorkey

In 11653:

Fix for bug in Smagorinsky scheme #2318.

comment:5 Changed 10 months ago by smasson

Thank you!
Last on before 4.0.1? :-)

comment:6 Changed 10 months ago by davestorkey

The system is too clever (or not clever enough). It closed the ticket when I only committed the fix to a branch. Fix now in trunk @ 11653.

Note: See TracTickets for help on using tickets.