1 | !$Id: chem_hook.F90 163 2010-02-22 15:41:45Z acosce $ |
---|
2 | !! ========================================================================= |
---|
3 | !! INCA - INteraction with Chemistry and Aerosols |
---|
4 | !! |
---|
5 | !! Copyright Laboratoire des Sciences du Climat et de l'Environnement (LSCE) |
---|
6 | !! Unite mixte CEA-CNRS-UVSQ |
---|
7 | !! |
---|
8 | !! Contributors to this INCA subroutine: |
---|
9 | !! |
---|
10 | !! Didier Hauglustaine, LSCE, hauglustaine@cea.fr |
---|
11 | !! Stacy Walters, NCAR, stacy@ucar.edu |
---|
12 | !! |
---|
13 | !! Anne Cozic, LSCE, anne.cozic@cea.fr |
---|
14 | !! Yann Meurdesoif, LSCE, yann.meurdesoif@cea.fr |
---|
15 | !! |
---|
16 | !! This software is a computer program whose purpose is to simulate the |
---|
17 | !! atmospheric gas phase and aerosol composition. The model is designed to be |
---|
18 | !! used within a transport model or a general circulation model. This version |
---|
19 | !! of INCA was designed to be coupled to the LMDz GCM. LMDz-INCA accounts |
---|
20 | !! for emissions, transport (resolved and sub-grid scale), photochemical |
---|
21 | !! transformations, and scavenging (dry deposition and washout) of chemical |
---|
22 | !! species and aerosols interactively in the GCM. Several versions of the INCA |
---|
23 | !! model are currently used depending on the envisaged applications with the |
---|
24 | !! chemistry-climate model. |
---|
25 | !! |
---|
26 | !! This software is governed by the CeCILL license under French law and |
---|
27 | !! abiding by the rules of distribution of free software. You can use, |
---|
28 | !! modify and/ or redistribute the software under the terms of the CeCILL |
---|
29 | !! license as circulated by CEA, CNRS and INRIA at the following URL |
---|
30 | !! "http://www.cecill.info". |
---|
31 | !! |
---|
32 | !! As a counterpart to the access to the source code and rights to copy, |
---|
33 | !! modify and redistribute granted by the license, users are provided only |
---|
34 | !! with a limited warranty and the software's author, the holder of the |
---|
35 | !! economic rights, and the successive licensors have only limited |
---|
36 | !! liability. |
---|
37 | !! |
---|
38 | !! In this respect, the user's attention is drawn to the risks associated |
---|
39 | !! with loading, using, modifying and/or developing or reproducing the |
---|
40 | !! software by the user in light of its specific status of free software, |
---|
41 | !! that may mean that it is complicated to manipulate, and that also |
---|
42 | !! therefore means that it is reserved for developers and experienced |
---|
43 | !! professionals having in-depth computer knowledge. Users are therefore |
---|
44 | !! encouraged to load and test the software's suitability as regards their |
---|
45 | !! requirements in conditions enabling the security of their systems and/or |
---|
46 | !! data to be ensured and, more generally, to use and operate it in the |
---|
47 | !! same conditions as regards security. |
---|
48 | !! |
---|
49 | !! The fact that you are presently reading this means that you have had |
---|
50 | !! knowledge of the CeCILL license and that you accept its terms. |
---|
51 | !! ========================================================================= |
---|
52 | |
---|
53 | #include <inca_define.h> |
---|
54 | |
---|
55 | SUBROUTINE CHEMHOOK_BEGIN( & |
---|
56 | calday, & |
---|
57 | ijour, & |
---|
58 | gmtime, & |
---|
59 | oro, & |
---|
60 | lat, & |
---|
61 | lon, & |
---|
62 | area, & |
---|
63 | pfull, & |
---|
64 | pmid, & |
---|
65 | coefh, & |
---|
66 | zma, & |
---|
67 | temp, & |
---|
68 | u, & |
---|
69 | v, & |
---|
70 | rot, & |
---|
71 | ozrad, & |
---|
72 | sh, & |
---|
73 | ts, & |
---|
74 | t_air_2m, & |
---|
75 | dpth_snow, & |
---|
76 | sws, & |
---|
77 | albs, & |
---|
78 | rain_fall, & |
---|
79 | snow_fall, & |
---|
80 | ctop, & |
---|
81 | cbot, & |
---|
82 | cldfr, & |
---|
83 | nx, & |
---|
84 | ny, & |
---|
85 | mmr, & |
---|
86 | ftsol, & |
---|
87 | paprs, & |
---|
88 | cdragh, & |
---|
89 | cdragm, & |
---|
90 | pctsrf, & |
---|
91 | delt, & |
---|
92 | nstep ) |
---|
93 | !---------------------------------------------------------------------- |
---|
94 | ! ... General purpose chemistry "hook" routine |
---|
95 | ! Didier Hauglustaine and Stacy Walters, 2000. |
---|
96 | !---------------------------------------------------------------------- |
---|
97 | |
---|
98 | USE MOD_INCA_PARA |
---|
99 | USE MOD_GRID_INCA, ONLY : PLON_GLO |
---|
100 | USE CHEM_CONS |
---|
101 | USE CONST_LMDZ |
---|
102 | USE INCA_DIM |
---|
103 | #ifdef GES |
---|
104 | USE CARBONATOR |
---|
105 | #endif |
---|
106 | USE SPECIES_NAMES |
---|
107 | USE PARAM_CHEM |
---|
108 | USE DRYDEP_ARRAYS, ONLY : fraction_landuse |
---|
109 | USE AIRPLANE_SRC, ONLY : itrop, ttrop, ztrop |
---|
110 | |
---|
111 | USE XIOS_INCA |
---|
112 | |
---|
113 | IMPLICIT NONE |
---|
114 | |
---|
115 | !---------------------------------------------------------------------- |
---|
116 | ! ... Dummy args |
---|
117 | !---------------------------------------------------------------------- |
---|
118 | REAL, INTENT(IN) :: calday |
---|
119 | INTEGER, INTENT(in) :: ijour ! jour julien |
---|
120 | REAL, INTENT(in) :: gmtime ! input-R-temps universel dans la journee (0 a 86400 s) |
---|
121 | INTEGER, INTENT(IN) :: ctop(PLON) |
---|
122 | INTEGER, INTENT(IN) :: cbot(PLON) |
---|
123 | INTEGER, INTENT(IN) :: nx, ny |
---|
124 | REAL, INTENT(IN) :: pmid(PLON,PLEV) |
---|
125 | REAL, INTENT(IN) :: pfull(PLON,PLEV+1) |
---|
126 | REAL, INTENT(IN) :: coefh(PLON,PLEV) |
---|
127 | REAL, INTENT(IN) :: zma(PLON,PLEV) |
---|
128 | REAL, INTENT(IN) :: temp(PLON,PLEV) |
---|
129 | REAL, INTENT(IN) :: u(PLON,PLEV) |
---|
130 | REAL, INTENT(IN) :: v(PLON,PLEV) |
---|
131 | REAL, INTENT(IN) :: rot(PLON,PLEV) |
---|
132 | REAL, INTENT(IN) :: ozrad(PLON,PLEV) |
---|
133 | REAL, INTENT(IN) :: sh(PLON,PLEV) |
---|
134 | REAL, INTENT(IN) :: lat(PLON) |
---|
135 | REAL, INTENT(IN) :: lon(PLON) |
---|
136 | REAL, INTENT(IN) :: oro(PLON) |
---|
137 | REAL, INTENT(IN) :: area(PLON) |
---|
138 | REAL, INTENT(IN) :: ts(PLON) |
---|
139 | REAL, INTENT(IN) :: t_air_2m(PLON) ! air temperature near surface |
---|
140 | REAL, INTENT(IN) :: dpth_snow(PLON) |
---|
141 | REAL, INTENT(IN) :: sws(PLON) |
---|
142 | REAL, INTENT(IN) :: albs(PLON) |
---|
143 | REAL, INTENT(IN) :: rain_fall(PLON) |
---|
144 | REAL, INTENT(IN) :: snow_fall(PLON) |
---|
145 | REAL, INTENT(IN) :: mmr(PLON,PLEV,PCNST) |
---|
146 | REAL, INTENT(IN) :: cldfr (PLON,PLEV) |
---|
147 | ! variables used in nightingale |
---|
148 | REAL, INTENT(in) :: ftsol(PLON,nbsrf) |
---|
149 | REAL, INTENT(in) :: paprs(PLON,PLEV+1) |
---|
150 | REAL, INTENT(in) :: cdragh(PLON), cdragm(PLON) |
---|
151 | REAL, INTENT(in) :: pctsrf(PLON,nbsrf) |
---|
152 | REAL, INTENT(in) :: delt ! timestep in seconds of physics |
---|
153 | INTEGER, INTENT(IN) :: nstep ! model time step |
---|
154 | |
---|
155 | !---------------------------------------------------------------------- |
---|
156 | ! ... Local arguments needed to calculate diurnal |
---|
157 | ! variation of isoprene and monoterpenes |
---|
158 | !---------------------------------------------------------------------- |
---|
159 | |
---|
160 | INTEGER :: iplon, i |
---|
161 | REAL :: sunon(PLON) ! sunrise angle in radians |
---|
162 | REAL :: sunoff(PLON) ! sunset angle in radians |
---|
163 | REAL :: zen_angle(PLON) ! solar zenith angle |
---|
164 | REAL :: loc_angle(PLON) ! "local" time angle |
---|
165 | LOGICAL :: polar_day(PLON) ! continuous daylight flag |
---|
166 | LOGICAL :: polar_night(PLON) ! continuous night flag |
---|
167 | LOGICAL :: zangtz(PLON) |
---|
168 | |
---|
169 | REAL :: tfld_glo(PLON_GLO,PLEV) |
---|
170 | REAL :: pmid_glo(PLON_GLO,PLEV) |
---|
171 | |
---|
172 | !---------------------------------------------------------------------- |
---|
173 | ! ... Local variables |
---|
174 | !---------------------------------------------------------------------- |
---|
175 | REAL :: zmid(PLON,PLEV) |
---|
176 | |
---|
177 | !----------------------------------------------------------------------- |
---|
178 | ! ... Function interface |
---|
179 | !----------------------------------------------------------------------- |
---|
180 | ! CALL xios_chem_read_restart() |
---|
181 | zmid(:,:) = zma(:PLON,:) / gravit !meters |
---|
182 | |
---|
183 | !----------------------------------------------------------------------- |
---|
184 | ! ... Tropopause Location |
---|
185 | !----------------------------------------------------------------------- |
---|
186 | CALL gather(pmid,pmid_glo) |
---|
187 | CALL bcast(pmid_glo) |
---|
188 | CALL gather(temp,tfld_glo) |
---|
189 | CALL bcast(tfld_glo) |
---|
190 | |
---|
191 | |
---|
192 | ! dans le cas dynamico il faut revoir le calcul de la tropopause |
---|
193 | ! CALL FDTROPOPAUSE ( & |
---|
194 | ! nx, & |
---|
195 | ! ny+1, & ! chemhook_begin recupere nbp_lat-1 de lmdz chemmain avait nbp_lat |
---|
196 | ! PLEV, & |
---|
197 | ! pmid_glo, & |
---|
198 | ! tfld_glo) |
---|
199 | |
---|
200 | |
---|
201 | |
---|
202 | DO i = 1, PLON |
---|
203 | itrop(i)=nint(3./4.*PLEVP) |
---|
204 | END DO |
---|
205 | |
---|
206 | DO iplon = 1, PLON |
---|
207 | |
---|
208 | ttrop(iplon) = temp(iplon,itrop(iplon)) |
---|
209 | ztrop(iplon) = zmid(iplon,itrop(iplon)) |
---|
210 | |
---|
211 | ENDDO |
---|
212 | |
---|
213 | ! appel de l'interface entre inca et orchidee |
---|
214 | |
---|
215 | IF (CoupSurfAtm) THEN |
---|
216 | CALL surf_chem_atm(pctsrf, fraction_landuse) |
---|
217 | ENDIF |
---|
218 | |
---|
219 | #ifndef DUSS |
---|
220 | |
---|
221 | #if defined(AERONLY) || defined(GES) |
---|
222 | CALL XIOS_OXYDANT_READ (calday) |
---|
223 | #else |
---|
224 | ! ... Read Ozone climatologies |
---|
225 | IF (TRIM(flag_o3) .EQ. 'o3clim') THEN |
---|
226 | CALL OZCLIM_READ (calday) |
---|
227 | CALL OZCLIM_INTERP (calday,pmid) |
---|
228 | ENDIF |
---|
229 | |
---|
230 | IF (TRIM(flag_o3) .EQ. 'o3lin') THEN |
---|
231 | ! ... Read Ozone Linear Coefficients |
---|
232 | CALL OZLIN_READ (calday) |
---|
233 | CALL OZLIN_INTERP (calday,pmid) |
---|
234 | ENDIF |
---|
235 | |
---|
236 | #ifdef STRAT |
---|
237 | ! ... Read sulfate data (sad, mass, vol, rmean) |
---|
238 | CALL SAD_READ (calday) |
---|
239 | CALL SAD_INTERP (calday,pmid) |
---|
240 | #endif |
---|
241 | |
---|
242 | ! ... Prepare fields to be used in radiation |
---|
243 | CALL FIELD_PREP (mmr) |
---|
244 | |
---|
245 | |
---|
246 | #ifndef AER |
---|
247 | ! ! ... Read SO4 fields |
---|
248 | CALL SULF_READ (calday) |
---|
249 | CALL SULF_INTERP (calday, pmid, zmid) |
---|
250 | #endif |
---|
251 | |
---|
252 | #endif |
---|
253 | #endif |
---|
254 | |
---|
255 | #ifdef AER |
---|
256 | ! initialise aerosol fields (e.g. emissions) |
---|
257 | CALL AEROSOL_INI(area,delt,nstep,mmr) |
---|
258 | #endif |
---|
259 | |
---|
260 | ! ... Dry deposition velocities |
---|
261 | #ifdef DUSS |
---|
262 | CALL MKDVEL (oro, lat) |
---|
263 | #else |
---|
264 | CALL MKDVEL (& |
---|
265 | oro, lat, zmid, coefh, & |
---|
266 | calday, temp, u, v, sh, & |
---|
267 | pfull, pmid, ts, & |
---|
268 | dpth_snow, sws, albs, & |
---|
269 | rain_fall, snow_fall) |
---|
270 | #endif |
---|
271 | |
---|
272 | #ifdef GES |
---|
273 | CALL CARBONATOR_SFLX(ijour,gmtime) |
---|
274 | #endif |
---|
275 | |
---|
276 | |
---|
277 | #ifdef NMHC |
---|
278 | ! ... calculate parameters for diurnal geomwtry |
---|
279 | CALL DIURNAL_GEOM( & |
---|
280 | lat, calday, polar_night, & |
---|
281 | polar_day, sunon, sunoff, & |
---|
282 | loc_angle, zen_angle, zangtz) |
---|
283 | |
---|
284 | #endif |
---|
285 | |
---|
286 | #ifndef DUSS |
---|
287 | ! ... Surface emissions |
---|
288 | CALL MKSFLX_P2P( & |
---|
289 | calday, oro, lat, lon, area, loc_angle, & |
---|
290 | polar_night, polar_day, sunon, sunoff, & |
---|
291 | u, v, paprs, pmid, cdragh, cdragm, temp, & |
---|
292 | sh, ftsol, ts, pctsrf) |
---|
293 | #endif |
---|
294 | |
---|
295 | #if !defined(GES) && !defined(DUSS) |
---|
296 | CALL MKNOPROD( & |
---|
297 | oro, lat, lon, area, & |
---|
298 | pmid, zmid, temp, & |
---|
299 | ctop, cbot, nx, ny) |
---|
300 | #endif |
---|
301 | CALL CALC_PV(lat,paprs,pmid,t_air_2m,temp,rot) |
---|
302 | |
---|
303 | CALL xios_inca_change_context("inca") |
---|
304 | CALL xios_inca_send_field("pfull", pfull) |
---|
305 | CALL xios_inca_send_field("ttrop", ttrop) |
---|
306 | CALL xios_inca_send_field("ztrop", ztrop) |
---|
307 | CALL xios_inca_change_context("LMDZ") |
---|
308 | |
---|
309 | |
---|
310 | END SUBROUTINE CHEMHOOK_BEGIN |
---|
311 | |
---|
312 | SUBROUTINE CHEMHOOK_END( & |
---|
313 | dt, & |
---|
314 | pmid, & |
---|
315 | temp, & |
---|
316 | mmr, & |
---|
317 | nbtr, & |
---|
318 | paprs, & |
---|
319 | sh, & |
---|
320 | area, & |
---|
321 | zma, & |
---|
322 | phis, & |
---|
323 | rh, aps, bps, ap, bp, lafin ) |
---|
324 | !---------------------------------------------------------------------- |
---|
325 | ! ... General purpose chemistry "hook" routine |
---|
326 | ! Didier Hauglustaine, IPSL, 2000. |
---|
327 | !---------------------------------------------------------------------- |
---|
328 | |
---|
329 | USE SPECIES_NAMES |
---|
330 | USE IOIPSL |
---|
331 | USE MOD_INCA_PARA |
---|
332 | USE CHEM_CONS |
---|
333 | USE TIMING |
---|
334 | USE INCA_DIM |
---|
335 | USE CHEM_MODS |
---|
336 | USE SFLX, ONLY : eflux, dvel, dflux, aflux |
---|
337 | USE PHT_TABLES, ONLY : jrates |
---|
338 | |
---|
339 | |
---|
340 | #ifdef AER |
---|
341 | ! USE OBS_PROF |
---|
342 | #endif |
---|
343 | |
---|
344 | #ifdef NMHC |
---|
345 | ! USE OBS_POS |
---|
346 | #endif |
---|
347 | |
---|
348 | USE XIOS_INCA |
---|
349 | #ifdef AER |
---|
350 | USE AEROSOL_MOD, ONLY : trmx, trnx |
---|
351 | #endif |
---|
352 | |
---|
353 | USE CHEM_TRACNM |
---|
354 | USE PRINT_INCA |
---|
355 | USE RATE_INDEX_MOD |
---|
356 | USE SRF_FLUX_INT |
---|
357 | IMPLICIT NONE |
---|
358 | |
---|
359 | !---------------------------------------------------------------------- |
---|
360 | ! ... Dummy args |
---|
361 | !---------------------------------------------------------------------- |
---|
362 | INTEGER, INTENT(IN) :: nbtr |
---|
363 | REAL, INTENT(IN) :: dt |
---|
364 | REAL, INTENT(IN) :: pmid(PLON,PLEV) |
---|
365 | REAL, INTENT(IN) :: area(PLON) |
---|
366 | REAL, INTENT(IN) :: temp(PLON,PLEV) |
---|
367 | REAL, INTENT(IN) :: paprs(PLON,PLEVP) |
---|
368 | REAL, INTENT(IN) :: sh(PLON,PLEV) |
---|
369 | REAL, INTENT(INOUT) :: mmr(PLON,PLEV,PCNST) |
---|
370 | REAL, INTENT(IN) :: zma(PLON,PLEV) |
---|
371 | REAL, INTENT(IN) :: phis(PLON) |
---|
372 | REAL, INTENT(IN) :: rh(PLON,PLEV) |
---|
373 | REAL, INTENT(IN), DIMENSION(PLEV) :: aps, bps |
---|
374 | REAL, INTENT(IN), DIMENSION(PLEV+1) :: ap, bp |
---|
375 | LOGICAL, INTENT(IN) :: lafin |
---|
376 | !---------------------------------------------------------------------- |
---|
377 | ! ... Local variables |
---|
378 | !---------------------------------------------------------------------- |
---|
379 | REAL :: pdel(PLON,PLEV) |
---|
380 | REAL, PARAMETER :: dry_mass = 28.966 !test userd |
---|
381 | INTEGER, PARAMETER :: inst=1, avgr=2 |
---|
382 | INTEGER :: k,i,j |
---|
383 | INTEGER, PARAMETER :: ilev=1 |
---|
384 | REAL :: dtinv |
---|
385 | real, dimension(PLON) :: field1d |
---|
386 | real, dimension(PLON) :: mmrpm2p5surf,mmrpm2p5asurf,mmrpm10surf,mmrpm1surf,mmrpm1asurf,vmro3surf,pmidsurf,tempsurf |
---|
387 | real, dimension(PLON) :: SOAasurf,SOAbsurf,POMMsurf,AIBCMsurf,ASBCMsurf |
---|
388 | real, dimension(PLON,PLEV) :: field2d |
---|
389 | REAL, DIMENSION(PLEV+1,2) :: Ahyb_bounds, Bhyb_bounds |
---|
390 | REAL, DIMENSION(PLEV,2) :: Ahyb_mid_bounds, Bhyb_mid_bounds |
---|
391 | character(3) :: text |
---|
392 | |
---|
393 | !----------------------------------------------------------------------- |
---|
394 | ! ... Function interface |
---|
395 | !----------------------------------------------------------------------- |
---|
396 | dtinv = 1./dt |
---|
397 | |
---|
398 | write(lunout,*) 'lafin = ', lafin |
---|
399 | |
---|
400 | call xios_inca_change_context("inca") |
---|
401 | |
---|
402 | |
---|
403 | #ifdef NMHC |
---|
404 | ! call obs_pos_interface ( & |
---|
405 | ! nbtr, paprs, pmid, temp, & |
---|
406 | ! mmr) |
---|
407 | #endif |
---|
408 | |
---|
409 | #if !defined(GES) && !defined(DUSS) |
---|
410 | CALL BOUNDSPC (dtinv, mmr, pmid, temp) |
---|
411 | #endif |
---|
412 | |
---|
413 | #ifdef AER |
---|
414 | ! call obs_profile_interpol(pmid,zma,phis,rh,sh,temp,mmr) |
---|
415 | #endif |
---|
416 | |
---|
417 | DO k = 1, PLEV |
---|
418 | pdel(:,k) = paprs(:,k) - paprs (:,k+1) |
---|
419 | END DO |
---|
420 | |
---|
421 | !---------------------------------------------------------------------- |
---|
422 | ! ... Writing the species concentration, surface flux and deposition |
---|
423 | ! velocity and the group members concentration |
---|
424 | !----------------------------------------------------------------------- |
---|
425 | |
---|
426 | CALL xios_inca_send_field("emich4ref", flx_ch4_ant(:,1)) |
---|
427 | CALL xios_inca_send_field("emich4interp", flx_ch4_ant_interp(:,1) ) |
---|
428 | |
---|
429 | |
---|
430 | CALL outfld_xios(pmid,temp,sh,paprs(1,1),pdel,area) |
---|
431 | |
---|
432 | DO i=1,PCNST |
---|
433 | #ifdef AER |
---|
434 | IF ( ( i .LT. trmx ) .OR. ( i .GT. trnx ) ) THEN |
---|
435 | #endif |
---|
436 | IF( adv_mass(i) /= 0. ) THEN |
---|
437 | field2d(:,:) = mmr(:,:,i) * dry_mass / adv_mass(i) |
---|
438 | # if GRPCNT != 0 |
---|
439 | ELSE |
---|
440 | IF ( tracnam(i) == 'OX' ) THEN |
---|
441 | field2d(:,:) = mmr(:,:,i) * dry_mass / nadv_mass(id_o3) |
---|
442 | END IF |
---|
443 | # endif |
---|
444 | ENDIF |
---|
445 | #ifdef AER |
---|
446 | ELSE |
---|
447 | field2d(:,:) = mmr(:,:,i) |
---|
448 | ENDIF |
---|
449 | #endif |
---|
450 | |
---|
451 | call xios_inca_send_field(tracnam(i), field2d) |
---|
452 | call xios_inca_send_field("Emi_"//tracnam(i), eflux(:,i)) |
---|
453 | call xios_inca_send_field("Dep_"//tracnam(i), dvel(:,i)) |
---|
454 | call xios_inca_send_field("Dflux_"//tracnam(i), dflux(:,i)) |
---|
455 | ENDDO |
---|
456 | |
---|
457 | |
---|
458 | Ahyb_bounds(1,1) = 0. |
---|
459 | Ahyb_bounds(1,2) = aps(1) |
---|
460 | Bhyb_bounds(1,1) = 1. |
---|
461 | Bhyb_bounds(1,2) = bps(1) |
---|
462 | DO i=2,PLEV |
---|
463 | Ahyb_bounds(i,1) = aps(i-1) |
---|
464 | Ahyb_bounds(i,2) = aps(i) |
---|
465 | Bhyb_bounds(i,1) = bps(i-1) |
---|
466 | Bhyb_bounds(i,2) = bps(i) |
---|
467 | ENDDO |
---|
468 | Ahyb_bounds(PLEV+1,1) = aps(PLEV) |
---|
469 | Ahyb_bounds(PLEV+1,2) = 0. |
---|
470 | Bhyb_bounds(PLEV+1,1) = bps(PLEV) |
---|
471 | Bhyb_bounds(PLEV+1,2) = 0. |
---|
472 | |
---|
473 | DO i=1, PLEV |
---|
474 | Ahyb_mid_bounds(i,1) = ap(i) |
---|
475 | Ahyb_mid_bounds(i,2) = ap(i+1) |
---|
476 | Bhyb_mid_bounds(i,1) = bp(i) |
---|
477 | Bhyb_mid_bounds(i,2) = bp(i+1) |
---|
478 | END DO |
---|
479 | |
---|
480 | |
---|
481 | CALL xios_inca_send_field("Ahyb", ap) |
---|
482 | CALL xios_inca_send_field("Bhyb", bp) |
---|
483 | |
---|
484 | CALL xios_inca_send_field("Ahyb_bounds", Ahyb_bounds) |
---|
485 | CALL xios_inca_send_field("Bhyb_bounds", Bhyb_bounds) |
---|
486 | |
---|
487 | CALL xios_inca_send_field("Ahyb_mid", aps ) |
---|
488 | CALL xios_inca_send_field("Bhyb_mid", bps) |
---|
489 | |
---|
490 | CALL xios_inca_send_field("Ahyb_mid_bounds", Ahyb_mid_bounds) |
---|
491 | CALL xios_inca_send_field("Bhyb_mid_bounds", Bhyb_mid_bounds) |
---|
492 | |
---|
493 | DO i=1,HETCNT |
---|
494 | CALL xios_inca_send_field("hrate_"//hetname(i), hrates(:,:,i)) |
---|
495 | CALL xios_inca_send_field("wetloss_"//hetname(i), wetloss(:,:,i)) |
---|
496 | ENDDO |
---|
497 | |
---|
498 | do i=1, PHTCNT |
---|
499 | call xios_inca_send_field("phtrate_"//trim(reacname(i)), jrates(:,:,i)) |
---|
500 | enddo |
---|
501 | |
---|
502 | # if EXTCNT != 0 |
---|
503 | DO i=1, EXTCNT |
---|
504 | CALL xios_inca_send_field("extfrc_"//trim(extname(i)), extfrc(:,:,i)) |
---|
505 | CALL xios_inca_send_field("extfrc_"//trim(extname(i))//"_col", extfrc_col(:,i)) |
---|
506 | ENDDO |
---|
507 | #endif |
---|
508 | |
---|
509 | # if GRPCNT != 0 |
---|
510 | DO i=1, GRPCNT |
---|
511 | field2d(:,:) = nas(:,:,i) * dry_mass / nadv_mass(i) |
---|
512 | call xios_inca_send_field(grpsym(i), field2d(:,:)) |
---|
513 | ENDDO |
---|
514 | # endif |
---|
515 | |
---|
516 | |
---|
517 | CALL xios_inca_send_field("prod_light_col", prod_light_col) |
---|
518 | CALL xios_inca_send_field("ASAP_p_col", ASAP_p_col) |
---|
519 | CALL xios_inca_send_field("ASAR_p_col", ASAR_p_col) |
---|
520 | |
---|
521 | |
---|
522 | ! define surface concentrations of PM2.5, PM10 and PM1 ---- YZ edits |
---|
523 | #if defined(AER) && defined(NMHC) && defined(STRAT) |
---|
524 | |
---|
525 | mmrpm2p5surf(:) = 0.640*mmr(:,ilev,id_CIDUSTM) + 0.640*mmr(:,ilev,id_CINO3M) + 0.993*mmr(:,ilev,id_ASSO4M) + & |
---|
526 | 0.993*mmr(:,ilev,id_ASNH4M) + 0.993*mmr(:,ilev,id_ASNO3M) + 0.993*mmr(:,ilev,id_ASBCM) + & |
---|
527 | 0.993*mmr(:,ilev,id_ASPOMM) + mmr(:,ilev,id_AIBCM) + mmr(:,ilev,id_AIPOMM) + 0.07*mmr(:,ilev,id_CSSSM) + & |
---|
528 | 0.07*mmr(:,ilev,id_CSNO3M) + 0.002*mmr(:,ilev,id_SSSSM) + 0.993*(mmr(:,ilev,id_ASAPp1a) + & |
---|
529 | mmr(:,ilev,id_ASAPp2a) + mmr(:,ilev,id_ASARp1a) + mmr(:,ilev,id_ASARp2a)) |
---|
530 | |
---|
531 | call xios_inca_send_field("PM2P5_surf",mmrpm2p5surf) |
---|
532 | |
---|
533 | mmrpm2p5asurf(:) = 0.640*mmr(:,ilev,id_CINO3M) + 0.993*mmr(:,ilev,id_ASSO4M) + 0.993*mmr(:,ilev,id_ASNH4M) + & |
---|
534 | 0.993*mmr(:,ilev,id_ASNO3M) + 0.993*mmr(:,ilev,id_ASBCM) + 0.993*mmr(:,ilev,id_ASPOMM) + mmr(:,ilev,id_AIBCM) + & |
---|
535 | mmr(:,ilev,id_AIPOMM) + 0.07*mmr(:,ilev,id_CSNO3M) + 0.993*(mmr(:,ilev,id_ASAPp1a) + mmr(:,ilev,id_ASAPp2a) + & |
---|
536 | mmr(:,ilev,id_ASARp1a) + mmr(:,ilev,id_ASARp2a)) |
---|
537 | call xios_inca_send_field("PM2P5a_surf",mmrpm2p5asurf) |
---|
538 | |
---|
539 | mmrpm10surf(:) = 0.996*mmr(:,ilev,id_CIDUSTM) + 0.996*mmr(:,ilev,id_CINO3M) + mmr(:,ilev,id_ASSO4M) + mmr(:,ilev,id_ASNH4M) + & |
---|
540 | mmr(:,ilev,id_ASNO3M) + mmr(:,ilev,id_ASBCM) + mmr(:,ilev,id_AIBCM) + mmr(:,ilev,id_ASPOMM) + mmr(:,ilev,id_AIPOMM) + & |
---|
541 | 0.7*mmr(:,ilev,id_CSSSM) + 0.7*mmr(:,ilev,id_CSNO3M) + 0.209*mmr(:,ilev,id_SSSSM) + mmr(:,ilev,id_ASAPp1a) + & |
---|
542 | mmr(:,ilev,id_ASAPp2a) + mmr(:,ilev,id_ASARp1a) + mmr(:,ilev,id_ASARp2a) |
---|
543 | call xios_inca_send_field("PM10_surf",mmrpm10surf) |
---|
544 | |
---|
545 | |
---|
546 | mmrpm1surf(:) = 0.168*mmr(:,ilev,id_CIDUSTM) + 0.168*mmr(:,ilev,id_CINO3M) + 0.684*mmr(:,ilev,id_ASSO4M) + & |
---|
547 | 0.684*mmr(:,ilev,id_ASNH4M) + 0.684*mmr(:,ilev,id_ASNO3M) + 0.684*mmr(:,ilev,id_ASBCM) + mmr(:,ilev,id_AIBCM) + & |
---|
548 | 0.684*mmr(:,ilev,id_ASPOMM) + mmr(:,ilev,id_AIPOMM) + 0.03*mmr(:,ilev,id_CSSSM) + 0.03*mmr(:,ilev,id_CSNO3M) + & |
---|
549 | 0.684*(mmr(:,ilev,id_ASAPp1a) + mmr(:,ilev,id_ASAPp2a) + mmr(:,ilev,id_ASARp1a) + mmr(:,ilev,id_ASARp2a)) |
---|
550 | call xios_inca_send_field("PM1_surf",mmrpm1surf) |
---|
551 | |
---|
552 | mmrpm1asurf(:)= 0.168*mmr(:,ilev,id_CINO3M) + 0.684*mmr(:,ilev,id_ASSO4M) + 0.684*mmr(:,ilev,id_ASNH4M) + & |
---|
553 | 0.684*mmr(:,ilev,id_ASNO3M) + 0.684*mmr(:,ilev,id_ASBCM) + mmr(:,ilev,id_AIBCM) + 0.684*mmr(:,ilev,id_ASPOMM) + & |
---|
554 | mmr(:,ilev,id_AIPOMM) + 0.03*mmr(:,ilev,id_CSNO3M) + 0.684*(mmr(:,ilev,id_ASAPp1a) + mmr(:,ilev,id_ASAPp2a) + & |
---|
555 | mmr(:,ilev,id_ASARp1a) + mmr(:,ilev,id_ASARp2a)) |
---|
556 | call xios_inca_send_field("PM1a_surf",mmrpm1asurf) |
---|
557 | |
---|
558 | SOAasurf(:) = mmr(:,ilev,id_ASARp1a) + mmr(:,ilev,id_ASARp2a) |
---|
559 | call xios_inca_send_field("SOAa_surf",SOAasurf) |
---|
560 | |
---|
561 | SOAbsurf(:) = mmr(:,ilev,id_ASAPp1a) + mmr(:,ilev,id_ASAPp2a) |
---|
562 | call xios_inca_send_field("SOAb_surf",SOAbsurf) |
---|
563 | |
---|
564 | POMMsurf(:) = mmr(:,ilev,id_ASPOMM) + mmr(:,ilev,id_AIPOMM) |
---|
565 | call xios_inca_send_field("POMM_surf",POMMsurf) |
---|
566 | |
---|
567 | AIBCMsurf(:) = mmr(:,ilev,id_AIBCM) |
---|
568 | call xios_inca_send_field("AIBCM_surf",AIBCMsurf) |
---|
569 | |
---|
570 | ASBCMsurf(:) = mmr(:,ilev,id_ASBCM) |
---|
571 | call xios_inca_send_field("ASBCM_surf",ASBCMsurf) |
---|
572 | |
---|
573 | |
---|
574 | pmidsurf(:)=pmid(:,ilev) |
---|
575 | call xios_inca_send_field("PMID_surf",pmidsurf) |
---|
576 | |
---|
577 | tempsurf(:)=temp(:,ilev) |
---|
578 | call xios_inca_send_field("TEMP_surf",tempsurf) |
---|
579 | |
---|
580 | #endif |
---|
581 | |
---|
582 | |
---|
583 | call xios_inca_change_context("LMDZ") |
---|
584 | if (lafin) CALL chem_write_restart |
---|
585 | |
---|
586 | END SUBROUTINE CHEMHOOK_END |
---|
587 | |
---|
588 | |
---|