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.
#1034 (Missplacing of the call to lbc_lnk in the bdy_tra) – NEMO

Opened 11 years ago

Closed 11 years ago

Last modified 8 years ago

#1034 closed Bug (fixed)

Missplacing of the call to lbc_lnk in the bdy_tra

Reported by: epico Owned by: epico
Priority: low Milestone:
Component: OCE Version: v3.6
Severity: Keywords: BDY
Cc: davestorkey, cbricaud

Description

Analyzing the source code, a potential bug has been identified in bdy_tra.
The lbc_lnk is invoked outside the loop on nb_bdy. The processes will exchange after having locally updated the values on the boundaries. This works fine if the new values on the boudaries do not depend from the adjacent points. For some schemas, such as bdy_tra_nmn and bdy_tra_rnf, this is not true.
The bug could happen when nb_dby is greater then 1 and bdy_tra_nmn or bdy_tra_rnf is used.

Moreover in the 3.5a version a new optimized routine (lbc_bdy_lnk) for handling the communication during the BDY has been introduced.

Finally, the last input parameter (ib_bdy) and the calls to the lbc_bdy_lnk can be removed from the routine bdy_tra_frs

The bdy_tra could be modified as follow:

      DO ib_bdy=1, nb_bdy
    
         SELECT CASE( nn_tra(ib_bdy) )
         CASE(jp_none)
            CYCLE
         CASE(jp_frs)
            CALL bdy_tra_frs( idx_bdy(ib_bdy), dta_bdy(ib_bdy), kt )
         CASE(2)
            CALL bdy_tra_spe( idx_bdy(ib_bdy), dta_bdy(ib_bdy), kt )
         CASE(3)
            CALL bdy_tra_nmn( idx_bdy(ib_bdy), dta_bdy(ib_bdy), kt )
         CASE(4)
            CALL bdy_tra_rnf( idx_bdy(ib_bdy), dta_bdy(ib_bdy), kt )
         CASE DEFAULT
            CALL ctl_stop( 'bdy_tra : unrecognised option for open boundaries for T and S' )
         END SELECT

         CALL lbc_bdy_lnk( tsa(:,:,:,jp_tem), 'T', 1., ib_bdy )
         CALL lbc_bdy_lnk( tsa(:,:,:,jp_sal), 'T', 1., ib_bdy )
      ENDDO

Commit History (1)

ChangesetAuthorTimeChangeLog
3777epico2013-02-08T11:39:22+01:00

fixed bug #1034 Missplacing of the call to lbc_lnk in the bdy_tra see ticket https://forge.ipsl.jussieu.fr/nemo/ticket/1034

Change History (3)

comment:1 Changed 11 years ago by clevy

  • Owner changed from NEMO team to epico

comment:2 Changed 11 years ago by epico

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

comment:3 Changed 8 years ago by nicolasmartin

  • Keywords BDY added; bdy_tra removed
Note: See TracTickets for help on using tickets.