Changeset 12675 for NEMO/branches/UKMO/NEMO_4.0.1_icesheet_and_river_coupling/src/OCE/SBC/cpl_rnf_1d.F90
- Timestamp:
- 2020-04-03T18:00:43+02:00 (4 years ago)
- 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
r12580 r12675 19 19 USE lib_mpp ! MPP library 20 20 USE iom 21 USE wrk_nemo ! Memory allocation22 21 USE dom_oce ! Domain sizes (for grid box area e1e2t) 23 22 USE sbc_oce ! Surface boundary condition: ocean fields … … 31 30 32 31 TYPE, PUBLIC :: RIVERS_DATA !: Storage for river outflow data 33 INTEGER, POINTER, DIMENSION(:,:) :: river_number !: River outflow number34 REAL(wp), POINTER, DIMENSION(:) :: river_area ! 1D array listing areas of each river outflow (m2)35 COMPLEX(wp), POINTER, DIMENSION(:) :: river_area_c ! Comlex version of river_area for use in bit reproducible sums (m2)32 INTEGER, ALLOCATABLE, DIMENSION(:,:) :: river_number !: River outflow number 33 REAL(wp), ALLOCATABLE, DIMENSION(:) :: river_area ! 1D array listing areas of each river outflow (m2) 34 COMPLEX(wp), ALLOCATABLE, DIMENSION(:) :: river_area_c ! Comlex version of river_area for use in bit reproducible sums (m2) 36 35 END TYPE RIVERS_DATA 37 36 … … 60 59 INTEGER :: ii, jj, rr !: Loop indices 61 60 INTEGER :: max_river 62 REAL(wp), POINTER, DIMENSION(:,:):: river_number ! 2D array containing the river outflow numbers61 REAL(wp), DIMENSION(jpi,jpj) :: river_number ! 2D array containing the river outflow numbers 63 62 64 63 NAMELIST/nam_cpl_rnf_1d/file_riv_number, nn_cpl_river, ln_print_river_info 65 64 !!---------------------------------------------------------------------- 66 65 67 IF( nn_timing == 1) CALL timing_start('cpl_rnf_1d_init')66 IF( ln_timing ) CALL timing_start('cpl_rnf_1d_init') 68 67 69 68 IF(lwp) WRITE(numout,*) 70 69 IF(lwp) WRITE(numout,*) 'cpl_rnf_1d_init : initialization of river runoff coupling' 71 70 IF(lwp) WRITE(numout,*) '~~~~~~~~~~~~' 72 IF(lwp .AND. lflush) CALL flush(numout)71 IF(lwp) CALL flush(numout) 73 72 74 73 REWIND(numnam_cfg) … … 76 75 ! Read the namelist 77 76 READ ( numnam_ref, nam_cpl_rnf_1d, IOSTAT = ios, ERR = 901) 78 901 IF( ios /= 0 ) CALL ctl_nam ( ios , 'nam_cpl_rnf_1d in reference namelist' , lwp)77 901 IF( ios /= 0 ) CALL ctl_nam ( ios , 'nam_cpl_rnf_1d in reference namelist' ) 79 78 READ ( numnam_cfg, nam_cpl_rnf_1d, IOSTAT = ios, ERR = 902 ) 80 902 IF( ios /= 0 ) CALL ctl_nam ( ios , 'nam_cpl_rnf_1d in configuration namelist' , lwp)79 902 IF( ios /= 0 ) CALL ctl_nam ( ios , 'nam_cpl_rnf_1d in configuration namelist' ) 81 80 IF(lwm .AND. nprint > 2) WRITE ( numond, nam_cpl_rnf_1d ) 82 81 … … 88 87 IF(lwp) WRITE(numout,*) ' Print river information = ',ln_print_river_info 89 88 IF(lwp) WRITE(numout,*) ' ' 90 IF(lwp .AND. lflush) CALL flush(numout)91 89 IF(lwp) CALL flush(numout) 90 92 91 ! Assign space for river numbers 93 92 ALLOCATE( rivers%river_number( jpi, jpj ) ) 94 CALL wrk_alloc( jpi, jpj, river_number )95 93 96 94 ! Read the river numbers from netcdf file … … 113 111 IF ( ln_print_river_info .AND. lwp) THEN 114 112 WRITE(numout,*) 'Maximum river number in input file = ',max_river 115 IF(lflush)CALL flush(numout)113 CALL flush(numout) 116 114 END IF 117 115 … … 132 130 133 131 ! Use mpp_sum to add together river areas on other processors 134 CALL mpp_sum( rivers%river_area_c, nn_cpl_river)132 CALL mpp_sum( 'cpl_rnf_1d', rivers%river_area_c ) 135 133 136 134 ! Convert from complex number to real … … 142 140 IF ( ln_print_river_info .AND. lwp) THEN 143 141 WRITE(numout,*) 'Area of rivers 1 to 10 are ',rivers%river_area(1:10) 144 IF(lflush)CALL flush(numout)142 CALL flush(numout) 145 143 END IF 146 144
Note: See TracChangeset
for help on using the changeset viewer.