New URL for NEMO forge!   http://forge.nemo-ocean.eu

Since March 2022 along with NEMO 4.2 release, the code development moved to a self-hosted GitLab.
This present forge is now archived and remained online for history.
#1932 (trabbl not conserving tracers at the north-fold) – NEMO

Opened 7 years ago

Closed 7 years ago

Last modified 7 years ago

#1932 closed Bug (fixed)

trabbl not conserving tracers at the north-fold

Reported by: acc Owned by: nemo
Priority: low Milestone:
Component: OCE Version: v3.6
Severity: Keywords:
Cc:

Description (last modified by nicolasmartin)

Context


v3.6_STABLE (and probably trunk, though not tested for trunk since trend diagnostics not yet implemented there).
Analyses of trend diagnostics and evidence from passive tracers has highlighted a conservation issue with the diffusive bbl code (nn_bbl_ldf=1). This first came to light with eORCA1 studies but is reproducible with ORCA2_LIM3

Analysis


The cause can be traced to north-fold points with zero bathymetry gradients across the fold. Consistent calculation of the diffusive coefficients relies on density gradients and bathymetry gradients taking opposite signs either side of the pivot, I.e. in routine bbl:

          zgdrho = (  za * ( zts(ji,jj+1,jp_tem) - zts(ji,jj,jp_tem))    &
             &      - zb * ( zts(ji,jj+1,jp_sal) - zts(ji,jj,jp_sal))  ) * vmask(ji,jj,1)
          !
          zsign = SIGN(  0.5, -zgdrho * REAL( mgrhv(ji,jj) )  )     !  sign of ( j-gradient * j-slope )
          ahv_bbl(ji,jj) = ( 0.5 - zsign ) * ahv_bbl_0(ji,jj)

but mgrhv (for example) is set in tra_bbl_init by:

                                       !* sign of grad(H) at u- and v-points
      mgrhu(jpi,:) = 0   ;   mgrhu(:,jpj) = 0   ;   mgrhv(jpi,:) = 0   ; mgrhv(:,jpj) = 0
      DO jj = 1, jpjm1
         DO ji = 1, jpim1
            mgrhu(ji,jj) = INT(  SIGN( 1.e0, gdept_0(ji+1,jj,mbkt(ji+1,jj)) - gdept_0(ji,jj,mbkt(ji,jj)) )  )
            mgrhv(ji,jj) = INT(  SIGN( 1.e0, gdept_0(ji,jj+1,mbkt(ji,jj+1)) - gdept_0(ji,jj,mbkt(ji,jj)) )  )
         END DO
      END DO

and when the gdept_0 values are equal the result is always positive. zgdrho, however, will always have opposite signs either side of the pivot. Thus ahv_bbl is non-zero one side of the pivot and zero on the other; leading to the non-conservation.

For example consider this T-pivot case:

    +---+                                  +---+
   | | C |  <------------\                  | A |
   v +---+                \                 +---+
     | B |-----------------o----------------| B |
     +---+                  \               +---+ ^
     | A |                   \------------> | C | |
     +---+                                  +---+

The cell marked B on the lhs is an inner point and its ahv_bbl value must match that calculated for the rhs inner point marked C. Any density gradient will be reversed by the folding of tracer values as indicated but the sign of grad(H) is unaltered in the cases of grad(H)=0.

Fix


The bbl should not be active when grad(H)=0 so the easiest solution is to force a zero coefficient in these cases. This can be done by setting the sign of the gradient to zero when the gradient is zero. This in turn sets zsign to 0.5 providing the sign function adheres to the f90 standard and sets sign of zero to be positive. Use key_nosignedzero if in doubt.

This code replacement in tra_bbl_init (trabbl.F90) achieves this:

                                       !* sign of grad(H) at u- and v-points; zero if grad(H) = 0
      mgrhu(:,:) = 0   ;   mgrhv(:,:) = 0
      DO jj = 1, jpjm1
         DO ji = 1, jpim1
            IF( gdept_0(ji+1,jj,mbkt(ji+1,jj)) - gdept_0(ji,jj,mbkt(ji,jj)) /= 0._wp ) THEN
               mgrhu(ji,jj) = INT(  SIGN( 1.e0, gdept_0(ji+1,jj,mbkt(ji+1,jj)) - gdept_0(ji,jj,mbkt(ji,jj)) )  )
            ENDIF
            !
            IF( gdept_0(ji,jj+1,mbkt(ji,jj+1)) - gdept_0(ji,jj,mbkt(ji,jj)) /= 0._wp ) THEN
               mgrhv(ji,jj) = INT(  SIGN( 1.e0, gdept_0(ji,jj+1,mbkt(ji,jj+1)) - gdept_0(ji,jj,mbkt(ji,jj)) )  )
            ENDIF
         END DO
      END DO

