1 | ! |
---|
2 | ! $Id: phys_state_var_mod.F90 1670 2012-10-17 08:42:04Z idelkadi $ |
---|
3 | ! |
---|
4 | MODULE phys_state_var_mod |
---|
5 | ! Variables sauvegardees pour le startphy.nc |
---|
6 | !====================================================================== |
---|
7 | ! |
---|
8 | ! |
---|
9 | !====================================================================== |
---|
10 | ! Declaration des variables |
---|
11 | USE dimphy |
---|
12 | ! INTEGER, SAVE :: radpas |
---|
13 | !!$OMP THREADPRIVATE(radpas) |
---|
14 | ! REAL, SAVE :: dtime |
---|
15 | !!$OMP THREADPRIVATE(dtime) |
---|
16 | |
---|
17 | REAL, ALLOCATABLE, SAVE :: ftsol(:) |
---|
18 | !$OMP THREADPRIVATE(ftsol) |
---|
19 | REAL, ALLOCATABLE, SAVE :: ftsoil(:,:) |
---|
20 | !$OMP THREADPRIVATE(ftsoil) |
---|
21 | REAL, ALLOCATABLE, SAVE :: falbe(:) |
---|
22 | !$OMP THREADPRIVATE(falbe) |
---|
23 | |
---|
24 | !clesphy0 param physiq |
---|
25 | ! |
---|
26 | ! Parametres de l'Orographie a l'Echelle Sous-Maille (OESM): |
---|
27 | ! |
---|
28 | REAL, ALLOCATABLE, SAVE :: zmea(:), zstd(:), zsig(:), zgam(:) |
---|
29 | !$OMP THREADPRIVATE(zmea, zstd, zsig, zgam) |
---|
30 | REAL, ALLOCATABLE, SAVE :: zthe(:), zpic(:), zval(:) |
---|
31 | !$OMP THREADPRIVATE(zthe, zpic, zval) |
---|
32 | ! REAL tabcntr0(100) |
---|
33 | REAL, ALLOCATABLE, SAVE :: rugoro(:) |
---|
34 | !$OMP THREADPRIVATE(rugoro) |
---|
35 | REAL, ALLOCATABLE, SAVE :: t_ancien(:,:), q_ancien(:,:) |
---|
36 | !$OMP THREADPRIVATE(t_ancien, q_ancien) |
---|
37 | REAL, ALLOCATABLE, SAVE :: u_ancien(:,:), v_ancien(:,:) |
---|
38 | !$OMP THREADPRIVATE(u_ancien, v_ancien) |
---|
39 | LOGICAL, SAVE :: ancien_ok |
---|
40 | !$OMP THREADPRIVATE(ancien_ok) |
---|
41 | ! pressure level |
---|
42 | REAL,ALLOCATABLE,SAVE :: zuthe(:),zvthe(:) |
---|
43 | !$OMP THREADPRIVATE(zuthe,zvthe) |
---|
44 | ! |
---|
45 | ! composition for upper atmosphere |
---|
46 | REAL,ALLOCATABLE,SAVE :: co2vmr_gcm(:,:) |
---|
47 | !$OMP THREADPRIVATE(co2vmr_gcm) |
---|
48 | REAL,ALLOCATABLE,SAVE :: ovmr_gcm(:,:) |
---|
49 | !$OMP THREADPRIVATE(ovmr_gcm) |
---|
50 | REAL,ALLOCATABLE,SAVE :: n2vmr_gcm(:,:) |
---|
51 | !$OMP THREADPRIVATE(n2vmr_gcm) |
---|
52 | REAL,ALLOCATABLE,SAVE :: nvmr_gcm(:,:) |
---|
53 | !$OMP THREADPRIVATE(nvmr_gcm) |
---|
54 | REAL,ALLOCATABLE,SAVE :: covmr_gcm(:,:) |
---|
55 | !$OMP THREADPRIVATE(covmr_gcm) |
---|
56 | |
---|
57 | ! Tendencies due to radiative scheme [K/s] |
---|
58 | ! heat : chauffage solaire |
---|
59 | ! heat0: chauffage solaire ciel clair |
---|
60 | ! cool : refroidissement infrarouge |
---|
61 | ! cool0 : refroidissement infrarouge ciel clair |
---|
62 | REAL,ALLOCATABLE,SAVE :: heat(:,:) |
---|
63 | !$OMP THREADPRIVATE(heat) |
---|
64 | REAL,ALLOCATABLE,SAVE :: heat0(:,:) |
---|
65 | !$OMP THREADPRIVATE(heat0) |
---|
66 | REAL,ALLOCATABLE,SAVE :: cool(:,:) |
---|
67 | !$OMP THREADPRIVATE(cool) |
---|
68 | REAL,ALLOCATABLE,SAVE :: cool0(:,:) |
---|
69 | !$OMP THREADPRIVATE(cool0) |
---|
70 | REAL,ALLOCATABLE,SAVE :: dtsw(:,:) |
---|
71 | !$OMP THREADPRIVATE(dtsw) |
---|
72 | REAL,ALLOCATABLE,SAVE :: dtlw(:,:) |
---|
73 | !$OMP THREADPRIVATE(dtlw) |
---|
74 | REAL,ALLOCATABLE,SAVE :: d_t_rad(:,:),d_t_euv(:,:) |
---|
75 | !$OMP THREADPRIVATE(d_t_rad,d_t_euv) |
---|
76 | REAL,ALLOCATABLE,SAVE :: d_t_nirco2(:,:),d_t_nlte(:,:) |
---|
77 | !$OMP THREADPRIVATE(d_t_nirco2,d_t_nlte) |
---|
78 | |
---|
79 | ! Fluxes (W/m2) |
---|
80 | ! sollwdown : downward LW flux at surface |
---|
81 | ! sollwdownclr : downward CS LW flux at surface |
---|
82 | ! toplwdown : downward CS LW flux at TOA |
---|
83 | ! toplwdownclr : downward CS LW flux at TOA |
---|
84 | REAL,ALLOCATABLE,SAVE :: swnet(:,:) |
---|
85 | !$OMP THREADPRIVATE(swnet) |
---|
86 | REAL,ALLOCATABLE,SAVE :: lwnet(:,:) |
---|
87 | !$OMP THREADPRIVATE(lwnet) |
---|
88 | REAL,ALLOCATABLE,SAVE :: topsw(:), toplw(:) |
---|
89 | !$OMP THREADPRIVATE(topsw,toplw) |
---|
90 | REAL, ALLOCATABLE, SAVE :: solsw(:), sollw(:) |
---|
91 | !$OMP THREADPRIVATE(solsw, sollw) |
---|
92 | REAL, ALLOCATABLE, SAVE :: radsol(:) |
---|
93 | !$OMP THREADPRIVATE(radsol) |
---|
94 | REAL,ALLOCATABLE,SAVE :: sollwdown(:) |
---|
95 | !$OMP THREADPRIVATE(sollwdown) |
---|
96 | REAL,ALLOCATABLE,SAVE :: sollwdownclr(:) |
---|
97 | !$OMP THREADPRIVATE(sollwdownclr) |
---|
98 | REAL,ALLOCATABLE,SAVE :: toplwdown(:) |
---|
99 | !$OMP THREADPRIVATE(toplwdown) |
---|
100 | REAL,ALLOCATABLE,SAVE :: toplwdownclr(:) |
---|
101 | !$OMP THREADPRIVATE(toplwdownclr) |
---|
102 | REAL,ALLOCATABLE,SAVE :: topsw0(:),toplw0(:),solsw0(:),sollw0(:) |
---|
103 | !$OMP THREADPRIVATE(topsw0,toplw0,solsw0,sollw0) |
---|
104 | REAL,save,allocatable :: dlw(:) ! derivee infra rouge |
---|
105 | REAL,save,allocatable :: fder(:) ! Derive de flux (sensible et latente) |
---|
106 | !$OMP THREADPRIVATE(dlw,fder) |
---|
107 | |
---|
108 | CONTAINS |
---|
109 | |
---|
110 | !====================================================================== |
---|
111 | SUBROUTINE phys_state_var_init |
---|
112 | |
---|
113 | IMPLICIT NONE |
---|
114 | #include "dimsoil.h" |
---|
115 | |
---|
116 | ALLOCATE(ftsol(klon)) ! temperature de surface |
---|
117 | ALLOCATE(ftsoil(klon,nsoilmx)) ! temperature dans le sol |
---|
118 | ALLOCATE(falbe(klon)) ! albedo |
---|
119 | |
---|
120 | ! Parametres de l'Orographie a l'Echelle Sous-Maille (OESM): |
---|
121 | ! |
---|
122 | !zmea(:) ! orographie moyenne |
---|
123 | !zstd(:) ! deviation standard de l'OESM |
---|
124 | !zsig(:) ! pente de l'OESM |
---|
125 | !zgam(:) ! anisotropie de l'OESM |
---|
126 | !zthe(:) ! orientation de l'OESM |
---|
127 | !zpic(:) ! Maximum de l'OESM |
---|
128 | !zval(:) ! Minimum de l'OESM |
---|
129 | !rugoro(:) ! longueur de rugosite de l'OESM |
---|
130 | ALLOCATE(zmea(klon), zstd(klon), zsig(klon), zgam(klon)) |
---|
131 | ALLOCATE(zthe(klon), zpic(klon), zval(klon)) |
---|
132 | ALLOCATE(rugoro(klon)) |
---|
133 | |
---|
134 | ALLOCATE(t_ancien(klon,klev), q_ancien(klon,klev)) |
---|
135 | ALLOCATE(u_ancien(klon,klev), v_ancien(klon,klev)) |
---|
136 | |
---|
137 | ALLOCATE(zuthe(klon),zvthe(klon)) |
---|
138 | |
---|
139 | ALLOCATE(ovmr_gcm(klon,klev),covmr_gcm(klon,klev)) |
---|
140 | ALLOCATE(co2vmr_gcm(klon,klev),n2vmr_gcm(klon,klev)) |
---|
141 | ALLOCATE(nvmr_gcm(klon,klev)) |
---|
142 | |
---|
143 | ALLOCATE(heat(klon,klev), heat0(klon,klev)) |
---|
144 | ALLOCATE(cool(klon,klev), cool0(klon,klev)) |
---|
145 | ALLOCATE(dtlw(klon,klev),dtsw(klon,klev)) |
---|
146 | ALLOCATE(d_t_rad(klon,klev),d_t_euv(klon,klev)) |
---|
147 | ALLOCATE(d_t_nirco2(klon,klev),d_t_nlte(klon,klev)) |
---|
148 | |
---|
149 | ALLOCATE(swnet(klon,klev+1), lwnet(klon,klev+1)) |
---|
150 | ALLOCATE(topsw(klon), toplw(klon)) |
---|
151 | ALLOCATE(solsw(klon), sollw(klon)) |
---|
152 | ALLOCATE(radsol(klon)) ! bilan radiatif au sol calcule par code radiatif |
---|
153 | ALLOCATE(sollwdown(klon), sollwdownclr(klon)) |
---|
154 | ALLOCATE(toplwdown(klon), toplwdownclr(klon)) |
---|
155 | ALLOCATE(topsw0(klon),toplw0(klon),solsw0(klon),sollw0(klon)) |
---|
156 | ALLOCATE(dlw(klon), fder(klon)) |
---|
157 | |
---|
158 | END SUBROUTINE phys_state_var_init |
---|
159 | |
---|
160 | !====================================================================== |
---|
161 | SUBROUTINE phys_state_var_end |
---|
162 | |
---|
163 | IMPLICIT NONE |
---|
164 | |
---|
165 | deallocate(ftsol, ftsoil, falbe) |
---|
166 | deallocate(zmea, zstd, zsig, zgam) |
---|
167 | deallocate(zthe, zpic, zval) |
---|
168 | deallocate(rugoro, t_ancien, q_ancien) |
---|
169 | deallocate( u_ancien, v_ancien) |
---|
170 | deallocate(zuthe, zvthe) |
---|
171 | |
---|
172 | deallocate(ovmr_gcm,covmr_gcm) |
---|
173 | deallocate(co2vmr_gcm,n2vmr_gcm) |
---|
174 | deallocate(nvmr_gcm) |
---|
175 | |
---|
176 | deallocate(heat, heat0) |
---|
177 | deallocate(cool, cool0) |
---|
178 | deallocate(dtlw,dtsw) |
---|
179 | deallocate(d_t_rad,d_t_euv) |
---|
180 | deallocate(d_t_nirco2,d_t_nlte) |
---|
181 | |
---|
182 | deallocate(swnet, lwnet) |
---|
183 | deallocate(solsw, sollw, radsol) |
---|
184 | deallocate(topsw, toplw) |
---|
185 | deallocate(sollwdown, sollwdownclr) |
---|
186 | deallocate(toplwdown, toplwdownclr) |
---|
187 | deallocate(topsw0,toplw0,solsw0,sollw0) |
---|
188 | deallocate(dlw, fder) |
---|
189 | |
---|
190 | END SUBROUTINE phys_state_var_end |
---|
191 | |
---|
192 | END MODULE phys_state_var_mod |
---|