par_mod.f90 12.1 KB
Newer Older
Matthias Langer's avatar
 
Matthias Langer committed
1
2
3
4
5
6
7
8
!*******************************************************************************
!   Include file for calculation of particle trajectories (Program FLEXPART)   *
!        This file contains the parameter statements used in FLEXPART          *
!                                                                              *
!        Author: A. Stohl                                                      *
!                                                                              *
!        1997                                                                  *
!                                                                              *
Espen Sollum's avatar
Espen Sollum committed
9
10
!        Update 15 August 2013 IP                                              *
!                                                                              *
Matthias Langer's avatar
 
Matthias Langer committed
11
12
13
14
15
16
17
18
!                                                                              *
!*******************************************************************************

module par_mod

  implicit none

  !****************************************************************
19
  ! Parameters defining KIND parameter for double/single precision
Matthias Langer's avatar
 
Matthias Langer committed
20
21
22
  !****************************************************************

  integer,parameter :: dp=selected_real_kind(P=15)
23
  integer,parameter :: sp=selected_real_kind(6)
24
25
26
27
28
29

  !****************************************************************
  ! dep_prec sets the precision for deposition calculations (sp or 
  ! dp). sp is default, dp can be used for increased precision.
  !****************************************************************

30
  integer,parameter :: dep_prec=sp
Matthias Langer's avatar
 
Matthias Langer committed
31

32
  !****************************************************************
33
  ! Set to F to disable use of kernel for concentrations/deposition
34
35
  !****************************************************************

36
  logical, parameter :: lusekerneloutput=.true.
37

38
39
40
41
42
  !*********************************************************************
  ! Set to T to change output units to number of particles per grid cell
  !*********************************************************************
  logical, parameter :: lparticlecountoutput=.false.

Matthias Langer's avatar
 
Matthias Langer committed
43
  !***********************************************************
44
  ! number of directories/files used for FLEXPART input/output
Matthias Langer's avatar
 
Matthias Langer committed
45
46
47
48
49
50
51
52
53
54
55
56
57
  !***********************************************************

  integer,parameter :: numpath=4

  ! numpath                 Number of different pathnames for input/output files


  !*****************************
  ! Physical and other constants
  !*****************************

  real,parameter :: pi=3.14159265, r_earth=6.371e6, r_air=287.05, ga=9.81
  real,parameter :: cpa=1004.6, kappa=0.286, pi180=pi/180., vonkarman=0.4
58
59
60
  ! additional constants RLT Aug-2017
  real,parameter :: rgas=8.31447 
  real,parameter :: r_water=461.495
Matthias Langer's avatar
 
Matthias Langer committed
61
62
63
64
65
66
67
68
69

  ! pi                      number "pi"
  ! pi180                   pi/180.
  ! r_earth                 radius of earth [m]
  ! r_air                   individual gas constant for dry air [J/kg/K]
  ! ga                      gravity acceleration of earth [m/s**2]
  ! cpa                     specific heat for dry air
  ! kappa                   exponent of formula for potential temperature
  ! vonkarman               von Karman constant
70
71
  ! rgas                    universal gas constant [J/mol/K]
  ! r_water                 specific gas constant for water vapor [J/kg/K]
Matthias Langer's avatar
 
Matthias Langer committed
72
73

  real,parameter :: karman=0.40, href=15., convke=2.0
74
75
76
  real,parameter :: hmixmin=100., hmixmax=4500. !, turbmesoscale=0.16
  !real,parameter :: d_trop=50., d_strat=0.1
  real :: d_trop=50., d_strat=0.1, turbmesoscale=0.16 ! turbulence factors can change for different runs
77
  real,parameter :: rho_water=1000. !ZHG 2015 [kg/m3]
78
  !ZHG MAR2016
79
  real,parameter :: incloud_ratio=6.2
80

Matthias Langer's avatar
 
