1 | subroutine calc_cpp_mugaz |
---|
2 | |
---|
3 | !================================================================== |
---|
4 | ! Purpose |
---|
5 | ! ------- |
---|
6 | ! Compute the atmospheric specific heat capacity. |
---|
7 | ! Compute the atmospheric mean molar mass. |
---|
8 | ! |
---|
9 | ! Authors |
---|
10 | ! ------- |
---|
11 | ! Robin Wordsworth (2009) |
---|
12 | ! |
---|
13 | !================================================================== |
---|
14 | |
---|
15 | use gases_h |
---|
16 | implicit none |
---|
17 | |
---|
18 | #include "comcstfi.h" |
---|
19 | !#include "callkeys.h" |
---|
20 | |
---|
21 | integer igas |
---|
22 | |
---|
23 | cpp=0.0 |
---|
24 | mugaz=0.0 |
---|
25 | |
---|
26 | do igas=1,ngasmx |
---|
27 | |
---|
28 | if(igas.eq.vgas)then |
---|
29 | ! ignore variable gas in cpp calculation |
---|
30 | else |
---|
31 | ! all values at 300 K from Engineering Toolbox |
---|
32 | if(gnom(igas).eq.'CO2')then |
---|
33 | cpp = cpp + 0.846*gfrac(igas) |
---|
34 | mugaz = mugaz + 44.01*gfrac(igas) |
---|
35 | elseif(gnom(igas).eq.'N2_')then |
---|
36 | cpp = cpp + 1.040*gfrac(igas) |
---|
37 | mugaz = mugaz + 28.01*gfrac(igas) |
---|
38 | elseif(gnom(igas).eq.'H2_')then |
---|
39 | cpp = cpp + 14.31*gfrac(igas) |
---|
40 | mugaz = mugaz + 2.01*gfrac(igas) |
---|
41 | elseif(gnom(igas).eq.'H2O')then |
---|
42 | cpp = cpp + 1.864*gfrac(igas) |
---|
43 | mugaz = mugaz + 18.02*gfrac(igas) |
---|
44 | elseif(gnom(igas).eq.'CH4')then |
---|
45 | cpp = cpp + 2.226*gfrac(igas) |
---|
46 | mugaz = mugaz + 16.04*gfrac(igas) |
---|
47 | elseif(gnom(igas).eq.'NH3')then |
---|
48 | cpp = cpp + 2.175*gfrac(igas) |
---|
49 | mugaz = mugaz + 17.03*gfrac(igas) |
---|
50 | print*,'WARNING, cpp for NH3 may be for liquid' |
---|
51 | else |
---|
52 | print*,'Error in calc_cpp_mugaz: Gas species not recognised!' |
---|
53 | call abort |
---|
54 | endif |
---|
55 | endif |
---|
56 | |
---|
57 | enddo |
---|
58 | |
---|
59 | cpp=1000.0*cpp |
---|
60 | |
---|
61 | print*,'Cp in calc_cpp_mugaz is ',cpp,'J kg^-1 K^-1' |
---|
62 | print*,'Mg in calc_cpp_mugaz is ',mugaz,'amu' |
---|
63 | |
---|
64 | R = 8.314511E+0 *1000.E+0/mugaz |
---|
65 | rcp = R/cpp |
---|
66 | |
---|
67 | return |
---|
68 | end subroutine calc_cpp_mugaz |
---|