| 1 | subroutine cond_muphy(ngrid,nlayer,pt,dqmuficond,dtlc) |
|---|
| 2 | |
|---|
| 3 | use comcstfi_mod, only: cpp ! Heat capacity of the atmosphere [J.kg-1.K-1] |
|---|
| 4 | use tracer_h |
|---|
| 5 | |
|---|
| 6 | implicit none |
|---|
| 7 | |
|---|
| 8 | !==================================================================== |
|---|
| 9 | ! |
|---|
| 10 | ! Purpose |
|---|
| 11 | ! ------- |
|---|
| 12 | ! The routine calculates the latent heat |
|---|
| 13 | ! from condensation of species from microphysics |
|---|
| 14 | ! |
|---|
| 15 | ! INPUT |
|---|
| 16 | ! ----- |
|---|
| 17 | ! ngrid = Number of grid points in the chunk [-] |
|---|
| 18 | ! nlayer = Number of vertical layers [-] |
|---|
| 19 | ! pt = Temperature [K] |
|---|
| 20 | ! dqmuficond = Trend of gas condensed in the microphysics [kg.kg_air-1.s-1] |
|---|
| 21 | ! |
|---|
| 22 | ! OUTPUT |
|---|
| 23 | ! ------ |
|---|
| 24 | ! dtlc = Condensation heating rate [K.s-1] |
|---|
| 25 | ! |
|---|
| 26 | ! Author |
|---|
| 27 | ! ------ |
|---|
| 28 | ! B. de Batz de Trenquelléon (07/2023) |
|---|
| 29 | !==================================================================== |
|---|
| 30 | |
|---|
| 31 | |
|---|
| 32 | !------------------------------------ |
|---|
| 33 | ! 0. DECLARATIONS |
|---|
| 34 | !------------------------------------ |
|---|
| 35 | |
|---|
| 36 | ! Inputs : |
|---|
| 37 | !--------- |
|---|
| 38 | integer, intent(in) :: ngrid |
|---|
| 39 | integer, intent(in) :: nlayer |
|---|
| 40 | real, intent(in) :: pt(ngrid,nlayer) |
|---|
| 41 | real, intent(in) :: dqmuficond(ngrid,nlayer,size(ices_indx)) |
|---|
| 42 | |
|---|
| 43 | ! Outputs : |
|---|
| 44 | !---------- |
|---|
| 45 | real, intent(out) :: dtlc(ngrid,nlayer) |
|---|
| 46 | |
|---|
| 47 | ! Local variables : |
|---|
| 48 | !------------------ |
|---|
| 49 | integer :: iq |
|---|
| 50 | real*8 :: Lc(ngrid,nlayer,size(ices_indx)) ! Condensation latente heat [J.kg-1] |
|---|
| 51 | |
|---|
| 52 | |
|---|
| 53 | !------------------------------------ |
|---|
| 54 | ! 1. INITIALISATION |
|---|
| 55 | !------------------------------------ |
|---|
| 56 | |
|---|
| 57 | ! Variables set to 0 : |
|---|
| 58 | ! ~~~~~~~~~~~~~~~~~~~~ |
|---|
| 59 | dtlc(:,:) = 0.0D0 |
|---|
| 60 | Lc(:,:,:) = 0.0D0 |
|---|
| 61 | |
|---|
| 62 | |
|---|
| 63 | ! Computes Lc for ices [J.kg-1] : |
|---|
| 64 | ! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
|---|
| 65 | call calc_condlh(ngrid,nlayer,pt,Lc) |
|---|
| 66 | |
|---|
| 67 | |
|---|
| 68 | ! Sum of condensation latent heat [J.kg_air-1.s-1] : |
|---|
| 69 | ! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
|---|
| 70 | do iq = 1, size(ices_indx) |
|---|
| 71 | dtlc(:,:) = dtlc(:,:) + (dqmuficond(:,:,iq) * Lc(:,:,iq)) |
|---|
| 72 | enddo |
|---|
| 73 | |
|---|
| 74 | |
|---|
| 75 | ! Condensation heating rate : |
|---|
| 76 | ! ~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
|---|
| 77 | ! If ice formation : dqmuficond > 0 --> dtlc > 0 |
|---|
| 78 | ! Else vaporisation : dqmuficond < 0 --> dtlc < 0 |
|---|
| 79 | dtlc(:,:) = dtlc(:,:) / cpp ! [K.s-1] |
|---|
| 80 | |
|---|
| 81 | return |
|---|
| 82 | |
|---|
| 83 | end subroutine cond_muphy |
|---|