PHYEX 0.9.5
PHYsique EXternalisée
Loading...
Searching...
No Matches
modd_elec_descr.F90
Go to the documentation of this file.
1!MNH_LIC Copyright 2002-2024 CNRS, Meteo-France and Universite Paul Sabatier
2!MNH_LIC This is part of the Meso-NH software governed by the CeCILL-C licence
3!MNH_LIC version 1. See LICENSE, CeCILL-C_V1-en.txt and CeCILL-C_V1-fr.txt
4!MNH_LIC for details. version 1.
5!-----------------------------------------------------------------
6! #######################
8
9!$ACDC methods
10
11! #######################
12!
13!!**** *MODD_ELEC_DESCR* - declaration of the electrical descriptive constants
14!!
15!! PURPOSE
16!! -------
17!
18!!** IMPLICIT ARGUMENTS
19!! ------------------
20!! None
21!!
22!! REFERENCE
23!! ---------
24!!
25!! AUTHOR
26!! ------
27!! Gilles Molinie * Laboratoire d'Aerologie *
28!!
29!! MODIFICATIONS
30!! -------------
31!! Original 14/11/02
32!! M. Chong 26/01/10 Small ions parameters
33!! +Option for Fair weather field from
34!! Helsdon-Farley (JGR, 1987, 5661-5675)
35!! Add "Beard" effect via sedimentation process
36!! J.-P. Pinty 25/10/13 Add "Latham" effect via aggregation process
37!! C. Barthe 05/07/23 New data structures for PHYEX - for sedimentation in ICE3
38!! + Remove unused variables
39!!
40!-------------------------------------------------------------------------------
41!
42!* 0. DECLARATIONS
43! ------------
44!
46
47IMPLICIT NONE
48!
49! Namelist
50LOGICAL :: locg=.false. ! .T.: only charge generation
51LOGICAL :: lelec_field=.true. ! .T.: the electric field is computed
52LOGICAL :: lfw_helfa=.false. ! .T.: Helsdon-Farley Fair Weather field
53LOGICAL :: lcosmic_approx=.false. ! .T.: Neglecting height variations of fair
54 ! weather ion current in calculating ion
55 ! source (XIONSOURCEFW) from cosmic rays
56LOGICAL :: lion_attach = .true. ! .T.: Ion attachment to hydrometeors
57CHARACTER (LEN=3) :: cdrift = 'PPM' ! PPM (advection) or DIV (Divergence form)
58LOGICAL :: lrelax2fw_ion = .false. ! .T.= Relaxation to fair weather ion
59 ! concentration in rim zone and top absorbing
60 ! layer
61LOGICAL :: lflash_geom=.true. ! .T.: the 'geometric' flash scheme is used
62LOGICAL :: lsave_coord=.false. ! .T.: the flash coord are written in an ascii file
63INTEGER :: nflash_write = 1000 ! Number of flashes to be saved before writing
64 ! the diag and/or coordinates in ascii files
65LOGICAL :: linductive=.false. ! .T.: inductive process is taken into account
66LOGICAL :: llnox_explicit=.false. ! .T.: lnox production is computed
67LOGICAL :: lseries_elec=.false. ! .T.: looking for flash rate proxies
68INTEGER :: ntsave_series = 60 ! time interval at which data from
69 ! series_cloud_elec are written in an ascii file
70!
71CHARACTER (LEN=5) :: cni_charging='TAKAH' ! Choice of the charging process
72REAL :: xqtc=263. ! temperature charge reversal for 'HELFA'
73REAL :: xlim_ni_is=10.e-15 ! max magnitude of dq for I-S non-inductive charging (C)
74REAL :: xlim_ni_ig=30.e-15 ! max magnitude of dq for I-G non-inductive charging (C)
75REAL :: xlim_ni_sg=100.e-15 ! max magnitude of dq for S-G non-inductive charging (C)
76!
77CHARACTER (LEN=5) :: clsol='RICHA' ! Choice of the Laplace equation solver
78INTEGER :: nlapitr_elec=4 ! Nb of iteration for the elec field solveur
79REAL :: xrelax_elec=1 ! Relaxation factor for the elec field solveur
80!
81REAL :: xetrig=200.e3 ! E threshold for lightning triggering
82REAL :: xebalance=0.1 ! Proportion of XETRIG that the lightning must reduce
83REAL :: xeprop=15.e3 ! E threshold for lightning propagation
84!
85REAL :: xqexces=2.e-10 ! Charge in excess of qexces => pt available for cell detection
86REAL :: xqneut=1.e-10 ! Charge in excess of qneut is neutralized
87REAL :: xdfrac_eclair=2.3 ! Fractal dimension of lightning flashes
88REAL :: xdfrac_l=1500. ! Linear coefficient for the branch number
89!
90REAL :: xwang_a = 0.34e21 ! Wang eta al. parameters of
91REAL :: xwang_b = 1.3e16 ! LNOX production
92!
93!
94REAL, DIMENSION(:), SAVE, ALLOCATABLE :: xqtmin ! Min values allowed for the
95 ! volumetric charge
96REAL, DIMENSION(:) , ALLOCATABLE :: xrtmin_elec ! Limit value of R where charge is available
97!
98REAL :: xepsilon ! Dielectric permittivity of air (F/m)
99!
100!
101! parameters relative to electrification
102!
103REAL, SAVE :: xlbdar_maxe, & ! Max values allowed for the shape
104 xlbdas_maxe, & ! when computation of charge separation
105 xlbdag_maxe, & ! and of lightning neutralisation
106 xlbdah_maxe !
108!
109!
110! parameters relative to the electric field
111!
112REAL :: xe_0, xkef ! Constant for the fair weather electric field
113
114REAL, SAVE :: xe0_hf, xa1_hf, xb1_hf, xa2_hf, xb2_hf, xa3_hf, xb3_hf ! Coeffs.
115 ! Helsdon-Farley Fair Weather Electric Field
116REAL, SAVE :: xioncomb ! Ionic recombination coefficient (m3/s)
117REAL, SAVE :: xf_pos, xf_neg ! Constant for positive/negative ion mobility
118 ! law (m2/V/s)
119REAL, SAVE :: xexpmob ! Exponent of ion mobility law (m-1)
120
121REAL, SAVE :: xfcorona ! Factor for corona current (A m /V3)
122REAL, SAVE :: xecorona ! Electric field threshold for corona (V/m)
123
124! Fair Weather electric property (Chiu, JGR 1978, 5025-5049)
125!
126REAL, SAVE :: xjcurr_fw ! Air-earth conduction current (A/m2)
127!
128! Lightning flashes
129!
130INTEGER :: nmax_cell ! max number of electrified cells in the domain
131INTEGER :: nbranch_max ! max number of branches per flash
132INTEGER :: nleader_max ! max number of segments in the bi-leader
133REAL :: xe_thresh ! electric field threshold for cell detection
134!
135INTEGER, PARAMETER :: nlghtmax = 5000, & ! Nb max of lightnings
136 nsegmax = 500 ! Nb max of segments
137!
138! Parameters relative to the lightning
139!
140INTEGER :: nnblight=0 ! Nb of lightning flashes
141!
142REAL, DIMENSION(:), ALLOCATABLE :: xneut_pos, xneut_neg
143INTEGER :: nnb_cg ! Nb of CG flashes
144INTEGER :: nnb_cg_pos ! Nb of positive CG flashes
145REAL :: xalt_cg ! Altitude (m) at which CG are detected
146!
147CHARACTER(LEN=JPSVNAMELGTMAX), DIMENSION(8) &
148 :: celecnames=(/'QNIONP','QCELEC','QRELEC','QIELEC','QSELEC', &
149 'QGELEC','QHELEC','QNIONN'/)
150! QNIONP (QNIONN): Positive (Negative) ion concentration
151! basenames of the SV articles stored in the binary files
152!
154!
155REAL, DIMENSION(:,:), ALLOCATABLE :: xepotfw_top
156!
157! Parameters relative to the "Beard" effect ELEC=>MICROPHYS
158!
159LOGICAL :: liaggs_latham=.false. ! .T.: to enable ELEC=>MICROPHYS via
160! ! ice aggregation rate
161!
162LOGICAL :: lelec_qlap=.false. ! .T.: to set Electric upper/lower boundary condition in QLAP after GDIV
163!
164! The following variables must be declared with a derived type to match with PHYEX requirements
166 REAL :: xfc, xfr, xfi, xfs, xfg, xfh ! f_x in q_x = e_x D^f_x
167 REAL :: xcxr ! Exponent in the concentration-slope
168 REAL :: xecharge ! Elementary charge (C)
169 LOGICAL :: lsedim_beard=.false. ! .T.: to enable ELEC=>MICROPHYS via
170! ! particule sedimentation rate
171END TYPE elec_descr_t
172!
173TYPE(elec_descr_t), TARGET, SAVE :: elec_descr
174!
175REAL, POINTER :: xfc => null(), &
176 xfr => null(), &
177 xfi => null(), &
178 xfs => null(), &
179 xfg => null(), &
180 xfh => null(), &
181 xcxr => null(), &
182 xecharge => null()
183LOGICAL, POINTER :: lsedim_beard => null()
184!
185CONTAINS
186!
188 IMPLICIT NONE
189 !
190 xfc => elec_descr%XFC
191 xfr => elec_descr%XFR
192 xfi => elec_descr%XFI
193 xfs => elec_descr%XFS
194 xfg => elec_descr%XFG
195 xfh => elec_descr%XFH
196 xcxr => elec_descr%XCXR
197 xecharge=> elec_descr%XECHARGE
198 lsedim_beard => elec_descr%LSEDIM_BEARD
199END SUBROUTINE elec_descr_associate
200!
201END MODULE modd_elec_descr
real, dimension(:), allocatable xneut_pos
character(len=5) clsol
logical, pointer lsedim_beard
real, dimension(:,:), allocatable xepotfw_top
character(len=5) cni_charging
type(elec_descr_t), target, save elec_descr
character(len=jpsvnamelgtmax), dimension(8) celecnames
real, dimension(:), allocatable xneut_neg
real, pointer xecharge
integer, parameter nsegmax
character(len=3) cdrift
real, dimension(:), allocatable, save xqtmin
subroutine elec_descr_associate()
real, dimension(:), allocatable xrtmin_elec
integer, parameter nlghtmax
integer, parameter jpsvnamelgtmax