New URL for NEMO forge!   http://forge.nemo-ocean.eu

Since March 2022 along with NEMO 4.2 release, the code development moved to a self-hosted GitLab.
This present forge is now archived and remained online for history.
Changeset 3682 – NEMO

Changeset 3682


Ignore:
Timestamp:
2012-11-27T16:12:51+01:00 (11 years ago)
Author:
vichi
Message:

Corrected a bug when checking the values of the river depth
from a given input file in sbcrnf.F90
It was possible to have zeroes that generated a division by zero
as in ticket #834

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/NEMOGCM/NEMO/OPA_SRC/SBC/sbcrnf.F90

    r3598 r3682  
    353353                     DO WHILE ( jk /= mbkt(ji,jj) .AND. fsdept(ji,jj,jk) < h_rnf(ji,jj) ) ;  jk = jk + 1 ;  END DO 
    354354                     nk_rnf(ji,jj) = jk 
    355                   ELSEIF( h_rnf(ji,jj) == -1   ) THEN   ;  nk_rnf(ji,jj) = 1 
    356                   ELSEIF( h_rnf(ji,jj) == -999 ) THEN   ;  nk_rnf(ji,jj) = mbkt(ji,jj) 
    357                   ELSEIF( h_rnf(ji,jj) /=  0   ) THEN 
     355                  ELSEIF( h_rnf(ji,jj) == -1._wp   ) THEN   ;  nk_rnf(ji,jj) = 1 
     356                  ELSEIF( h_rnf(ji,jj) == -999._wp ) THEN   ;  nk_rnf(ji,jj) = mbkt(ji,jj) 
     357                  ELSE 
    358358                     CALL ctl_stop( 'runoff depth not positive, and not -999 or -1, rnf value in file fort.999'  ) 
    359359                     WRITE(999,*) 'ji, jj, rnf(ji,jj) :', ji, jj, rnf(ji,jj) 
Note: See TracChangeset for help on using the changeset viewer.