riverplume2 crashes on restart

Bug reports, work arounds and fixes

Moderators: arango, robertson

Post Reply
Message
Author
rubash

riverplume2 crashes on restart

#1 Unread post by rubash »

I get a divide by zero vbar in ana_psource.h when restarting the riverplume2 example.
It can be avoided by using the following if statement at about line 262:

Code: Select all

        if (vbar(i,j,knew).ne.0.0) then
                Qshape(is,k)=ABS(v(i,j,k,nnew)/vbar(i,j,knew))*         &
     &                     (z_w(i,j-1,k)-z_w(i,j-1,k-1)+                &
     &                      z_w(i  ,j,k)-z_w(i  ,j,k-1))/               &
     &                     (z_w(i,j-1,N(ng))-z_w(i,j-1,0)+              &
     &                      z_w(i  ,j,N(ng))-z_w(i  ,j,0))
              else
                Qshape(is,k) = 0.0
              end if
It's actually a zero/zero.

Post Reply