Changeset 8366 for branches/ORCHIDEE_2_2
- Timestamp:
- 2024-01-08T15:25:30+01:00 (11 months ago)
- Location:
- branches/ORCHIDEE_2_2/ORCHIDEE/src_sechiba
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/ORCHIDEE_2_2/ORCHIDEE/src_sechiba/routing_native.f90
r8227 r8366 457 457 CALL routing_flow_set(coastalflow_mean=coastalflow) 458 458 459 CALL irrigation_main( dt_routing, reinfiltration, irrigated_next, irrig_frac, root_deficit, soiltile, &459 CALL irrigation_main( dt_routing, contfrac, reinfiltration, irrigated_next, irrig_frac, root_deficit, soiltile, & 460 460 fraction_aeirrig_sw ) 461 461 -
branches/ORCHIDEE_2_2/ORCHIDEE/src_sechiba/routing_native_irrig.f90
r8227 r8366 219 219 220 220 221 SUBROUTINE irrigation_main(dt_routing, reinfiltration, irrigated_next, irrig_frac, root_deficit, soiltile, &221 SUBROUTINE irrigation_main(dt_routing, contfrac, reinfiltration, irrigated_next, irrig_frac, root_deficit, soiltile, & 222 222 fraction_aeirrig_sw ) 223 223 USE constantes … … 227 227 IMPLICIT NONE 228 228 REAL(r_std), INTENT(IN) :: dt_routing 229 REAL(r_std), INTENT(IN) :: contfrac(nbpt) 229 230 REAL(r_std), INTENT(IN) :: reinfiltration(nbpt) 230 231 REAL(r_std), INTENT(IN) :: irrigated_next(nbpt) … … 242 243 243 244 IF (old_irrig_scheme) THEN 244 CALL irrigation_compute_requested_old( reinfiltration, irrigated, irrig_needs_r)245 CALL irrigation_compute_requested_old(contfrac, reinfiltration, irrigated, irrig_needs_r) 245 246 CALL irrigation_old(irrig_needs_r, irrig_actual_r) 246 247 ELSE 247 CALL irrigation_compute_requested_new(dt_routing, root_deficit, soiltile, irrig_frac, irrig_needs_r)248 CALL irrigation_new( fraction_aeirrig_sw, irrig_needs_r, irrig_actual_r)248 CALL irrigation_compute_requested_new(dt_routing, contfrac, root_deficit, soiltile, irrig_frac, irrig_needs_r) 249 CALL irrigation_new(contfrac,fraction_aeirrig_sw, irrig_needs_r, irrig_actual_r) 249 250 ENDIF 250 251 … … 254 255 ENDIF 255 256 CALL scatter_omp(irrig_actual,irrigation_mean) 256 irrigation_mean(:)=irrigation_mean(:)/ area(:)257 irrigation_mean(:)=irrigation_mean(:)/(area(:)*contfrac(:)) 257 258 CALL irrigation_mean_reset() 258 259 ELSE … … 266 267 267 268 268 SUBROUTINE irrigation_new( fraction_aeirrig_sw, irrig_needs_r, irrig_actual_r)269 SUBROUTINE irrigation_new(contfrac, fraction_aeirrig_sw, irrig_needs_r, irrig_actual_r) 269 270 USE constantes 270 271 USE routing_native_flow_mod, ONLY : routing_mask_r, routing_flow_get, routing_flow_set … … 272 273 USE xios 273 274 IMPLICIT NONE 274 275 REAL(r_std),INTENT(IN) :: fraction_aeirrig_sw(nbpt) !! Total irrigation requirement (water requirements by the crop for its optimal growth) (kg)275 REAL(r_std),INTENT(IN) :: contfrac(nbpt) 276 REAL(r_std),INTENT(IN) :: fraction_aeirrig_sw(nbpt) 276 277 REAL(r_std),INTENT(IN) :: irrig_needs_r(nbpt_r) !! Total irrigation requirement (water requirements by the crop for its optimal growth) (kg) 277 278 REAL(r_std),INTENT(OUT) :: irrig_actual_r(nbpt_r) !! Possible irrigation according to the water availability in the reservoirs (kg) … … 300 301 301 302 CALL gather_omp(fraction_aeirrig_sw, fraction_aeirrig_sw_mpi) 303 !! fraction moyenne => need contfrac ?? 302 304 303 305 IF (is_omp_root) THEN 304 306 305 307 CALL xios_send_field("fraction_aeirrig_sw", fraction_aeirrig_sw_mpi) 306 CALL xios_recv_field("fraction_aeirrig_sw_r", fraction_aeirrig_sw_r) ! ==> need conservative quantity interp 308 CALL xios_recv_field("fraction_aeirrig_sw_r", fraction_aeirrig_sw_r) ! ==> need conservative quantity interp => no flux => to check !!! 307 309 308 310 … … 454 456 455 457 ENDIF 456 458 ELSE 459 irrig_actual_r(ig) = 0 457 460 ENDIF 458 461 ENDDO … … 559 562 560 563 561 SUBROUTINE irrigation_compute_requested_new(dt_routing, root_deficit, soiltile, irrig_frac, irrig_netereq_r)564 SUBROUTINE irrigation_compute_requested_new(dt_routing, contfrac, root_deficit, soiltile, irrig_frac, irrig_netereq_r) 562 565 USE constantes 563 566 USE constantes_soil … … 567 570 IMPLICIT NONE 568 571 REAL(r_std),INTENT(IN) :: dt_routing 572 REAL(r_std),INTENT(IN) :: contfrac(nbpt) 569 573 REAL(r_std),INTENT(IN) :: root_deficit(nbpt) 570 574 REAL(r_std),INTENT(IN) :: soiltile(nbpt,nstm) !! Fraction of each soil tile within vegtot (0-1, unitless) … … 574 578 REAL(r_std) :: irrig_netereq(nbpt) 575 579 REAL(r_std) :: irrig_netereq_mpi(nbp_mpi) 576 REAL(r_std) :: area_mpi(nbp_mpi) 577 580 578 581 INTEGER :: ig 579 582 … … 604 607 ENDDO 605 608 606 CALL gather_omp(irrig_netereq, irrig_netereq_mpi) 607 CALL gather_omp(area, area_mpi) 608 609 CALL gather_omp(irrig_netereq*area*contfrac, irrig_netereq_mpi) 610 609 611 IF (is_omp_root) THEN 610 CALL xios_send_field("irrig_netereq",irrig_netereq_mpi *area_mpi) !! contfrac?612 CALL xios_send_field("irrig_netereq",irrig_netereq_mpi) !! contfrac => ok ? 611 613 CALL xios_recv_field("irrig_netereq_r",irrig_netereq_r) ! ==> need conservative quantity interp 612 614 ENDIF … … 615 617 616 618 617 SUBROUTINE irrigation_compute_requested_old( reinfiltration, irrigated, irrig_need_r)619 SUBROUTINE irrigation_compute_requested_old(contfrac, reinfiltration, irrigated, irrig_need_r) 618 620 USE constantes 619 621 USE xios … … 621 623 USE grid, ONLY : area 622 624 IMPLICIT NONE 625 REAL(r_std),INTENT(IN) :: contfrac(nbpt) 623 626 REAL(r_std),INTENT(IN) :: reinfiltration(nbpt) 624 627 REAL(r_std),INTENT(IN) :: irrigated(nbpt) … … 627 630 REAL(r_std) :: irrig_netereq(nbpt) 628 631 REAL(r_std) :: irrig_netereq_mpi(nbp_mpi) 629 REAL(r_std) :: area_mpi(nbp_mpi) 630 632 631 633 INTEGER :: ig, ir 632 634 … … 641 643 ENDDO 642 644 643 CALL gather_omp(irrig_netereq, irrig_netereq_mpi) 644 CALL gather_omp(area, area_mpi) 645 645 CALL gather_omp(irrig_netereq*area*contfrac, irrig_netereq_mpi) 646 646 647 IF (is_omp_root) THEN 647 CALL xios_send_field("irrig_netereq",irrig_netereq_mpi *area_mpi) ! contfrac ??648 CALL xios_send_field("irrig_netereq",irrig_netereq_mpi) ! contfrac ?? 648 649 CALL xios_recv_field("irrig_netereq_r",irrig_need_r) ! ==> need conservative quantity interp 649 650 ENDIF
Note: See TracChangeset
for help on using the changeset viewer.