| 1 |
jscott |
1.1 |
|
| 2 |
|
|
#include "ctrparam.h" |
| 3 |
|
|
|
| 4 |
|
|
! ============================================================ |
| 5 |
|
|
! |
| 6 |
|
|
! CHEMBUDGET.F: Subroutine for calculating total amount of |
| 7 |
|
|
! tracers in MIT Global Chemistry Model |
| 8 |
|
|
! |
| 9 |
|
|
! ------------------------------------------------------------ |
| 10 |
|
|
! |
| 11 |
|
|
! Author: Chien Wang |
| 12 |
|
|
! MIT Joint Program on Science and Policy |
| 13 |
|
|
! of Global Change |
| 14 |
|
|
! |
| 15 |
|
|
! ---------------------------------------------------------- |
| 16 |
|
|
! |
| 17 |
|
|
! Revision History: |
| 18 |
|
|
! |
| 19 |
|
|
! When Who What |
| 20 |
|
|
! ---- ---------- ------- |
| 21 |
|
|
! 022999 Chien Wang rev. |
| 22 |
|
|
! 080100 Chien Wang repack based on CliChem3 & add cpp |
| 23 |
|
|
! 092001 Chien Wang add bc and oc |
| 24 |
|
|
! 051804 Chien Wang rev. for 46x11 |
| 25 |
|
|
! |
| 26 |
|
|
! ========================================================== |
| 27 |
|
|
|
| 28 |
|
|
subroutine chembudget (p) |
| 29 |
|
|
|
| 30 |
|
|
#include "chem_para" |
| 31 |
|
|
#include "chem_com" |
| 32 |
|
|
#include "BD2G04.COM" |
| 33 |
|
|
|
| 34 |
|
|
dimension tlayer(nlev) |
| 35 |
|
|
|
| 36 |
|
|
real :: totalair, tropair, totalf11, totalch4, totalco |
| 37 |
|
|
real :: totalo3, totaloh, totalso2, totalnox |
| 38 |
|
|
real :: totalbc, totaloc |
| 39 |
|
|
|
| 40 |
|
|
! --------------------------------------------------------- |
| 41 |
|
|
#if ( defined CPL_CHEM ) |
| 42 |
|
|
|
| 43 |
|
|
totalair = 0.0 |
| 44 |
|
|
tropair = 0.0 |
| 45 |
|
|
totalf11 = 0.0 |
| 46 |
|
|
|
| 47 |
|
|
c add ch4 and co budget 022996: |
| 48 |
|
|
|
| 49 |
|
|
totalch4 = 0.0 |
| 50 |
|
|
totalco = 0.0 |
| 51 |
|
|
|
| 52 |
|
|
c and others 030996: |
| 53 |
|
|
|
| 54 |
|
|
totalo3 = 0.0 |
| 55 |
|
|
totaloh = 0.0 |
| 56 |
|
|
totalso2 = 0.0 |
| 57 |
|
|
totalnox = 0.0 |
| 58 |
|
|
|
| 59 |
|
|
! === add bc and oc |
| 60 |
|
|
totalbc = 0.0 |
| 61 |
|
|
totaloc = 0.0 |
| 62 |
|
|
|
| 63 |
|
|
i = 1 |
| 64 |
|
|
|
| 65 |
|
|
c Troposphere first: |
| 66 |
|
|
|
| 67 |
|
|
do 111 k=1,n_tropopause |
| 68 |
|
|
do 112 j=1,nlat |
| 69 |
|
|
amass = airmass0(i,j,k)*p(i,j) |
| 70 |
|
|
totalair = totalair |
| 71 |
|
|
& + amass |
| 72 |
|
|
|
| 73 |
|
|
totalf11 = totalf11 |
| 74 |
|
|
& + amass * cfc11(i,j,k) |
| 75 |
|
|
totalch4 = totalch4 |
| 76 |
|
|
& + amass * ch4(i,j,k) |
| 77 |
|
|
totalco = totalco |
| 78 |
|
|
& + amass * co(i,j,k) |
| 79 |
|
|
totalo3 = totalo3 |
| 80 |
|
|
& + amass * o3(i,j,k) |
| 81 |
|
|
totaloh = totaloh |
| 82 |
|
|
& + amass * ho(i,j,k) |
| 83 |
|
|
totalso2 = totalso2 |
| 84 |
|
|
& + amass * so2(i,j,k) |
| 85 |
|
|
totalnox = totalnox |
| 86 |
|
|
& + amass * 14.0*(xno(i,j,k)/30.0 |
| 87 |
|
|
& + xno2(i,j,k)/46.0) !Convert to N |
| 88 |
|
|
totalbc = totalbc |
| 89 |
|
|
& + amass * bcarbon(i,j,k) |
| 90 |
|
|
totaloc = totaloc |
| 91 |
|
|
& + amass * ocarbon(i,j,k) |
| 92 |
|
|
112 continue |
| 93 |
|
|
111 continue |
| 94 |
|
|
|
| 95 |
|
|
tropair = totalair |
| 96 |
|
|
|
| 97 |
|
|
c Whole Atmosphere: |
| 98 |
|
|
|
| 99 |
|
|
do 115 k=n_tropopause+1,nlev |
| 100 |
|
|
do 116 j=1,nlat |
| 101 |
|
|
amass = airmass0(i,j,k)*p(i,j) |
| 102 |
|
|
totalair = totalair |
| 103 |
|
|
& + amass |
| 104 |
|
|
|
| 105 |
|
|
totalf11 = totalf11 |
| 106 |
|
|
& + amass * cfc11(i,j,k) |
| 107 |
|
|
totalch4 = totalch4 |
| 108 |
|
|
& + amass * ch4(i,j,k) |
| 109 |
|
|
totalco = totalco |
| 110 |
|
|
& + amass * co(i,j,k) |
| 111 |
|
|
totalbc = totalbc |
| 112 |
|
|
& + amass * bcarbon(i,j,k) |
| 113 |
|
|
totaloc = totaloc |
| 114 |
|
|
& + amass * ocarbon(i,j,k) |
| 115 |
|
|
116 continue |
| 116 |
|
|
115 continue |
| 117 |
|
|
|
| 118 |
|
|
totalf11 = totalf11 * 1.e-15 !10^6 kg |
| 119 |
|
|
totalch4 = totalch4 * 1.e-18 !TgCH4 |
| 120 |
|
|
totalco = totalco * 1.e-18 !TgCO |
| 121 |
|
|
totalbc = totalbc * 1.e-18 !TgC |
| 122 |
|
|
totaloc = totaloc * 1.e-18 !TgC |
| 123 |
|
|
|
| 124 |
|
|
c troposphere only: |
| 125 |
|
|
totalo3 = totalo3 * 1.e-18 !TgO3 |
| 126 |
|
|
totaloh = totaloh !10^-9 kg |
| 127 |
|
|
totalso2 = totalso2 * 1.e-18 !TGSO2 |
| 128 |
|
|
totalnox = totalnox * 1.e-18 !TGN |
| 129 |
|
|
|
| 130 |
|
|
write(167,100) iyearchem, monthchem, |
| 131 |
|
|
& totalair,tropair, |
| 132 |
|
|
& totalf11, |
| 133 |
|
|
& totalch4, |
| 134 |
|
|
& totalco, |
| 135 |
|
|
& totalo3, |
| 136 |
|
|
& totaloh, |
| 137 |
|
|
& totalso2, |
| 138 |
|
|
& totalnox, |
| 139 |
|
|
& totalbc, |
| 140 |
|
|
& totaloc |
| 141 |
|
|
|
| 142 |
|
|
c100 format(" Yr ",i4," Mon ",i3, |
| 143 |
|
|
c & " Total air mass = ",e12.3," kg",/ |
| 144 |
|
|
c & " Total F11 = ",f12.3," 10^6 kg",/ |
| 145 |
|
|
c & " Total CH4 = ",f12.3," TgCH4",/ |
| 146 |
|
|
c & " Total CO = ",f12.3," TgCO") |
| 147 |
|
|
|
| 148 |
|
|
100 format(i5,i5,2e12.4,3f12.3,/ |
| 149 |
|
|
& 10x,f12.3,e12.4,2f12.3,2e12.4) |
| 150 |
|
|
|
| 151 |
|
|
#endif |
| 152 |
|
|
|
| 153 |
|
|
return |
| 154 |
|
|
end |