Opened 8 years ago

Closed 8 years ago

#151 closed defect (fixed)

pb error_reservoir in routing.f90

Reported by: maignan Owned by: somebody
Priority: minor Milestone: ORCHIDEE 1.9.7
Component: Physical processes Version: trunc
Keywords: Cc:


In routing.f90, we have:

    DO ig=1,nbpt
       DO ib=1,nbasmax
          IF ( slow_reservoir(ig,ib) .LT. zero ) THEN

    IF (error_reservoir) THEN
       WRITE(numout,*) 'WARNING : There is a negative reservoir at :', ig, ib
       WRITE(numout,*) 'WARNING : slowr, slow_flow, drainage', &
            & slow_reservoir(ig,ib), slow_flow(ig,ib), drainage(ig)
       WRITE(numout,*) 'WARNING : pondr, pond_inflow, pond_drainage', &
            & pond_reservoir(ig), pond_inflow(ig,ib), pond_drainage(ig,ib)
       CALL ipslerr_p(2, 'routing_flow', 'WARNING negative slow_reservoir.','','')

If error_reservoir is TRUE, the last IF makes some prints outside of the two former loops on ig and ib with variables all indexed on ig and/or ib, which are then equal to nbpt+1 and nbasmax+1 and thus outside of the arrays' bounds.

This error is caught with the standard debug options (when routing is activated) and to be corrected.

Change History (1)

comment:1 Changed 8 years ago by jgipsl

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

Done rev [2385]

Jan, Mattieu, Fabienne, Josefine

Note: See TracTickets for help on using tickets.