Changeset 13102


Ignore:
Timestamp:
2020-06-12T13:29:50+02:00 (3 months ago)
Author:
dancopsey
Message:

Add test for any zero size river areas. This will crash the model later on so best to catch it now.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • NEMO/branches/UKMO/NEMO_4.0.1_icesheet_and_river_coupling/src/OCE/SBC/cpl_rnf_1d.F90

    r12780 r13102  
    5757      INTEGER                                   ::   ios                 ! Local integer output status for namelist read 
    5858      INTEGER                                   ::   inum 
    59       INTEGER                                   ::   ii, jj, rr          !: Loop indices 
     59      INTEGER                                   ::   ii, jj              !: Loop indices 
    6060      INTEGER                                   ::   max_river 
    6161      REAL(wp), DIMENSION(jpi,jpj)              ::   river_number        ! 2D array containing the river outflow numbers 
     
    133133       
    134134      ! Convert from complex number to real 
    135       ! DO rr = 1, nn_cpl_river 
    136       !    rivers%river_area(rr) = rivers%river_area_c(rr) 
    137       ! END DO 
    138135      rivers%river_area(:) = REAL(rivers%river_area_c(:),wp) 
    139136       
    140137      IF ( ln_print_river_info .AND. lwp) THEN 
    141138        WRITE(numout,*) 'Area of rivers 1 to 10 are ',rivers%river_area(1:10) 
     139        WRITE(numout,*) 'Maximum river area = ',MAXVAL(rivers%river_area) 
     140        WRITE(numout,*) 'Minimum river area = ',MINVAL(rivers%river_area) 
    142141        CALL flush(numout) 
     142      END IF 
     143 
     144      IF ( MINVAL(rivers%river_area) <= 0 ) THEN 
     145         CALL oasis_abort ( ncomp_id, 'cpl_rnf_1d_init', 'There is at least one river with a river outflow area of zero. Please check your file_riv_number file that all the allocated river numbers are at ocean points as defined by the bathymetry file.')   ;   RETURN 
    143146      END IF 
    144147       
Note: See TracChangeset for help on using the changeset viewer.