Matthias Langer committed
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
  ! karman                  Karman's constant
  ! href [m]                Reference height for dry deposition
  ! konvke                  Relative share of kinetic energy used for parcel lifting
  ! hmixmin,hmixmax         Minimum and maximum allowed PBL height
  ! turbmesoscale           the factor by which standard deviations of winds at grid
  !                    points surrounding the particle positions are scaled to
  !                    yield the scales for the mesoscale wind velocity fluctuations
  ! d_trop [m2/s]           Turbulent diffusivity for horizontal components in the troposphere
  ! d_strat [m2/s]          Turbulent diffusivity for vertical component in the stratosphere

  real,parameter :: xmwml=18.016/28.960

  ! xmwml   ratio of molar weights of water vapor and dry air
  !****************************************************
  ! Constants related to the stratospheric ozone tracer
  !****************************************************

  real,parameter :: ozonescale=60., pvcrit=2.0

  ! ozonescale              ppbv O3 per PV unit
  ! pvcrit                  PV level of the tropopause



  !********************
  ! Some time constants
  !********************

  integer,parameter :: idiffnorm=10800, idiffmax=2*idiffnorm, minstep=1

  ! idiffnorm [s]           normal time interval between two wind fields
  ! idiffmax [s]            maximum time interval between two wind fields
  ! minstep [s]             minimum time step to be used within FLEXPART


  !*****************************************************************
  ! Parameters for polar stereographic projection close to the poles
  !*****************************************************************

  real,parameter :: switchnorth=75., switchsouth=-75.

  ! switchnorth    use polar stereographic grid north of switchnorth
  ! switchsouth    use polar stereographic grid south of switchsouth


  !*********************************************
  ! Maximum dimensions of the input mother grids
  !*********************************************
129
  
130
131
  ! ECMWF
! integer,parameter :: nxmax=361,nymax=181,nuvzmax=92,nwzmax=92,nzmax=92,nxshift=359 ! 1.0 degree 92 level
132
!  integer,parameter :: nxmax=361,nymax=181,nuvzmax=138,nwzmax=138,nzmax=138,nxshift=0 ! 1.0 degree 138 level
133
!   integer,parameter :: nxmax=361,nymax=181,nuvzmax=138,nwzmax=138,nzmax=138,nxshift=359 ! 1.0 degree 138 level
134
135
! integer,parameter :: nxmax=721,nymax=361,nuvzmax=138,nwzmax=138,nzmax=138,nxshift=359  ! 0.5 degree 138 level
!  integer,parameter :: nxmax=181,nymax=91,nuvzmax=92,nwzmax=92,nzmax=92,nxshift=0  ! CERA 2.0 degree 92 level
136

137
! GFS
138
   integer,parameter :: nxmax=361,nymax=181,nuvzmax=138,nwzmax=138,nzmax=138
139
   integer :: nxshift=0 ! shift not fixed for the executable 
140
141
142
143
144
145


  !*********************************************
  ! Maximum dimensions of the nested input grids
  !*********************************************

146
  integer,parameter :: maxnests=0,nxmaxn=0,nymaxn=0
147
148
149
150
151
152
153
154
155
156
157
158

  ! nxmax,nymax        maximum dimension of wind fields in x and y
  !                    direction, respectively
  ! nuvzmax,nwzmax     maximum dimension of (u,v) and (w) wind fields in z
  !                    direction (for fields on eta levels)
  ! nzmax              maximum dimension of wind fields in z direction
  !                    for the transformed Cartesian coordinates
  ! nxshift            for global grids (in x), the grid can be shifted by
  !                    nxshift grid points, in order to accomodate nested
  !                    grids, and output grids overlapping the domain "boundary"
  !                    nxshift must not be negative; "normal" setting would be 0

159
  
Matthias Langer's avatar
 
Matthias Langer committed
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
  integer,parameter :: nconvlevmax = nuvzmax-1
  integer,parameter :: na = nconvlevmax+1

  ! ntracermax         maximum number of tracer species in convection
  ! nconvlevmax        maximum number of levels for convection
  ! na                 parameter used in Emanuel's convect subroutine


  !*********************************
  ! Parmaters for GRIB file decoding
  !*********************************

  integer,parameter :: jpack=4*nxmax*nymax, jpunp=4*jpack

  ! jpack,jpunp             maximum dimensions needed for GRIB file decoding


  !**************************************
  ! Maximum dimensions of the output grid
  !**************************************

  !integer,parameter :: maxageclass=1,maxzgrid=10,nclassunc=1
  integer,parameter :: maxageclass=1,nclassunc=1

  ! nclassunc               number of classes used to calculate the uncertainty
  !                         of the output
  ! maxageclass             maximum number of age classes used for output

  ! Sabine Eckhardt, June, 2008
  ! the dimensions of the OUTGRID are now set dynamically during runtime
  ! maxxgrid,maxygrid,maxzgrid    maximum dimensions in x,y,z direction
  ! maxxgridn,maxygridn           maximum dimension of the nested grid
  !integer maxxgrid,maxygrid,maxzgrid,maxxgridn,maxygridn
  !integer,parameter :: maxxgrid=361,maxygrid=181,maxxgridn=0,maxygridn=0)

