1 | |
---|
2 | |
---|
3 | |
---|
4 | |
---|
5 | |
---|
6 | |
---|
7 | |
---|
8 | |
---|
9 | |
---|
10 | |
---|
11 | |
---|
12 | !$Id: exp_slv.F90 123 2009-03-27 10:38:52Z acosce $ |
---|
13 | !! ========================================================================= |
---|
14 | !! INCA - INteraction with Chemistry and Aerosols |
---|
15 | !! |
---|
16 | !! Copyright Laboratoire des Sciences du Climat et de l'Environnement (LSCE) |
---|
17 | !! Unite mixte CEA-CNRS-UVSQ |
---|
18 | !! |
---|
19 | !! Contributors to this INCA subroutine: |
---|
20 | !! |
---|
21 | !! Didier Hauglustaine, LSCE, hauglustaine@cea.fr |
---|
22 | !! Stacy Walters, NCAR, stacy@ucar.edu |
---|
23 | !! |
---|
24 | !! Anne Cozic, LSCE, anne.cozic@cea.fr |
---|
25 | !! Yann Meurdesoif, LSCE, yann.meurdesoif@cea.fr |
---|
26 | !! |
---|
27 | !! This software is a computer program whose purpose is to simulate the |
---|
28 | !! atmospheric gas phase and aerosol composition. The model is designed to be |
---|
29 | !! used within a transport model or a general circulation model. This version |
---|
30 | !! of INCA was designed to be coupled to the LMDz GCM. LMDz-INCA accounts |
---|
31 | !! for emissions, transport (resolved and sub-grid scale), photochemical |
---|
32 | !! transformations, and scavenging (dry deposition and washout) of chemical |
---|
33 | !! species and aerosols interactively in the GCM. Several versions of the INCA |
---|
34 | !! model are currently used depending on the envisaged applications with the |
---|
35 | !! chemistry-climate model. |
---|
36 | !! |
---|
37 | !! This software is governed by the CeCILL license under French law and |
---|
38 | !! abiding by the rules of distribution of free software. You can use, |
---|
39 | !! modify and/ or redistribute the software under the terms of the CeCILL |
---|
40 | !! license as circulated by CEA, CNRS and INRIA at the following URL |
---|
41 | !! "http://www.cecill.info". |
---|
42 | !! |
---|
43 | !! As a counterpart to the access to the source code and rights to copy, |
---|
44 | !! modify and redistribute granted by the license, users are provided only |
---|
45 | !! with a limited warranty and the software's author, the holder of the |
---|
46 | !! economic rights, and the successive licensors have only limited |
---|
47 | !! liability. |
---|
48 | !! |
---|
49 | !! In this respect, the user's attention is drawn to the risks associated |
---|
50 | !! with loading, using, modifying and/or developing or reproducing the |
---|
51 | !! software by the user in light of its specific status of free software, |
---|
52 | !! that may mean that it is complicated to manipulate, and that also |
---|
53 | !! therefore means that it is reserved for developers and experienced |
---|
54 | !! professionals having in-depth computer knowledge. Users are therefore |
---|
55 | !! encouraged to load and test the software's suitability as regards their |
---|
56 | !! requirements in conditions enabling the security of their systems and/or |
---|
57 | !! data to be ensured and, more generally, to use and operate it in the |
---|
58 | !! same conditions as regards security. |
---|
59 | !! |
---|
60 | !! The fact that you are presently reading this means that you have had |
---|
61 | !! knowledge of the CeCILL license and that you accept its terms. |
---|
62 | !! ========================================================================= |
---|
63 | |
---|
64 | |
---|
65 | SUBROUTINE EXP_SOL( & |
---|
66 | base_sol ,& |
---|
67 | reaction_rates ,& |
---|
68 | het_rates ,& |
---|
69 | extfrc ,& |
---|
70 | nstep ,& |
---|
71 | delt ) |
---|
72 | |
---|
73 | !----------------------------------------------------------------------- |
---|
74 | ! ... Exp_sol advances the volumetric mixing ratio |
---|
75 | ! forward one time step via the fully explicit |
---|
76 | ! Euler scheme |
---|
77 | ! Stacy Walters, NCAR, 1998. |
---|
78 | ! Modified by Didier Hauglustaine, IPSL, for LMDz/INCA, 2000. |
---|
79 | !----------------------------------------------------------------------- |
---|
80 | |
---|
81 | USE INCA_DIM |
---|
82 | USE CHEM_MODS, ONLY: clsmap |
---|
83 | USE SPECIES_NAMES |
---|
84 | |
---|
85 | USE RATE_INDEX_MOD |
---|
86 | |
---|
87 | IMPLICIT NONE |
---|
88 | |
---|
89 | !----------------------------------------------------------------------- |
---|
90 | ! ... Dummy arguments |
---|
91 | !----------------------------------------------------------------------- |
---|
92 | INTEGER, INTENT(in) :: nstep ! time step index |
---|
93 | REAL, INTENT(in) :: delt ! time step in seconds |
---|
94 | REAL, INTENT(in) :: reaction_rates(PLNPLV,12) |
---|
95 | REAL, INTENT(in) :: het_rates(PLNPLV,1) |
---|
96 | REAL, INTENT(out) :: extfrc(PLNPLV,1) |
---|
97 | REAL, INTENT(inout) :: base_sol(PLNPLV,8) |
---|
98 | |
---|
99 | !----------------------------------------------------------------------- |
---|
100 | ! ... Local variables |
---|
101 | !----------------------------------------------------------------------- |
---|
102 | INTEGER :: k, l, m |
---|
103 | REAL :: prod(PLNPLV,8) |
---|
104 | REAL :: loss(PLNPLV,8) |
---|
105 | REAL :: ind_prd(PLNPLV,8) |
---|
106 | |
---|
107 | |
---|
108 | !----------------------------------------------------------------------- |
---|
109 | ! ... Put "independent" production in the forcing |
---|
110 | !----------------------------------------------------------------------- |
---|
111 | CALL INDPRD( & |
---|
112 | 1 ,& |
---|
113 | ind_prd ,& |
---|
114 | base_sol ,& |
---|
115 | extfrc ,& |
---|
116 | reaction_rates ) |
---|
117 | |
---|
118 | !----------------------------------------------------------------------- |
---|
119 | ! ... Form F(y) |
---|
120 | !----------------------------------------------------------------------- |
---|
121 | CALL EXP_PROD_LOSS( & |
---|
122 | prod ,& |
---|
123 | loss ,& |
---|
124 | base_sol ,& |
---|
125 | reaction_rates ,& |
---|
126 | het_rates ) |
---|
127 | |
---|
128 | DO k = 1,8 |
---|
129 | prod(:,k) = prod(:,k) + ind_prd(:,k) |
---|
130 | END DO |
---|
131 | |
---|
132 | !----------------------------------------------------------------------- |
---|
133 | ! ... Solve for the mixing ratio at t(n+1) |
---|
134 | !----------------------------------------------------------------------- |
---|
135 | DO k = 1,8 |
---|
136 | l = clsmap(k,1) |
---|
137 | base_sol(:,l) = base_sol(:,l)+delt*(prod(:,k)-loss(:,k)) |
---|
138 | END DO |
---|
139 | |
---|
140 | |
---|
141 | END SUBROUTINE EXP_SOL |
---|