It is inelegant but only performed once at start-up. This has been verified to fix the issue in ORCA2_LIM3 with:

  • diffusive bbl without any advective bbl i.e. nn_bbl_ldf=1 nn_bbl_adv=0
  • diffusive bbl + advective bbl option 1 i.e. nn_bbl_ldf=1 nn_bbl_adv=1
  • diffusive bbl + advective bbl option 2 i.e. nn_bbl_ldf=1 nn_bbl_adv=2

It also has been verified to fix the issue in the Met O. GO6 configuration at 1 deg res (ORCA1-CICE) being used as the UK submision to CMIP6, for

  • diffusive bbl without any advective bbl i.e. nn_bbl_ldf=1 nn_bbl_adv=0.

Other options have not yet been checked.

Commit History (3)

ChangesetAuthorTimeChangeLog
8509acc2017-09-07T17:01:58+02:00

Trunk: Updated icb_pp.py script to process all fields in a trajectory mean file (#1938). Also includes bugfix to trabbl.F90 (#1932)

8507acc2017-09-07T16:24:27+02:00

Branch 2015/nemo_v3_6_STABLE. Bug fix for #1932 to correct tracer conservation at the north-fold

8489jpalmier2017-09-01T16:55:53+02:00

JPALM -- gmed ticket #346 : improve MEDUSA conservation -- import BBL bug fix from NEMO ticket #1932 to GO6 branch

Change History (3)

comment:1 Changed 7 years ago by nicolasmartin

  • Description modified (diff)

comment:2 Changed 7 years ago by acc

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

Bug fix applied at revision 8507:

  • trabbl.F90

     
    547547      zmbk(:,:) = REAL( mbku_d(:,:), wp )   ;   CALL lbc_lnk(zmbk,'U',1.)   ;   mbku_d(:,:) = MAX( INT( zmbk(:,:) ), 1 ) 
    548548      zmbk(:,:) = REAL( mbkv_d(:,:), wp )   ;   CALL lbc_lnk(zmbk,'V',1.)   ;   mbkv_d(:,:) = MAX( INT( zmbk(:,:) ), 1 ) 
    549549 
    550                                         !* sign of grad(H) at u- and v-points 
    551       mgrhu(jpi,:) = 0   ;   mgrhu(:,jpj) = 0   ;   mgrhv(jpi,:) = 0   ;   mgrhv(:,jpj) = 0 
     550                                        !* sign of grad(H) at u- and v-points; zero if grad(H) = 0 
     551      mgrhu(:,:) = 0   ;   mgrhv(:,:) = 0 
    552552      DO jj = 1, jpjm1 
    553553         DO ji = 1, jpim1 
    554             mgrhu(ji,jj) = INT(  SIGN( 1.e0, gdept_0(ji+1,jj,mbkt(ji+1,jj)) - gdept_0(ji,jj,mbkt(ji,jj)) )  ) 
    555             mgrhv(ji,jj) = INT(  SIGN( 1.e0, gdept_0(ji,jj+1,mbkt(ji,jj+1)) - gdept_0(ji,jj,mbkt(ji,jj)) )  ) 
     554            IF( gdept_0(ji+1,jj,mbkt(ji+1,jj)) - gdept_0(ji,jj,mbkt(ji,jj)) /= 0._wp ) THEN 
     555               mgrhu(ji,jj) = INT(  SIGN( 1.e0, gdept_0(ji+1,jj,mbkt(ji+1,jj)) - gdept_0(ji,jj,mbkt(ji,jj)) )  ) 
     556            ENDIF 
     557            ! 
     558            IF( gdept_0(ji,jj+1,mbkt(ji,jj+1)) - gdept_0(ji,jj,mbkt(ji,jj)) /= 0._wp ) THEN 
     559               mgrhv(ji,jj) = INT(  SIGN( 1.e0, gdept_0(ji,jj+1,mbkt(ji,jj+1)) - gdept_0(ji,jj,mbkt(ji,jj)) )  ) 
     560            ENDIF 
    556561         END DO 
    557562      END DO 
    558563 
Version 1, edited 7 years ago by nicolasmartin (previous) (next) (diff)

comment:3 Changed 7 years ago by acc

And committed to trunk at revision r8509

Last edited 7 years ago by nicolasmartin (previous) (diff)
Note: See TracTickets for help on using tickets.