Changeset 11452
- Timestamp:
- 2019-08-19T13:28:30+02:00 (5 years ago)
- Location:
- branches/UKMO/r6232_new_runoff_coupling/NEMOGCM/NEMO/OPA_SRC/SBC
- Files:
-
- 1 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/UKMO/r6232_new_runoff_coupling/NEMOGCM/NEMO/OPA_SRC/SBC/cpl_oasis3.F90
r11448 r11452 24 24 !! cpl_finalize : finalize the coupled mode communication 25 25 !!---------------------------------------------------------------------- 26 #if defined key_oasis3 26 #if defined key_oasis3 || defined key_oasis3mct 27 27 USE mod_oasis ! OASIS3-MCT module 28 28 #endif … … 46 46 INTEGER :: ncomp_id ! id returned by oasis_init_comp 47 47 INTEGER :: nerror ! return error code 48 #if ! defined key_oasis3 48 #if ! defined key_oasis3 && ! defined key_oasis3mct 49 49 ! OASIS Variables not used. defined only for compilation purpose 50 50 INTEGER :: OASIS_Out = -1 … … 69 69 INTEGER, PUBLIC, PARAMETER :: nmaxcpl=5 ! Maximum number of coupling fields 70 70 71 INTEGER, PUBLIC :: nn_cpl_river=0 ! Maximum number of rivers being passed through the coupler 72 INTEGER, PUBLIC :: runoff_id ! OASIS coupling id used in oasis_get command 73 71 74 TYPE, PUBLIC :: FLD_CPL !: Type for coupling field information 72 75 LOGICAL :: laction ! To be coupled or not … … 136 139 INTEGER, INTENT(in) :: kcplmodel ! Maximum number of models to/from which NEMO is potentialy sending/receiving data 137 140 ! 138 INTEGER :: id_part 141 INTEGER :: id_part ! Partition for all 2D model fields to be coupled 142 INTEGER :: id_part_rnf_1d ! Partition for river runoff using 1D array 139 143 INTEGER :: paral(5) ! OASIS3 box partition 140 144 INTEGER :: ishape(2,2) ! shape of arrays passed to PSMILe … … 198 202 CALL oasis_def_partition ( id_part, paral, nerror ) 199 203 ! 204 ! Another partition is needed for river runoff when using 1D array 205 paral(1) = 0 ! serial partitioning 206 paral(2) = 0 207 paral(3) = nn_cpl_river ! size of array to couple 208 paral(4) = 0 209 paral(5) = 0 210 211 CALL oasis_def_partition ( id_part_rnf_1d, paral, nerror, nn_cpl_river ) 200 212 ! ... Announce send variables. 201 213 ! … … 289 301 END DO 290 302 303 ! Define coupled river runoff using 1D array 304 CALL oasis_def_var (runoff_id, 'runoffo', id_part_rnf_1d, (/ 1, 0 /), & 305 & OASIS_In , (/ 1, nn_cpl_river /) , OASIS_REAL, nerror ) 306 IF ( nerror /= OASIS_Ok ) THEN 307 WRITE(numout,*) 'Failed to define transient runoffo' 308 CALL oasis_abort ( runoff_id, 'cpl_define', 'Failure in oasis_def_var' ) 309 ENDIF 310 291 311 !------------------------------------------------------------------ 292 312 ! End of definition phase … … 514 534 END SUBROUTINE oasis_get_localcomm 515 535 516 SUBROUTINE oasis_def_partition(k1,k2,k3) 517 INTEGER , INTENT( out) :: k1,k3 518 INTEGER , INTENT(in ) :: k2(5) 536 SUBROUTINE oasis_def_partition(k1,k2,k3,k4) 537 INTEGER , INTENT( out) :: k1,k3 538 INTEGER , INTENT(in ) :: k2(5) 539 INTEGER, OPTIONAL, INTENT(in ) :: k4 519 540 k1 = k2(1) ; k3 = k2(5) 520 541 WRITE(numout,*) 'oasis_def_partition: Error you sould not be there...' -
branches/UKMO/r6232_new_runoff_coupling/NEMOGCM/NEMO/OPA_SRC/SBC/sbccpl.F90
r11448 r11452 43 43 USE eosbn2 44 44 USE sbcrnf , ONLY : l_rnfcpl 45 USE cpl_rnf_1d ! Coupled runoff using 1D array 45 46 #if defined key_cpl_carbon_cycle 46 47 USE p4zflx, ONLY : oce_co2 … … 401 402 ! ! ------------------------- ! 402 403 srcv(jpr_rnf )%clname = 'O_Runoff' 403 IF( TRIM( sn_rcv_rnf%cldes ) == 'coupled' ) THEN404 IF( TRIM( sn_rcv_rnf%cldes ) == 'coupled' .OR. TRIM( sn_rcv_rnf%cldes ) == 'coupled1d' ) THEN 404 405 srcv(jpr_rnf)%laction = .TRUE. 405 406 l_rnfcpl = .TRUE. ! -> no need to read runoffs in sbcrnf … … 407 408 IF(lwp) WRITE(numout,*) 408 409 IF(lwp) WRITE(numout,*) ' runoffs received from oasis -> force ln_rnf = ', ln_rnf 410 ! Written here like this to allow merging with other branches (river mask) 411 IF( TRIM( sn_rcv_rnf%cldes ) == 'coupled' ) THEN 412 srcv(jpr_rnf)%laction = .TRUE. 413 ELSE 414 srcv(jpr_rnf)%laction = .FALSE. 415 ENDIF 409 416 ENDIF 410 417 ! … … 761 768 ENDIF 762 769 ENDIF 770 771 ! Initialise 1D river outflow scheme 772 nn_cpl_river = 1 773 IF ( TRIM( sn_rcv_rnf%cldes ) == 'coupled1d' ) CALL cpl_rnf_1d_init ! Coupled runoff using 1D array 763 774 764 775 ! … … 1072 1083 ! 1073 1084 ! ! runoffs and calving (added in emp) 1074 IF( srcv(jpr_rnf)%laction ) rnf(:,:) = frcv(jpr_rnf)%z3(:,:,1) 1085 IF( srcv(jpr_rnf)%laction ) rnf(:,:) = frcv(jpr_rnf)%z3(:,:,1) 1086 IF ( TRIM( sn_rcv_rnf%cldes ) == 'coupled1d' ) CALL cpl_rnf_1d_rcv( isec) 1075 1087 IF( srcv(jpr_cal)%laction ) zemp(:,:) = zemp(:,:) - frcv(jpr_cal)%z3(:,:,1) 1076 1088 … … 1331 1343 1332 1344 1333 SUBROUTINE sbc_cpl_ice_flx( p_frld, palbi, psst, pist )1345 SUBROUTINE sbc_cpl_ice_flx( kt, p_frld, palbi, psst, pist ) 1334 1346 !!---------------------------------------------------------------------- 1335 1347 !! *** ROUTINE sbc_cpl_ice_flx *** … … 1371 1383 !! sprecip solid precipitation over the ocean 1372 1384 !!---------------------------------------------------------------------- 1385 INTEGER, INTENT(in) :: kt ! ocean model time step index 1373 1386 REAL(wp), INTENT(in ), DIMENSION(:,:) :: p_frld ! lead fraction [0 to 1] 1374 1387 ! optional arguments, used only in 'mixed oce-ice' case … … 1384 1397 !!---------------------------------------------------------------------- 1385 1398 ! 1399 INTEGER :: isec ! number of seconds since nit000 (assuming rdttra did not change since nit000) 1400 1386 1401 IF( nn_timing == 1 ) CALL timing_start('sbc_cpl_ice_flx') 1387 1402 ! … … 1432 1447 CALL iom_put( 'calving_cea', frcv(jpr_cal)%z3(:,:,1) ) 1433 1448 ENDIF 1449 isec = ( kt - nit000 ) * NINT( rdttra(1) ) 1450 CALL cpl_rnf_1d_rcv( isec) 1434 1451 1435 1452 IF( ln_mixcpl ) THEN -
branches/UKMO/r6232_new_runoff_coupling/NEMOGCM/NEMO/OPA_SRC/SBC/sbcice_cice.F90
r11448 r11452 139 139 CALL cice_sbc_force(kt) 140 140 ELSE IF ( ksbc == jp_purecpl ) THEN 141 CALL sbc_cpl_ice_flx( 1.0-fr_i )141 CALL sbc_cpl_ice_flx( kt, 1.0-fr_i ) 142 142 ENDIF 143 143
Note: See TracChangeset
for help on using the changeset viewer.