source: palm/tags/release-3.7/SOURCE/modules.f90 @ 1037

Last change on this file since 1037 was 392, checked in by raasch, 15 years ago

New:
---

Adapted for machine lck
(mrun, mbuild, subjob)

bc_lr/bc_ns in most subroutines replaced by LOGICAL variables bc_lr_cyc,
bc_ns_cyc for speed optimization
(check_parameters, diffusion_u, diffusion_v, diffusion_w, modules)

Additional timestep criterion in case of simulations with plant canopy (timestep)

Check for illegal entries in section_xy|xz|yz that exceed nz+1|ny+1|nx+1
(check_parameters)

Clipping of dvrp output implemented. Default colourtable for particles
implemented, particle attributes (color, dvrp_size) can be set with new
parameters particle_color, particle_dvrpsize, color_interval,
dvrpsize_interval (init_dvrp, data_output_dvrp, modules, user_data_output_dvrp).
Slicer attributes (dvrp) are set with new routine set_slicer_attributes_dvrp
and are controlled with existing parameters slicer_range_limits.
(set_slicer_attributes_dvrp)

Ocean atmosphere coupling allows to use independent precursor runs in order
to account for different spin-up times. The time when coupling has to be
started is given by new inipar parameter coupling_start_time. The precursor
ocean run has to be started using new mrun option "-y" in order to add
appendix "_O" to all output files.
(check_for_restart, check_parameters, data_output_2d, data_output_3d,
data_output_profiles, data_output_ptseries, data_output_spectra,
data_output_tseries, header, init_coupling, modules, mrun,
parin, read_var_list, surface_coupler, time_integration, write_var_list)

Polygon reduction for topography and ground plate isosurface. Reduction level
for buildings can be chosen with parameter cluster_size. (init_dvrp)

External pressure gradient (check_parameters, header, init_3d_model, modules,
parin, prognostic_equations, read_var_list, write_var_list)

New topography case 'single_street_canyon' (header, init_grid, modules, parin,
read_var_list, user_check_parameters, user_header, user_init_grid, write_var_list)

Option to predefine a target bulk velocity for conserve_volume_flow
(check_parameters, header, init_3d_model, modules, parin, read_var_list,
write_var_list)

Option for user defined 2D data output in xy cross sections at z=nzb+1
(data_output_2d, user_data_output_2d)

xy cross section output of surface heatfluxes (latent, sensible)
(average_3d_data, check_parameters, data_output_2d, modules, read_3d_binary,
sum_up_3d_data, write_3d_binary)

average_3d_data, check_for_restart, check_parameters, data_output_2d, data_output_3d, data_output_dvrp, data_output_profiles, data_output_ptseries, data_output_spectra, data_output_tseries, init_coupling, init_dvrp, init_grid, init_3d_model, header, mbuild, modules, mrun, package_parin, parin, prognostic_equations, read_3d_binary, read_var_list, subjob, surface_coupler, timestep, time_integration, user_check_parameters, user_data_output_2d, user_data_output_dvrp, user_header, user_init_grid, write_3d_binary, write_var_list

New: set_particle_attributes, set_slicer_attributes_dvrp

Changed:


lcmuk changed to lc to avoid problems with Intel compiler on sgi-ice
(poisfft)

For extended NetCDF files, the updated title attribute includes an update of
time_average_text where appropriate. (netcdf)

In case of restart runs without extension, initial profiles are not written
to NetCDF-file anymore. (data_output_profiles, modules, read_var_list, write_var_list)

Small change in formatting of the message handling routine concering the output in the
job protocoll. (message)

initializing_actions='read_data_for_recycling' renamed to 'cyclic_fill', now
independent of turbulent_inflow (check_parameters, header, init_3d_model)

2 NetCDF error numbers changed. (data_output_3d)

A Link to the website appendix_a.html is printed for further information
about the possible errors. (message)

Temperature gradient criterion for estimating the boundary layer height
replaced by the gradient criterion of Sullivan et al. (1998). (flow_statistics)

NetCDF unit attribute in timeseries output in case of statistic regions added
(netcdf)

Output of NetCDF messages with aid of message handling routine.
(check_open, close_file, data_output_2d, data_output_3d,
data_output_profiles, data_output_ptseries, data_output_spectra,
data_output_tseries, netcdf, output_particles_netcdf)

Output of messages replaced by message handling routine.
(advec_particles, advec_s_bc, buoyancy, calc_spectra, check_for_restart,
check_open, coriolis, cpu_log, data_output_2d, data_output_3d, data_output_dvrp,
data_output_profiles, data_output_spectra, fft_xy, flow_statistics, header,
init_1d_model, init_3d_model, init_dvrp, init_grid, init_particles, init_pegrid,
netcdf, parin, plant_canopy_model, poisfft_hybrid, poismg, read_3d_binary,
read_var_list, surface_coupler, temperton_fft, timestep, user_actions,
user_data_output_dvrp, user_dvrp_coltab, user_init_grid, user_init_plant_canopy,
user_parin, user_read_restart_data, user_spectra )

Maximum number of tails is calculated from maximum number of particles and
skip_particles_for_tail (init_particles)

Value of vertical_particle_advection may differ for each particle group
(advec_particles, header, modules)

First constant in array den also defined as type double. (eqn_state_seawater)

Parameter dvrp_psize moved from particles_par to dvrp_graphics_par. (package_parin)

topography_grid_convention moved from userpar to inipar (check_parameters,
header, parin, read_var_list, user_check_parameters, user_header,
user_init_grid, user_parin, write_var_list)

Default value of grid_matching changed to strict.

Adjustments for runs on lcxt4 (necessary due to an software update on CRAY) and
for coupled runs on ibmy (mrun, subjob)

advec_particles, advec_s_bc, buoyancy, calc_spectra, check_for_restart, check_open, check_parameters, close_file, coriolis, cpu_log, data_output_2d, data_output_3d, data_output_dvrp, data_output_profiles, data_output_ptseries, data_output_spectra, data_output_tseries, eqn_state_seawater, fft_xy, flow_statistics, header, init_1d_model, init_3d_model, init_dvrp, init_grid, init_particles, init_pegrid, message, mrun, netcdf, output_particles_netcdf, package_parin, parin, plant_canopy_model, poisfft, poisfft_hybrid, poismg, read_3d_binary, read_var_list, sort_particles, subjob, user_check_parameters, user_header, user_init_grid, user_parin, surface_coupler, temperton_fft, timestep, user_actions, user_data_output_dvrp, user_dvrp_coltab, user_init_grid, user_init_plant_canopy, user_parin, user_read_restart_data, user_spectra, write_var_list

Errors:


Bugfix: Initial hydrostatic pressure profile in case of ocean runs is now
calculated in 5 iteration steps. (init_ocean)

Bugfix: wrong sign in buoyancy production of ocean part in case of not using
the reference density (only in 3D routine production_e) (production_e)

Bugfix: output of averaged 2d/3d quantities requires that an avaraging
interval has been set, respective error message is included (check_parameters)

Bugfix: Output on unit 14 only if requested by write_binary.
(user_last_actions)

Bugfix to avoid zero division by km_neutral (production_e)

Bugfix for extended NetCDF files: In order to avoid 'data mode' errors if
updated attributes are larger than their original size, NF90_PUT_ATT is called
in 'define mode' enclosed by NF90_REDEF and NF90_ENDDEF calls. This implies a
possible performance loss; an alternative strategy would be to ensure equal
attribute size in a job chain. (netcdf)

Bugfix: correction of initial volume flow for non-flat topography (init_3d_model)
Bugfix: zero initialization of arrays within buildings for 'cyclic_fill' (init_3d_model)

Bugfix: to_be_resorted => s_av for time-averaged scalars (data_output_2d, data_output_3d)

Bugfix: error in formatting the output (message)

Bugfix: avoid that ngp_2dh_s_inner becomes zero (init_3_model)

Typographical error: unit of wpt in dots_unit (modules)

Bugfix: error in check, if particles moved further than one subdomain length.
This check must not be applied for newly released particles. (advec_particles)

Bugfix: several tail counters are initialized, particle_tail_coordinates is
only written to file if its third index is > 0, arrays for tails are allocated
with a minimum size of 10 tails if there is no tail initially (init_particles,
advec_particles)

Bugfix: pressure included for profile output (check_parameters)

Bugfix: Type of count and count_rate changed to default INTEGER on NEC machines
(cpu_log)

Bugfix: output if particle time series only if particle advection is switched
on. (time_integration)

Bugfix: qsws was calculated in case of constant heatflux = .FALSE. (prandtl_fluxes)

Bugfix: averaging along z is not allowed for 2d quantities (e.g. u* and z0) (data_output_2d)

Typographical errors (netcdf)

If the inversion height calculated by the prerun is zero, inflow_damping_height
must be explicitly specified (init_3d_model)

Small bugfix concerning 3d 64bit netcdf output format (header)

Bugfix: dt_fixed removed from the restart file, because otherwise, no change
from a fixed to a variable timestep would be possible in restart runs.
(read_var_list, write_var_list)

Bugfix: initial setting of time_coupling in coupled restart runs (time_integration)

advec_particles, check_parameters, cpu_log, data_output_2d, data_output_3d, header, init_3d_model, init_particles, init_ocean, modules, netcdf, prandtl_fluxes, production_e, read_var_list, time_integration, user_last_actions, write_var_list

  • Property svn:keywords set to Id
