source: CONFIG/publications/ICOLMDZORINCA_CO2_Transport_GMD_2023/INCA/src/INCA_MOD/lightning_mod.F90 @ 6610

Last change on this file since 6610 was 6610, checked in by acosce, 10 months ago

INCA used for ICOLMDZORINCA_CO2_Transport_GMD_2023

File size: 4.5 KB
Line 
1!$Id: lightning_mod.F90 104 2008-12-23 10:28:51Z 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!! Line Jourdain, SA
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      module LIGHTNING
56!---------------------------------------------------------------
57!       ... Lightning NOx production
58! Line Jourdain, SA, 2001.
59! Modified, Didier Hauglustaine, IPSL, 08-2001. 11-2013.
60!---------------------------------------------------------------
61       implicit none
62
63      integer , parameter :: zdim = 16
64
65      real,SAVE,ALLOCATABLE    :: prod_no(:) 
66      real,SAVE,ALLOCATABLE    :: prod_light(:,:)
67
68      real,SAVE,ALLOCATABLE    :: ztop(:)
69      real,SAVE,ALLOCATABLE    :: flash(:)
70      real,SAVE,ALLOCATABLE    :: pcg(:) 
71      real,SAVE,ALLOCATABLE    :: flpcg(:) 
72      real,SAVE,ALLOCATABLE    :: dcold(:)
73
74!$OMP THREADPRIVATE(prod_no, prod_light)
75!$OMP THREADPRIVATE(ztop, flash, pcg, dcold)
76!$OMP THREADPRIVATE(flpcg)
77
78!     ... Pickering et al. (1998) vertical distribution
79
80      real    :: alt(zdim)= &
81      (/ 0.5, 1.5, 2.5, 3.5, 4.5, 5.5, 6.5, 7.5,  8.5,  9.5, 10.5, 11.5, 12.5, 13.5, 14.5, 15.5/)
82
83      real    :: coeff_mc(zdim)= &
84      (/20.1, 2.3, 0.8, 1.5, 3.4, 5.3, 3.6, 3.8,  5.4,  6.6,  8.3,  9.6, 12.8, 10.0,  6.2,  0.3/)
85
86      real    :: coeff_tm(zdim)= &
87      (/ 5.8, 2.9, 2.6, 2.4, 2.2, 2.1, 2.3, 6.1, 16.5, 14.1, 13.7, 12.8, 12.5,  2.8,  0.9,  0.3/)
88
89      real    :: coeff_tc(zdim)= &
90      (/ 8.2, 1.9, 2.1, 1.6, 1.1, 1.6, 3.0, 5.8,  7.6,  9.6, 10.5, 12.3, 11.8, 12.5,  8.1,  2.3/)
91
92      CONTAINS
93       
94        SUBROUTINE init_lightning
95        USE inca_dim
96        IMPLICIT NONE
97       
98          ALLOCATE( prod_no(PLON))
99          ALLOCATE( prod_light(PLON,PLEV))
100          ALLOCATE( ztop(PLON))
101          ALLOCATE( flash(PLON))
102          ALLOCATE( pcg(PLON))
103          ALLOCATE( flpcg(PLON))
104          ALLOCATE( dcold(PLON))
105         
106          prod_no(:)          = 0.
107          prod_light(:,:) = 0.
108          ztop(:)  = 0.
109          flash(:) = 0.
110          pcg(:)   = 0.
111          flpcg(:)   = 0.
112          dcold(:) = 0. 
113         
114        END SUBROUTINE init_lightning
115             
116      end module LIGHTNING
117
Note: See TracBrowser for help on using the repository browser.