#947 closed bug (Fixed)

LuvSrc / LwSrc issue reported by Aurora Leeson

Reported by: wilkin Owned by:
Priority: minor Milestone: Release ROMS/TOMS 4.2
Component: Nonlinear Version: 4.1
Keywords: Cc:

Description (last modified by arango)

Parker MacCready's student Aurora Leeson identifies in the ROMS Forum what appears to be a bug in the processing of LuvSrc / LwSrc options in the particular combination that a user has a mix of BOTH LwSrc and LuvSrc sources (functionality we recently allowed following discussion with John Warner) AND not all the LuvSrc sources are in the u-direction (it is a quirky combination to trigger an error).

In step3d_uv.F, we need to have instead:

!
!-----------------------------------------------------------------------
! Apply momentum transport point sources (like river runoff), if any.
!-----------------------------------------------------------------------
!
      IF (LuvSrc(ng)) THEN
        DO is=1,Nsrc(ng)
          i=SOURCES(ng)%Isrc(is)
          j=SOURCES(ng)%Jsrc(is)
          IF (((IstrR.le.i).and.(i.le.IendR)).and.                      &
     &        ((JstrR.le.j).and.(j.le.JendR))) THEN
            IF (INT(SOURCES(ng)%Dsrc(is)).eq.0) THEN
              DO k=1,N(ng)
                cff1=1.0_r8/(on_u(i,j)*                                 &
     &                       0.5_r8*(z_w(i-1,j,k)-z_w(i-1,j,k-1)+       &
     &                               z_w(i  ,j,k)-z_w(i  ,j,k-1)))
                u(i,j,k,nnew)=SOURCES(ng)%Qsrc(is,k)*cff1
              END DO
            ELSE IF (INT(SOURCES(ng)%Dsrc(is)).eq.1) THEN
              DO k=1,N(ng)
                cff1=1.0_r8/(om_v(i,j)*                                 &
     &                       0.5_r8*(z_w(i,j-1,k)-z_w(i,j-1,k-1)+       &
     &                               z_w(i,j  ,k)-z_w(i,j  ,k-1)))
                v(i,j,k,nnew)=SOURCES(ng)%Qsrc(is,k)*cff1
              END DO
            END IF
          END IF
        END DO
      END IF

Notice that when Dsrc(is) = 2, no contribution is added to u and v. That is done as volume vertical influx in omega.F.

Propagated change to the TLM, RPM, and ADM versions of step3d_uv.F.

Change History (1)

comment:1 by arango, 11 months ago

Description: modified (diff)
Resolution: Fixed
Status: newclosed
Note: See TracTickets for help on using tickets.