File size: 55.1 KB
Line 
1 MODULE advection
2
3
4!------------------------------------------------------------------------------!
5! Current revisions:
6! -----------------
7!
8!
9! Former revisions:
10! -----------------
11! $Id: modules.f90 392 2009-09-24 10:39:14Z raasch $
12!
13! 388 2009-09-23 09:40:33Z raasch
14! +prho, prho_1
15! +bc_lr_cyc, bc_ns_cyc
16! +output_for_t0
17! translation error of actual -> current revisions fixed
18! +q* in dots_label, dots_unit. increased dots_num respectively
19! typographical error in dots_unit fixed
20! +clip_dvrp_*, cluster_size, color_interval, dvrpsize_interval, dvrp_overlap,
21! dvrp_total_overlap, groundplate_color, local_dvrserver_running, n*_dvrp,
22! interval_*_dvrp_prt, isosurface_color, particle_color, particle_dvrpsize,
23! topography color in dvrp_variables,
24! vertical_particle_advection is a 1d-array,
25! +canyon_height, canyon_width_x, canyon_width_y, canyon_wall_left,
26! canyon_wall_south, conserve_volume_flow_mode, coupling_start_time,
27! dp_external, dp_level_b, dp_level_ind_b, dp_smooth, dp_smooth_factor, dpdxy,
28! run_coupled, time_since_reference_point, u_bulk, v_bulk in control_parameters,
29! default value of grid_matching changed to strict
30! +shf_av, qsws_av
31!
32! 217 2008-12-09 18:00:48Z letzel
33! +topography_grid_convention
34! some dvrp-variables changed to single precision, variables for dvrp-mode
35! pathlines added, +target_id, abort_mode, message_string
36!
37! 197 2008-09-16 15:29:03Z raasch
38! allow 100 spectra levels instead of 10 for consistency with
39! define_netcdf_header, +canopy_heat_flux, cthf, lai,
40! +leaf_surface_concentration, scalar_exchange_coefficient, sec, sls
41! +hor_index_bounds, hor_index_bounds_previous_run, id_inflow, id_recycling,
42! inflow_damping_*, mean_inflow_profiles, numprocs_previous_run, nx_on_file,
43! ny_on_file, offset_ocean_*, recycling_plane, recycling_width, turbulent_inflow
44! -myid_char_14
45!
46! 138 2007-11-28 10:03:58Z letzel
47! +drag_coefficient, pch_index, lad_surface, lad_vertical_gradient,
48! lad_vertical_gradient_level, plant_canopy, lad, lad_s, lad_u, lad_v,
49! lad_w, cdc, lad_vertical_gradient_level_ind, canopy_mode
50! +dt_sort_particles, ngp_2dh_s_inner, time_sort_particles, flags,
51! wall_flags_1..10, wall_humidityflux(0:4), wall_qflux(0:4),
52! wall_salinityflux(0:4), wall_scalarflux(0:4)
53!
54! 108 2007-08-24 15:10:38Z letzel
55! +comm_inter, constant_top_momentumflux, coupling_char, coupling_mode,
56! coupling_mode_remote, c_u, c_v, c_w, dt_coupling, e_init, humidity_remote,
57! ngp_xy, nxlu, nysv, port_name, qswst_remote, terminate_coupled,
58! terminate_coupled_remote, time_coupling, top_momentumflux_u|v, type_xy,
59! uswst*, vswst*
60!
61! 97 2007-06-21 08:23:15Z raasch
62! +atmos_ocean_sign, ocean, r, + salinity variables
63! defaults of .._vertical_gradient_levels changed from -1.0 to -9999999.9
64! hydro_press renamed hyp, use_pt_reference renamed use_reference
65!
66! 89 2007-05-25 12:08:31Z raasch
67! +data_output_pr_user, max_pr_user, size of data_output_pr, dopr_index,
68! dopr_initial_index and dopr_unit enlarged,
69! var_hom and var_sum renamed pr_palm
70!
71! 82 2007-04-16 15:40:52Z raasch
72! +return_addres, return_username
73! Cpp-directive lcmuk renamed lc
74!
75! 75 2007-03-22 09:54:05Z raasch
76! +arrays precipitation_amount, precipitation_rate, precipitation_rate_av,
77! rif_wall, z0_av, +arrays u_m_l, u_m_r, etc. for radiation boundary conditions,
78! +loop_optimization, netcdf_64bit_3d, zu_s_inner, zw_w_inner, id_var_zusi_*,
79! id_var_zwwi_*, ts_value, u_nzb_p1_for_vfc, v_nzb_p1_for_vfc, pt_reference,
80! use_pt_reference, precipitation_amount_interval, revision
81! +age_m in particle_type, moisture renamed humidity,
82! -data_output_ts, dots_n, uvmean_outflow, uxrp, vynp,
83! arrays dots_label and dots_unit now dimensioned with dots_max,
84! setting of palm version moved to main program
85!
86! 37 2007-03-01 08:33:54Z raasch
87! +constant_top_heatflux, top_heatflux, use_top_fluxes, +arrays for top fluxes,
88! +nzt_diff, default of bc_pt_t renamed "initial_gradient"
89! Bugfix: p is not a pointer
90!
91! RCS Log replace by Id keyword, revision history cleaned up
92!
93! Revision 1.95  2007/02/11 13:18:30  raasch
94! version 3.1b (last under RCS control)
95!
96! Revision 1.1  1997/07/24 11:21:26  raasch
97! Initial revision
98!
99!
100! Description:
101! ------------
102! Definition of variables for special advection schemes
103!------------------------------------------------------------------------------!
104
105    REAL ::  spl_gamma_x, spl_gamma_y
106
107    REAL, DIMENSION(:), ALLOCATABLE   ::  aex, bex, dex, eex, spl_z_x, spl_z_y
108    REAL, DIMENSION(:,:), ALLOCATABLE ::  spl_tri_x, spl_tri_y, spl_tri_zu, &
109                                          spl_tri_zw
110
111    SAVE
112
113 END MODULE advection
114
115
116
117
118 MODULE array_kind
119
120!------------------------------------------------------------------------------!
121! Description:
122! ------------
123! Definition of type parameters (used for the definition of single or double
124! precision variables)
125!------------------------------------------------------------------------------!
126
127    INTEGER, PARAMETER ::  dpk = SELECTED_REAL_KIND( 12 ), &
128                           spk = SELECTED_REAL_KIND( 6 )
129
130    SAVE
131
132 END MODULE array_kind
133
134
135
136
137 MODULE arrays_3d
138
139!------------------------------------------------------------------------------!
140! Description:
141! ------------
142! Definition of all arrays defined on the computational grid
143!------------------------------------------------------------------------------!
144
145    USE array_kind
146
147    REAL, DIMENSION(:), ALLOCATABLE ::                                         &
148          ddzu, dd2zu, dzu, ddzw, dzw, hyp, inflow_damping_factor, km_damp_x,  &
149          km_damp_y, lad, l_grid, pt_init, q_init, rdf, sa_init, ug, u_init,   &
150          u_nzb_p1_for_vfc, vg, v_init, v_nzb_p1_for_vfc, zu, zw
151
152    REAL, DIMENSION(:,:), ALLOCATABLE ::                                       &
153          c_u, c_v, c_w, dzu_mg, dzw_mg, f1_mg, f2_mg, f3_mg,                  &
154          mean_inflow_profiles, pt_slope_ref, qs, qswst_remote, ts, us, z0
155
156    REAL, DIMENSION(:,:), ALLOCATABLE, TARGET ::                               &
157          qsws_1, qsws_2, qswst_1, qswst_2, rif_1, rif_2, saswsb_1, saswst_1,  &
158          shf_1, shf_2, tswst_1, tswst_2, usws_1, usws_2, uswst_1, uswst_2,    &
159          vsws_1, vsws_2, vswst_1, vswst_2
160
161    REAL, DIMENSION(:,:), POINTER ::                                           &
162          qsws, qsws_m, qswst, qswst_m, rif, rif_m, saswsb, saswst, shf,       &
163          shf_m, tswst, tswst_m, usws, uswst, usws_m, uswst_m, vsws, vswst,    &
164          vsws_m, vswst_m
165
166    REAL, DIMENSION(:,:,:), ALLOCATABLE ::                                     &
167          canopy_heat_flux, cdc, d, diss, lad_s, lad_u, lad_v, lad_w, lai,     &
168          l_wall, sec, sls, tend, u_m_l, u_m_n, u_m_r, u_m_s, v_m_l, v_m_n,    &
169          v_m_r, v_m_s, w_m_l, w_m_n, w_m_r, w_m_s
170
171    REAL, DIMENSION(:,:,:), ALLOCATABLE, TARGET ::                             &
172          ql_v, ql_vp
173
174    REAL, DIMENSION(:,:,:), ALLOCATABLE, TARGET ::                             &
175          e_1, e_2, e_3, kh_1, kh_2, km_1, km_2, p, prho_1, pt_1, pt_2, pt_3,  &
176          q_1, q_2, q_3, ql_1, ql_2, rho_1, sa_1, sa_2, sa_3, u_1, u_2, u_3,   &
177          v_1, v_2, v_3, vpt_1, vpt_2, w_1, w_2, w_3
178
179    REAL, DIMENSION(:,:,:), POINTER ::                                         &
180          e, e_m, e_p, kh, kh_m, km, km_m, prho, pt, pt_m, pt_p, q, q_m, q_p,  &
181          ql, ql_c, rho, sa, sa_p, te_m, tpt_m, tq_m, tsa_m, tu_m, tv_m, tw_m, &
182          u, u_m, u_p, v, v_m, v_p, vpt, vpt_m, w, w_m, w_p
183
184    REAL, DIMENSION(:,:,:,:), ALLOCATABLE ::  rif_wall
185
186    SAVE
187
188 END MODULE arrays_3d
189
190
191
192
193 MODULE averaging
194
195!------------------------------------------------------------------------------!
196! Description:
197! ------------
198! Definition of variables needed for time-averaging of 2d/3d data
199!------------------------------------------------------------------------------!
200
201    REAL, DIMENSION(:,:), ALLOCATABLE ::  lwp_av, precipitation_rate_av,       &
202                                          qsws_av, shf_av,ts_av, us_av, z0_av
203
204    REAL, DIMENSION(:,:,:), ALLOCATABLE, TARGET :: &
205          e_av, p_av, pc_av, pr_av, pt_av, q_av, ql_av, ql_c_av, ql_v_av, &
206          ql_vp_av, qv_av, rho_av, s_av, sa_av, u_av, v_av, vpt_av, w_av
207
208 END MODULE averaging
209
210
211
212
213 MODULE cloud_parameters
214
215!------------------------------------------------------------------------------!
216! Description:
217! ------------
218! Definition of variables and constants for cloud physics
219!------------------------------------------------------------------------------!
220
221    REAL  ::  b_cond, cp = 1005.0, diff_coeff_l = 0.23E-4,                     &
222              effective_coll_efficiency, l_d_cp, l_d_r, l_d_rv, l_v = 2.5E+06, &
223              mass_of_solute, molecular_weight_of_solute,                      &
224              prec_time_const = 0.001, ql_crit = 0.0005, rho_l = 1.0E3,        &
225              r_d = 287.0, r_v = 461.51, thermal_conductivity_l = 2.43E-2
226
227    REAL, DIMENSION(:), ALLOCATABLE   ::  pt_d_t, t_d_pt
228
229    REAL, DIMENSION(:,:), ALLOCATABLE ::  precipitation_amount, &
230                                          precipitation_rate
231
232    SAVE
233
234 END MODULE cloud_parameters
235
236
237
238
239 MODULE constants
240
241!------------------------------------------------------------------------------!
242! Description:
243! ------------
244! Definition of general constants
245!------------------------------------------------------------------------------!
246
247    REAL    ::  pi = 3.141592654
248
249    SAVE
250
251 END MODULE constants
252
253
254
255
256 MODULE control_parameters
257
258!------------------------------------------------------------------------------!
259! Description:
260! ------------
261! Definition of parameters for program control
262!------------------------------------------------------------------------------!
263
264    TYPE plot_precision
265       CHARACTER (LEN=6) ::  variable
266       INTEGER           ::  precision
267    END TYPE plot_precision
268
269    TYPE(plot_precision), DIMENSION(100) ::  plot_3d_precision =               &
270                        (/ plot_precision( 'u', 2 ), plot_precision( 'v', 2 ), &
271                           plot_precision( 'w', 2 ), plot_precision( 'p', 5 ), &
272                           plot_precision( 'pt', 2 ),                          &
273                           ( plot_precision( ' ', 1 ), i9 = 1,95 ) /)
274
275    TYPE file_status
276       LOGICAL ::  opened, opened_before
277    END TYPE file_status
278
279    TYPE(file_status), DIMENSION(200) :: openfile = file_status(.FALSE.,.FALSE.)
280
281
282    CHARACTER (LEN=1)    ::  cycle_mg = 'w', timestep_reason = ' '
283    CHARACTER (LEN=2)    ::  coupling_char = ''
284    CHARACTER (LEN=5)    ::  write_binary = 'false'
285    CHARACTER (LEN=6)    ::  grid_matching = 'strict'
286    CHARACTER (LEN=8)    ::  run_date, run_time
287    CHARACTER (LEN=9)    ::  simulated_time_chr
288    CHARACTER (LEN=11)   ::  topography_grid_convention = ' '
289    CHARACTER (LEN=12)   ::  version = ' ', revision = ' '
290    CHARACTER (LEN=16)   ::  conserve_volume_flow_mode = 'default', &
291                             loop_optimization = 'default', &
292                             momentum_advec = 'pw-scheme', &
293                             psolver = 'poisfft', &
294                             scalar_advec = 'pw-scheme'
295    CHARACTER (LEN=20)   ::  bc_e_b = 'neumann', bc_lr = 'cyclic', &
296                             bc_ns = 'cyclic', bc_p_b = 'neumann', &
297                             bc_p_t = 'dirichlet', bc_pt_b = 'dirichlet', &
298                             bc_pt_t = 'initial_gradient', &
299                             bc_q_b = 'dirichlet', bc_q_t = 'neumann', &
300                             bc_s_b = 'dirichlet', bc_s_t = 'neumann', &
301                             bc_sa_t = 'neumann', &
302                             bc_uv_b = 'dirichlet', bc_uv_t = 'dirichlet', &
303                             canopy_mode = 'block', &
304                             coupling_mode = 'uncoupled', &
305                             coupling_mode_remote = 'uncoupled', &
306                             dissipation_1d = 'as_in_3d_model', &
307                             fft_method = 'system-specific', &
308                             mixing_length_1d = 'as_in_3d_model', &
309                             random_generator = 'numerical-recipes', &
310                             return_addres, return_username, &
311                             timestep_scheme = 'runge-kutta-3'
312    CHARACTER (LEN=40)   ::  avs_data_file, topography = 'flat'
313    CHARACTER (LEN=64)   ::  host = ' '
314    CHARACTER (LEN=80)   ::  log_message, run_identifier
315    CHARACTER (LEN=100)  ::  initializing_actions = ' ', run_description_header
316    CHARACTER (LEN=1000) ::  message_string = ' '
317
318    CHARACTER (LEN=7),  DIMENSION(100) ::  do3d_comp_prec = ' '
319    CHARACTER (LEN=10), DIMENSION(10)  ::  data_output_format = ' '
320    CHARACTER (LEN=11), DIMENSION(100) ::  data_output = ' ',    &
321                                           data_output_user = ' ', doav = ' '
322    CHARACTER (LEN=10), DIMENSION(300) ::  data_output_pr = ' '
323    CHARACTER (LEN=10), DIMENSION(200) ::  data_output_pr_user = ' '
324    CHARACTER (LEN=20), DIMENSION(10)  ::  netcdf_precision = ' '
325
326    CHARACTER (LEN=10), DIMENSION(0:1,100) ::  do2d = ' ', do3d = ' '
327
328    INTEGER ::  abort_mode = 1, average_count_pr = 0, average_count_sp = 0, &
329                average_count_3d = 0, current_timestep_number = 0, &
330                dist_range = 0, disturbance_level_ind_b, &
331                disturbance_level_ind_t, doav_n = 0, dopr_n = 0, &
332                dopr_time_count = 0, dopts_time_count = 0, &
333                dosp_time_count = 0, dots_time_count = 0, &
334                do2d_xy_n = 0, do2d_xz_n = 0, do2d_yz_n = 0, do3d_avs_n = 0, &
335                dp_level_ind_b = 0, &
336                dvrp_filecount = 0, dz_stretch_level_index, gamma_mg, &
337                grid_level, ibc_e_b, ibc_p_b, ibc_p_t, ibc_pt_b, ibc_pt_t, &
338                ibc_q_b, ibc_q_t, ibc_sa_t, ibc_uv_b, ibc_uv_t, &
339                inflow_disturbance_begin = -1, inflow_disturbance_end = -1, &
340                intermediate_timestep_count, intermediate_timestep_count_max, &
341                iran = -1234567, last_dt_change = 0, maximum_grid_level, &
342                max_pr_user = 0, mgcycles = 0, mg_cycles = -1, &
343                mg_switch_to_pe0_level = 0, ngsrb = 2, nsor = 20, &
344                nsor_ini = 100, n_sor, normalizing_region = 0, &
345                nz_do1d, nz_do3d = -9999, outflow_damping_width = -1, &
346                pch_index = 0, prt_time_count = 0, recycling_plane, runnr = 0, &
347                skip_do_avs = 0, terminate_coupled = 0, &
348                terminate_coupled_remote = 0, timestep_count = 0
349
350    INTEGER ::  dist_nxl(0:1), dist_nxr(0:1), dist_nyn(0:1), dist_nys(0:1), &
351                do2d_no(0:1) = 0, do2d_xy_time_count(0:1), &
352                do2d_xz_time_count(0:1), do2d_yz_time_count(0:1), &
353                do3d_no(0:1) = 0, do3d_time_count(0:1), &
354                lad_vertical_gradient_level_ind(10) = -9999, &
355                pt_vertical_gradient_level_ind(10) = -9999, &
356                q_vertical_gradient_level_ind(10) = -9999, &
357                sa_vertical_gradient_level_ind(10) = -9999, &
358                section(100,3), section_xy(100) = -9999, &
359                section_xz(100) = -9999, section_yz(100) = -9999, &
360                ug_vertical_gradient_level_ind(10) = -9999, &
361                vg_vertical_gradient_level_ind(10) = -9999
362
363    INTEGER, DIMENSION(:), ALLOCATABLE ::  grid_level_count
364
365    LOGICAL ::  adjust_mixing_length = .FALSE., avs_output = .FALSE., &
366                bc_lr_cyc =.TRUE., bc_ns_cyc = .TRUE., &
367                call_psolver_at_all_substeps = .TRUE., &
368                cloud_droplets = .FALSE., cloud_physics = .FALSE., &
369                conserve_volume_flow = .FALSE., constant_diffusion = .FALSE., &
370                constant_heatflux = .TRUE., constant_top_heatflux = .TRUE., &
371                constant_top_momentumflux = .FALSE., &
372                constant_top_salinityflux = .TRUE., &
373                constant_waterflux = .TRUE., create_disturbances = .TRUE., &
374                cut_spline_overshoot = .TRUE., &
375                data_output_2d_on_each_pe = .TRUE., do2d_at_begin = .FALSE., &
376                do3d_at_begin = .FALSE., do3d_compress = .FALSE., &
377                do_sum = .FALSE., dp_external = .FALSE., dp_smooth = .FALSE., &
378                dt_changed = .FALSE., dt_fixed = .FALSE., &
379                disturbance_created = .FALSE., &
380                first_call_advec_particles = .TRUE., &
381                force_print_header = .FALSE., galilei_transformation = .FALSE.,&
382                humidity = .FALSE., humidity_remote = .FALSE., &
383                inflow_l = .FALSE., inflow_n = .FALSE., &
384                inflow_r = .FALSE., inflow_s = .FALSE., iso2d_output = .FALSE.,&
385                mg_switch_to_pe0 = .FALSE., &
386                netcdf_output = .FALSE., netcdf_64bit = .FALSE., &
387                netcdf_64bit_3d = .TRUE., ocean = .FALSE., &
388                outflow_l = .FALSE., outflow_n = .FALSE., outflow_r = .FALSE., &
389                outflow_s = .FALSE., passive_scalar = .FALSE., &
390                plant_canopy = .FALSE., &
391                prandtl_layer = .TRUE., precipitation = .FALSE., &
392                profil_output = .FALSE., radiation = .FALSE., &
393                random_heatflux = .FALSE., run_control_header = .FALSE., &
394                run_coupled = .TRUE., sloping_surface = .FALSE., &
395                stop_dt = .FALSE., terminate_run = .FALSE., &
396                turbulent_inflow = .FALSE., &
397                use_prior_plot1d_parameters = .FALSE., use_reference = .FALSE.,&
398                use_surface_fluxes = .FALSE., use_top_fluxes = .FALSE., &
399                use_ug_for_galilei_tr = .TRUE., use_upstream_for_tke = .FALSE.,&
400                wall_adjustment = .TRUE.
401
402    LOGICAL ::  data_output_xy(0:1) = .FALSE., data_output_xz(0:1) = .FALSE., &
403                data_output_yz(0:1) = .FALSE.
404
405    REAL ::  advected_distance_x = 0.0, advected_distance_y = 0.0, &
406             alpha_surface = 0.0, asselin_filter_factor = 0.1, &
407             atmos_ocean_sign = 1.0, &
408             averaging_interval = 0.0, averaging_interval_pr = 9999999.9, &
409             averaging_interval_sp = 9999999.9, bc_pt_t_val, bc_q_t_val, &
410             bottom_salinityflux = 0.0, &
411             building_height = 50.0, building_length_x = 50.0, &
412             building_length_y = 50.0, building_wall_left = 9999999.9, &
413             building_wall_south = 9999999.9, canyon_height = 50.0, &
414             canyon_width_x = 9999999.9, canyon_width_y = 9999999.9, &
415             canyon_wall_left = 9999999.9, canyon_wall_south = 9999999.9, &
416             cthf = 0.0, cfl_factor = -1.0, cos_alpha_surface, &
417             coupling_start_time, disturbance_amplitude = 0.25, &
418             disturbance_energy_limit = 0.01, &
419             disturbance_level_b = -9999999.9, &
420             disturbance_level_t = -9999999.9, &
421             dp_level_b = 0.0, drag_coefficient = 0.0, &
422             dt = -1.0, dt_averaging_input = 0.0, &
423             dt_averaging_input_pr = 9999999.9, dt_coupling = 9999999.9, &
424             dt_data_output = 9999999.9, &
425             dt_data_output_av = 9999999.9, dt_disturb = 9999999.9, &
426             dt_dopr = 9999999.9, dt_dopr_listing = 9999999.9, &
427             dt_dopts = 9999999.9, dt_dosp = 9999999.9, dt_dots = 9999999.9, &
428             dt_do2d_xy = 9999999.9, dt_do2d_xz = 9999999.9, &
429             dt_do2d_yz = 9999999.9, dt_do3d = 9999999.9, dt_dvrp = 9999999.9, &
430             dt_max = 20.0, dt_prel = 9999999.9, dt_restart = 9999999.9, &
431             dt_run_control = 60.0, dt_3d = -1.0, dz = -1.0, &
432             dz_max = 9999999.9, dz_stretch_factor = 1.08, &
433             dz_stretch_level = 100000.0, e_init = 0.0, e_min = 0.0, &
434             end_time = 0.0, &
435             f = 0.0, fs = 0.0, g = 9.81, inflow_damping_height = 9999999.9, &
436             inflow_damping_width = 9999999.9, kappa = 0.4, km_constant = -1.0,&
437             km_damp_max = -1.0, lad_surface = 0.0,  &
438             leaf_surface_concentration = 0.0, long_filter_factor = 0.0, &
439             maximum_cpu_time_allowed = 0.0, molecular_viscosity = 1.461E-5, &
440             old_dt = 1.0E-10, omega = 7.29212E-5, omega_sor = 1.8, &
441             overshoot_limit_e = 0.0, overshoot_limit_pt = 0.0, &
442             overshoot_limit_u = 0.0, overshoot_limit_v = 0.0, &
443             overshoot_limit_w = 0.0, particle_maximum_age = 9999999.9, &
444             phi = 55.0, prandtl_number = 1.0, &
445             precipitation_amount_interval = 9999999.9, prho_reference, &
446             pt_reference = 9999999.9, pt_slope_offset = 0.0, &
447             pt_surface = 300.0, pt_surface_initial_change = 0.0, &
448             q_surface = 0.0, q_surface_initial_change = 0.0, &
449             rayleigh_damping_factor = -1.0, rayleigh_damping_height = -1.0, &
450             recycling_width = 9999999.9, residual_limit = 1.0E-4, &
451             restart_time = 9999999.9, rho_reference, rho_surface, &
452             rif_max = 1.0, rif_min = -5.0, roughness_length = 0.1, &
453             sa_surface = 35.0, scalar_exchange_coefficient = 0.0, &
454             simulated_time = 0.0, simulated_time_at_begin, sin_alpha_surface, &
455             skip_time_data_output = 0.0, skip_time_data_output_av = 9999999.9,&
456             skip_time_dopr = 9999999.9, skip_time_dosp = 9999999.9, &
457             skip_time_do2d_xy = 9999999.9, skip_time_do2d_xz = 9999999.9, &
458             skip_time_do2d_yz = 9999999.9, skip_time_do3d = 9999999.9, &
459             surface_heatflux = 9999999.9, surface_pressure = 1013.25, &
460             surface_scalarflux = 0.0, surface_waterflux = 0.0, &
461             s_surface = 0.0, s_surface_initial_change = 0.0, &
462             termination_time_needed = -1.0, time_coupling = 0.0, &
463             time_disturb = 0.0, time_dopr = 0.0, time_dopr_av = 0.0, &
464             time_dopr_listing = 0.0, time_dopts = 0.0, time_dosp = 0.0, &
465             time_dosp_av = 0.0, time_dots = 0.0, time_do2d_xy = 0.0, &
466             time_do2d_xz = 0.0, time_do2d_yz = 0.0, time_do3d = 0.0, &
467             time_do_av = 0.0, time_do_sla = 0.0, time_dvrp = 0.0, &
468             time_prel = 0.0, time_restart = 9999999.9, time_run_control = 0.0,&
469             time_since_reference_point, top_heatflux = 9999999.9, &
470             top_momentumflux_u = 9999999.9, &
471             top_momentumflux_v = 9999999.9, top_salinityflux = 9999999.9, &
472             ug_surface = 0.0, u_bulk = 0.0, u_gtrans = 0.0, &
473             ups_limit_e = 0.0, ups_limit_pt = 0.0, ups_limit_u = 0.0, &
474             ups_limit_v = 0.0, ups_limit_w = 0.0, vg_surface = 0.0, &
475             v_bulk = 0.0, v_gtrans = 0.0, wall_adjustment_factor = 1.8, &
476             z_max_do1d = -1.0, z_max_do1d_normalized = -1.0, z_max_do2d = -1.0
477
478    REAL ::  do2d_xy_last_time(0:1) = -1.0, do2d_xz_last_time(0:1) = -1.0, &
479             do2d_yz_last_time(0:1) = -1.0, dpdxy(1:2) = 0.0, &
480             lad_vertical_gradient(10) = 0.0, &
481             lad_vertical_gradient_level(10) = -9999999.9, &
482             pt_vertical_gradient(10) = 0.0, &
483             pt_vertical_gradient_level(10) = -9999999.9, &
484             q_vertical_gradient(10) = 0.0, &
485             q_vertical_gradient_level(10) = -1.0, &
486             s_vertical_gradient(10) = 0.0, &
487             s_vertical_gradient_level(10) = -1.0, &
488             sa_vertical_gradient(10) = 0.0, &
489             sa_vertical_gradient_level(10) = -9999999.9, threshold(20) = 0.0, &
490             tsc(10) = (/ 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 /), &
491             ug_vertical_gradient(10) = 0.0, &
492             ug_vertical_gradient_level(10) = -9999999.9, &
493             vg_vertical_gradient(10) = 0.0, &
494             vg_vertical_gradient_level(10) = -9999999.9, &
495             volume_flow(1:2) = 0.0, volume_flow_area(1:2) = 0.0, &
496             volume_flow_initial(1:2) = 0.0, wall_heatflux(0:4) = 0.0, &
497             wall_humidityflux(0:4) = 0.0, wall_qflux(0:4) = 0.0, &
498             wall_salinityflux(0:4) = 0.0, wall_scalarflux(0:4) = 0.0
499
500    REAL, DIMENSION(:), ALLOCATABLE ::  dp_smooth_factor
501
502
503    SAVE
504
505 END MODULE control_parameters
506
507
508
509
510 MODULE cpulog
511
512!------------------------------------------------------------------------------!
513! Description:
514! ------------
515! Definition of variables for cpu-time measurements
516!------------------------------------------------------------------------------!
517
518    REAL ::  initial_wallclock_time
519
520    TYPE logpoint
521       REAL               ::  isum, ivect, mean, mtime, mtimevec, sum, vector
522       INTEGER            ::  counts
523       CHARACTER (LEN=20) ::  place
524    END TYPE logpoint
525
526    TYPE(logpoint), DIMENSION(100) ::  log_point = logpoint( 0.0, 0.0, 0.0,   &
527                                       0.0, 0.0, 0.0, 0.0, 0, ' ' ),          &
528                                       log_point_s = logpoint( 0.0, 0.0, 0.0, &
529                                       0.0, 0.0, 0.0, 0.0, 0, ' ' )
530
531    SAVE
532
533 END MODULE cpulog
534
535
536
537
538 MODULE dvrp_variables
539
540!------------------------------------------------------------------------------!
541! Description:
542! ------------
543! Definition of variables used with dvrp-software
544!------------------------------------------------------------------------------!
545
546    CHARACTER (LEN=10) ::  dvrp_output = 'rtsp', particle_color = 'none', &
547                           particle_dvrpsize = 'none'
548
549    CHARACTER (LEN=20), DIMENSION(10) ::  mode_dvrp = &
550                                     (/ ( '                    ', i9 = 1,10 ) /)
551
552    CHARACTER (LEN=80) ::  dvrp_directory = 'default',                    &
553                           dvrp_file      = 'default',                    &
554                           dvrp_host      = 'origin.rvs.uni-hannover.de', &
555                           dvrp_password  = '********',                   &
556                           dvrp_username  = ' '
557
558    INTEGER ::  cluster_size = 1, dvrp_colortable_entries = 4,                 &
559                dvrp_colortable_entries_prt = 22, islice_dvrp,                 &
560                nx_dvrp, nxl_dvrp, nxr_dvrp, ny_dvrp, nyn_dvrp, nys_dvrp,      &
561                nz_dvrp, pathlines_fadeintime = 5, pathlines_fadeouttime = 5,  &
562                pathlines_linecount = 1000, pathlines_maxhistory = 40,         &
563                pathlines_wavecount = 10, pathlines_wavetime = 50,             &
564                vc_gradient_normals = 0, vc_mode = 0, vc_size_x = 2,           &
565                vc_size_y = 2, vc_size_z = 2
566
567    INTEGER, DIMENSION(10) ::  slicer_position_dvrp
568
569    LOGICAL ::  cyclic_dvrp = .FALSE., dvrp_overlap, dvrp_total_overlap, &
570                local_dvrserver_running, lock_steering_update = .FALSE., &
571                use_seperate_pe_for_dvrp_output = .FALSE.
572
573    REAL    ::  clip_dvrp_l = 9999999.9, clip_dvrp_n = 9999999.9, &
574                clip_dvrp_r = 9999999.9, clip_dvrp_s = 9999999.9, &
575                superelevation = 1.0, superelevation_x = 1.0,     &
576                superelevation_y = 1.0, vc_alpha = 38.0
577
578    REAL, DIMENSION(2) ::  color_interval = (/ 0.0, 1.0 /), &
579                           dvrpsize_interval = (/ 0.0, 1.0 /)
580
581    REAL, DIMENSION(3) ::  groundplate_color = (/ 0.0, 0.6, 0.0 /), &
582                           topography_color = (/ 0.8, 0.7, 0.6 /)
583
584#if defined( __decalpha )
585    REAL, DIMENSION(2,10)  ::  slicer_range_limits_dvrp = (/ &
586                                -1.0, 1.0, -1.0, 1.0, -1.0, 1.0, -1.0, 1.0, &
587                                -1.0, 1.0, -1.0, 1.0, -1.0, 1.0, -1.0, 1.0, &
588                                -1.0, 1.0, -1.0, 1.0 /)
589
590    REAL, DIMENSION(3,10)  ::  isosurface_color = (/ &
591                                0.9, 0.9, 0.9,  0.8, 0.1, 0.1,  0.1, 0.1, 0.8, &
592                                0.1, 0.8, 0.1,  0.6, 0.1, 0.1,  0.1, 0.1, 0.6, &
593                                0.1, 0.6, 0.1,  0.4, 0.1, 0.1,  0.1, 0.1, 0.4  &
594                                0.1, 0.4, 0.1 /)
595
596    REAL(4), DIMENSION(2,100) ::  interval_values_dvrp, interval_h_dvrp =      &
597                                  (/ 270.0, 225.0, 225.0, 180.0, 70.0, 25.0,   &
598                                     25.0, -25.0, ( 0.0, i9 = 1, 192 ) /),     &
599                                  interval_l_dvrp = 0.5, interval_s_dvrp = 1.0,&
600                                  interval_a_dvrp = 0.0,                       &
601                                  interval_values_dvrp_prt,                    &
602                                  interval_h_dvrp_prt,                         &
603                                  (/ 270.0, 225.0, 225.0, 180.0, 70.0, 25.0,   &
604                                     25.0, -25.0, ( 0.0, i9 = 1, 192 ) /),     &
605                                  interval_l_dvrp_prt = 0.5,                   &
606                                  interval_s_dvrp_prt = 1.0,                   &
607                                  interval_a_dvrp_prt = 0.0
608#else
609    REAL, DIMENSION(2,10)     ::  slicer_range_limits_dvrp
610
611    REAL, DIMENSION(3,10)     ::  isosurface_color
612
613    REAL(4), DIMENSION(2,100) ::  interval_values_dvrp,                       &
614                                  interval_values_dvrp_prt, interval_h_dvrp,  &
615                                  interval_h_dvrp_prt, interval_l_dvrp = 0.5, &
616                                  interval_l_dvrp_prt = 0.5, interval_s_dvrp = 1.0, &
617                                  interval_s_dvrp_prt = 1.0, interval_a_dvrp = 0.0, &
618                                  interval_a_dvrp_prt = 0.0
619
620    DATA  slicer_range_limits_dvrp / -1.0, 1.0, -1.0, 1.0, -1.0, 1.0, &
621                                     -1.0, 1.0, -1.0, 1.0, -1.0, 1.0, &
622                                     -1.0, 1.0, -1.0, 1.0, -1.0, 1.0, &
623                                     -1.0, 1.0 /
624
625    DATA  isosurface_color / 0.9, 0.9, 0.9,  0.8, 0.1, 0.1,  0.1, 0.1, 0.8, &
626                             0.1, 0.8, 0.1,  0.6, 0.1, 0.1,  0.1, 0.1, 0.6, &
627                             0.1, 0.6, 0.1,  0.4, 0.1, 0.1,  0.1, 0.1, 0.4, &
628                             0.1, 0.4, 0.1 /
629
630    DATA  interval_h_dvrp / 270.0, 225.0, 225.0, 180.0, 70.0, 25.0, &
631                            25.0, -25.0, 192 * 0.0 /
632
633    DATA  interval_h_dvrp_prt / 270.0, 225.0, 225.0, 180.0, 70.0, 25.0, &
634                                25.0, -25.0, 192 * 0.0 /
635#endif
636
637    REAL(4), DIMENSION(:), ALLOCATABLE ::  xcoor_dvrp, ycoor_dvrp, zcoor_dvrp
638
639    TYPE steering
640       CHARACTER (LEN=20) ::  name
641       REAL(4)            ::  min, max
642       INTEGER            ::  imin, imax
643    END TYPE steering
644
645    TYPE(steering), DIMENSION(:), ALLOCATABLE ::  steering_dvrp
646
647    SAVE
648
649 END MODULE dvrp_variables
650
651
652
653
654 MODULE grid_variables
655
656!------------------------------------------------------------------------------!
657! Description:
658! ------------
659! Definition of grid spacings
660!------------------------------------------------------------------------------!
661
662    REAL ::  ddx, ddx2, dx = 1.0, dx2, ddy, ddy2, dy = 1.0, dy2
663
664    REAL, DIMENSION(:), ALLOCATABLE ::  ddx2_mg, ddy2_mg
665
666    REAL, DIMENSION(:,:), ALLOCATABLE ::  fwxm, fwxp, fwym, fwyp, fxm, fxp,   &
667                                          fym, fyp, wall_e_x, wall_e_y,       &
668                                          wall_u, wall_v, wall_w_x, wall_w_y, &
669                                          zu_s_inner, zw_w_inner
670
671    SAVE
672
673 END MODULE grid_variables
674
675
676
677
678 MODULE indices
679
680!------------------------------------------------------------------------------!
681! Description:
682! ------------
683! Definition of array bounds and number of gridpoints
684!------------------------------------------------------------------------------!
685
686    INTEGER ::  ngp_sums, nnx, nx = 0, nxa, nxl, nxlu, nxr, nxra, nx_on_file,  &
687                nny, ny = 0, nya, nyn, nyna, nys, nysv, ny_on_file, nnz,       &
688                nz = 0, nza, nzb, nzb_diff, nzt, nzta, nzt_diff
689
690    INTEGER, DIMENSION(:), ALLOCATABLE ::                                      &
691                ngp_2dh, ngp_3d, ngp_3d_inner,                                 &
692                nnx_pe, nny_pe, nxl_mg, nxr_mg, nyn_mg, nys_mg, nzt_mg
693
694    INTEGER, DIMENSION(:,:), ALLOCATABLE ::                                    &
695                ngp_2dh_outer, ngp_2dh_s_inner, mg_loc_ind, nzb_diff_s_inner,  &
696                nzb_diff_s_outer, nzb_diff_u, nzb_diff_v, nzb_inner, nzb_outer,&
697                nzb_s_inner, nzb_s_outer, nzb_u_inner, nzb_u_outer,            &
698                nzb_v_inner, nzb_v_outer, nzb_w_inner, nzb_w_outer, nzb_2d
699
700    INTEGER, DIMENSION(:,:,:), POINTER ::  flags
701
702    INTEGER, DIMENSION(:,:,:), ALLOCATABLE, TARGET ::  wall_flags_1,           &
703                wall_flags_2, wall_flags_3, wall_flags_4, wall_flags_5,        &
704                wall_flags_6, wall_flags_7, wall_flags_8, wall_flags_9,        &
705                wall_flags_10
706
707    SAVE
708
709 END MODULE indices
710
711
712
713
714 MODULE interfaces
715
716!------------------------------------------------------------------------------!
717! Description:
718! ------------
719! Interfaces for special subroutines which use optional parameters
720!------------------------------------------------------------------------------!
721
722    INTERFACE
723
724       SUBROUTINE cpu_log( log_event, place, modus, barrierwait )
725
726          USE cpulog
727
728          CHARACTER (LEN=*)           ::  modus, place
729          CHARACTER (LEN=*), OPTIONAL ::  barrierwait
730          TYPE(logpoint)              ::  log_event
731
732       END SUBROUTINE cpu_log
733
734    END INTERFACE
735
736
737
738    INTERFACE
739
740       SUBROUTINE global_min_max ( i1, i2, j1, j2, k1, k2, feld, mode, wert, &
741                                   wert_ijk, wert1, wert1_ijk )
742          CHARACTER (LEN=*), INTENT(IN) ::  mode
743          INTEGER, INTENT(IN)           ::  i1, i2, j1, j2, k1, k2
744          INTEGER                       ::  wert_ijk(3)
745          INTEGER, OPTIONAL             ::  wert1_ijk(3)
746          REAL                          ::  wert
747          REAL, OPTIONAL                ::  wert1
748          REAL, INTENT(IN)              ::  feld(i1:i2,j1:j2,k1:k2)
749
750       END SUBROUTINE global_min_max
751
752    END INTERFACE
753
754    SAVE
755
756 END MODULE interfaces
757
758
759
760 MODULE pointer_interfaces
761
762!------------------------------------------------------------------------------!
763! Description:
764! ------------
765! Interfaces for subroutines with pointer arguments called in
766! prognostic_equations
767!------------------------------------------------------------------------------!
768
769    INTERFACE
770
771       SUBROUTINE advec_s_bc( sk, sk_char )
772
773          CHARACTER (LEN=*), INTENT(IN)   ::  sk_char
774          REAL, DIMENSION(:,:,:), POINTER ::  sk
775
776       END SUBROUTINE advec_s_bc
777
778    END INTERFACE
779
780
781    SAVE
782
783 END MODULE pointer_interfaces
784
785
786
787
788 MODULE model_1d
789
790!------------------------------------------------------------------------------!
791! Description:
792! ------------
793! Definition of variables for the 1D-model
794!------------------------------------------------------------------------------!
795
796    INTEGER ::  current_timestep_number_1d = 0, damp_level_ind_1d, &
797                last_dt_change_1d = 0 
798
799    LOGICAL ::  run_control_header_1d = .FALSE., stop_dt_1d = .FALSE. 
800
801    REAL ::     damp_level_1d = -1.0, dt_1d = 60.0, dt_max_1d = 300.0, &
802                dt_pr_1d = 9999999.9, dt_run_control_1d = 60.0, &
803                end_time_1d = 864000.0, old_dt_1d = 1.0E-10, &
804                qs1d, simulated_time_1d = 0.0, time_pr_1d = 0.0, &
805                time_run_control_1d = 0.0, ts1d, us1d, usws1d, usws1d_m, &
806                vsws1d, vsws1d_m, z01d
807
808
809    REAL, DIMENSION(:), ALLOCATABLE ::  e1d, e1d_m, e1d_p, kh1d, kh1d_m, km1d, &
810                                        km1d_m, l_black, l1d, l1d_m, rif1d,    &
811                                        te_e, te_em, te_u, te_um, te_v, te_vm, &
812                                        u1d, u1d_m, u1d_p, v1d, v1d_m, v1d_p
813
814    SAVE
815
816 END MODULE model_1d
817
818
819
820
821 MODULE netcdf_control
822
823!------------------------------------------------------------------------------!
824! Description:
825! ------------
826! Definition of parameters and variables for netcdf control.
827!------------------------------------------------------------------------------!
828
829#if defined( __netcdf )
830    USE netcdf
831#endif
832
833    INTEGER, PARAMETER ::  dopr_norm_num = 7, dopts_num = 26, dots_max = 100, &
834                           replace_num = 6
835
836    INTEGER ::  dots_num = 23
837
838    CHARACTER, DIMENSION( replace_num ) :: &
839                           replace_char = (/ '''', '"', '*', '/', '(', ')' /), &
840                           replace_by   = (/ 'p' , 'p', 's', 'o', '_', '_' /)
841
842    CHARACTER (LEN=6), DIMENSION(dopr_norm_num) ::  dopr_norm_names =   &
843         (/ 'wpt0  ', 'ws2   ', 'tsw2  ', 'ws3   ', 'ws2tsw', 'wstsw2', &
844            'z_i   ' /)
845
846    CHARACTER (LEN=6), DIMENSION(dopr_norm_num) ::  dopr_norm_longnames = &
847         (/ 'wpt0  ', 'w*2   ', 't*w2  ', 'w*3   ', 'w*2t*w', 'w*t*w2',   &
848            'z_i   ' /)
849
850    CHARACTER (LEN=7), DIMENSION(dopts_num) :: dopts_label = &
851          (/ 'tnpt   ', 'x_     ', 'y_     ', 'z_     ', 'z_abs  ', 'u      ', &
852             'v      ', 'w      ', 'u"     ', 'v"     ', 'w"     ', 'npt_up ', &
853             'w_up   ', 'w_down ', 'npt_max', 'npt_min', 'x*2    ', 'y*2    ', &
854             'z*2    ', 'u*2    ', 'v*2    ', 'w*2    ', 'u"2    ', 'v"2    ', &
855             'w"2    ', 'npt*2  ' /)
856
857    CHARACTER (LEN=7), DIMENSION(dopts_num) :: dopts_unit = &
858          (/ 'number ', 'm      ', 'm      ', 'm      ', 'm      ', 'm/s    ', &
859             'm/s    ', 'm/s    ', 'm/s    ', 'm/s    ', 'm/s    ', 'number ', &
860             'm/s    ', 'm/s    ', 'number ', 'number ', 'm2     ', 'm2     ', &
861             'm2     ', 'm2/s2  ', 'm2/s2  ', 'm2/s2  ', 'm2/s2  ', 'm2/s2  ', &
862             'm2/s2  ', 'number2' /)
863
864    CHARACTER (LEN=7), DIMENSION(dots_max) :: dots_label = &
865          (/ 'E      ', 'E*     ', 'dt     ', 'u*     ', 'th*    ', 'umax   ', &
866             'vmax   ', 'wmax   ', 'div_new', 'div_old', 'z_i_wpt', 'z_i_pt ', &
867             'w*     ', 'w"pt"0 ', 'w"pt"  ', 'wpt    ', 'pt(0)  ', 'pt(zp) ', &
868             'w"u"0  ', 'w"v"0  ', 'w"q"0  ', 'mo_L   ', 'q*     ',            &
869             ( 'unknown', i9 = 1, 77) /)
870
871    CHARACTER (LEN=7), DIMENSION(dots_max) :: dots_unit = &
872          (/ 'm2/s2  ', 'm2/s2  ', 's      ', 'm/s    ', 'K      ', 'm/s    ', &
873             'm/s    ', 'm/s    ', 's-1    ', 's-1    ', 'm      ', 'm      ', &
874             'm/s    ', 'K m/s  ', 'K m/s  ', 'K m/s  ', 'K      ', 'K      ', &
875             'm2/s2  ', 'm2/s2  ', 'kg m/s ', 'm      ', 'kg/kg  ',            &
876             ( 'unknown', i9 = 1, 77 ) /)
877
878    CHARACTER (LEN=7), DIMENSION(300) ::  dopr_unit = 'unknown'
879
880    CHARACTER (LEN=7), DIMENSION(0:1,100) ::  do2d_unit, do3d_unit
881
882    CHARACTER (LEN=16), DIMENSION(25) ::  prt_var_names = &
883          (/ 'pt_age          ', 'pt_dvrp_size    ', 'pt_origin_x     ', &
884             'pt_origin_y     ', 'pt_origin_z     ', 'pt_radius       ', &
885             'pt_speed_x      ', 'pt_speed_y      ', 'pt_speed_z      ', &
886             'pt_weight_factor', 'pt_x            ', 'pt_y            ', &
887             'pt_z            ', 'pt_color        ', 'pt_group        ', &
888             'pt_tailpoints   ', 'pt_tail_id      ', 'pt_density_ratio', &
889             'pt_exp_arg      ', 'pt_exp_term     ', 'not_used        ', &
890             'not_used        ', 'not_used        ', 'not_used        ', &
891             'not_used        ' /)
892
893    CHARACTER (LEN=16), DIMENSION(25) ::  prt_var_units = &
894          (/ 'seconds         ', 'meters          ', 'meters          ', &
895             'meters          ', 'meters          ', 'meters          ', &
896             'm/s             ', 'm/s             ', 'm/s             ', &
897             'factor          ', 'meters          ', 'meters          ', &
898             'meters          ', 'none            ', 'none            ', &
899             'none            ', 'none            ', 'ratio           ', &
900             'none            ', 'none            ', 'not_used        ', &
901             'not_used        ', 'not_used        ', 'not_used        ', &
902             'not_used        ' /)
903
904    INTEGER ::  id_dim_prtnum, id_dim_time_pr, id_dim_time_prt, &
905                id_dim_time_pts, id_dim_time_sp, id_dim_time_ts, id_dim_x_sp, &
906                id_dim_y_sp, id_dim_zu_sp, id_dim_zw_sp, id_set_pr, &
907                id_set_prt, id_set_pts, id_set_sp, id_set_ts, id_var_prtnum, &
908                id_var_rnop_prt, id_var_time_pr, id_var_time_prt, &
909                id_var_time_pts, id_var_time_sp, id_var_time_ts, id_var_x_sp, &
910                id_var_y_sp, id_var_zu_sp, id_var_zw_sp, nc_stat
911
912    INTEGER, DIMENSION(0:1) ::  id_dim_time_xy, id_dim_time_xz, &
913                id_dim_time_yz, id_dim_time_3d, id_dim_x_xy, id_dim_xu_xy, &
914                id_dim_x_xz, id_dim_xu_xz, id_dim_x_yz, id_dim_xu_yz, &
915                id_dim_x_3d, id_dim_xu_3d, id_dim_y_xy, id_dim_yv_xy, &
916                id_dim_y_xz, id_dim_yv_xz, id_dim_y_yz, id_dim_yv_yz, &
917                id_dim_y_3d, id_dim_yv_3d, id_dim_zu_xy, id_dim_zu1_xy, &
918                id_dim_zu_xz, id_dim_zu_yz, id_dim_zu_3d, id_dim_zw_xy, &
919                id_dim_zw_xz, id_dim_zw_yz, id_dim_zw_3d, id_set_xy, &
920                id_set_xz, id_set_yz, id_set_3d, id_var_ind_x_yz, &
921                id_var_ind_y_xz, id_var_ind_z_xy, id_var_time_xy, &
922                id_var_time_xz, id_var_time_yz, id_var_time_3d, id_var_x_xy, &
923                id_var_xu_xy, id_var_x_xz, id_var_xu_xz, id_var_x_yz, &
924                id_var_xu_yz, id_var_x_3d, id_var_xu_3d, id_var_y_xy, &
925                id_var_yv_xy, id_var_y_xz, id_var_yv_xz, id_var_y_yz, &
926                id_var_yv_yz, id_var_y_3d, id_var_yv_3d, id_var_zusi_xy, &
927                id_var_zusi_3d, id_var_zu_xy, id_var_zu1_xy, id_var_zu_xz, &
928                id_var_zu_yz, id_var_zu_3d, id_var_zwwi_xy, id_var_zwwi_3d, &
929                id_var_zw_xy, id_var_zw_xz, id_var_zw_yz, id_var_zw_3d
930
931    INTEGER, DIMENSION(10)  ::  id_var_dospx, id_var_dospy, nc_precision 
932    INTEGER, DIMENSION(20)  ::  id_var_prt
933    INTEGER, DIMENSION(dopr_norm_num) ::  id_var_norm_dopr
934
935    INTEGER, DIMENSION(dopts_num,0:10) ::  id_var_dopts
936    INTEGER, DIMENSION(0:1,100)        ::  id_var_do2d, id_var_do3d
937    INTEGER, DIMENSION(100,0:9)        ::  id_dim_z_pr, id_var_dopr, &
938                                           id_var_z_pr
939    INTEGER, DIMENSION(dots_max,0:9)   ::  id_var_dots
940
941    LOGICAL ::  output_for_t0 = .FALSE.
942
943    SAVE
944
945 END MODULE netcdf_control
946
947
948
949 MODULE particle_attributes
950
951!------------------------------------------------------------------------------!
952! Description:
953! ------------
954! Definition of variables used to compute particle transport
955!------------------------------------------------------------------------------!
956
957    USE array_kind
958
959    CHARACTER (LEN=15)  ::  bc_par_lr = 'cyclic',  bc_par_ns = 'cyclic', &
960                            bc_par_b  = 'reflect', bc_par_t  = 'absorb'
961
962#if defined( __parallel )
963    INTEGER ::  mpi_particle_type
964#endif
965    INTEGER ::  ibc_par_lr, ibc_par_ns, ibc_par_b, ibc_par_t,                  &
966                iran_part = -1234567, maximum_number_of_particles = 1000,      &
967                maximum_number_of_tailpoints = 100,                            &
968                maximum_number_of_tails = 0,                                   &
969                number_of_initial_particles = 0, number_of_particles = 0,      &
970                number_of_particle_groups = 1, number_of_tails = 0,            &
971                number_of_initial_tails = 0, offset_ocean_nzt = 0,             &
972                offset_ocean_nzt_m1 = 0, particles_per_point = 1,              &
973                particle_file_count = 0, skip_particles_for_tail = 100,        &
974                total_number_of_particles, total_number_of_tails = 0
975
976    INTEGER, PARAMETER ::  max_number_of_particle_groups = 10
977
978    INTEGER, DIMENSION(:), ALLOCATABLE     ::  new_tail_id
979    INTEGER, DIMENSION(:,:,:), ALLOCATABLE ::  prt_count, prt_start_index
980
981    LOGICAL ::  particle_advection = .FALSE., random_start_position = .FALSE., &
982                read_particles_from_restartfile = .TRUE.,                      &
983                uniform_particles = .TRUE., use_particle_tails = .FALSE.,      &
984                use_sgs_for_particles = .FALSE.,                               &
985                write_particle_statistics = .FALSE.
986
987    LOGICAL, DIMENSION(max_number_of_particle_groups) ::                       &
988                vertical_particle_advection = .TRUE.
989
990    LOGICAL, DIMENSION(:), ALLOCATABLE ::  particle_mask, tail_mask
991
992    REAL    ::  c_0 = 3.0, dt_min_part = 0.0002, dt_sort_particles = 0.0,      &
993                dt_write_particle_data = 9999999.9, dvrp_psize = 9999999.9,    &
994                end_time_prel = 9999999.9, initial_weighting_factor = 1.0,     &
995                maximum_tailpoint_age = 100000.0,                              &
996                minimum_tailpoint_distance = 0.0,                              &
997                particle_advection_start = 0.0, sgs_wfu_part = 0.3333333,      &
998                sgs_wfv_part = 0.3333333, sgs_wfw_part = 0.3333333,            &
999                time_sort_particles = 0.0, time_write_particle_data = 0.0
1000
1001    REAL, DIMENSION(max_number_of_particle_groups) ::  &
1002                density_ratio = 9999999.9, pdx = 9999999.9, pdy = 9999999.9, &
1003                pdz = 9999999.9, psb = 9999999.9, psl = 9999999.9,           &
1004                psn = 9999999.9, psr = 9999999.9, pss = 9999999.9,           &
1005                pst = 9999999.9, radius = 9999999.9
1006
1007    REAL, DIMENSION(:,:,:), ALLOCATABLE ::  particle_tail_coordinates
1008
1009
1010    TYPE particle_type
1011       SEQUENCE
1012       REAL    ::  age, age_m, dt_sum, dvrp_psize, e_m, origin_x, origin_y, &
1013                   origin_z, radius, speed_x, speed_x_sgs, speed_y,         &
1014                   speed_y_sgs, speed_z, speed_z_sgs, weight_factor, x, y, z
1015       INTEGER ::  color, group, tailpoints, tail_id
1016    END TYPE particle_type
1017
1018    TYPE(particle_type), DIMENSION(:), ALLOCATABLE ::  initial_particles, &
1019                                                       particles
1020
1021    TYPE particle_groups_type
1022       SEQUENCE
1023       REAL    ::  density_ratio, radius, exp_arg, exp_term
1024    END TYPE particle_groups_type
1025
1026    TYPE(particle_groups_type), DIMENSION(max_number_of_particle_groups) ::&
1027                   particle_groups
1028
1029    SAVE
1030
1031 END MODULE particle_attributes
1032
1033
1034
1035
1036
1037 MODULE pegrid
1038
1039!------------------------------------------------------------------------------!
1040! Description:
1041! ------------
1042! Definition of variables which define processor topology and the exchange of
1043! ghost point layers. This modules must be placed in all routines which contain
1044! MPI-calls.
1045!------------------------------------------------------------------------------!
1046
1047#if defined( __parallel )
1048#if defined( __lc )
1049    USE MPI
1050#else
1051    INCLUDE "mpif.h"
1052#endif
1053#endif
1054    CHARACTER(LEN=5)       ::  myid_char = ''
1055    INTEGER                ::  id_inflow = 0, id_recycling = 0, myid = 0,      &
1056                               target_id, npex = -1, npey = -1, numprocs = 1,  &
1057                               numprocs_previous_run = -1,                     &
1058                               tasks_per_node = -9999, threads_per_task = 1
1059
1060    INTEGER, DIMENSION(:,:), ALLOCATABLE ::  hor_index_bounds, &
1061                                             hor_index_bounds_previous_run
1062
1063#if defined( __parallel )
1064#if defined( __mpi2 )
1065    CHARACTER (LEN=MPI_MAX_PORT_NAME) ::  port_name
1066#endif
1067
1068    INTEGER ::  comm1dx, comm1dy, comm2d, comm_inter, comm_palm, ierr, myidx,  &
1069                myidy, ndim = 2, ngp_xy, ngp_y, pleft, pnorth, pright, psouth, &
1070                sendrecvcount_xy, sendrecvcount_yz, sendrecvcount_zx,          &
1071                sendrecvcount_zyd, sendrecvcount_yxd,                          &
1072                type_x, type_x_int, type_xy
1073
1074    INTEGER ::  ibuf(12), pcoord(2), pdims(2), status(MPI_STATUS_SIZE)
1075
1076    INTEGER, DIMENSION(:), ALLOCATABLE ::  ngp_yz, type_xz
1077
1078    LOGICAL ::  reorder = .TRUE.
1079    LOGICAL, DIMENSION(2) ::  cyclic = (/ .TRUE. , .TRUE. /), &
1080                              remain_dims
1081#endif
1082
1083    SAVE
1084
1085 END MODULE pegrid
1086
1087
1088
1089
1090 MODULE profil_parameter
1091
1092!------------------------------------------------------------------------------!
1093! Description:
1094! ------------
1095! Definition of variables which control PROFIL-output
1096!------------------------------------------------------------------------------!
1097
1098    INTEGER, PARAMETER ::  crmax = 100
1099
1100    CHARACTER (LEN=10), DIMENSION(100) ::  dopr_label = ' '
1101
1102    CHARACTER (LEN=10), DIMENSION(crmax) ::  cross_normalized_x = ' ', &
1103                                             cross_normalized_y = ' '
1104
1105    CHARACTER (LEN=20), DIMENSION(20) ::  cross_ts_profiles = &
1106                           (/ ' E E*               ', ' dt                 ', &
1107                              ' u* w*              ', ' th*                ', &
1108                              ' umax vmax wmax     ', ' div_old div_new    ', &
1109                              ' z_i_wpt z_i_pt     ', ' w"pt"0 w"pt" wpt   ', &
1110                              ' pt(0) pt(zp)       ', ' splux spluy spluz  ', &
1111                              ' L                  ',                         &
1112                            ( '                    ', i9 = 1, 9 ) /)
1113
1114    CHARACTER (LEN=40), DIMENSION(crmax) ::  cross_xtext = &
1115                           (/ 'windspeed in ms>->1         ', &
1116                              'pot. temperature in K       ', &
1117                              'heat flux in K ms>->1       ', &
1118                              'momentum flux in m>2s>2     ', &
1119                              'eddy diffusivity in m>2s>->1', &
1120                              'mixing length in m          ', &
1121                            ( '                            ', i9 = 1, 94 ) /)
1122
1123    CHARACTER (LEN=100), DIMENSION(crmax) ::  cross_profiles = &
1124                           (/ ' u v                           ', &
1125                              ' pt                            ', &
1126                              ' w"pt" w*pt* w*pt*BC wpt wptBC ', &
1127                              ' w"u" w*u* wu w"v" w*v* wv     ', &
1128                              ' km kh                         ', &
1129                              ' l                             ', &
1130                         ( '                               ', i9 = 1, 94 ) /)
1131
1132    INTEGER ::  profile_columns = 3, profile_rows = 2, profile_number = 0
1133
1134    INTEGER ::  cross_linecolors(100,crmax) = 1, &
1135                cross_linestyles(100,crmax) = 0, &
1136                cross_profile_numbers(100,crmax) = 0, &
1137                cross_pnc_local(crmax), cross_profile_number_count(crmax) = 0, &
1138                cross_ts_numbers(crmax,crmax) = 0, &
1139                cross_ts_number_count(crmax) = 0, dopr_crossindex(100) = 0, &
1140                dopr_index(300) = 0, dopr_initial_index(300) = 0, &
1141                dots_crossindex(100) = 0, dots_index(100) = 0, &
1142                linecolors(10) = (/ 2, 3, 4,  5, 7, 8, 12, 15, 16, 23 /), &
1143                linestyles(11) = (/ 0, 7, 3, 10, 4, 1,  9,  2,  5,  8, 6 /)
1144               
1145
1146    REAL ::  cross_normx_factor(100,crmax) = 1.0, &
1147             cross_normy_factor(100,crmax) = 1.0, &
1148             cross_ts_uymax(20) = &
1149                             (/ 999.999, 999.999, 999.999, 999.999, 999.999,   &
1150                                999.999, 999.999, 999.999, 999.999, 999.999,   &
1151                                999.999, 999.999, 999.999, 999.999, 999.999,   &
1152                                999.999, 999.999, 999.999, 999.999, 999.999 /),&
1153             cross_ts_uymax_computed(20) = 999.999, &
1154             cross_ts_uymin(20) = &
1155                             (/ 999.999, 999.999, 999.999,  -5.000, 999.999,   &
1156                                999.999,   0.000, 999.999, 999.999, 999.999,   &
1157                                999.999, 999.999, 999.999, 999.999, 999.999,   &
1158                                999.999, 999.999, 999.999, 999.999, 999.999 /),&
1159             cross_ts_uymin_computed(20) = 999.999, &
1160             cross_uxmax(crmax) = 0.0, cross_uxmax_computed(crmax) = -1.0, &
1161             cross_uxmax_normalized(crmax) = 0.0, &
1162             cross_uxmax_normalized_computed(crmax) = -1.0, &
1163             cross_uxmin(crmax) = 0.0, cross_uxmin_computed(crmax) =  1.0, &
1164             cross_uxmin_normalized(crmax) = 0.0, &
1165             cross_uxmin_normalized_computed(crmax) = 1.0, &
1166             cross_uymax(crmax), cross_uymin(crmax)
1167
1168    SAVE
1169
1170 END MODULE profil_parameter
1171
1172
1173
1174
1175 MODULE spectrum
1176
1177!------------------------------------------------------------------------------!
1178! Description:
1179! ------------
1180! Definition of quantities used for computing spectra
1181!------------------------------------------------------------------------------!
1182
1183    CHARACTER (LEN=6),  DIMENSION(1:5) ::  header_char = (/ 'PS(u) ', 'PS(v) ',&
1184                                           'PS(w) ', 'PS(pt)', 'PS(q) ' /)
1185    CHARACTER (LEN=2),  DIMENSION(10)  ::  spectra_direction = 'x'
1186    CHARACTER (LEN=10), DIMENSION(10)  ::  data_output_sp  = ' '
1187    CHARACTER (LEN=25), DIMENSION(1:5) ::  utext_char =                    &
1188                                           (/ '-power spectrum of u     ', &
1189                                              '-power spectrum of v     ', &
1190                                              '-power spectrum of w     ', &
1191                                              '-power spectrum of ^1185 ', &
1192                                              '-power spectrum of q     ' /)
1193    CHARACTER (LEN=39), DIMENSION(1:5) ::  ytext_char =                        &
1194                                 (/ 'k ^2236 ^2566^2569<u(k) in m>2s>->2    ', &
1195                                    'k ^2236 ^2566^2569<v(k) in m>2s>->2    ', &
1196                                    'k ^2236 ^2566^2569<w(k) in m>2s>->2    ', &
1197                                    'k ^2236 ^2566^2569<^1185(k) in m>2s>->2', &
1198                                    'k ^2236 ^2566^2569<q(k) in m>2s>->2    ' /)
1199
1200    INTEGER ::  klist_x = 0, klist_y = 0, n_sp_x = 0, n_sp_y = 0
1201
1202    INTEGER ::  comp_spectra_level(100) = 999999,                   &
1203                lstyles(100) = (/ 0, 7, 3, 10, 1, 4, 9, 2, 6, 8,    &
1204                                  0, 7, 3, 10, 1, 4, 9, 2, 6, 8,    &
1205                                  0, 7, 3, 10, 1, 4, 9, 2, 6, 8,    &
1206                                  0, 7, 3, 10, 1, 4, 9, 2, 6, 8,    &
1207                                  0, 7, 3, 10, 1, 4, 9, 2, 6, 8,    &
1208                                  0, 7, 3, 10, 1, 4, 9, 2, 6, 8,    &
1209                                  0, 7, 3, 10, 1, 4, 9, 2, 6, 8,    &
1210                                  0, 7, 3, 10, 1, 4, 9, 2, 6, 8,    &
1211                                  0, 7, 3, 10, 1, 4, 9, 2, 6, 8,    &
1212                                  0, 7, 3, 10, 1, 4, 9, 2, 6, 8 /), &
1213                plot_spectra_level(100) = 999999
1214
1215    REAL    ::  time_to_start_sp = 0.0
1216
1217    SAVE
1218
1219 END MODULE spectrum
1220
1221
1222
1223
1224 MODULE statistics
1225
1226!------------------------------------------------------------------------------!
1227! Description:
1228! ------------
1229! Definition of statistical quantities, e.g. global sums
1230!------------------------------------------------------------------------------!
1231
1232    CHARACTER (LEN=40) ::  region(0:9)
1233    INTEGER ::  pr_palm = 80, statistic_regions = 0, var_ts = 100
1234    INTEGER ::  u_max_ijk(3), v_max_ijk(3), w_max_ijk(3)
1235    LOGICAL ::  flow_statistics_called = .FALSE.
1236    REAL ::     u_max, v_max, w_max
1237    REAL, DIMENSION(:), ALLOCATABLE       ::  sums_divnew_l, sums_divold_l
1238    REAL, DIMENSION(:,:), ALLOCATABLE     ::  sums, sums_wsts_bc_l, ts_value
1239    REAL, DIMENSION(:,:,:), ALLOCATABLE   ::  hom_sum, rmask, spectrum_x, &
1240                                              spectrum_y, sums_l, sums_l_l, &
1241                                              sums_up_fraction_l
1242    REAL, DIMENSION(:,:,:,:), ALLOCATABLE ::  hom
1243
1244    SAVE
1245
1246 END MODULE statistics
1247
1248
1249
1250
1251 MODULE transpose_indices
1252
1253!------------------------------------------------------------------------------!
1254! Description:
1255! ------------
1256! Definition of indices for transposed arrays
1257!------------------------------------------------------------------------------!
1258
1259    INTEGER ::  nxl_y, nxl_yd, nxl_z, nxr_y, nxr_ya, nxr_yd, nxr_yda, nxr_z, &
1260                nxr_za, nyn_x, nyn_xa, nyn_z, nyn_za, nys_x, nys_z, nzb_x,   &
1261                nzb_y, nzb_yd, nzt_x, nzt_xa, nzt_y, nzt_ya, nzt_yd, nzt_yda
1262               
1263
1264    SAVE
1265
1266 END MODULE transpose_indices
Note: See TracBrowser for help on using the repository browser.