| 1 | SUBROUTINE perosat(ngrid,nlayer,nq,ig, ptimestep, |
|---|
| 2 | $ pplev, pplay, zt, |
|---|
| 3 | & zy, pdqcloud, pdqscloud) |
|---|
| 4 | |
|---|
| 5 | use tracer_mod, only: igcm_h2o2, mmol |
|---|
| 6 | use conc_mod, only: mmean |
|---|
| 7 | USE comcstfi_h |
|---|
| 8 | IMPLICIT NONE |
|---|
| 9 | |
|---|
| 10 | c======================================================================= |
|---|
| 11 | c Treatment of saturation of hydrogen peroxide (H2O2) |
|---|
| 12 | c |
|---|
| 13 | c Modif de zq si saturation dans l'atmopshere |
|---|
| 14 | c si zq(ig,l)> zqsat(ig,l) -> zq(ig,l)=zqsat(ig,l) |
|---|
| 15 | c Le test est effectue de bas en haut. H2O2 condense |
|---|
| 16 | c (si saturation) est remis dans la couche en dessous. |
|---|
| 17 | c H2O2 condense dans la couche du bas est depose a la surface |
|---|
| 18 | c |
|---|
| 19 | c WARNING : H2O2 mixing ratio is assumed to be q(igcm_h2o2) |
|---|
| 20 | c index igcm_h2o2 is known from tracer_mod |
|---|
| 21 | c======================================================================= |
|---|
| 22 | |
|---|
| 23 | c----------------------------------------------------------------------- |
|---|
| 24 | c declarations: |
|---|
| 25 | c ------------- |
|---|
| 26 | |
|---|
| 27 | c |
|---|
| 28 | c arguments: |
|---|
| 29 | c ---------- |
|---|
| 30 | |
|---|
| 31 | integer,intent(in) :: ngrid ! number of atmospheric columns |
|---|
| 32 | integer,intent(in) :: nlayer ! number of atmospheric layers |
|---|
| 33 | integer,intent(in) :: nq ! number of tracers |
|---|
| 34 | INTEGER ig |
|---|
| 35 | REAL ptimestep ! pas de temps physique (s) |
|---|
| 36 | REAL pplev(ngrid,nlayer+1) ! pression aux inter-couches (Pa) |
|---|
| 37 | REAL pplay(ngrid,nlayer) ! pression au milieu des couches (Pa) |
|---|
| 38 | REAL zt(nlayer) ! temperature au centre des couches (K) |
|---|
| 39 | ! deja mise a jour dans calchim |
|---|
| 40 | |
|---|
| 41 | c Traceurs : |
|---|
| 42 | real zy(nlayer,nq) ! traceur (fraction molaire sortie chimie) |
|---|
| 43 | real pdqcloud(ngrid,nlayer,nq) ! tendance condensation (kg/kg.s-1) |
|---|
| 44 | real pdqscloud(ngrid,nq) ! flux en surface (kg.m-2.s-1) |
|---|
| 45 | |
|---|
| 46 | c local: |
|---|
| 47 | c ------ |
|---|
| 48 | |
|---|
| 49 | INTEGER l,iq |
|---|
| 50 | |
|---|
| 51 | REAL zysat(nlayer) |
|---|
| 52 | REAL zynew(nlayer) ! mole fraction after condensation |
|---|
| 53 | REAL psat_hg ! pression saturante (mm Hg) |
|---|
| 54 | REAL psat_hpa ! pression saturante (hPa) |
|---|
| 55 | logical,save :: firstcall=.true. |
|---|
| 56 | |
|---|
| 57 | c Pour diagnostique : |
|---|
| 58 | c ~~~~~~~~~~~~~~~~~ |
|---|
| 59 | REAL taucond(ngrid,nlayer) ! taux de condensation (kg/kg/s-1) |
|---|
| 60 | |
|---|
| 61 | c----------------------------------------------------------------------- |
|---|
| 62 | c 1. initialisation/verification |
|---|
| 63 | c ------------------------------ |
|---|
| 64 | c |
|---|
| 65 | if (firstcall) then |
|---|
| 66 | ! check that there is an h2o2 tracer: |
|---|
| 67 | if (igcm_h2o2.eq.0) then |
|---|
| 68 | write(*,*) "perosat: error; no h2o2 tracer !!!!" |
|---|
| 69 | stop |
|---|
| 70 | endif |
|---|
| 71 | firstcall=.false. |
|---|
| 72 | endif |
|---|
| 73 | |
|---|
| 74 | c ---------------------------------------------- |
|---|
| 75 | c |
|---|
| 76 | c Rapport de melange a saturation dans la couche l : |
|---|
| 77 | c ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
|---|
| 78 | c |
|---|
| 79 | c d'apres Lindner, Planet. Space Sci., 36, 125, 1988. |
|---|
| 80 | c domaine d'application: T < 220 K |
|---|
| 81 | c |
|---|
| 82 | do l = 1,nlayer |
|---|
| 83 | |
|---|
| 84 | c print *,'ig=',ig,' l=',l,' igcm_h2o2=',igcm_h2o2 |
|---|
| 85 | c print *,'y=',zy(l,igcm_h2o2),' T=',zt(l) |
|---|
| 86 | |
|---|
| 87 | zynew(l) = zy(l,igcm_h2o2) |
|---|
| 88 | |
|---|
| 89 | if (zt(l) .le. 220.) then |
|---|
| 90 | psat_hg = 10.**(11.98 - (3422./zt(l))) |
|---|
| 91 | psat_hpa = psat_hg*760./1013. |
|---|
| 92 | zysat(l) = (psat_hpa*100./pplay(ig,l)) |
|---|
| 93 | else |
|---|
| 94 | zysat(l) = 1.e+30 |
|---|
| 95 | end if |
|---|
| 96 | |
|---|
| 97 | c print *,'ysat=',zysat(l) |
|---|
| 98 | |
|---|
| 99 | end do |
|---|
| 100 | |
|---|
| 101 | c taux de condensation (kg/kg/s-1) dans les differentes couches |
|---|
| 102 | c ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
|---|
| 103 | c (Pour diagnostic seulement !) |
|---|
| 104 | c |
|---|
| 105 | do l=1, nlayer |
|---|
| 106 | taucond(ig,l)=max((zy(l,igcm_h2o2)-zysat(l))*mmol(igcm_h2o2) |
|---|
| 107 | $ /(mmean(ig,l)*ptimestep),0.) |
|---|
| 108 | end do |
|---|
| 109 | c |
|---|
| 110 | c Saturation couche nlay a 2 : |
|---|
| 111 | c ~~~~~~~~~~~~~~~~~~~~~~~~~~ |
|---|
| 112 | c |
|---|
| 113 | do l=nlayer,2, -1 |
|---|
| 114 | if (zynew(l).gt.zysat(l)) then |
|---|
| 115 | zynew(l-1) = zynew(l-1) + (zynew(l) - zysat(l)) |
|---|
| 116 | & *(pplev(ig,l)-pplev(ig,l+1))/(pplev(ig,l-1)-pplev(ig,l)) |
|---|
| 117 | |
|---|
| 118 | zynew(l)=zysat(l) |
|---|
| 119 | endif |
|---|
| 120 | enddo |
|---|
| 121 | c |
|---|
| 122 | c Saturation couche l=1 |
|---|
| 123 | c ~~~~~~~~~~~~~~~~~~~~~ |
|---|
| 124 | c |
|---|
| 125 | if (zynew(1).gt.zysat(1)) then |
|---|
| 126 | pdqscloud(ig,igcm_h2o2)= (zynew(1)-zysat(1))*mmol(igcm_h2o2) |
|---|
| 127 | $ *(pplev(ig,1)-pplev(ig,2))/(mmean(ig,1)*g*ptimestep) |
|---|
| 128 | c |
|---|
| 129 | zynew(1)=zysat(1) |
|---|
| 130 | else |
|---|
| 131 | pdqscloud(ig,igcm_h2o2)=0 |
|---|
| 132 | end if |
|---|
| 133 | c |
|---|
| 134 | c Tendance finale |
|---|
| 135 | c ~~~~~~~~~~~~~~~ |
|---|
| 136 | c |
|---|
| 137 | do l=1, nlayer |
|---|
| 138 | pdqcloud(ig,l,igcm_h2o2)=(zynew(l) - zy(l,igcm_h2o2)) |
|---|
| 139 | & *mmol(igcm_h2o2)/(mmean(ig,l)*ptimestep) |
|---|
| 140 | c print *,'pdqcloud=',pdqcloud(ig,l,igcm_h2o2) |
|---|
| 141 | end do |
|---|
| 142 | |
|---|
| 143 | RETURN |
|---|
| 144 | END |
|---|