1 | |
---|
2 | |
---|
3 | |
---|
4 | |
---|
5 | |
---|
6 | |
---|
7 | |
---|
8 | |
---|
9 | |
---|
10 | |
---|
11 | |
---|
12 | !$Id: mr_xform.F90 10 2007-08-09 12:43:01Z 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 | subroutine MMR2VMR(vmr, mmr, mbar) |
---|
65 | !----------------------------------------------------------------- |
---|
66 | ! ... Xfrom from mass to volume mixing ratio |
---|
67 | ! Stacy Walters, NCAR, 1998. |
---|
68 | ! Modified by Didier Hauglustaine, IPSL, for LMDZ/INCA, 1999. |
---|
69 | !----------------------------------------------------------------- |
---|
70 | |
---|
71 | use SPECIES_NAMES |
---|
72 | use INCA_DIM |
---|
73 | use CHEM_MODS, only : adv_mass, nadv_mass |
---|
74 | |
---|
75 | implicit none |
---|
76 | |
---|
77 | !----------------------------------------------------------------- |
---|
78 | ! ... Dummy args |
---|
79 | !----------------------------------------------------------------- |
---|
80 | real, intent(in) :: mbar(PLON,PLEV) |
---|
81 | real, intent(in) :: mmr(PLON,PLEV,8) |
---|
82 | real, intent(out) :: vmr(PLON,PLEV,8) |
---|
83 | |
---|
84 | !----------------------------------------------------------------- |
---|
85 | ! ... Local variables |
---|
86 | !----------------------------------------------------------------- |
---|
87 | integer :: m |
---|
88 | vmr(:,:,:) = 0. |
---|
89 | do m = 1,8 |
---|
90 | if( adv_mass(m) /= 0. ) THEN |
---|
91 | vmr(:,:,m) = mbar(:,:) * mmr(:PLON,:,m) / adv_mass(m) |
---|
92 | end if |
---|
93 | end do |
---|
94 | |
---|
95 | |
---|
96 | end subroutine MMR2VMR |
---|
97 | |
---|
98 | subroutine VMR2MMR( vmr ,& |
---|
99 | mmr ,& |
---|
100 | mbar ) |
---|
101 | !----------------------------------------------------------------- |
---|
102 | ! ... Xfrom from mass to volume mixing ratio |
---|
103 | ! Stacy Walters, NCAR, 1998. |
---|
104 | ! Modified by Didier Hauglustaine, IPSL, for LMDZ/INCA, 1999. |
---|
105 | !----------------------------------------------------------------- |
---|
106 | |
---|
107 | use SPECIES_NAMES |
---|
108 | use INCA_DIM |
---|
109 | use CHEM_MODS, only : adv_mass, nadv_mass |
---|
110 | |
---|
111 | implicit none |
---|
112 | |
---|
113 | !----------------------------------------------------------------- |
---|
114 | ! ... Dummy args |
---|
115 | !----------------------------------------------------------------- |
---|
116 | real, intent(in) :: mbar(PLON,PLEV) |
---|
117 | real, intent(in) :: vmr(PLON,PLEV,8) |
---|
118 | real, intent(out) :: mmr(PLON,PLEV,8) |
---|
119 | |
---|
120 | !----------------------------------------------------------------- |
---|
121 | ! ... Local variables |
---|
122 | !----------------------------------------------------------------- |
---|
123 | integer :: m |
---|
124 | |
---|
125 | !----------------------------------------------------------------- |
---|
126 | ! ... The non-group species |
---|
127 | !----------------------------------------------------------------- |
---|
128 | do m = 1,8 |
---|
129 | if( adv_mass(m) /= 0. ) then |
---|
130 | mmr(:PLON,:,m) = adv_mass(m) * vmr(:,:,m) / mbar(:,:) |
---|
131 | end if |
---|
132 | end do |
---|
133 | |
---|
134 | |
---|
135 | end subroutine VMR2MMR |
---|