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