Line data Source code
1 : module mo_prod_loss 2 : use shr_kind_mod, only : r8 => shr_kind_r8 3 : private 4 : public :: exp_prod_loss 5 : public :: imp_prod_loss 6 : contains 7 1489176 : subroutine exp_prod_loss( prod, loss, y, rxt, het_rates ) 8 : use ppgrid, only : pver 9 : implicit none 10 : !-------------------------------------------------------------------- 11 : ! ... dummy args 12 : !-------------------------------------------------------------------- 13 : real(r8), dimension(:,:,:), intent(out) :: & 14 : prod, & 15 : loss 16 : real(r8), intent(in) :: y(:,:,:) 17 : real(r8), intent(in) :: rxt(:,:,:) 18 : real(r8), intent(in) :: het_rates(:,:,:) 19 : !-------------------------------------------------------------------- 20 : ! ... loss and production for Explicit method 21 : !-------------------------------------------------------------------- 22 2315495520 : loss(:,:,1) = ( + het_rates(:,:,6))* y(:,:,6) 23 2315495520 : prod(:,:,1) = 0._r8 24 1489176 : end subroutine exp_prod_loss 25 4348047600 : subroutine imp_prod_loss( prod, loss, y, rxt, het_rates ) 26 : use ppgrid, only : pver 27 : implicit none 28 : !-------------------------------------------------------------------- 29 : ! ... dummy args 30 : !-------------------------------------------------------------------- 31 : real(r8), dimension(:), intent(out) :: & 32 : prod, & 33 : loss 34 : real(r8), intent(in) :: y(:) 35 : real(r8), intent(in) :: rxt(:) 36 : real(r8), intent(in) :: het_rates(:) 37 : !-------------------------------------------------------------------- 38 : ! ... loss and production for Implicit method 39 : !-------------------------------------------------------------------- 40 4348047600 : loss(1) = ( + het_rates(1))* y(1) 41 4348047600 : prod(1) = 0._r8 42 4348047600 : loss(2) = ( + het_rates(2))* y(2) 43 4348047600 : prod(2) = 0._r8 44 4348047600 : loss(3) = ( + rxt(8) + het_rates(3))* y(3) 45 4348047600 : prod(3) = 0._r8 46 4348047600 : loss(4) = ( + rxt(9) + het_rates(4))* y(4) 47 4348047600 : prod(4) = 0._r8 48 4348047600 : loss(5) = ( + rxt(10) + het_rates(5))* y(5) 49 4348047600 : prod(5) = 0._r8 50 4348047600 : loss(6) = ( + rxt(11) + rxt(12) + rxt(14) + het_rates(7))* y(7) 51 4348047600 : prod(6) = 0._r8 52 4348047600 : loss(7) = ( + het_rates(8))* y(8) 53 4348047600 : prod(7) = 0._r8 54 4348047600 : loss(8) = ( + het_rates(9))* y(9) 55 4348047600 : prod(8) = 0._r8 56 4348047600 : loss(9) = ( + het_rates(10))* y(10) 57 4348047600 : prod(9) = 0._r8 58 4348047600 : loss(10) = ( + rxt(1) + rxt(5) + het_rates(11))* y(11) 59 4348047600 : prod(10) = 0._r8 60 4348047600 : loss(11) = ( + het_rates(12))* y(12) 61 4348047600 : prod(11) =rxt(13)*y(23) 62 4348047600 : loss(12) = ( + rxt(7) + het_rates(13))* y(13) 63 4348047600 : prod(12) = 0._r8 64 4348047600 : loss(13) = ( + het_rates(14))* y(14) 65 4348047600 : prod(13) = 0._r8 66 4348047600 : loss(14) = ( + het_rates(15))* y(15) 67 4348047600 : prod(14) = 0._r8 68 4348047600 : loss(15) = ( + het_rates(16))* y(16) 69 4348047600 : prod(15) = 0._r8 70 4348047600 : loss(16) = ( + het_rates(17))* y(17) 71 4348047600 : prod(16) = 0._r8 72 4348047600 : loss(17) = ( + het_rates(18))* y(18) 73 4348047600 : prod(17) = 0._r8 74 4348047600 : loss(18) = ( + het_rates(19))* y(19) 75 4348047600 : prod(18) = 0._r8 76 4348047600 : loss(19) = ( + het_rates(20))* y(20) 77 4348047600 : prod(19) = 0._r8 78 4348047600 : loss(20) = ( + het_rates(21))* y(21) 79 4348047600 : prod(20) = 0._r8 80 4348047600 : loss(21) = ( + het_rates(22))* y(22) 81 4348047600 : prod(21) = 0._r8 82 4348047600 : loss(22) = ( + rxt(13) + het_rates(23))* y(23) 83 4348047600 : prod(22) = (rxt(11) +rxt(12) +.500_r8*rxt(14))*y(7) 84 4348047600 : loss(23) = ( + het_rates(24))* y(24) 85 4348047600 : prod(23) = 0._r8 86 4348047600 : loss(24) = ( + het_rates(25))* y(25) 87 4348047600 : prod(24) = 0._r8 88 4348047600 : loss(25) = ( + het_rates(26))* y(26) 89 4348047600 : prod(25) = 0._r8 90 4348047600 : loss(26) = ( + rxt(2) + het_rates(27))* y(27) 91 4348047600 : prod(26) = 0._r8 92 4348047600 : loss(27) = ( + rxt(3) + het_rates(28))* y(28) 93 4348047600 : prod(27) = 0._r8 94 4348047600 : loss(28) = ( + rxt(15) + het_rates(29))* y(29) 95 4348047600 : prod(28) = 0._r8 96 4348047600 : loss(29) = ( + het_rates(30))* y(30) 97 4348047600 : prod(29) =rxt(15)*y(29) 98 4348047600 : loss(30) = ( + rxt(4) + het_rates(31))* y(31) 99 4348047600 : prod(30) =2.000_r8*rxt(10)*y(5) +rxt(5)*y(11) 100 4348047600 : end subroutine imp_prod_loss 101 : end module mo_prod_loss