[57] | 1 | SUBROUTINE euvheat(pt,pdt,pplev,pplay,zzlay,dist_sol, |
---|
| 2 | $ mu0,ptimestep,ptime,zday,pq,pdq,pdteuv) |
---|
| 3 | |
---|
| 4 | IMPLICIT NONE |
---|
| 5 | c======================================================================= |
---|
| 6 | c subject: |
---|
| 7 | c -------- |
---|
| 8 | c Computing heating rate due to EUV absorption |
---|
| 9 | c |
---|
| 10 | c author: MAC 2002 |
---|
| 11 | c ------ |
---|
| 12 | c |
---|
| 13 | c input: |
---|
| 14 | c ----- |
---|
| 15 | c dist_sol sun-Mars distance (AU) |
---|
| 16 | c mu0(ngridmx) |
---|
| 17 | c pplay(ngrid,nlayer) pressure at middle of layers (Pa) |
---|
| 18 | c |
---|
| 19 | c output: |
---|
| 20 | c ------- |
---|
| 21 | c |
---|
| 22 | c pdteuv(ngrid,nlayer) Heating rate (K/s) |
---|
| 23 | c |
---|
| 24 | c======================================================================= |
---|
| 25 | c |
---|
| 26 | c 0. Declarations : |
---|
| 27 | c ------------------ |
---|
| 28 | c |
---|
| 29 | #include "dimensions.h" |
---|
| 30 | #include "dimphys.h" |
---|
| 31 | #include "comcstfi.h" |
---|
| 32 | #include "callkeys.h" |
---|
| 33 | #include "comdiurn.h" |
---|
| 34 | #include "param.h" |
---|
| 35 | #include "param_v3.h" |
---|
| 36 | #include "chimiedata.h" |
---|
| 37 | #include "tracer.h" |
---|
| 38 | #include "conc.h" |
---|
| 39 | c----------------------------------------------------------------------- |
---|
| 40 | c Input/Output |
---|
| 41 | c ------------ |
---|
| 42 | |
---|
| 43 | REAL pplay(ngridmx,nlayermx) |
---|
| 44 | REAL zzlay(ngridmx,nlayermx) |
---|
| 45 | real pplev(ngridmx,nlayermx+1) |
---|
| 46 | REAL pt(ngridmx,nlayermx) |
---|
| 47 | REAL pdt(ngridmx,nlayermx) |
---|
| 48 | real zday |
---|
| 49 | REAL dist_sol |
---|
| 50 | real mu0(ngridmx) |
---|
| 51 | real pq(ngridmx,nlayermx,nqmx) |
---|
| 52 | real pdq(ngridmx,nlayermx,nqmx) |
---|
| 53 | real ptimestep,ptime |
---|
| 54 | |
---|
| 55 | |
---|
| 56 | REAL pdteuv(ngridmx,nlayermx) |
---|
| 57 | c |
---|
| 58 | c Local variables : |
---|
| 59 | c ----------------- |
---|
| 60 | integer nespeuv |
---|
| 61 | parameter (nespeuv=6) |
---|
| 62 | |
---|
| 63 | INTEGER l,iq,ig,n,inif ! , ngrid, nlayer |
---|
| 64 | real rm(nlayermx,nespeuv) ! number density (cm-3) |
---|
| 65 | real zq(ngridmx,nlayermx,nqmx) |
---|
| 66 | real zt(ngridmx,nlayermx) |
---|
| 67 | real zlocal(nlayermx) |
---|
| 68 | real zenit |
---|
| 69 | real aux1(nlayermx) |
---|
| 70 | real aux2(nlayermx) |
---|
| 71 | real jtot(nlayermx) |
---|
| 72 | real dens ! amu/cm-3 |
---|
| 73 | real tx(nlayermx) |
---|
| 74 | real tmean |
---|
| 75 | |
---|
| 76 | integer i_co2, i_o2, i_h2, i_h2o, i_h2o2, i_o |
---|
| 77 | integer g_co2, g_co, g_o2, g_h2, g_h2o, g_h2o2, |
---|
| 78 | $ g_o1d, g_o, g_h, g_oh, g_ho2, g_o3, g_n2 |
---|
| 79 | |
---|
| 80 | |
---|
| 81 | logical firstcall |
---|
| 82 | save firstcall |
---|
| 83 | data firstcall /.true./ |
---|
| 84 | |
---|
| 85 | if (firstcall) then |
---|
| 86 | if ((nqchem_min+nespeuv).gt.nqmx) then |
---|
| 87 | print*,'******* Dimension problem in EUVHEAT ********' |
---|
| 88 | STOP |
---|
| 89 | endif |
---|
| 90 | |
---|
| 91 | firstcall= .false. |
---|
| 92 | ! print*,'EUV',nlayer,nlayermx,ngrid,ngridmx |
---|
| 93 | endif |
---|
| 94 | |
---|
| 95 | cccccccccccccccccccccccccccccccccccccccccccccccccccccccc |
---|
| 96 | c tracer numbering in the gcm |
---|
| 97 | cccccccccccccccccccccccccccccccccccccccccccccccccccccccc |
---|
| 98 | c |
---|
| 99 | g_co2 = nqchem_min |
---|
| 100 | g_co = nqchem_min + 1 |
---|
| 101 | g_o = nqchem_min + 2 |
---|
| 102 | g_o1d = nqchem_min + 3 |
---|
| 103 | g_o2 = nqchem_min + 4 |
---|
| 104 | g_o3 = nqchem_min + 5 |
---|
| 105 | g_h = nqchem_min + 6 |
---|
| 106 | g_h2 = nqchem_min + 7 |
---|
| 107 | g_oh = nqchem_min + 8 |
---|
| 108 | g_ho2 = nqchem_min + 9 |
---|
| 109 | g_h2o2 = nqchem_min + 10 |
---|
| 110 | g_n2 = nqchem_min + 11 |
---|
| 111 | g_h2o = nqmx |
---|
| 112 | |
---|
| 113 | cccccccccccccccccccccccccccccccccccccccccccccccccccccccc |
---|
| 114 | c tracer numbering in the EUV heating |
---|
| 115 | cccccccccccccccccccccccccccccccccccccccccccccccccccccccc |
---|
| 116 | c |
---|
| 117 | i_co2 = 1 |
---|
| 118 | i_o2 = 2 |
---|
| 119 | i_o = 3 |
---|
| 120 | i_h2 = 4 |
---|
| 121 | i_h2o = 5 |
---|
| 122 | i_h2o2 = 6 |
---|
| 123 | c |
---|
| 124 | cccccccccccccccccccccccccccccccccccccccccccccccccccccccc |
---|
| 125 | |
---|
| 126 | do l=1,nlayermx |
---|
| 127 | do ig=1,ngridmx |
---|
| 128 | do iq=nqchem_min,nqmx |
---|
| 129 | zq(ig,l,iq)=pq(ig,l,iq)+pdq(ig,l,iq)*ptimestep |
---|
| 130 | enddo |
---|
| 131 | zt(ig,l)=pt(ig,l)+pdt(ig,l)*ptimestep |
---|
| 132 | enddo |
---|
| 133 | enddo |
---|
| 134 | |
---|
| 135 | call flujo(solarcondate) |
---|
| 136 | c call flujo(solarcondate+zday/365.) ! version with EUV time evolution |
---|
| 137 | |
---|
| 138 | do ig=1,ngridmx |
---|
| 139 | |
---|
| 140 | zenit=acos(mu0(ig))*180./acos(-1.) |
---|
| 141 | |
---|
| 142 | do l=1,nlayermx |
---|
| 143 | dens=pplay(ig,l)/(rnew(ig,l)*zt(ig,l)) / 1.66e-21 |
---|
| 144 | rm(l,i_co2) = zq(ig,l,g_co2) * dens / mmol(g_co2) |
---|
| 145 | rm(l,i_o2) = zq(ig,l,g_o2) * dens / mmol(g_o2) |
---|
| 146 | rm(l,i_o) = zq(ig,l,g_o) * dens / mmol(g_o) |
---|
| 147 | rm(l,i_h2) = zq(ig,l,g_h2) * dens / mmol(g_h2) |
---|
| 148 | rm(l,i_h2o) = zq(ig,l,g_h2o) * dens / mmol(g_h2o) |
---|
| 149 | rm(l,i_h2o2) = zq(ig,l,g_h2o2) * dens / mmol(g_h2o2) |
---|
| 150 | enddo |
---|
| 151 | |
---|
| 152 | c zlocal(1)=-log(pplay(ig,1)/pplev(ig,1)) |
---|
| 153 | c & *Rnew(ig,1)*zt(ig,1)/g |
---|
| 154 | zlocal(1)=zzlay(ig,1) |
---|
| 155 | zlocal(1)=zlocal(1)/1000. |
---|
| 156 | tx(1)=zt(ig,1) |
---|
| 157 | |
---|
| 158 | do l=2,nlayermx |
---|
| 159 | tx(l)=zt(ig,l) |
---|
| 160 | tmean=tx(l) |
---|
| 161 | if(tx(l).ne.tx(l-1)) |
---|
| 162 | & tmean=(tx(l)-tx(l-1))/log(tx(l)/tx(l-1)) |
---|
| 163 | c zlocal(l)= zlocal(l-1) |
---|
| 164 | c & -log(pplay(ig,l)/pplay(ig,l-1))*Rnew(ig,l-1)*tmean/g/1000. |
---|
| 165 | zlocal(l)=zzlay(ig,l)/1000. |
---|
| 166 | enddo |
---|
| 167 | |
---|
| 168 | call hrtherm (rm(1,i_co2),rm(1,i_o2),rm(1,i_o), |
---|
| 169 | & rm(1,i_h2),rm(1,i_h2o),rm(1,i_h2o2), |
---|
| 170 | & aux1,aux2,tx,nlayermx,zlocal, |
---|
| 171 | & solarcondate+zday/365.,zenit,jtot) |
---|
| 172 | |
---|
| 173 | do l=1,nlayermx |
---|
| 174 | pdteuv(ig,l)=0.16*jtot(l)/10. |
---|
| 175 | & /(cpnew(ig,l)*pplay(ig,l)/(rnew(ig,l)*zt(ig,l))) |
---|
| 176 | & *(1.52/dist_sol)**2 |
---|
| 177 | |
---|
| 178 | enddo |
---|
| 179 | |
---|
| 180 | enddo ! of do ig=1,ngridmx |
---|
| 181 | |
---|
| 182 | return |
---|
| 183 | end |
---|