1 | subroutine moldiffcoeff(dij) |
---|
2 | |
---|
3 | IMPLICIT NONE |
---|
4 | c======================================================================= |
---|
5 | c subject: |
---|
6 | c -------- |
---|
7 | c Computing molecular diffusion coefficients |
---|
8 | c following Nair 94 (pg 131) |
---|
9 | c author: MAC 2002 |
---|
10 | c ------ |
---|
11 | c |
---|
12 | c======================================================================= |
---|
13 | #include "dimensions.h" |
---|
14 | #include "dimphys.h" |
---|
15 | #include "callkeys.h" |
---|
16 | #include "comdiurn.h" |
---|
17 | #include "chimiedata.h" |
---|
18 | #include "tracer.h" |
---|
19 | #include "conc.h" |
---|
20 | |
---|
21 | c----------------------------------------------------------------------- |
---|
22 | c Input/Output |
---|
23 | c ------------ |
---|
24 | INTEGER nq, n, nn, i |
---|
25 | integer i_co2, i_co, i_o2, i_h2, i_h2o, i_h2o2, i_n2, i_o3, |
---|
26 | $ i_o1d, i_o, i_h, i_oh, i_ho2, i_ar |
---|
27 | integer g_co2, g_co, g_o2, g_h2, g_h2o, g_h2o2, |
---|
28 | $ g_o1d, g_o, g_h, g_oh, g_ho2, g_o3, g_n2, g_ar |
---|
29 | integer gcmind(ncomptot) |
---|
30 | |
---|
31 | real dnh |
---|
32 | real dij(ncomptot,ncomptot) |
---|
33 | |
---|
34 | cccccccccccccccccccccccccccccccccccccccccccccccccccccccc |
---|
35 | c tracer numbering in the gcm |
---|
36 | cccccccccccccccccccccccccccccccccccccccccccccccccccccccc |
---|
37 | c |
---|
38 | g_co2 = nqchem_min |
---|
39 | g_co = nqchem_min + 1 |
---|
40 | g_o = nqchem_min + 2 |
---|
41 | g_o1d = nqchem_min + 3 |
---|
42 | g_o2 = nqchem_min + 4 |
---|
43 | g_o3 = nqchem_min + 5 |
---|
44 | g_h = nqchem_min + 6 |
---|
45 | g_h2 = nqchem_min + 7 |
---|
46 | g_oh = nqchem_min + 8 |
---|
47 | g_ho2 = nqchem_min + 9 |
---|
48 | g_h2o2 = nqchem_min + 10 |
---|
49 | g_n2 = nqchem_min + 11 |
---|
50 | g_ar = nqchem_min + 12 |
---|
51 | g_h2o = nqmx |
---|
52 | |
---|
53 | cccccccccccccccccccccccccccccccccccccccccccccccccccccccc |
---|
54 | c tracer numbering in the molecular diffusion |
---|
55 | cccccccccccccccccccccccccccccccccccccccccccccccccccccccc |
---|
56 | c Atomic oxygen must always be the LAST species of the list as |
---|
57 | c it is the dominant species at high altitudes. |
---|
58 | i_co = 1 |
---|
59 | i_n2 = 2 |
---|
60 | i_o2 = 3 |
---|
61 | i_co2 = 4 |
---|
62 | i_h2 = 5 |
---|
63 | i_h = 6 |
---|
64 | i_oh = 7 |
---|
65 | i_ho2 = 8 |
---|
66 | i_h2o = 9 |
---|
67 | i_h2o2 = 10 |
---|
68 | i_o1d = 11 |
---|
69 | i_o3 = 12 |
---|
70 | i_ar = 13 |
---|
71 | i_o = 14 |
---|
72 | c |
---|
73 | cccccccccccccccccccccccccccccccccccccccccccccccccccccccc |
---|
74 | c array to relate local indexes to gcm indexes |
---|
75 | cccccccccccccccccccccccccccccccccccccccccccccccccccccccc |
---|
76 | |
---|
77 | gcmind(i_co) = g_co |
---|
78 | gcmind(i_n2) = g_n2 |
---|
79 | gcmind(i_o2) = g_o2 |
---|
80 | gcmind(i_co2) = g_co2 |
---|
81 | gcmind(i_h2) = g_h2 |
---|
82 | gcmind(i_h) = g_h |
---|
83 | gcmind(i_oh) = g_oh |
---|
84 | gcmind(i_ho2) = g_ho2 |
---|
85 | gcmind(i_h2o) = g_h2o |
---|
86 | gcmind(i_h2o2)= g_h2o2 |
---|
87 | gcmind(i_o1d) = g_o1d |
---|
88 | gcmind(i_o3) = g_o3 |
---|
89 | gcmind(i_o) = g_o |
---|
90 | gcmind(i_ar) = g_ar |
---|
91 | c |
---|
92 | cccccccccccccccccccccccccccccccccccccccccccccccccccccccc |
---|
93 | |
---|
94 | |
---|
95 | dij(i_h2,i_co) = 0.0000651 |
---|
96 | dij(i_h2,i_n2) = 0.0000674 |
---|
97 | dij(i_h2,i_o2) = 0.0000697 |
---|
98 | dij(i_h2,i_co2) = 0.0000550 |
---|
99 | dij(i_h2,i_h2) = 0.0 |
---|
100 | dij(i_h2,i_h) = 0.0 |
---|
101 | dij(i_h2,i_oh) = 0.0 !0003 |
---|
102 | dij(i_h2,i_ho2) = 0.0 !0003 |
---|
103 | dij(i_h2,i_h2o) = 0.0 !0003 |
---|
104 | dij(i_h2,i_h2o2) = 0.0 !0003 |
---|
105 | dij(i_h2,i_o1d) = 0.0 |
---|
106 | dij(i_h2,i_o3) = 0.0 !0003 |
---|
107 | dij(i_h2,i_o) = 0.0 |
---|
108 | dij(i_h2,i_ar) = 0.0 |
---|
109 | |
---|
110 | c dij(i_h,i_o) = 0.0000144 |
---|
111 | dij(i_h,i_o) = 0.000114 |
---|
112 | |
---|
113 | print*,' COEFF CALC' |
---|
114 | open(56,file='coeffs.dat',status='unknown') |
---|
115 | do n=1,ncomptot |
---|
116 | if (dij(i_h2,n).gt.0.0) then |
---|
117 | do nn=n,ncomptot |
---|
118 | dij(nn,n)=dij(i_h2,n) |
---|
119 | & *sqrt(mmol(g_h2)/mmol(gcmind(nn))) |
---|
120 | if(n.eq.nn) dij(nn,n)=1.0 |
---|
121 | dij(n,nn)=dij(nn,n) |
---|
122 | enddo |
---|
123 | endif |
---|
124 | if (dij(i_h2,n).eq.0.0) then |
---|
125 | dnh=dij(i_h,i_o)*sqrt(mmol(g_o)/mmol(gcmind(n))) |
---|
126 | do nn=n,ncomptot |
---|
127 | dij(nn,n)=dnh*sqrt(mmol(g_h)/mmol(gcmind(nn))) |
---|
128 | if(n.eq.nn) dij(nn,n)=1.0 |
---|
129 | dij(n,nn)=dij(nn,n) |
---|
130 | enddo |
---|
131 | endif |
---|
132 | enddo |
---|
133 | |
---|
134 | do n=1,ncomptot |
---|
135 | do nn=n,ncomptot |
---|
136 | write(56,*) n,nn,dij(n,nn) !*1.e5/1.381e-23/(273**1.75) |
---|
137 | enddo |
---|
138 | enddo |
---|
139 | close(56) |
---|
140 | |
---|
141 | |
---|
142 | return |
---|
143 | end |
---|