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