Line data Source code
1 : ! Include shortname defintions, so that the F77 code does not have to be modified to 2 : ! reference the CARMA structure. 3 : #include "carma_globaer.h" 4 : 5 : !! This routine drives the potentially slower microphysics calculations. 6 : !! 7 : !! Originally part of microphy. Now in this separate routine to allow 8 : !! time splitting of coagulation at a different timestep size from 9 : !! other microphysical calcs. 10 : !! 11 : !! @author McKie 12 : !! @version Sep-1997 13 1050624 : subroutine microslow(carma, cstate, rc) 14 : 15 : ! carma types defs 16 : use carma_precision_mod 17 : use carma_enums_mod 18 : use carma_constants_mod 19 : use carma_types_mod 20 : use carmastate_mod 21 : use carma_mod 22 : 23 : implicit none 24 : 25 : type(carma_type), intent(in) :: carma !! the carma object 26 : type(carmastate_type), intent(inout) :: cstate !! the carma state object 27 : integer, intent(inout) :: rc !! return code, negative indicates failure 28 : 29 : ! Local Declarations 30 : integer :: ibin 31 : integer :: ielem 32 : 33 : 34 : 35 : ! Set production terms and loss rates due to slow microphysics 36 : ! processes (coagulation) to zero. 37 10451607552 : coagpe(:,:,:) = 0._f 38 2986924032 : coaglg(:,:,:) = 0._f 39 : 40 : ! Calculate (implicit) particle loss rates for coagulation. 41 1050624 : call coagl(carma, cstate, rc) 42 : 43 : ! Calculate particle production terms and solve for particle 44 : ! concentrations at end of time step. 45 : ! 46 : ! NOTE: The order of elements required by CARMA to work with the 47 : ! element loop first is: if you have a group that is both a source 48 : ! and product of coagulation, then it needs to come after the 49 : ! other group that participates in that coagulation in the element 50 : ! table. For example, icoag(2,1) = 1 will not work, but 51 : ! icoag(2,1) = 2 should work. 52 8404992 : do ielem = 1,NELEM 53 155492352 : do ibin = 1,NBIN 54 147087360 : call coagp(carma, cstate, ibin, ielem, rc) 55 154441728 : call csolve(carma, cstate, ibin, ielem, rc) 56 : enddo 57 : enddo 58 : 59 : ! Return to caller with new particle concentrations. 60 1050624 : return 61 1050624 : end