195
  integer,parameter :: maxreceptor=20
Matthias Langer's avatar
 
Matthias Langer committed
196
197
198
199
200
201
202
203

  ! maxreceptor             maximum number of receptor points


  !**************************************************
  ! Maximum number of particles, species, and similar
  !**************************************************

204
205
  integer,parameter :: maxpart=100000
  integer,parameter :: maxspec=1
206

207
  real,parameter :: minmass=0.0001
Matthias Langer's avatar
 
Matthias Langer committed
208
209
210

  ! maxpart                 Maximum number of particles
  ! maxspec                 Maximum number of chemical species per release
211
  ! minmass                 Terminate particles carrying less mass
212

Matthias Langer's avatar
 
Matthias Langer committed
213
214
215
216
217
218
219
  ! maxpoint is also set dynamically during runtime
  ! maxpoint                Maximum number of release locations

  ! ---------
  ! Sabine Eckhardt: change of landuse inventary numclass=13
  ! ---------
  integer,parameter :: maxwf=50000, maxtable=1000, numclass=13, ni=11
220
221
  integer,parameter :: numwfmem=2 ! Serial version/MPI with 2 fields
  !integer,parameter :: numwfmem=3 ! MPI with 3 fields
Matthias Langer's avatar
 
Matthias Langer committed
222
223
224
225
226
227

  ! maxwf                   maximum number of wind fields to be used for simulation
  ! maxtable                Maximum number of chemical species that can be
  !                         tabulated for FLEXPART
  ! numclass                Number of landuse classes available to FLEXPART
  ! ni                      Number of diameter classes of particles
228
229
  ! numwfmem                Number of windfields kept in memory. 2 for serial
  !                         version, 2 or 3 for MPI version
Matthias Langer's avatar
 
Matthias Langer committed
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247

  !**************************************************************************
  ! dimension of the OH field
  !**************************************************************************
  integer,parameter :: maxxOH=72, maxyOH=46, maxzOH=7

  !**************************************************************************
  ! Maximum number of particles to be released in a single atmospheric column
  ! for the domain-filling trajectories option
  !**************************************************************************

  integer,parameter :: maxcolumn=3000


  !*********************************
  ! Dimension of random number field
  !*********************************

248
  integer,parameter :: maxrand=1000000
249

Matthias Langer's avatar
 
Matthias Langer committed
250
  ! maxrand                 number of random numbers used
251
  
Matthias Langer's avatar
 
Matthias Langer committed
252
253
254
255
256
257
258
259
260
261
262
263

  !*****************************************************
  ! Number of clusters to be used for plume trajectories
  !*****************************************************

  integer,parameter :: ncluster=5

  !************************************
  ! Unit numbers for input/output files
  !************************************

  integer,parameter :: unitpath=1, unitcommand=1, unitageclasses=1, unitgrid=1
264
  integer,parameter :: unitavailab=1, unitreleases=88, unitpartout=93, unitpartout_average=105
Matthias Langer's avatar
 
Matthias Langer committed
265
266
267
268
269
270
  integer,parameter :: unitpartin=93, unitflux=98, unitouttraj=96
  integer,parameter :: unitvert=1, unitoro=1, unitpoin=1, unitreceptor=1
  integer,parameter :: unitoutgrid=97, unitoutgridppt=99, unitoutinfo=1
  integer,parameter :: unitspecies=1, unitoutrecept=91, unitoutreceptppt=92
  integer,parameter :: unitlsm=1, unitsurfdata=1, unitland=1, unitwesely=1
  integer,parameter :: unitOH=1
271
  integer,parameter :: unitdates=94, unitheader=90,unitheader_txt=100, unitshortpart=95, unitprecip=101
Matthias Langer's avatar
 
Matthias Langer committed
272
  integer,parameter :: unitboundcond=89
273
  integer,parameter :: unittmp=101
274
275
! RLT
  integer,parameter :: unitoutfactor=102
Matthias Langer's avatar
 
Matthias Langer committed
276

277
278
279
280
!******************************************************
! integer code for missing values, used in wet scavenging (PS, 2012)
!******************************************************

281
  integer,parameter ::  icmv=-9999
282
283


Matthias Langer's avatar
 
Matthias Langer committed
284
end module par_mod