Opened 9 months ago

Closed 8 months 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: release-4.0
Severity: minor Keywords:
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 (3)

comment:1 Changed 8 months ago by jchanut

In 12049:

#2334, bdy init from initial T/S

comment:2 Changed 8 months ago by jchanut

In 12050:

#2334, bdy init from initial T/S

comment:3 Changed 8 months ago by jchanut

  • Resolution set to fixed
  • Status changed from new to closed
Note: See TracTickets for help on using tickets.