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.
#2334 (Wrong initialization of T/S open boundary data if set from initial state) – NEMO

Opened 4 years ago

Closed 4 years ago

Last modified 2 years ago

#2334 closed Bug (fixed)

Wrong initialization of T/S open boundary data if set from initial state

Reported by: jchanut Owned by: systeam
Priority: low Milestone:
Component: BDY Version: v4.0
Severity: minor Keywords: v4.0
Cc:

Description

Context

In nambdy, if nn_tra_dta = 0 then open boundary data arrays are filled with initial fields. Currently, one gets zeros as boundary data values in that case.

Analysis

This done in bdydta thanks to the following lines (around line 165):

            IF( nn_tra_dta(jbdy) == 0 ) THEN
               ilen1(:) = nblen(:)
               IF( dta_bdy(jbdy)%lneed_tra ) THEN
                  igrd = 1
                  DO ib = 1, ilen1(igrd)
                     DO ik = 1, jpkm1
                        ii = idx_bdy(jbdy)%nbi(ib,igrd)
                        ij = idx_bdy(jbdy)%nbj(ib,igrd)
                        dta_bdy(jbdy)%tem(ib,ik) = tsn(ii,ij,ik,jp_bdytem) * tmask(ii,ij,ik)
                        dta_bdy(jbdy)%sal(ib,ik) = tsn(ii,ij,ik,jp_bdysal) * tmask(ii,ij,ik)
                        END DO
                  END DO
               ENDIF
            ENDIF

Fix

One should however take as the 4th dimension of tracers jp_tem and jp_sal repectively for T and S:

            IF( nn_tra_dta(jbdy) == 0 ) THEN
               ilen1(:) = nblen(:)
               IF( dta_bdy(jbdy)%lneed_tra ) THEN
                  igrd = 1
                  DO ib = 1, ilen1(igrd)
                     DO ik = 1, jpkm1
                        ii = idx_bdy(jbdy)%nbi(ib,igrd)
                        ij = idx_bdy(jbdy)%nbj(ib,igrd)
                        dta_bdy(jbdy)%tem(ib,ik) = tsn(ii,ij,ik,jp_tem) * tmask(ii,ij,ik)
                        dta_bdy(jbdy)%sal(ib,ik) = tsn(ii,ij,ik,jp_sal) * tmask(ii,ij,ik)
                        END DO
                  END DO
               ENDIF
            ENDIF

Commit History (2)

ChangesetAuthorTimeChangeLog
12050jchanut2019-12-04T16:38:29+01:00

#2334, bdy init from initial T/S

12049jchanut2019-12-04T16:36:36+01:00

#2334, bdy init from initial T/S

Change History (4)

comment:1 Changed 4 years ago by jchanut

In 12049:

Error: Failed to load processor CommitTicketReference
No macro or processor named 'CommitTicketReference' found

comment:2 Changed 4 years ago by jchanut

In 12050:

Error: Failed to load processor CommitTicketReference
No macro or processor named 'CommitTicketReference' found

comment:3 Changed 4 years ago by jchanut

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

comment:4 Changed 2 years ago by nemo

  • Keywords v4.0 added
Note: See TracTickets for help on using tickets.