Changeset 9313 for branches/UKMO/dev_r5518_new_runoff_coupling/NEMOGCM/NEMO
- Timestamp:
- 2018-02-08T15:41:43+01:00 (6 years ago)
- Location:
- branches/UKMO/dev_r5518_new_runoff_coupling/NEMOGCM/NEMO/OPA_SRC
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/UKMO/dev_r5518_new_runoff_coupling/NEMOGCM/NEMO/OPA_SRC/SBC/cpl_oasis3.F90
r9242 r9313 31 31 USE in_out_manager ! I/O manager 32 32 USE lbclnk ! ocean lateral boundary conditions (or mpp link) 33 USE cpl_rnf_1d, ONLY: nn_cpl_river, runoff_id ! Variables used in 1D river outflow 33 34 34 35 IMPLICIT NONE … … 68 69 INTEGER, PUBLIC, PARAMETER :: nmaxcat=5 ! Maximum number of coupling fields 69 70 INTEGER, PUBLIC, PARAMETER :: nmaxcpl=5 ! Maximum number of coupling fields 70 INTEGER, PUBLIC, PARAMETER :: n_rivers=2000 ! Total number of rivers in coupled runoff using 1D array 71 72 INTEGER, PUBLIC :: runoff_id 71 72 73 73 74 74 TYPE, PUBLIC :: FLD_CPL !: Type for coupling field information … … 206 206 paral(1) = 0 ! serial partitioning 207 207 paral(2) = 0 208 paral(3) = n _rivers! size of array to couple208 paral(3) = nn_cpl_river ! size of array to couple 209 209 paral(4) = 0 210 210 paral(5) = 0 211 211 212 CALL oasis_def_partition ( id_part_rnf_1d, paral, nerror, n _rivers)212 CALL oasis_def_partition ( id_part_rnf_1d, paral, nerror, nn_cpl_river ) 213 213 214 214 ! ... Announce send variables. … … 305 305 ! Define coupled river runoff using 1D array 306 306 CALL oasis_def_var (runoff_id, 'runoffo', id_part_rnf_1d , (/ 1, 0 /), & 307 & OASIS_In , (/ 1, n _rivers/) , OASIS_REAL, nerror )307 & OASIS_In , (/ 1, nn_cpl_river /) , OASIS_REAL, nerror ) 308 308 IF ( nerror /= OASIS_Ok ) THEN 309 309 WRITE(numout,*) 'Failed to define transient runoffo' -
branches/UKMO/dev_r5518_new_runoff_coupling/NEMOGCM/NEMO/OPA_SRC/SBC/cpl_rnf_1d.F90
r9264 r9313 22 22 USE dom_oce ! Domain sizes (for grid box area e1e2t) 23 23 USE sbc_oce ! Surface boundary condition: ocean fields 24 USE cpl_oasis3 ! Coupling information (for n_rivers and runoff_id)25 24 26 25 IMPLICIT NONE … … 36 35 37 36 TYPE(RIVERS_DATA), PUBLIC, TARGET :: rivers !: River data 37 38 INTEGER, PUBLIC :: nn_cpl_river ! Maximum number of rivers being passed through the coupler 39 INTEGER, PUBLIC :: runoff_id ! OASIS coupling id used in oasis_get command 38 40 39 41 CONTAINS … … 57 59 REAL(wp), POINTER, DIMENSION(:,:) :: river_number ! 2D array containing the river outflow numbers 58 60 59 NAMELIST/nam_cpl_rnf_1d/file_riv_number 61 NAMELIST/nam_cpl_rnf_1d/file_riv_number, nn_cpl_river 60 62 !!---------------------------------------------------------------------- 61 63 … … 114 116 115 117 ! Get the area of each river outflow 116 ALLOCATE( rivers%river_area( n _rivers) )118 ALLOCATE( rivers%river_area( nn_cpl_river ) ) 117 119 rivers%river_area(:) = 0.0 118 120 DO ii = 1, jpi 119 121 DO jj = 1, jpj 120 IF ( rivers%river_number(ii,jj) > 0 .AND. rivers%river_number(ii,jj) <= n _rivers) THEN122 IF ( rivers%river_number(ii,jj) > 0 .AND. rivers%river_number(ii,jj) <= nn_cpl_river ) THEN 121 123 rivers%river_area(rivers%river_number(ii,jj)) = rivers%river_area(rivers%river_number(ii,jj)) + e1e2t(ii,jj) 122 124 END IF … … 125 127 126 128 ! Use mpp_sum to add together river areas on other processors 127 CALL mpp_sum( rivers%river_area, n _rivers)129 CALL mpp_sum( rivers%river_area, nn_cpl_river ) 128 130 WRITE(numout,*) 'Area of river number 1 is ',rivers%river_area(1) 129 131 WRITE(numout,*) 'Area of river number 10 is ',rivers%river_area(10) … … 147 149 148 150 INTEGER :: kinfo ! OASIS3 info argument 149 REAL(wp) :: runoff_1d(n _rivers) ! River runoff. One value per river.151 REAL(wp) :: runoff_1d(nn_cpl_river) ! River runoff. One value per river. 150 152 INTEGER :: ii, jj ! Loop indices 151 153 LOGICAL :: llaction ! Has the get worked? … … 180 182 DO ii = 1, jpi 181 183 DO jj = 1, jpj 182 IF ( rivers%river_number(ii,jj) > 0 .AND. rivers%river_number(ii,jj) <= n _rivers) THEN184 IF ( rivers%river_number(ii,jj) > 0 .AND. rivers%river_number(ii,jj) <= nn_cpl_river ) THEN 183 185 rnf(ii,jj) = runoff_1d(rivers%river_number(ii,jj)) / rivers%river_area(rivers%river_number(ii,jj)) 184 186 ELSE -
branches/UKMO/dev_r5518_new_runoff_coupling/NEMOGCM/NEMO/OPA_SRC/SBC/sbccpl.F90
r9264 r9313 43 43 USE eosbn2 44 44 USE sbcrnf , ONLY : l_rnfcpl 45 USE cpl_rnf_1d , ONLY : cpl_rnf_1D_rcv! Coupled runoff using 1D array45 USE cpl_rnf_1d ! Coupled runoff using 1D array 46 46 #if defined key_cpl_carbon_cycle 47 47 USE p4zflx, ONLY : oce_co2 … … 762 762 ENDIF 763 763 ENDIF 764 765 ! Initialise 1D river outflow scheme 766 nn_cpl_river = 1 767 IF ( TRIM( sn_rcv_rnf%cldes ) == 'coupled1d' ) CALL cpl_rnf_1d_init ! Coupled runoff using 1D array 764 768 765 769 ! … … 1072 1076 ! ! runoffs and calving (added in emp) 1073 1077 IF( srcv(jpr_rnf)%laction ) rnf(:,:) = frcv(jpr_rnf)%z3(:,:,1) 1074 CALL cpl_rnf_1d_rcv( isec)1078 IF ( TRIM( sn_rcv_rnf%cldes ) == 'coupled1d' ) CALL cpl_rnf_1d_rcv( isec) 1075 1079 IF( srcv(jpr_cal)%laction ) zemp(:,:) = zemp(:,:) - frcv(jpr_cal)%z3(:,:,1) 1076 1080 -
branches/UKMO/dev_r5518_new_runoff_coupling/NEMOGCM/NEMO/OPA_SRC/nemogcm.F90
r9242 r9313 53 53 USE bdydta ! open boundary cond. setting (bdy_dta_init routine) 54 54 USE bdytides ! open boundary cond. setting (bdytide_init routine) 55 USE cpl_rnf_1d, ONLY : cpl_rnf_1d_init ! Coupled runoff 1D array56 55 USE istate ! initial state setting (istate_init routine) 57 56 USE ldfdyn ! lateral viscosity setting (ldfdyn_init routine) … … 398 397 IF( lk_bdy .AND. lk_tide ) & 399 398 & CALL bdytide_init ! Open boundaries initialisation of tidal harmonic forcing 400 CALL cpl_rnf_1d_init ! Coupled runoff using 1D array401 399 402 400 CALL dyn_nept_init ! simplified form of Neptune effect
Note: See TracChangeset
for help on using the changeset viewer.