1 | SUBROUTINE METHOX(KIDIA, KFDIA, KLON, KLEV, PQ, PTENQ, PAP) |
---|
2 | |
---|
3 | !**** *METHOX* - Calculate humidity tendencies from methane |
---|
4 | ! oxidation and photolysis |
---|
5 | |
---|
6 | !** INTERFACE. |
---|
7 | ! ---------- |
---|
8 | ! CALL *METHOX* FROM *CALLPAR* |
---|
9 | ! ------ ------- |
---|
10 | |
---|
11 | ! EXPLICIT ARGUMENTS : |
---|
12 | ! -------------------- |
---|
13 | ! PARAMETER DESCRIPTION UNITS |
---|
14 | ! --------- ----------- ----- |
---|
15 | ! INPUT PARAMETERS (INTEGER): |
---|
16 | |
---|
17 | ! *KIDIA* START POINT |
---|
18 | ! *KFDIA* END POINT |
---|
19 | ! *KLON* NUMBER OF GRID POINTS PER PACKET |
---|
20 | ! *KLEV* NUMBER OF LEVELS |
---|
21 | |
---|
22 | ! INPUT PARAMETERS (REAL): |
---|
23 | |
---|
24 | ! *PAP* PRESSURE PA |
---|
25 | ! *PQ* SPECIFIC HUMIDITY KG/KG |
---|
26 | |
---|
27 | ! UPDATED PARAMETERS (REAL): |
---|
28 | |
---|
29 | ! *PTENQ* TENDENCY OF SPECIFIC HUMIDITY KG/(KG*S) |
---|
30 | |
---|
31 | ! NONE |
---|
32 | |
---|
33 | ! IMPLICIT ARGUMENTS : |
---|
34 | ! -------------------- |
---|
35 | ! MODULE YOEMETH |
---|
36 | ! MODULE YOMCST |
---|
37 | |
---|
38 | ! METHOD. |
---|
39 | ! ------- |
---|
40 | ! SEE RD-MEMO R60.1/AJS/31 |
---|
41 | |
---|
42 | ! EXTERNALS. |
---|
43 | ! ---------- |
---|
44 | ! NONE |
---|
45 | |
---|
46 | ! REFERENCE. |
---|
47 | ! ---------- |
---|
48 | ! SEE RD-MEMO R60.1/AJS/31 |
---|
49 | |
---|
50 | ! AUTHOR. |
---|
51 | ! ------- |
---|
52 | ! C.JAKOB *ECMWF* |
---|
53 | |
---|
54 | ! MODIFICATIONS. |
---|
55 | ! -------------- |
---|
56 | ! ORIGINAL : 98-04-07 |
---|
57 | ! M.Hamrud 01-Oct-2003 CY28 Cleaning |
---|
58 | ! D. Cugnet 24-Feb-2012 Adapted for LMDZ |
---|
59 | ! ------------------------------------------------------------------ |
---|
60 | |
---|
61 | USE YOEMETH, ONLY: RALPHA1, RALPHA2, RQLIM, & |
---|
62 | RPBOTOX, RPBOTPH, RPTOPOX, RPTOPPH, & |
---|
63 | RALPHA3, RLOGPPH |
---|
64 | USE lmdz_yomcst |
---|
65 | |
---|
66 | IMPLICIT NONE |
---|
67 | |
---|
68 | INTEGER, INTENT(IN) :: KLON |
---|
69 | INTEGER, INTENT(IN) :: KLEV |
---|
70 | INTEGER, INTENT(IN) :: KIDIA |
---|
71 | INTEGER, INTENT(IN) :: KFDIA |
---|
72 | REAL, INTENT(IN) :: PQ(KLON, KLEV) |
---|
73 | REAL, INTENT(INOUT) :: PTENQ(KLON, KLEV) |
---|
74 | REAL, INTENT(IN) :: PAP(KLON, KLEV) |
---|
75 | LOGICAL :: LLOXID, LLPHOTO |
---|
76 | |
---|
77 | INTEGER :: JK, JL |
---|
78 | |
---|
79 | REAL :: ZARG, ZPRATIO, ZTAU1, ZTAU2, ZTDAYS |
---|
80 | |
---|
81 | DO JK = 1, KLEV |
---|
82 | DO JL = KIDIA, KFDIA |
---|
83 | |
---|
84 | LLOXID = PAP(JL, JK) < RPBOTOX.AND.PQ(JL, JK) < RQLIM |
---|
85 | LLPHOTO = PAP(JL, JK) < RPBOTPH |
---|
86 | |
---|
87 | ! METHANE OXIDATION |
---|
88 | |
---|
89 | IF(LLOXID) THEN |
---|
90 | IF(PAP(JL, JK) <= RPTOPOX) THEN |
---|
91 | ZTDAYS = 100. |
---|
92 | ELSE |
---|
93 | ZPRATIO = (LOG(PAP(JL, JK) / RPTOPOX))**4. / LOG(RPBOTOX / PAP(JL, JK)) |
---|
94 | ZTDAYS = 100. * (1 + RALPHA1 * ZPRATIO) |
---|
95 | ENDIF |
---|
96 | ZTAU1 = 86400. * ZTDAYS |
---|
97 | PTENQ(JL, JK) = PTENQ(JL, JK) + (RQLIM - PQ(JL, JK)) / ZTAU1 |
---|
98 | ENDIF |
---|
99 | |
---|
100 | ! PHOTOLYSIS |
---|
101 | |
---|
102 | IF(LLPHOTO) THEN |
---|
103 | IF(PAP(JL, JK) <= RPTOPPH) THEN |
---|
104 | ZTDAYS = 3. |
---|
105 | ELSE |
---|
106 | ZARG = RALPHA2 - RALPHA3 * (1 + COS((RPI * LOG(PAP(JL, JK) / RPBOTPH)) / RLOGPPH)) |
---|
107 | ZTDAYS = 1.0 / (EXP(ZARG) - 0.01) |
---|
108 | ENDIF |
---|
109 | ZTAU2 = 86400. * ZTDAYS |
---|
110 | PTENQ(JL, JK) = PTENQ(JL, JK) - PQ(JL, JK) / ZTAU2 |
---|
111 | ENDIF |
---|
112 | ENDDO |
---|
113 | ENDDO |
---|
114 | |
---|
115 | END SUBROUTINE METHOX |
---|
116 | |
---|
117 | |
---|