Opened 11 years ago

Closed 11 years ago

#391 closed upgrade (Done)

Override of DU_avg1 and DV_avg1 when using UV_PSOURCE

Reported by: arango Owned by: arango
Priority: major Milestone: Release ROMS/TOMS 3.3
Component: Nonlinear Version: 3.3
Keywords: Cc:


In src:ticket:384 I mentioned that the override of barotropic, time filtering arrays DU_avg1 and DV_avg1 is unnecessary in routine step2d, when the point sources (river runoff) option UV_PSOURCE is activated. In this ticket, I proposed that, if this is actually needed this computation needs to be done at the nfast(ng)+1 when all the barotropic time-filtering is finalized:

      IF ((iif(ng).eq.(nfast(ng)+1)).and.PREDICTOR_2D_STEP(ng)) THEN

#  ifdef UV_PSOURCE
        DO is=1,Nsrc
          IF (((IstrR.le.i).and.(i.le.IendR)).and.                      &
     &        ((JstrR.le.j).and.(j.le.JendR))) THEN
            IF (INT(Dsrc(is)).eq.0) THEN
            END IF
          END IF
        END DO
#  endif
      END IF

I have some time to think and test the need of this code. It turns out that this is totally redundant. The algorithm takes care of this when computing the local transports DUon and DVom. At the point sources locations, the value of DU_avg1 or DV_avg1 is exactly the same as Qbar.

I don't recall how this was introduced in the code. As a matter of fact, the original formulation corrected in src:ticket:384 was wrong! This is a good example of how the adjoint model help us (in a very hard way to find) to track redundant computations. In this case the redundant computation was wrong.

Change History (1)

comment:1 Changed 11 years ago by arango

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