Opened 12 years ago

Closed 12 years ago

Last modified 4 years ago

#230 closed Bug (fixed)

do while loop never done in sbcrnf.F90

Reported by: molines@… Owned by: nemo
Priority: low Milestone:
Component: OCE Version: release-3.0
Severity: Keywords: SBC
Cc:

Description

A new namelist parameter has been added in order to control the vertical mixing enhancement at the river runoff (rn_hrnf). It gives the deptht over which the enhancement applies. This is done only if ln_rnf_mouth is true.

There is a bug in sbcrnf.F90 in the following lines :

    170          nkrnf = 0
    171          IF( rn_hrnf > 0.e0 ) THEN
    172             nkrnf = 2
    173             DO WHILE( nkrnf == jpkm1 .OR. gdepw_0(nkrnf) > rn_hrnf )   ;   nkrnf = nkrnf + 1   ;   END DO
    174             IF( ln_sco )   &
    175                CALL ctl_warn( 'sbc_rnf: number of levels over which Kz is increased is computed for zco...' )
    176          ENDIF

I propose to change the DO WHILE loop to :

           DO WHILE( nkrnf /= jpkm1 .AND. gdepw_0(nkrnf+1) < rn_hrnf )   ;   nkrnf = nkrnf + 1  ;   END DO

Note that I suggest to test gdepw_0(nkrnf+1).
On the other hand, I also note that in step_c1d there is still

       IF( nn_runoff /=0 ) THEN                              ! increase diffusivity at rivers mouths
         DO jk = 2, nkrnf   ;   avt(:,:,jk) = avt(:,:,jk) + rn_avt_rnf * rnfmsk(:,:)   ;   END DO
      ENDIF

instead of

      IF( ln_rnf_mouth ) THEN                                ! increase diffusivity at rivers mouths
         DO jk = 2, nkrnf   ;   avt(:,:,jk) = avt(:,:,jk) + 2.e0 * rn_avt_rnf * rnfmsk(:,:)   ;   END DO
      ENDIF

Jean-Marc

Commit History (1)

ChangesetAuthorTimeChangeLog
1164ctlod2008-07-08T17:37:09+02:00

trunk: correct a wrong DO WHILE sequence, see ticket: #230 and update step_c1d.F90 related to ticket #223

Change History (3)

comment:1 Changed 12 years ago by ctlod

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

comment:2 Changed 4 years ago by nicolasmartin

  • Milestone New Surface Module deleted

Milestone New Surface Module deleted

comment:3 Changed 4 years ago by nicolasmartin

  • Keywords SBC added; sbcrnf removed
Note: See TracTickets for help on using tickets.