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 13712 – NEMO

Changeset 13712


Ignore:
Timestamp:
2020-11-02T13:07:13+01:00 (3 years ago)
Author:
dancopsey
Message:

Use tmask to ignore North Fold. Improve error messages.

Location:
NEMO/branches/UKMO/NEMO_4.0.1_icesheet_and_river_coupling/src/OCE/SBC
Files:
2 edited

Legend:

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

    r12675 r13712  
    8181   INTEGER                    ::   nsnd         ! total number of fields sent  
    8282   INTEGER                    ::   ncplmodel    ! Maximum number of models to/from which NEMO is potentialy sending/receiving data 
    83    INTEGER, PUBLIC, PARAMETER ::   nmaxfld=60   ! Maximum number of coupling fields 
     83   INTEGER, PUBLIC, PARAMETER ::   nmaxfld=61   ! Maximum number of coupling fields 
    8484   INTEGER, PUBLIC, PARAMETER ::   nmaxcat=5    ! Maximum number of coupling fields 
    8585   INTEGER, PUBLIC, PARAMETER ::   nmaxcpl=5    ! Maximum number of coupling fields 
  • NEMO/branches/UKMO/NEMO_4.0.1_icesheet_and_river_coupling/src/OCE/SBC/cpl_rnf_1d.F90

    r13388 r13712  
    5757      INTEGER                                   ::   ios                 ! Local integer output status for namelist read 
    5858      INTEGER                                   ::   inum 
    59       INTEGER                                   ::   ii, jj              !: Loop indices 
     59      INTEGER                                   ::   ii, jj, rr          !: Loop indices 
    6060      INTEGER                                   ::   max_river 
    6161      REAL(wp), DIMENSION(jpi,jpj)              ::   river_number        ! 2D array containing the river outflow numbers 
     
    139139        WRITE(numout,*) 'Maximum river area = ',MAXVAL(rivers%river_area) 
    140140        WRITE(numout,*) 'Minimum river area = ',MINVAL(rivers%river_area) 
     141        WRITE(numout,*) 'Sum of river areas = ',SUM(rivers%river_area) 
    141142        CALL flush(numout) 
    142143      END IF 
     
    146147         WRITE(numout,*) 'that all the allocated river numbers are at ocean points as defined by the bathymetry file with no river' 
    147148         WRITE(numout,*) 'numbers within the north fold or wraparound points.' 
    148          CALL ctl_stop ( 'STOP', 'ERROR: There is at least one river with a river outflow area of zero. See stdout.') 
     149         DO rr = 1,nn_cpl_river 
     150           IF ( rivers%river_area(rr) <= 0 ) THEN 
     151             WRITE(numout,*) 'The first river with this problem is river number ',rr 
     152             CALL ctl_stop ( 'STOP', 'ERROR: There is at least one river with a river outflow area of zero. See stdout.') 
     153           END IF 
     154         END DO 
    149155      END IF 
    150156       
     
    164170      REAL                   , INTENT(in   ) ::   runoff_1d(nn_cpl_river)    ! River runoff. One value per river. 
    165171       
    166       INTEGER  ::   ii, jj                 ! Loop indices 
     172      INTEGER  ::   ii, jj, rr                 ! Loop indices 
     173      LOGICAL  ::   found_nan 
    167174             
    168175      ! Convert the 1D total runoff per river to 2D runoff flux by 
     
    170177      DO ii = 1, jpi 
    171178        DO jj = 1, jpj 
    172           IF ( rivers%river_number(ii,jj) > 0 .AND. rivers%river_number(ii,jj) <= nn_cpl_river ) THEN 
     179          IF ( rivers%river_number(ii,jj) > 0 .AND. rivers%river_number(ii,jj) <= nn_cpl_river .AND. tmask_i(ii,jj) > 0.5 ) THEN 
    173180            rnf(ii,jj) = runoff_1d(rivers%river_number(ii,jj)) / rivers%river_area(rivers%river_number(ii,jj)) 
    174181          ELSE 
     
    179186      END DO 
    180187 
     188      IF ( ln_print_river_info ) THEN 
     189        WRITE(numout,*) 'SUM of river runoff on 1D array = ',SUM(runoff_1d) 
     190        WRITE(numout,*) 'SUM of river runoff on 2D array = ',SUM(rnf) 
     191        found_nan = .false. 
     192        DO rr = 1, nn_cpl_river 
     193          IF (runoff_1d(rr) /= runoff_1d(rr)) THEN 
     194            IF (.NOT. found_nan) THEN 
     195              WRITE(numout,*) 'WARNING: NAN found at river number ',rr 
     196              found_nan = .true. 
     197            END IF 
     198          END IF 
     199        END DO 
     200      END IF      
     201 
     202 
    181203   END SUBROUTINE cpl_rnf_1d_to_2d 
    182204 
Note: See TracChangeset for help on using the changeset viewer.