[e200b7a] | 1 | !******************************************************************************* |
---|
| 2 | ! Include file for particle diffusion model FLEXPART * |
---|
| 3 | ! This file contains a global common block used by FLEXPART * |
---|
| 4 | ! * |
---|
| 5 | ! Author: A. Stohl * |
---|
| 6 | ! * |
---|
| 7 | ! June 1996 * |
---|
| 8 | ! * |
---|
[f13406c] | 9 | ! Last update:15 August 2013 IP * |
---|
[e200b7a] | 10 | ! * |
---|
| 11 | !******************************************************************************* |
---|
| 12 | |
---|
| 13 | module com_mod |
---|
| 14 | |
---|
| 15 | use par_mod, only: dp, numpath, maxnests, maxageclass, maxspec, ni, & |
---|
| 16 | numclass, nymax, nxmax, maxcolumn, maxwf, nzmax, nxmaxn, nymaxn, & |
---|
[8a65cb0] | 17 | maxreceptor, maxpart, maxrand, nwzmax, nuvzmax, numwfmem |
---|
[e200b7a] | 18 | |
---|
| 19 | implicit none |
---|
| 20 | |
---|
[0a94e13] | 21 | |
---|
| 22 | |
---|
[e200b7a] | 23 | !**************************************************************** |
---|
| 24 | ! Variables defining where FLEXPART input/output files are stored |
---|
| 25 | !**************************************************************** |
---|
| 26 | |
---|
[8a65cb0] | 27 | character :: path(numpath+2*maxnests)*120 |
---|
[e200b7a] | 28 | integer :: length(numpath+2*maxnests) |
---|
[fddc6ec] | 29 | character(len=256) :: pathfile, flexversion, flexversion_major, arg1, arg2 |
---|
[78e62dc] | 30 | character(len=256) :: ohfields_path |
---|
[f13406c] | 31 | |
---|
[e200b7a] | 32 | ! path path names needed for trajectory model |
---|
| 33 | ! length length of path names needed for trajectory model |
---|
[f13406c] | 34 | ! pathfile file where pathnames are stored |
---|
[fddc6ec] | 35 | ! flexversion version of flexpart (descriptive long string) |
---|
| 36 | ! flexversion_major version of flexpart (major version number) |
---|
[f13406c] | 37 | ! arg input arguments from launch at command line |
---|
[78e62dc] | 38 | ! ohfields_path path to binary files for OH fields |
---|
[e200b7a] | 39 | |
---|
| 40 | !******************************************************** |
---|
| 41 | ! Variables defining the general model run specifications |
---|
| 42 | !******************************************************** |
---|
| 43 | |
---|
| 44 | integer :: ibdate,ibtime,iedate,ietime |
---|
| 45 | real(kind=dp) :: bdate,edate |
---|
| 46 | |
---|
| 47 | |
---|
| 48 | ! ibdate beginning date (YYYYMMDD) |
---|
| 49 | ! ibtime beginning time (HHMISS) |
---|
| 50 | ! iedate ending date (YYYYMMDD) |
---|
| 51 | ! ietime ending time (HHMISS) |
---|
| 52 | ! bdate beginning date of simulation (julian date) |
---|
| 53 | ! edate ending date of simulation (julian date) |
---|
| 54 | |
---|
| 55 | |
---|
| 56 | integer :: ldirect,ideltas |
---|
| 57 | |
---|
| 58 | ! ldirect 1 for forward, -1 for backward simulation |
---|
| 59 | ! ideltas length of trajectory loop from beginning to |
---|
| 60 | ! ending date (s) |
---|
| 61 | |
---|
| 62 | integer :: loutstep,loutaver,loutsample,method,lsynctime |
---|
| 63 | real :: outstep |
---|
| 64 | |
---|
| 65 | ! loutstep [s] gridded concentration output every loutstep seconds |
---|
| 66 | ! loutaver [s] concentration output is an average over [s] seconds |
---|
| 67 | ! loutsample [s] sampling interval of gridded concentration output |
---|
| 68 | ! lsynctime [s] synchronisation time of all particles |
---|
| 69 | ! method indicator which dispersion method is to be used |
---|
| 70 | ! outstep = real(abs(loutstep)) |
---|
| 71 | |
---|
| 72 | real :: ctl,fine |
---|
[0a94e13] | 73 | integer :: ifine,iout,ipout,ipin,iflux,mdomainfill,ipoutfac |
---|
[e200b7a] | 74 | integer :: mquasilag,nested_output,ind_source,ind_receptor |
---|
[f13406c] | 75 | integer :: ind_rel,ind_samp,ioutputforeachrelease,linit_cond,surf_only |
---|
[e200b7a] | 76 | logical :: turbswitch |
---|
[43225d1] | 77 | integer :: cblflag !added by mc for cbl |
---|
[e200b7a] | 78 | |
---|
| 79 | ! ctl factor, by which time step must be smaller than Lagrangian time scale |
---|
| 80 | ! ifine reduction factor for time step used for vertical wind |
---|
| 81 | ! Langevin equation for the vertical wind component |
---|
| 82 | ! ioutputforeachrelease Should each release be a seperate output field? |
---|
| 83 | ! iflux flux calculation options: 1 calculation of fluxes, 2 no fluxes |
---|
| 84 | ! iout output options: 1 conc. output (ng/m3), 2 mixing ratio (pptv), 3 both |
---|
| 85 | ! ipout particle dump options: 0 no, 1 every output interval, 2 only at end |
---|
[0a94e13] | 86 | ! ipoutfac increase particle dump interval by factor (default 1) |
---|
[e200b7a] | 87 | ! ipin read in particle positions from dumped file from a previous run |
---|
| 88 | ! fine real(ifine) |
---|
| 89 | ! mdomainfill 0: normal run |
---|
| 90 | ! 1: particles are initialized according to atmospheric mass distribution |
---|
| 91 | ! ind_source switches between different units for concentrations at the source |
---|
| 92 | ! NOTE that in backward simulations the release of computational particles |
---|
| 93 | ! takes place at the "receptor" and the sampling of particles at the "source". |
---|
| 94 | ! 1= mass units |
---|
| 95 | ! 2= mass mixing ratio units |
---|
| 96 | ! ind_receptor switches between different units for FLEXPART concentration at the receptor |
---|
| 97 | ! 1= mass units |
---|
| 98 | ! 2= mass mixing ratio units |
---|
| 99 | ! linit_cond switch on the output of sensitivity to initial conditions for backward runs |
---|
| 100 | ! 0=no, 1=mass unit, 2=mass mixing ratio unit |
---|
| 101 | ! mquasilag 0: normal run |
---|
| 102 | ! 1: Particle position output is produced in a condensed format and particles are numbered |
---|
[f13406c] | 103 | ! surf_only switch output in grid_time files for surface only or full vertical resolution |
---|
| 104 | ! 0=no (full vertical resolution), 1=yes (surface only) |
---|
[e200b7a] | 105 | ! nested_output: 0 no, 1 yes |
---|
| 106 | ! turbswitch determines how the Markov chain is formulated |
---|
| 107 | |
---|
| 108 | ! ind_rel and ind_samp are used within the code to change between mass and mass-mix (see readcommand.f) |
---|
[8a65cb0] | 109 | ! cblflag !: 1 activate cbl skewed pdf routines with bi-gaussina pdf whan OL<0 added by mc |
---|
[e200b7a] | 110 | |
---|
| 111 | |
---|
| 112 | integer :: mintime,itsplit |
---|
| 113 | |
---|
| 114 | ! mintime minimum time step to be used by FLEXPART |
---|
| 115 | ! itsplit time constant for splitting particles |
---|
| 116 | |
---|
| 117 | integer :: lsubgrid,lconvection,lagespectra |
---|
| 118 | |
---|
| 119 | ! lsubgrid 1 if subgrid topography parameterization switched on, 2 if not |
---|
| 120 | ! lconvection 1 if convection parameterization switched on, 0 if not |
---|
| 121 | ! lagespectra 1 if age spectra calculation switched on, 2 if not |
---|
| 122 | |
---|
[8a65cb0] | 123 | integer :: lnetcdfout |
---|
| 124 | ! lnetcdfout 1 for netcdf grid output, 0 if not. Set in COMMAND (namelist input) |
---|
[e200b7a] | 125 | |
---|
[2eefa58] | 126 | integer :: linversionout |
---|
| 127 | ! linversionout 1 for one grid_time output file for each release containing all timesteps |
---|
| 128 | |
---|
[e200b7a] | 129 | integer :: nageclass,lage(maxageclass) |
---|
| 130 | |
---|
| 131 | ! nageclass number of ageclasses for the age spectra calculation |
---|
| 132 | ! lage [s] ageclasses for the age spectra calculation |
---|
| 133 | |
---|
| 134 | |
---|
| 135 | logical :: gdomainfill |
---|
| 136 | ! gdomainfill .T., if domain-filling is global, .F. if not |
---|
| 137 | |
---|
[d6a0977] | 138 | !ZHG SEP 2015 wheather or not to read clouds from GRIB |
---|
[4c64400] | 139 | logical :: readclouds=.false. |
---|
[f75967d] | 140 | !ESO DEC 2015 whether or not both clwc and ciwc are present (if so they are summed) |
---|
[4c64400] | 141 | logical :: sumclouds=.false. |
---|
[db712a8] | 142 | |
---|
[5184a7c] | 143 | !ESO: Disable settling if more than 1 species per release point |
---|
| 144 | logical :: lsettling=.true. |
---|
| 145 | |
---|
[db712a8] | 146 | logical,dimension(maxnests) :: readclouds_nest, sumclouds_nest |
---|
[f75967d] | 147 | |
---|
[8a65cb0] | 148 | |
---|
| 149 | !NIK 16.02.2015 |
---|
[c8fc724] | 150 | integer(selected_int_kind(16)), dimension(maxspec) :: tot_blc_count=0, & |
---|
| 151 | &tot_inc_count=0 |
---|
[e200b7a] | 152 | |
---|
| 153 | |
---|
| 154 | !********************************************************************* |
---|
| 155 | ! Variables defining the release locations, released species and their |
---|
| 156 | ! properties, etc. |
---|
| 157 | !********************************************************************* |
---|
| 158 | |
---|
| 159 | !change Sabine Eckhardt, only save the first 1000 identifier for releasepoints |
---|
| 160 | character :: compoint(1001)*45 |
---|
| 161 | integer :: numpoint |
---|
| 162 | !sec, now dynamically allocated: |
---|
| 163 | ! ireleasestart(maxpoint),ireleaseend(maxpoint) |
---|
| 164 | ! real xpoint1(maxpoint),ypoint1(maxpoint) |
---|
| 165 | !real xpoint2(maxpoint),ypoint2(maxpoint) |
---|
| 166 | !real zpoint1(maxpoint),zpoint2(maxpoint) |
---|
| 167 | !integer*2 kindz(maxpoint) |
---|
| 168 | integer :: specnum(maxspec) |
---|
| 169 | !real xmass(maxpoint,maxspec) |
---|
| 170 | real :: decay(maxspec) |
---|
[341f4b7] | 171 | real :: weta_gas(maxspec),wetb_gas(maxspec) |
---|
| 172 | real :: crain_aero(maxspec),csnow_aero(maxspec) |
---|
[f13406c] | 173 | ! NIK: 31.01.2013- parameters for in-cloud scavening |
---|
[341f4b7] | 174 | real :: ccn_aero(maxspec),in_aero(maxspec) |
---|
[e200b7a] | 175 | real :: reldiff(maxspec),henry(maxspec),f0(maxspec) |
---|
| 176 | real :: density(maxspec),dquer(maxspec),dsigma(maxspec) |
---|
| 177 | real :: vsetaver(maxspec),cunningham(maxspec),weightmolar(maxspec) |
---|
| 178 | real :: vset(maxspec,ni),schmi(maxspec,ni),fract(maxspec,ni) |
---|
| 179 | real :: ri(5,numclass),rac(5,numclass),rcl(maxspec,5,numclass) |
---|
| 180 | real :: rgs(maxspec,5,numclass),rlu(maxspec,5,numclass) |
---|
[2eefa58] | 181 | real :: rm(maxspec),dryvel(maxspec),kao(maxspec) |
---|
[78e62dc] | 182 | real :: ohcconst(maxspec),ohdconst(maxspec),ohnconst(maxspec) |
---|
[e200b7a] | 183 | |
---|
| 184 | real :: area_hour(maxspec,24),point_hour(maxspec,24) |
---|
| 185 | real :: area_dow(maxspec,7),point_dow(maxspec,7) |
---|
| 186 | |
---|
| 187 | !integer npart(maxpoint) |
---|
| 188 | integer :: nspec,maxpointspec_act |
---|
| 189 | character(len=10) :: species(maxspec) |
---|
| 190 | |
---|
| 191 | |
---|
| 192 | ! compoint comment, also "name" of each starting point |
---|
| 193 | ! numpoint actual number of trajectory starting/ending points |
---|
| 194 | ! ireleasestart,ireleaseend [s] starting and ending time of each release |
---|
| 195 | ! xmass total mass emitted |
---|
| 196 | ! xpoint1,ypoint1 lower left coordinates of release area |
---|
| 197 | ! xpoint2,ypoint2 upper right coordinates of release area |
---|
| 198 | ! zpoint1,zpoint2 min./max. z-coordinates of release points |
---|
| 199 | ! kindz 1: zpoint is in m agl, 2: zpoint is in m asl |
---|
| 200 | ! npart number of particles per release point |
---|
| 201 | ! nspec number of different species allowed for one release |
---|
| 202 | ! maxpointspec_act number of releaspoints for which a different output shall be created |
---|
| 203 | ! species name of species |
---|
| 204 | ! decay decay constant of radionuclide |
---|
| 205 | |
---|
| 206 | ! WET DEPOSITION |
---|
[341f4b7] | 207 | ! weta_gas, wetb_gas parameters for below-cloud wet scavenging coefficients (gasses) |
---|
[05cf28d] | 208 | ! crain_aero, csnow_aero parameters for below-cloud wet scavenging coefficients (aerosols) |
---|
| 209 | ! ccn_aero, cin_aero parameters for in-cloud wet scavenging coefficients (aerosols) |
---|
[e200b7a] | 210 | |
---|
| 211 | ! GAS DEPOSITION |
---|
| 212 | ! reldiff diffusivitiy of species relative to diff. of H2O |
---|
| 213 | ! henry [M/atm] Henry constant |
---|
| 214 | ! f0 reactivity relative to that of O3 |
---|
| 215 | ! ri [s/m] stomatal resistance |
---|
| 216 | ! rcl [s/m] lower canopy resistance |
---|
| 217 | ! rgs [s/m] ground resistance |
---|
| 218 | ! rlu [s/m] leaf cuticular resistance |
---|
| 219 | ! rm [s/m] mesophyll resistance |
---|
| 220 | ! dryvel [m/s] constant dry deposition velocity |
---|
| 221 | |
---|
| 222 | ! PARTICLE DEPOSITION |
---|
| 223 | ! density [kg/m3] density of particles |
---|
| 224 | ! dquer [m] mean diameter of particles |
---|
| 225 | ! dsigma dsigma=10 or dsigma=0.1 means that 68% of the |
---|
[341f4b7] | 226 | ! mass are between 0.1*dquer and 10*dquer |
---|
[e200b7a] | 227 | |
---|
| 228 | ! fract mass fraction of each diameter interval |
---|
| 229 | ! vset [m/s] gravitational settling velocity in ni intervals |
---|
| 230 | ! cunningham Cunningham slip correction (strictly valid only near surface) |
---|
| 231 | ! vsetaver [m/s] average gravitational settling velocity |
---|
| 232 | ! schmi Schmidt number**2/3 of each diameter interval |
---|
| 233 | ! weightmolar [g/mol] molecular weight |
---|
| 234 | |
---|
| 235 | ! TIME VARIATION OF EMISSION |
---|
| 236 | ! area_hour, point_hour daily variation of emission strengths for area and point sources |
---|
| 237 | ! area_dow, point_dow day-of-week variation of emission strengths for area and point sources |
---|
| 238 | |
---|
| 239 | |
---|
| 240 | |
---|
| 241 | !********************************************************** |
---|
| 242 | ! Variables used for domain-filling trajectory calculations |
---|
| 243 | !********************************************************** |
---|
| 244 | |
---|
| 245 | integer :: nx_we(2),ny_sn(2) |
---|
| 246 | integer :: numcolumn |
---|
| 247 | integer :: numcolumn_we(2,0:nymax-1),numcolumn_sn(2,0:nxmax-1) |
---|
| 248 | real :: zcolumn_we(2,0:nymax-1,maxcolumn) |
---|
| 249 | real :: zcolumn_sn(2,0:nxmax-1,maxcolumn) |
---|
| 250 | real :: xmassperparticle |
---|
| 251 | real :: acc_mass_we(2,0:nymax-1,maxcolumn) |
---|
| 252 | real :: acc_mass_sn(2,0:nxmax-1,maxcolumn) |
---|
| 253 | |
---|
| 254 | ! nx_we(2) x indices of western and eastern boundary of domain-filling |
---|
| 255 | ! ny_sn(2) y indices of southern and northern boundary of domain-filling |
---|
| 256 | ! numcolumn_we number of particles to be released within one column |
---|
| 257 | ! at the western and eastern boundary surfaces |
---|
| 258 | ! numcolumn_sn same as numcolumn_we, but for southern and northern domain boundary |
---|
| 259 | ! numcolumn maximum number of particles to be released within a single |
---|
| 260 | ! column |
---|
| 261 | ! zcolumn_we altitudes where particles are to be released |
---|
| 262 | ! at the western and eastern boundary surfaces |
---|
| 263 | ! zcolumn_sn same as zcolumn_we, but for southern and northern domain boundary |
---|
| 264 | ! xmassperparticle air mass per particle in the domain-filling traj. option |
---|
| 265 | ! acc_mass_we mass that has accumulated at the western and eastern boundary; |
---|
| 266 | ! if it exceeds xmassperparticle, a particle is released and |
---|
| 267 | ! acc_mass_we is reduced accordingly |
---|
| 268 | ! acc_mass_sn same as acc_mass_we, but for southern and northern domain boundary |
---|
| 269 | |
---|
| 270 | |
---|
| 271 | |
---|
| 272 | !****************************************************************************** |
---|
| 273 | ! Variables associated with the ECMWF meteorological input data ("wind fields") |
---|
| 274 | !****************************************************************************** |
---|
| 275 | |
---|
| 276 | integer :: numbwf,wftime(maxwf),lwindinterv |
---|
| 277 | character(len=255) :: wfname(maxwf),wfspec(maxwf) |
---|
| 278 | |
---|
| 279 | ! lwindinterv [s] Interval between wind fields currently in memory |
---|
| 280 | ! numbwf actual number of wind fields |
---|
| 281 | ! wftime(maxwf) [s] times relative to beginning time of wind fields |
---|
| 282 | ! wfname(maxwf) file names of wind fields |
---|
| 283 | ! wfspec(maxwf) specifications of wind field file, e.g. if on hard |
---|
[8a65cb0] | 284 | ! disc or on tape |
---|
[e200b7a] | 285 | |
---|
[5f9d14a] | 286 | integer :: memtime(numwfmem),memind(3) ! eso: or memind(numwfmem) |
---|
[e200b7a] | 287 | |
---|
| 288 | ! memtime [s] validation times of wind fields in memory |
---|
| 289 | ! memind pointer to wind field, in order to avoid shuffling |
---|
[8a65cb0] | 290 | ! of wind fields |
---|
[e200b7a] | 291 | |
---|
| 292 | |
---|
| 293 | |
---|
| 294 | !**************************************************************************** |
---|
| 295 | ! Variables defining actual size and geographical location of the wind fields |
---|
| 296 | !**************************************************************************** |
---|
| 297 | |
---|
| 298 | integer :: nx,ny,nxmin1,nymin1,nxfield,nuvz,nwz,nz,nmixz,nlev_ec |
---|
| 299 | real :: dx,dy,xlon0,ylat0,dxconst,dyconst,height(nzmax) |
---|
| 300 | |
---|
| 301 | ! nx,ny,nz actual dimensions of wind fields in x,y and z |
---|
| 302 | ! direction, respectively |
---|
| 303 | ! nxmin1,nymin1 nx-1, ny-1, respectively |
---|
| 304 | ! nuvz,nwz vertical dimension of original ECMWF data |
---|
| 305 | ! nxfield same as nx for limited area fields, |
---|
| 306 | ! but for global fields nx=nxfield+1 |
---|
| 307 | ! nmixz number of levels up to maximum PBL height (3500 m) |
---|
| 308 | |
---|
| 309 | ! nuvz is used for u,v components |
---|
| 310 | ! nwz is used for w components (staggered grid) |
---|
| 311 | ! nz is used for the levels in transformed coordinates (terrain-following Cartesian |
---|
| 312 | ! coordinates) |
---|
| 313 | |
---|
| 314 | ! nlev_ec number of levels ECMWF model |
---|
| 315 | ! dx grid distance in x direction |
---|
| 316 | ! dy grid distance in y direction |
---|
| 317 | ! dxconst,dyconst auxiliary variables for utransform,vtransform |
---|
| 318 | ! height heights of all levels |
---|
| 319 | ! xlon0 geographical longitude and |
---|
| 320 | ! ylat0 geographical latitude of lower left grid point |
---|
| 321 | |
---|
| 322 | |
---|
| 323 | |
---|
| 324 | !************************************************* |
---|
| 325 | ! Variables used for vertical model discretization |
---|
| 326 | !************************************************* |
---|
| 327 | |
---|
| 328 | real :: akm(nwzmax),bkm(nwzmax) |
---|
| 329 | real :: akz(nuvzmax),bkz(nuvzmax) |
---|
| 330 | real :: aknew(nzmax),bknew(nzmax) |
---|
| 331 | |
---|
| 332 | ! akm,bkm: coeffizients which regulate vertical discretization of ecmwf model |
---|
| 333 | ! (at the border of model layers) |
---|
| 334 | ! akz,bkz: model discretization coeffizients at the centre of the layers |
---|
| 335 | ! aknew,bknew model discretization coeffizients at the interpolated levels |
---|
| 336 | |
---|
| 337 | |
---|
| 338 | |
---|
| 339 | ! Fixed fields, unchangeable with time |
---|
| 340 | !************************************* |
---|
| 341 | |
---|
| 342 | real :: oro(0:nxmax-1,0:nymax-1) |
---|
| 343 | real :: excessoro(0:nxmax-1,0:nymax-1) |
---|
| 344 | real :: lsm(0:nxmax-1,0:nymax-1) |
---|
| 345 | real :: xlanduse(0:nxmax-1,0:nymax-1,numclass) |
---|
| 346 | |
---|
| 347 | ! oro [m] orography of the ECMWF model |
---|
| 348 | ! excessoro excess orography mother domain |
---|
| 349 | ! lsm land sea mask of the ECMWF model |
---|
| 350 | ! xlanduse [0-1] area fractions in percent |
---|
| 351 | |
---|
| 352 | ! 3d fields |
---|
| 353 | !********** |
---|
| 354 | |
---|
[8a65cb0] | 355 | real :: uu(0:nxmax-1,0:nymax-1,nzmax,numwfmem) |
---|
| 356 | real :: vv(0:nxmax-1,0:nymax-1,nzmax,numwfmem) |
---|
| 357 | real :: uupol(0:nxmax-1,0:nymax-1,nzmax,numwfmem) |
---|
| 358 | real :: vvpol(0:nxmax-1,0:nymax-1,nzmax,numwfmem) |
---|
| 359 | real :: ww(0:nxmax-1,0:nymax-1,nzmax,numwfmem) |
---|
| 360 | real :: tt(0:nxmax-1,0:nymax-1,nzmax,numwfmem) |
---|
| 361 | real :: qv(0:nxmax-1,0:nymax-1,nzmax,numwfmem) |
---|
[d6a0977] | 362 | !ZHG adding cloud water |
---|
[41d8574] | 363 | real :: clwc(0:nxmax-1,0:nymax-1,nzmax,numwfmem)=0.0 !liquid [kg/kg] |
---|
| 364 | real :: ciwc(0:nxmax-1,0:nymax-1,nzmax,numwfmem)=0.0 !ice [kg/kg] |
---|
| 365 | real :: clw(0:nxmax-1,0:nymax-1,nzmax,numwfmem)=0.0 !combined [m3/m3] |
---|
[2eefa58] | 366 | ! RLT add pressure and dry air density |
---|
| 367 | real :: prs(0:nxmax-1,0:nymax-1,nzmax,numwfmem) |
---|
| 368 | real :: rho_dry(0:nxmax-1,0:nymax-1,nzmax,numwfmem) |
---|
[8a65cb0] | 369 | real :: pv(0:nxmax-1,0:nymax-1,nzmax,numwfmem) |
---|
| 370 | real :: rho(0:nxmax-1,0:nymax-1,nzmax,numwfmem) |
---|
| 371 | real :: drhodz(0:nxmax-1,0:nymax-1,nzmax,numwfmem) |
---|
| 372 | real :: tth(0:nxmax-1,0:nymax-1,nuvzmax,numwfmem) |
---|
| 373 | real :: qvh(0:nxmax-1,0:nymax-1,nuvzmax,numwfmem) |
---|
[41d8574] | 374 | real :: clwch(0:nxmax-1,0:nymax-1,nuvzmax,numwfmem)=0.0 |
---|
| 375 | real :: ciwch(0:nxmax-1,0:nymax-1,nuvzmax,numwfmem)=0.0 |
---|
[8a65cb0] | 376 | |
---|
| 377 | real :: pplev(0:nxmax-1,0:nymax-1,nuvzmax,numwfmem) |
---|
| 378 | !scavenging NIK, PS |
---|
| 379 | integer(kind=1) :: clouds(0:nxmax-1,0:nymax-1,nzmax,numwfmem) |
---|
| 380 | integer :: cloudsh(0:nxmax-1,0:nymax-1,numwfmem) |
---|
[d6a0977] | 381 | |
---|
| 382 | !ZHG Sep 2015 |
---|
[341f4b7] | 383 | ! real :: icloud_stats(0:nxmax-1,0:nymax-1,5,numwfmem) |
---|
[62e65c7] | 384 | real :: ctwc(0:nxmax-1,0:nymax-1,numwfmem) ! ESO: =icloud_stats(:,:,4,:) |
---|
[f13406c] | 385 | |
---|
[e200b7a] | 386 | |
---|
| 387 | ! uu,vv,ww [m/2] wind components in x,y and z direction |
---|
| 388 | ! uupol,vvpol [m/s] wind components in polar stereographic projection |
---|
| 389 | ! tt [K] temperature data |
---|
[2eefa58] | 390 | ! prs air pressure |
---|
[e200b7a] | 391 | ! qv specific humidity data |
---|
| 392 | ! pv (pvu) potential vorticity |
---|
| 393 | ! rho [kg/m3] air density |
---|
| 394 | ! drhodz [kg/m2] vertical air density gradient |
---|
| 395 | ! tth,qvh tth,qvh on original eta levels |
---|
| 396 | ! clouds: no cloud, no precipitation 0 |
---|
| 397 | ! cloud, no precipitation 1 |
---|
| 398 | ! rainout conv/lsp dominated 2/3 |
---|
| 399 | ! washout conv/lsp dominated 4/5 |
---|
[8a65cb0] | 400 | ! PS 2013 |
---|
| 401 | !c icloudbot (m) cloud bottom height |
---|
| 402 | !c icloudthck (m) cloud thickness |
---|
[f13406c] | 403 | |
---|
[e200b7a] | 404 | ! pplev for the GFS version |
---|
[341f4b7] | 405 | ! ctwc total cloud water content |
---|
[e200b7a] | 406 | |
---|
| 407 | ! 2d fields |
---|
| 408 | !********** |
---|
| 409 | |
---|
[8a65cb0] | 410 | real :: ps(0:nxmax-1,0:nymax-1,1,numwfmem) |
---|
| 411 | real :: sd(0:nxmax-1,0:nymax-1,1,numwfmem) |
---|
| 412 | real :: msl(0:nxmax-1,0:nymax-1,1,numwfmem) |
---|
| 413 | real :: tcc(0:nxmax-1,0:nymax-1,1,numwfmem) |
---|
| 414 | real :: u10(0:nxmax-1,0:nymax-1,1,numwfmem) |
---|
| 415 | real :: v10(0:nxmax-1,0:nymax-1,1,numwfmem) |
---|
| 416 | real :: tt2(0:nxmax-1,0:nymax-1,1,numwfmem) |
---|
| 417 | real :: td2(0:nxmax-1,0:nymax-1,1,numwfmem) |
---|
| 418 | real :: lsprec(0:nxmax-1,0:nymax-1,1,numwfmem) |
---|
| 419 | real :: convprec(0:nxmax-1,0:nymax-1,1,numwfmem) |
---|
| 420 | real :: sshf(0:nxmax-1,0:nymax-1,1,numwfmem) |
---|
| 421 | real :: ssr(0:nxmax-1,0:nymax-1,1,numwfmem) |
---|
| 422 | real :: surfstr(0:nxmax-1,0:nymax-1,1,numwfmem) |
---|
| 423 | real :: ustar(0:nxmax-1,0:nymax-1,1,numwfmem) |
---|
| 424 | real :: wstar(0:nxmax-1,0:nymax-1,1,numwfmem) |
---|
| 425 | real :: hmix(0:nxmax-1,0:nymax-1,1,numwfmem) |
---|
| 426 | real :: tropopause(0:nxmax-1,0:nymax-1,1,numwfmem) |
---|
| 427 | real :: oli(0:nxmax-1,0:nymax-1,1,numwfmem) |
---|
[d6a0977] | 428 | ! real :: diffk(0:nxmax-1,0:nymax-1,1,numwfmem) ESO: this is not in use? |
---|
| 429 | ! logical :: beneath_cloud=.true. |
---|
[e200b7a] | 430 | ! ps surface pressure |
---|
| 431 | ! sd snow depth |
---|
| 432 | ! msl mean sea level pressure |
---|
| 433 | ! tcc total cloud cover |
---|
| 434 | ! u10 10 meter u |
---|
| 435 | ! v10 10 meter v |
---|
| 436 | ! tt2 2 meter temperature |
---|
| 437 | ! td2 2 meter dew point |
---|
| 438 | ! lsprec [mm/h] large scale total precipitation |
---|
| 439 | ! convprec [mm/h] convective precipitation |
---|
| 440 | ! sshf surface sensible heat flux |
---|
| 441 | ! ssr surface solar radiation |
---|
| 442 | ! surfstr surface stress |
---|
| 443 | ! ustar [m/s] friction velocity |
---|
| 444 | ! wstar [m/s] convective velocity scale |
---|
| 445 | ! hmix [m] mixing height |
---|
| 446 | ! tropopause [m] altitude of thermal tropopause |
---|
| 447 | ! oli [m] inverse Obukhov length (1/L) |
---|
| 448 | ! diffk [m2/s] diffusion coefficient at reference height |
---|
| 449 | |
---|
| 450 | |
---|
[8a65cb0] | 451 | real :: vdep(0:nxmax-1,0:nymax-1,maxspec,numwfmem) |
---|
[e200b7a] | 452 | |
---|
| 453 | ! vdep [m/s] deposition velocities |
---|
| 454 | |
---|
| 455 | |
---|
| 456 | !******************************************************************** |
---|
| 457 | ! Variables associated with the ECMWF input data (nested wind fields) |
---|
| 458 | !******************************************************************** |
---|
| 459 | |
---|
| 460 | ! NOTE: all nested variables have the same name as the variables used |
---|
| 461 | ! for the mother domain, except with a 'n' appended at the end |
---|
| 462 | !******************************************************************** |
---|
| 463 | |
---|
| 464 | integer :: numbnests |
---|
| 465 | |
---|
| 466 | ! numbnests number of nested grids |
---|
| 467 | |
---|
| 468 | character(len=255) :: wfnamen(maxnests,maxwf) |
---|
| 469 | character(len=18) :: wfspecn(maxnests,maxwf) |
---|
| 470 | |
---|
| 471 | ! wfnamen nested wind field names |
---|
| 472 | ! wfspecn specifications of wind field file, e.g. if on hard |
---|
| 473 | ! disc or on tape |
---|
| 474 | |
---|
| 475 | |
---|
| 476 | !********************************************************************* |
---|
| 477 | ! Variables characterizing size and location of the nested wind fields |
---|
| 478 | !********************************************************************* |
---|
| 479 | |
---|
| 480 | integer :: nxn(maxnests),nyn(maxnests) |
---|
| 481 | real :: dxn(maxnests),dyn(maxnests),xlon0n(maxnests),ylat0n(maxnests) |
---|
| 482 | |
---|
| 483 | ! nxn,nyn actual dimensions of nested wind fields in x and y direction |
---|
| 484 | ! dxn,dyn grid distances in x,y direction for the nested grids |
---|
| 485 | ! xlon0n geographical longitude of lower left grid point of nested wind fields |
---|
| 486 | ! ylat0n geographical latitude of lower left grid point of nested wind fields |
---|
| 487 | |
---|
| 488 | |
---|
| 489 | ! Nested fields, unchangeable with time |
---|
| 490 | !************************************** |
---|
| 491 | |
---|
| 492 | real :: oron(0:nxmaxn-1,0:nymaxn-1,maxnests) |
---|
| 493 | real :: excessoron(0:nxmaxn-1,0:nymaxn-1,maxnests) |
---|
| 494 | real :: lsmn(0:nxmaxn-1,0:nymaxn-1,maxnests) |
---|
| 495 | real :: xlandusen(0:nxmaxn-1,0:nymaxn-1,numclass,maxnests) |
---|
| 496 | |
---|
| 497 | |
---|
| 498 | ! 3d nested fields |
---|
| 499 | !***************** |
---|
| 500 | |
---|
[b0434e1] | 501 | real,allocatable,dimension(:,:,:,:,:) :: uun, vvn, wwn, ttn, qvn, pvn,& |
---|
[db712a8] | 502 | & rhon, drhodzn, tthn, qvhn, clwcn, ciwcn, clwn, clwchn, ciwchn |
---|
[341f4b7] | 503 | real,allocatable,dimension(:,:,:,:) :: ctwcn |
---|
[db712a8] | 504 | integer,allocatable,dimension(:,:,:,:) :: cloudshn |
---|
[b0434e1] | 505 | integer(kind=1),allocatable,dimension(:,:,:,:,:) :: cloudsn |
---|
[e200b7a] | 506 | |
---|
| 507 | ! 2d nested fields |
---|
| 508 | !***************** |
---|
| 509 | |
---|
[8a65cb0] | 510 | real :: psn(0:nxmaxn-1,0:nymaxn-1,1,numwfmem,maxnests) |
---|
| 511 | real :: sdn(0:nxmaxn-1,0:nymaxn-1,1,numwfmem,maxnests) |
---|
| 512 | real :: msln(0:nxmaxn-1,0:nymaxn-1,1,numwfmem,maxnests) |
---|
| 513 | real :: tccn(0:nxmaxn-1,0:nymaxn-1,1,numwfmem,maxnests) |
---|
| 514 | real :: u10n(0:nxmaxn-1,0:nymaxn-1,1,numwfmem,maxnests) |
---|
| 515 | real :: v10n(0:nxmaxn-1,0:nymaxn-1,1,numwfmem,maxnests) |
---|
| 516 | real :: tt2n(0:nxmaxn-1,0:nymaxn-1,1,numwfmem,maxnests) |
---|
| 517 | real :: td2n(0:nxmaxn-1,0:nymaxn-1,1,numwfmem,maxnests) |
---|
| 518 | real :: lsprecn(0:nxmaxn-1,0:nymaxn-1,1,numwfmem,maxnests) |
---|
| 519 | real :: convprecn(0:nxmaxn-1,0:nymaxn-1,1,numwfmem,maxnests) |
---|
| 520 | real :: sshfn(0:nxmaxn-1,0:nymaxn-1,1,numwfmem,maxnests) |
---|
| 521 | real :: ssrn(0:nxmaxn-1,0:nymaxn-1,1,numwfmem,maxnests) |
---|
| 522 | real :: surfstrn(0:nxmaxn-1,0:nymaxn-1,1,numwfmem,maxnests) |
---|
| 523 | real :: ustarn(0:nxmaxn-1,0:nymaxn-1,1,numwfmem,maxnests) |
---|
| 524 | real :: wstarn(0:nxmaxn-1,0:nymaxn-1,1,numwfmem,maxnests) |
---|
| 525 | real :: hmixn(0:nxmaxn-1,0:nymaxn-1,1,numwfmem,maxnests) |
---|
| 526 | real :: tropopausen(0:nxmaxn-1,0:nymaxn-1,1,numwfmem,maxnests) |
---|
| 527 | real :: olin(0:nxmaxn-1,0:nymaxn-1,1,numwfmem,maxnests) |
---|
| 528 | ! real :: diffkn(0:nxmaxn-1,0:nymaxn-1,1,numwfmem,maxnests) ! not in use? |
---|
| 529 | real :: vdepn(0:nxmaxn-1,0:nymaxn-1,maxspec,numwfmem,maxnests) |
---|
[e200b7a] | 530 | |
---|
| 531 | |
---|
| 532 | !************************************************* |
---|
| 533 | ! Certain auxiliary variables needed for the nests |
---|
| 534 | !************************************************* |
---|
| 535 | |
---|
| 536 | real :: xresoln(0:maxnests),yresoln(0:maxnests) |
---|
| 537 | |
---|
| 538 | ! xresoln, yresoln Factors by which the resolutions in the nests |
---|
| 539 | ! are enhanced compared to mother grid |
---|
| 540 | |
---|
| 541 | real :: xln(maxnests),yln(maxnests),xrn(maxnests),yrn(maxnests) |
---|
| 542 | |
---|
| 543 | ! xln,yln,xrn,yrn Corner points of nested grids in grid coordinates |
---|
| 544 | ! of mother grid |
---|
| 545 | |
---|
| 546 | |
---|
| 547 | !****************************************************** |
---|
| 548 | ! Variables defining the polar stereographic projection |
---|
| 549 | !****************************************************** |
---|
| 550 | |
---|
| 551 | logical :: xglobal,sglobal,nglobal |
---|
| 552 | real :: switchnorthg,switchsouthg |
---|
| 553 | |
---|
| 554 | !xglobal T for global fields, F for limited area fields |
---|
| 555 | !sglobal T if domain extends towards south pole |
---|
| 556 | !nglobal T if domain extends towards north pole |
---|
| 557 | !switchnorthg,switchsouthg same as parameters switchnorth, |
---|
| 558 | ! switchsouth, but in grid units |
---|
| 559 | |
---|
| 560 | real :: southpolemap(9),northpolemap(9) |
---|
| 561 | |
---|
| 562 | !southpolemap,northpolemap define stereographic projections |
---|
| 563 | ! at the two poles |
---|
| 564 | |
---|
| 565 | |
---|
| 566 | !****************** |
---|
| 567 | ! Landuse inventory |
---|
| 568 | ! Sabine Eckhardt Dec 06: change to new landuse inventary - 11 classes, 1200 x 600 global |
---|
| 569 | !****************** |
---|
| 570 | |
---|
| 571 | integer(kind=1) :: landinvent(1200,600,6) |
---|
| 572 | real :: z0(numclass) |
---|
| 573 | |
---|
| 574 | ! landinvent landuse inventory (numclass=11 classes) |
---|
| 575 | ! z0 roughness length for the landuse classes |
---|
| 576 | |
---|
| 577 | |
---|
| 578 | |
---|
| 579 | !************************************************************************** |
---|
| 580 | ! Variables characterizing the output grid and containing the model results |
---|
| 581 | !************************************************************************** |
---|
| 582 | |
---|
| 583 | integer :: numxgrid,numygrid,numzgrid |
---|
| 584 | real :: dxout,dyout,outlon0,outlat0,xoutshift,youtshift |
---|
| 585 | integer :: numxgridn,numygridn |
---|
| 586 | real :: dxoutn,dyoutn,outlon0n,outlat0n,xoutshiftn,youtshiftn |
---|
| 587 | !real outheight(maxzgrid),outheighthalf(maxzgrid) |
---|
[6985a98] | 588 | |
---|
[c8fc724] | 589 | logical :: DEP,DRYDEP,DRYDEPSPEC(maxspec),WETDEP,WETDEPSPEC(maxspec),& |
---|
| 590 | & OHREA,ASSSPEC |
---|
[54cbd6c] | 591 | logical :: DRYBKDEP,WETBKDEP |
---|
[e200b7a] | 592 | |
---|
| 593 | ! numxgrid,numygrid number of grid points in x,y-direction |
---|
| 594 | ! numxgridn,numygridn number of grid points in x,y-direction for nested output grid |
---|
| 595 | ! numzgrid number of vertical levels of output grid |
---|
| 596 | ! dxout,dyout grid distance of output grid |
---|
| 597 | ! dxoutn,dyoutn grid distance of nested output grid |
---|
| 598 | ! outlon0,outlat0 lower left corner of output grid |
---|
| 599 | ! outlon0n,outlat0n lower left corner of nested output grid |
---|
| 600 | ! xoutshift,youtshift xlon0-outlon0, ylat0-outlat0 |
---|
| 601 | ! xoutshiftn,youtshiftn xlon0-outlon0n, ylat0-outlat0n |
---|
| 602 | ! outheight [m] upper levels of the output grid |
---|
| 603 | ! outheighthalf [m] half (middle) levels of the output grid cells |
---|
| 604 | ! DEP .true., if either dry or wet depos. is switched on |
---|
| 605 | ! DRYDEP .true., if dry deposition is switched on |
---|
| 606 | ! DRYDEPSPEC .true., if dry deposition is switched on for that species |
---|
| 607 | ! WETDEP .true., if wet deposition is switched on |
---|
[c8fc724] | 608 | ! WETDEPSPEC .true., if wet deposition is switched on for that species |
---|
[e200b7a] | 609 | ! OHREA .true., if OH reaction is switched on |
---|
| 610 | ! ASSSPEC .true., if there are two species asscoiated |
---|
[54cbd6c] | 611 | ! DRYBKDEP,WETBKDEP .true., for bkwd runs, where mass deposited and source regions is calculated - either for dry or for wet deposition |
---|
[e200b7a] | 612 | ! (i.e. transfer of mass between these two occurs |
---|
| 613 | |
---|
| 614 | |
---|
| 615 | |
---|
| 616 | ! if output for each releasepoint shall be created maxpointspec=number of releasepoints |
---|
| 617 | ! else maxpointspec is 1 -> moved to unc_mod |
---|
| 618 | ! the OUTGRID is moved to the module outg_mod |
---|
| 619 | !****************************************************************************** |
---|
| 620 | |
---|
| 621 | !real gridunc(0:maxxgrid-1,0:maxygrid-1,maxzgrid,maxspec, |
---|
| 622 | ! + maxpointspec_act,nclassunc,maxageclass) |
---|
| 623 | !real griduncn(0:maxxgridn-1,0:maxygridn-1,maxzgrid,maxspec, |
---|
| 624 | ! + maxpointspec_act,nclassunc,maxageclass) |
---|
| 625 | !real wetgridunc(0:maxxgrid-1,0:maxygrid-1,maxspec, |
---|
| 626 | ! + maxpointspec_act,nclassunc,maxageclass) |
---|
| 627 | !real wetgriduncn(0:maxxgridn-1,0:maxygridn-1,maxspec, |
---|
| 628 | ! +ct maxpointspec,nclassunc,maxageclass) |
---|
| 629 | !real drygridunc(0:maxxgrid-1,0:maxygrid-1,maxspec,maxpointspec, |
---|
| 630 | ! + nclassunc,maxageclass) |
---|
| 631 | !real drygriduncn(0:maxxgridn-1,0:maxygridn-1,maxspec, |
---|
| 632 | ! + maxpointspec,nclassunc,maxageclass) |
---|
| 633 | |
---|
| 634 | !real oroout(0:maxxgrid-1,0:maxygrid-1) |
---|
| 635 | !real orooutn(0:maxxgridn-1,0:maxygridn-1) |
---|
| 636 | ! real area(0:maxxgrid-1,0:maxygrid-1) |
---|
| 637 | !real arean(0:maxxgridn-1,0:maxygridn-1) |
---|
| 638 | !real volume(0:maxxgrid-1,0:maxygrid-1,maxzgrid) |
---|
| 639 | !real volumen(0:maxxgridn-1,0:maxygridn-1,maxzgrid) |
---|
| 640 | |
---|
| 641 | !real areaeast(0:maxxgrid-1,0:maxygrid-1,maxzgrid) |
---|
| 642 | !real areanorth(0:maxxgrid-1,0:maxygrid-1,maxzgrid) |
---|
| 643 | |
---|
| 644 | |
---|
| 645 | ! gridunc,griduncn uncertainty of outputted concentrations |
---|
| 646 | ! wetgridunc,wetgriduncn uncertainty of accumulated wet deposited mass on output grid |
---|
| 647 | ! drygridunc,drygriduncn uncertainty of accumulated dry deposited mass on output grid |
---|
| 648 | ! oroout,orooutn [m] height of model topography at output grid |
---|
| 649 | ! area,arean [m2] area of each grid cell |
---|
| 650 | ! volume,volumen [m3] volume of each grid cell |
---|
| 651 | ! ... field names with n at the end indicate a nested output grid |
---|
| 652 | |
---|
| 653 | |
---|
| 654 | !*********************************** |
---|
| 655 | ! Variables defining receptor points |
---|
| 656 | !*********************************** |
---|
| 657 | |
---|
| 658 | real :: xreceptor(maxreceptor),yreceptor(maxreceptor) |
---|
| 659 | real :: receptorarea(maxreceptor) |
---|
| 660 | real :: creceptor(maxreceptor,maxspec) |
---|
[328fdf9] | 661 | real, allocatable, dimension(:,:) :: creceptor0 |
---|
[e200b7a] | 662 | character(len=16) :: receptorname(maxreceptor) |
---|
| 663 | integer :: numreceptor |
---|
| 664 | |
---|
| 665 | ! xreceptor,yreceptor receptor position |
---|
| 666 | ! creceptor concentrations at receptor points |
---|
| 667 | ! receptorarea area of 1*1 grid cell at receptor point |
---|
| 668 | |
---|
| 669 | |
---|
| 670 | |
---|
| 671 | !*************************************** |
---|
| 672 | ! Variables characterizing each particle |
---|
| 673 | !*************************************** |
---|
| 674 | |
---|
[8a65cb0] | 675 | integer :: numpart=0 |
---|
[e200b7a] | 676 | integer :: numparticlecount |
---|
| 677 | |
---|
[8a65cb0] | 678 | integer, allocatable, dimension(:) :: itra1, npoint, nclass, idt, itramem, itrasplit |
---|
| 679 | |
---|
| 680 | real(kind=dp), allocatable, dimension(:) :: xtra1, ytra1 |
---|
| 681 | real, allocatable, dimension(:) :: ztra1 |
---|
| 682 | real, allocatable, dimension(:,:) :: xmass1 |
---|
[462f74b] | 683 | real, allocatable, dimension(:,:) :: xscav_frac1 |
---|
[8a65cb0] | 684 | |
---|
[0a94e13] | 685 | ! Variables used for writing out interval averages for partoutput |
---|
| 686 | !**************************************************************** |
---|
| 687 | |
---|
| 688 | integer, allocatable, dimension(:) :: npart_av |
---|
| 689 | real, allocatable, dimension(:) :: part_av_cartx,part_av_carty,part_av_cartz,part_av_z,part_av_topo |
---|
| 690 | real, allocatable, dimension(:) :: part_av_pv,part_av_qv,part_av_tt,part_av_rho,part_av_tro,part_av_hmix |
---|
| 691 | real, allocatable, dimension(:) :: part_av_uu,part_av_vv,part_av_energy |
---|
| 692 | |
---|
[8a65cb0] | 693 | ! eso: Moved from timemanager |
---|
| 694 | real, allocatable, dimension(:) :: uap,ucp,uzp,us,vs,ws |
---|
| 695 | integer(kind=2), allocatable, dimension(:) :: cbt |
---|
| 696 | |
---|
[e200b7a] | 697 | |
---|
[d6a0977] | 698 | !CGZ-lifetime |
---|
| 699 | real, allocatable, dimension(:,:) ::checklifetime, species_lifetime |
---|
| 700 | !CGZ-lifetime |
---|
| 701 | |
---|
[e200b7a] | 702 | ! numpart actual number of particles in memory |
---|
| 703 | ! itra1 (maxpart) [s] temporal positions of the particles |
---|
| 704 | ! npoint(maxpart) indicates the release point of each particle |
---|
| 705 | ! nclass (maxpart) one of nclassunc classes to which the particle is attributed |
---|
| 706 | ! itramem (maxpart) [s] memorized release times of the particles |
---|
| 707 | ! itrasplit (maxpart) [s] next time when particle is to be split into two |
---|
| 708 | ! idt(maxpart) [s] time step to be used for next integration |
---|
| 709 | ! numparticlecount counts the total number of particles that have been released |
---|
| 710 | ! xtra1,ytra1,ztra1 spatial positions of the particles |
---|
| 711 | ! xmass1 [kg] particle masses |
---|
[462f74b] | 712 | ! xscav_frac1 fraction of particle masse which has been scavenged at receptor |
---|
| 713 | |
---|
[e200b7a] | 714 | |
---|
| 715 | |
---|
| 716 | !******************************************************* |
---|
| 717 | ! Info table on available chemical species/radionuclides |
---|
| 718 | !******************************************************* |
---|
| 719 | |
---|
| 720 | !character*10 specname(maxtable) |
---|
| 721 | !real decaytime(maxtable),wetscava(maxtable),wetscavb(maxtable) |
---|
| 722 | !real drydiff(maxtable),dryhenry(maxtable),dryactiv(maxtable) |
---|
| 723 | !real partrho(maxtable),partmean(maxtable),partsig(maxtable) |
---|
| 724 | !real dryvelo(maxtable),weightmol(maxtable),ohreact(maxtable) |
---|
| 725 | |
---|
| 726 | ! specname Name of chemical species/radionuclide |
---|
| 727 | ! decaytime Half time of radionuclides |
---|
| 728 | ! wetscava, wetscavb Parameters for calculating scavenging coefficients |
---|
| 729 | ! drydiff diffusivitiy of species relative to diff. of H2O |
---|
| 730 | ! dryhenry [M/atm] Henry constant |
---|
| 731 | ! dryactiv reactivity relative to that of O3 |
---|
| 732 | ! partrho [kg/m3] density of particles |
---|
| 733 | ! partmean [m] mean diameter of particles |
---|
| 734 | ! partsig [m] mean stand. deviation of particle diameter |
---|
| 735 | ! dryvelo [cm/s] constant dry deposition velocity |
---|
| 736 | ! weightmol [g/mol] molecular weight |
---|
| 737 | ! ohreact OH reaction rate |
---|
| 738 | |
---|
| 739 | |
---|
| 740 | !******************** |
---|
| 741 | ! Random number field |
---|
| 742 | !******************** |
---|
| 743 | |
---|
| 744 | real :: rannumb(maxrand) |
---|
| 745 | |
---|
| 746 | ! rannumb field of normally distributed random numbers |
---|
[8a65cb0] | 747 | |
---|
| 748 | !******************************************************************** |
---|
| 749 | ! variables to control stability of CBL scheme under variation |
---|
| 750 | ! of statistics in time and space |
---|
| 751 | !******************************************************************** |
---|
| 752 | integer :: nan_count,nan_count2,sum_nan_count(3600),maxtl=1200 |
---|
| 753 | !added by mc , note that for safety sum_nan_count(N) with N>maxtl |
---|
| 754 | |
---|
| 755 | !******************************************************************** |
---|
| 756 | ! variables to test well-mixed state of CBL scheme not to be included in final release |
---|
| 757 | !******************************************************************** |
---|
| 758 | real :: well_mixed_vector(50),h_well,well_mixed_norm,avg_air_dens(50),avg_ol,avg_wst,avg_h |
---|
| 759 | ! modified by mc to test well-mixed for cbl |
---|
[e200b7a] | 760 | |
---|
[f13406c] | 761 | !******************** |
---|
[b4d29ce] | 762 | ! Verbosity, testing flags, namelist I/O |
---|
[f13406c] | 763 | !******************** |
---|
[07c3e71] | 764 | logical :: debug_mode=.false. |
---|
[f13406c] | 765 | integer :: verbosity=0 |
---|
| 766 | integer :: info_flag=0 |
---|
[b4d29ce] | 767 | integer :: count_clock, count_clock0, count_rate, count_max |
---|
[8a65cb0] | 768 | real :: tins |
---|
[6b22af9] | 769 | logical, parameter :: nmlout=.true. |
---|
[8a65cb0] | 770 | |
---|
| 771 | ! These variables are used to avoid having separate versions of |
---|
[4c64400] | 772 | ! files in cases where differences with MPI version are minor (eso) |
---|
[8a65cb0] | 773 | !***************************************************************** |
---|
| 774 | integer :: mpi_mode=0 ! .gt. 0 if running MPI version |
---|
[f75967d] | 775 | logical :: lroot=.true. ! true if serial version, or if MPI .and. root process |
---|
[b0434e1] | 776 | |
---|
[fe32dca] | 777 | logical, parameter :: interpolhmix=.false. ! true if the hmix shall be interpolated |
---|
| 778 | logical, parameter :: turboff=.false. ! true if the turbulence shall be switched off |
---|
[cea125d] | 779 | |
---|
[1c0d5e6] | 780 | |
---|
[b0434e1] | 781 | contains |
---|
| 782 | subroutine com_mod_allocate_part(nmpart) |
---|
| 783 | !******************************************************************************* |
---|
| 784 | ! Dynamic allocation of arrays |
---|
| 785 | ! |
---|
| 786 | ! For FLEXPART version 9.2 and earlier these arrays were statically declared |
---|
| 787 | ! with size maxpart. This function is introduced so that the MPI version |
---|
| 788 | ! can declare these arrays with smaller size ("maxpart per process"), while |
---|
| 789 | ! the serial version allocate at run-time with size maxpart |
---|
| 790 | ! |
---|
| 791 | !******************************************************************************* |
---|
[8a65cb0] | 792 | implicit none |
---|
| 793 | |
---|
[43225d1] | 794 | integer, intent(in) :: nmpart ! maximum number of particles (per process) |
---|
[8a65cb0] | 795 | |
---|
[43225d1] | 796 | ! Arrays, previously static of size maxpart |
---|
[8a65cb0] | 797 | allocate(itra1(nmpart),npoint(nmpart),nclass(nmpart),& |
---|
| 798 | & idt(nmpart),itramem(nmpart),itrasplit(nmpart),& |
---|
| 799 | & xtra1(nmpart),ytra1(nmpart),ztra1(nmpart),& |
---|
[0a94e13] | 800 | & xmass1(nmpart, maxspec)) ! ,& |
---|
| 801 | ! & checklifetime(nmpart,maxspec), species_lifetime(maxspec,2))!CGZ-lifetime |
---|
| 802 | |
---|
| 803 | if (ipout.eq.3) then |
---|
| 804 | allocate(npart_av(nmpart),part_av_cartx(nmpart),part_av_carty(nmpart),& |
---|
| 805 | & part_av_cartz(nmpart),part_av_z(nmpart),part_av_topo(nmpart)) |
---|
| 806 | allocate(part_av_pv(nmpart),part_av_qv(nmpart),part_av_tt(nmpart),& |
---|
| 807 | & part_av_rho(nmpart),part_av_tro(nmpart),part_av_hmix(nmpart)) |
---|
| 808 | allocate(part_av_uu(nmpart),part_av_vv(nmpart),part_av_energy(nmpart)) |
---|
| 809 | end if |
---|
[d6a0977] | 810 | |
---|
[8a65cb0] | 811 | |
---|
| 812 | allocate(uap(nmpart),ucp(nmpart),uzp(nmpart),us(nmpart),& |
---|
| 813 | & vs(nmpart),ws(nmpart),cbt(nmpart)) |
---|
[0a94e13] | 814 | |
---|
[b0434e1] | 815 | end subroutine com_mod_allocate_part |
---|
| 816 | |
---|
| 817 | |
---|
| 818 | subroutine com_mod_allocate_nests |
---|
| 819 | !******************************************************************************* |
---|
| 820 | ! Dynamic allocation of arrays |
---|
| 821 | ! |
---|
| 822 | ! For nested wind fields. |
---|
| 823 | ! |
---|
| 824 | !******************************************************************************* |
---|
| 825 | implicit none |
---|
| 826 | |
---|
| 827 | allocate(uun(0:nxmaxn-1,0:nymaxn-1,nzmax,numwfmem,numbnests)) |
---|
| 828 | allocate(vvn(0:nxmaxn-1,0:nymaxn-1,nzmax,numwfmem,numbnests)) |
---|
| 829 | allocate(wwn(0:nxmaxn-1,0:nymaxn-1,nzmax,numwfmem,numbnests)) |
---|
| 830 | allocate(ttn(0:nxmaxn-1,0:nymaxn-1,nzmax,numwfmem,numbnests)) |
---|
| 831 | allocate(qvn(0:nxmaxn-1,0:nymaxn-1,nzmax,numwfmem,numbnests)) |
---|
| 832 | allocate(pvn(0:nxmaxn-1,0:nymaxn-1,nzmax,numwfmem,numbnests)) |
---|
[db712a8] | 833 | allocate(clwcn(0:nxmaxn-1,0:nymaxn-1,nzmax,numwfmem,numbnests)) |
---|
| 834 | allocate(ciwcn(0:nxmaxn-1,0:nymaxn-1,nzmax,numwfmem,numbnests)) |
---|
| 835 | allocate(clwn(0:nxmaxn-1,0:nymaxn-1,nzmax,numwfmem,numbnests)) |
---|
| 836 | |
---|
| 837 | allocate(cloudsn(0:nxmaxn-1,0:nymaxn-1,nzmax,numwfmem,numbnests)) |
---|
| 838 | allocate(cloudshn(0:nxmaxn-1,0:nymaxn-1,numwfmem,numbnests)) |
---|
[b0434e1] | 839 | allocate(rhon(0:nxmaxn-1,0:nymaxn-1,nzmax,numwfmem,numbnests)) |
---|
| 840 | allocate(drhodzn(0:nxmaxn-1,0:nymaxn-1,nzmax,numwfmem,numbnests)) |
---|
| 841 | allocate(tthn(0:nxmaxn-1,0:nymaxn-1,nuvzmax,numwfmem,numbnests)) |
---|
| 842 | allocate(qvhn(0:nxmaxn-1,0:nymaxn-1,nuvzmax,numwfmem,numbnests)) |
---|
[db712a8] | 843 | allocate(clwchn(0:nxmaxn-1,0:nymaxn-1,nuvzmax,numwfmem,numbnests)) |
---|
| 844 | allocate(ciwchn(0:nxmaxn-1,0:nymaxn-1,nuvzmax,numwfmem,numbnests)) |
---|
[c2bd55e] | 845 | allocate(ctwcn(0:nxmaxn-1,0:nymaxn-1,numwfmem,numbnests)) |
---|
[db712a8] | 846 | |
---|
| 847 | clwcn(:,:,:,:,:)=0. |
---|
| 848 | ciwcn(:,:,:,:,:)=0. |
---|
| 849 | clwchn(:,:,:,:,:)=0. |
---|
| 850 | ciwchn(:,:,:,:,:)=0. |
---|
[b0434e1] | 851 | |
---|
| 852 | end subroutine com_mod_allocate_nests |
---|
[f13406c] | 853 | |
---|
[e200b7a] | 854 | |
---|
| 855 | end module com_mod |
---|