Changeset 4472 for palm/trunk
- Timestamp:
- Mar 24, 2020 12:21:00 PM (5 years ago)
- Location:
- palm/trunk/SOURCE
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
palm/trunk/SOURCE/check_parameters.f90
r4444 r4472 25 25 ! ----------------- 26 26 ! $Id$ 27 ! Kolmogorov length scale eta added to profile output 28 ! 29 ! 4444 2020-03-05 15:59:50Z raasch 27 30 ! bugfix: cpp-directives for serial mode added 28 ! 31 ! 29 32 ! 4392 2020-01-31 16:14:57Z pavelkrc 30 33 ! Some error numbers revised to prevent double usage 31 ! 34 ! 32 35 ! 11:55:33Z oliver.maas 33 36 ! Checks for closed channel flow implemented 34 ! 37 ! 35 38 ! 11:55:33Z oliver.maas 36 39 ! Move 2-m potential temperature output to diagnostic_output_quantities 37 ! 40 ! 38 41 ! 11:55:33Z oliver.maas 39 42 ! removed message PA0421, concerning old parameter recycling_yshift 40 ! 43 ! 41 44 ! 11:55:33Z oliver.maas 42 45 ! adjust message to the modified parameter recycling_yshift 43 ! 46 ! 44 47 ! 11:55:33Z oliver.maas 45 48 ! Check if a cross section is specified if any output cross-section quantity 46 49 ! is given 47 ! 50 ! 48 51 ! 11:55:33Z oliver.maas 49 52 ! Overwrite rotation_angle from namelist by value from static driver 50 ! 53 ! 51 54 ! 11:55:33Z oliver.maas 52 ! removed conversion from recycle_absolute_quantities to raq, added check and 55 ! removed conversion from recycle_absolute_quantities to raq, added check and 53 56 ! error message for correct input of recycling_method_for_thermodynamic_quantities 54 ! 57 ! 55 58 ! 11:55:33Z oliver.maas 56 59 ! Corrected "Former revisions" section 57 ! 60 ! 58 61 ! 11:55:33Z oliver.maas 59 62 ! bugfix error message: replaced PA184 by PA0184 60 ! 63 ! 61 64 ! 11:55:33Z oliver.maas 62 ! added conversion from recycle_absolute_quantities to raq for recycling of 65 ! added conversion from recycle_absolute_quantities to raq for recycling of 63 66 ! absolute quantities and added error message PA184 for not implemented quantities 64 ! 67 ! 65 68 ! 4142 2019-08-05 12:38:31Z suehring 66 69 ! Consider spinup in number of output timesteps for averaged 2D output (merge 67 70 ! from branch resler). 68 ! 71 ! 69 72 ! 4069 2019-07-01 14:05:51Z Giersch 70 ! Masked output running index mid has been introduced as a local variable to 73 ! Masked output running index mid has been introduced as a local variable to 71 74 ! avoid runtime error (Loop variable has been modified) in time_integration 72 ! 75 ! 73 76 ! 4048 2019-06-21 21:00:21Z knoop 74 77 ! Moved tcm_check_data_output to module_interface 75 ! 78 ! 76 79 ! 4039 2019-06-18 10:32:41Z suehring 77 80 ! Modularize diagnostic output 78 ! 81 ! 79 82 ! 4017 2019-06-06 12:16:46Z schwenkel 80 83 ! output of turbulence intensity added 81 ! 84 ! 82 85 ! 3933 2019-04-25 12:33:20Z kanani 83 86 ! Alphabetical resorting in CASE, condense settings for theta_2m* into one IF clause 84 ! 87 ! 85 88 ! 3885 2019-04-11 11:29:34Z kanani 86 ! Changes related to global restructuring of location messages and introduction 89 ! Changes related to global restructuring of location messages and introduction 87 90 ! of additional debug messages 88 ! 91 ! 89 92 ! 3766 2019-02-26 16:23:41Z raasch 90 93 ! trim added to avoid truncation compiler warnings 91 ! 94 ! 92 95 ! 3761 2019-02-25 15:31:42Z raasch 93 96 ! unused variables removed 94 ! 97 ! 95 98 ! 3735 2019-02-12 09:52:40Z dom_dwd_user 96 ! Passing variable j (averaged output?) to 99 ! Passing variable j (averaged output?) to 97 100 ! module_interface.f90:chem_check_data_output. 98 ! 101 ! 99 102 ! 3705 2019-01-29 19:56:39Z suehring 100 103 ! bugfix: renamed thetav_t to vtheta_t 101 ! 104 ! 102 105 ! 3702 2019-01-28 13:19:30Z gronemeier 103 106 ! most_method removed 104 ! 107 ! 105 108 ! 3655 2019-01-07 16:51:22Z knoop 106 109 ! Formatting … … 158 161 USE particle_attributes, & 159 162 ONLY: particle_advection, use_sgs_for_particles 160 163 161 164 USE pegrid 162 165 … … 242 245 CALL message( 'check_parameters', 'PA0476', 1, 2, 0, 6, 0 ) 243 246 ENDIF 244 247 245 248 ! 246 249 !-- Check dt_coupling, restart_time, dt_restart, end_time, dx, dy, nx and ny … … 522 525 ! 523 526 !-- Check illegal/untested parameter combinations for closed channel 524 If ( topography == 'closed_channel' ) THEN 527 If ( topography == 'closed_channel' ) THEN 525 528 symmetry_flag = 1 526 529 message_string = 'Bottom and top boundary are treated equal' 527 530 CALL message( 'check_parameters', 'PA0699', 0, 0, 0, 6, 0 ) 528 531 529 532 IF ( dz(1) /= dz(COUNT( dz /= -1.0_wp )) .OR. & 530 533 dz_stretch_level /= -9999999.9_wp) THEN … … 533 536 CALL message( 'check_parameters', 'PA0700', 1, 2, 0, 6, 0 ) 534 537 ENDIF 535 538 536 539 IF ( constant_flux_layer ) THEN 537 540 WRITE( message_string, * ) 'A constant flux layer is not '// & … … 540 543 CALL message( 'check_parameters', 'PA0701', 1, 2, 0, 6, 0 ) 541 544 ENDIF 542 545 543 546 IF ( ocean_mode ) THEN 544 547 WRITE( message_string, * ) 'The ocean mode is not allowed if '// & … … 546 549 CALL message( 'check_parameters', 'PA0702', 1, 2, 0, 6, 0 ) 547 550 ENDIF 548 551 549 552 IF ( momentum_advec /= 'ws-scheme' .OR. & 550 553 scalar_advec /= 'ws-scheme' ) THEN … … 629 632 630 633 ! 631 !-- When the land- or urban-surface model is used, the flux output must be 634 !-- When the land- or urban-surface model is used, the flux output must be 632 635 !-- dynamic. 633 636 IF ( land_surface .OR. urban_surface ) THEN … … 663 666 ' its maximum of dots_max = ', dots_max, & 664 667 '&Please increase dots_max in modules.f90.' 665 CALL message( 'init_3d_model', 'PA0194', 1, 2, 0, 6, 0 ) 668 CALL message( 'init_3d_model', 'PA0194', 1, 2, 0, 6, 0 ) 666 669 ENDIF 667 670 … … 705 708 ! 706 709 !-- Advection schemes: 707 IF ( momentum_advec /= 'pw-scheme' .AND. & 710 IF ( momentum_advec /= 'pw-scheme' .AND. & 708 711 momentum_advec /= 'ws-scheme' .AND. & 709 712 momentum_advec /= 'up-scheme' ) & … … 849 852 ENDIF 850 853 ! 851 !-- In case of spinup and nested run, spinup end time must be identical 852 !-- in order to have synchronously running simulations. 854 !-- In case of spinup and nested run, spinup end time must be identical 855 !-- in order to have synchronously running simulations. 853 856 IF ( nested_run ) THEN 854 857 #if defined( __parallel ) … … 1149 1152 1150 1153 ! 1151 !-- Overwrite parameters from namelist if necessary and compute Coriolis parameter. 1154 !-- Overwrite parameters from namelist if necessary and compute Coriolis parameter. 1152 1155 !-- @todo - move initialization of f and fs to coriolis_mod. 1153 1156 IF ( input_pids_static ) THEN … … 2279 2282 ENDIF 2280 2283 2284 CASE ( 'eta' ) 2285 dopr_index(i) = 121 2286 dopr_unit(i) = 'mm' 2287 hom(:,2,121,:) = SPREAD( zu, 2, statistic_regions+1 ) 2288 2289 kolmogorov_length_scale = .TRUE. 2290 2281 2291 CASE DEFAULT 2282 2292 unit = 'illegal' … … 2463 2473 2464 2474 IF ( ( TRIM( var ) == 'r_a*' .OR. TRIM( var ) == 'ghf*' ) & 2465 .AND. .NOT. land_surface .AND. .NOT. urban_surface ) & 2475 .AND. .NOT. land_surface .AND. .NOT. urban_surface ) & 2466 2476 THEN 2467 2477 message_string = 'output of "' // TRIM( var ) // '" requi' // & … … 2470 2480 CALL message( 'check_parameters', 'PA0404', 1, 2, 0, 6, 0 ) 2471 2481 ENDIF 2472 2482 2473 2483 IF ( TRIM( var ) == 'ssws*' .AND. .NOT. passive_scalar ) THEN 2474 2484 message_string = 'output of "' // TRIM( var ) // '" requi' // & … … 2490 2500 IF ( TRIM( var ) == 'z0h*' ) unit = 'm' 2491 2501 ! 2492 !-- Output of surface latent and sensible heat flux will be in W/m2 2493 !-- in case of natural- and urban-type surfaces, even if 2502 !-- Output of surface latent and sensible heat flux will be in W/m2 2503 !-- in case of natural- and urban-type surfaces, even if 2494 2504 !-- flux_output_mode is set to kinematic units. 2495 2505 IF ( land_surface .OR. urban_surface ) THEN … … 2705 2715 CALL check_dt_do( dt_data_output_av, 'dt_data_output_av' ) 2706 2716 2707 !-- Set needed time levels (ntdim) to 2717 !-- Set needed time levels (ntdim) to 2708 2718 !-- saved time levels + to be saved time levels. 2709 2719 ntdim_3d(0) = do3d_time_count(0) + CEILING( & … … 2749 2759 ENDIF 2750 2760 ! 2751 !-- Please note, for averaged 2D data skip_time_data_output_av is the relavant 2752 !-- output control parameter. 2761 !-- Please note, for averaged 2D data skip_time_data_output_av is the relavant 2762 !-- output control parameter. 2753 2763 ntdim_2d_xy(1) = do2d_xy_time_count(1) + CEILING( & 2754 2764 ( end_time - MAX( MERGE( skip_time_data_output_av, & … … 3158 3168 CALL message( 'check_parameters', 'PA0157', 1, 2, 0, 6, 0 ) 3159 3169 ENDIF 3160 3170 3161 3171 ! 3162 3172 !-- Prevent empty time records in volume, cross-section and masked data in case … … 3197 3207 3198 3208 ! 3199 !-- Check if vertical grid stretching is switched off in case of complex 3209 !-- Check if vertical grid stretching is switched off in case of complex 3200 3210 !-- terrain simulations 3201 3211 IF ( complex_terrain .AND. & -
palm/trunk/SOURCE/flow_statistics.f90
r4464 r4472 25 25 ! ----------------- 26 26 ! $Id$ 27 ! Calculations of the Kolmogorov lengt scale eta implemented 28 ! 29 ! 4464 2020-03-17 11:08:46Z Giersch 27 30 ! Reset last change (r4463) 28 ! 31 ! 29 32 ! 4463 2020-03-17 09:27:36Z Giersch 30 33 ! Calculate horizontally averaged profiles of all velocity components at the … … 33 36 ! 4444 2020-03-05 15:59:50Z raasch 34 37 ! bugfix: cpp-directives for serial mode added 35 ! 38 ! 36 39 ! 4442 2020-03-04 19:21:13Z suehring 37 ! Change order of dimension in surface array %frac to allow for better 40 ! Change order of dimension in surface array %frac to allow for better 38 41 ! vectorization. 39 ! 42 ! 40 43 ! 4441 2020-03-04 19:20:35Z suehring 41 44 ! Introduction of wall_flags_total_0, which currently sets bits based on static 42 45 ! topography information used in wall_flags_static_0 43 ! 46 ! 44 47 ! 4329 2019-12-10 15:46:36Z motisi 45 48 ! Renamed wall_flags_0 to wall_flags_static_0 46 ! 49 ! 47 50 ! 4182 2019-08-22 15:20:23Z scharf 48 51 ! Corrected "Former revisions" section 49 ! 52 ! 50 53 ! 4131 2019-08-02 11:06:18Z monakurppa 51 54 ! Allow profile output for salsa variables. 52 ! 55 ! 53 56 ! 4039 2019-06-18 10:32:41Z suehring 54 ! Correct conversion to kinematic scalar fluxes in case of pw-scheme and 57 ! Correct conversion to kinematic scalar fluxes in case of pw-scheme and 55 58 ! statistic regions 56 ! 59 ! 57 60 ! 3828 2019-03-27 19:36:23Z raasch 58 61 ! unused variables removed 59 ! 62 ! 60 63 ! 3676 2019-01-16 15:07:05Z knoop 61 64 ! Bugfix, terminate OMP Parallel block … … 71 74 !> 72 75 !> @note For simplicity, nzb_s_inner and nzb_diff_s_inner are being used as a 73 !> lower vertical index for k-loops for all variables, although strictly 74 !> speaking the k-loops would have to be split up according to the staggered 75 !> grid. However, this implies no error since staggered velocity components 76 !> lower vertical index for k-loops for all variables, although strictly 77 !> speaking the k-loops would have to be split up according to the staggered 78 !> grid. However, this implies no error since staggered velocity components 76 79 !> are zero at the walls and inside buildings. 77 80 !------------------------------------------------------------------------------! … … 97 100 USE control_parameters, & 98 101 ONLY: air_chemistry, average_count_pr, cloud_droplets, do_sum, & 99 dt_3d, humidity, initializing_actions, land_surface,&100 la rge_scale_forcing, large_scale_subsidence, max_pr_user,&101 m essage_string, neutral, ocean_mode, passive_scalar,&102 simulated_time, simulated_time_at_begin,&102 dt_3d, humidity, initializing_actions, kolmogorov_length_scale,& 103 land_surface, large_scale_forcing, large_scale_subsidence, & 104 max_pr_user, message_string, neutral, ocean_mode, & 105 passive_scalar, simulated_time, simulated_time_at_begin, & 103 106 use_subsidence_tendencies, use_surface_fluxes, use_top_fluxes, & 104 107 ws_scheme_mom, ws_scheme_sca, salsa, max_pr_salsa … … 109 112 USE grid_variables, & 110 113 ONLY: ddx, ddy 111 114 112 115 USE indices, & 113 116 ONLY: ngp_2dh, ngp_2dh_s_inner, ngp_3d, ngp_3d_inner, nxl, nxr, nyn, & … … 118 121 ONLY: ngp_sums, ngp_sums_ls 119 122 #endif 120 123 121 124 USE kinds 122 125 123 126 USE land_surface_model_mod, & 124 127 ONLY: m_soil_h, nzb_soil, nzt_soil, t_soil_h … … 151 154 INTEGER(iwp) :: j !< 152 155 INTEGER(iwp) :: k !< 153 INTEGER(iwp) :: ki !< 156 INTEGER(iwp) :: ki !< 154 157 INTEGER(iwp) :: k_surface_level !< 155 INTEGER(iwp) :: m !< loop variable over all horizontal wall elements 158 INTEGER(iwp) :: m !< loop variable over all horizontal wall elements 156 159 INTEGER(iwp) :: l !< loop variable over surface facing -- up- or downward-facing 157 160 INTEGER(iwp) :: nt !< … … 161 164 162 165 LOGICAL :: first !< 163 164 REAL(wp) :: dptdz_threshold !< 166 167 REAL(wp) :: dissipation !< dissipation rate 168 REAL(wp) :: dptdz_threshold !< 169 REAL(wp) :: du_dx !< Derivative of u fluctuations with respect to x 170 REAL(wp) :: du_dy !< Derivative of u fluctuations with respect to y 171 REAL(wp) :: du_dz !< Derivative of u fluctuations with respect to z 172 REAL(wp) :: dv_dx !< Derivative of v fluctuations with respect to x 173 REAL(wp) :: dv_dy !< Derivative of v fluctuations with respect to y 174 REAL(wp) :: dv_dz !< Derivative of v fluctuations with respect to z 175 REAL(wp) :: dw_dx !< Derivative of w fluctuations with respect to x 176 REAL(wp) :: dw_dy !< Derivative of w fluctuations with respect to y 177 REAL(wp) :: dw_dz !< Derivative of w fluctuations with respect to z 178 REAL(wp) :: eta !< Kolmogorov length scale 165 179 REAL(wp) :: fac !< 166 180 REAL(wp) :: flag !< 167 181 REAL(wp) :: height !< 168 182 REAL(wp) :: pts !< 183 REAL(wp) :: s11 !< fluctuating rate-of-strain tensor component 11 184 REAL(wp) :: s21 !< fluctuating rate-of-strain tensor component 21 185 REAL(wp) :: s31 !< fluctuating rate-of-strain tensor component 31 186 REAL(wp) :: s12 !< fluctuating rate-of-strain tensor component 12 187 REAL(wp) :: s22 !< fluctuating rate-of-strain tensor component 22 188 REAL(wp) :: s32 !< fluctuating rate-of-strain tensor component 32 189 REAL(wp) :: s13 !< fluctuating rate-of-strain tensor component 13 190 REAL(wp) :: s23 !< fluctuating rate-of-strain tensor component 23 191 REAL(wp) :: s33 !< fluctuating rate-of-strain tensor component 33 169 192 REAL(wp) :: sums_l_etot !< 170 193 REAL(wp) :: ust !< … … 175 198 REAL(wp) :: v2 !< 176 199 REAL(wp) :: w2 !< 177 200 178 201 REAL(wp) :: dptdz(nzb+1:nzt+1) !< 179 202 REAL(wp) :: sums_ll(nzb:nzt+1,2) !< … … 210 233 !-- array 211 234 sums_l(:,11,:) = sums_l_l(:,sr,:) ! mixing length from diffusivities 212 !-- WARNING: next line still has to be adjusted for OpenMP 235 !-- WARNING: next line still has to be adjusted for OpenMP 213 236 sums_l(:,21,0) = sums_wsts_bc_l(:,sr) * & 214 237 heatflux_output_conversion ! heat flux from advec_s_bc … … 220 243 !-- scale) vertical fluxes and velocity variances by using commonly- 221 244 !-- applied Reynolds-based methods ( e.g. <w'pt'> = (w-<w>)*(pt-<pt>) ) 222 !-- in combination with the 5th order advection scheme, pronounced 223 !-- artificial kinks could be observed in the vertical profiles near the 224 !-- surface. Please note: these kinks were not related to the model truth, 225 !-- i.e. these kinks are just related to an evaluation problem. 226 !-- In order avoid these kinks, vertical fluxes and horizontal as well 245 !-- in combination with the 5th order advection scheme, pronounced 246 !-- artificial kinks could be observed in the vertical profiles near the 247 !-- surface. Please note: these kinks were not related to the model truth, 248 !-- i.e. these kinks are just related to an evaluation problem. 249 !-- In order avoid these kinks, vertical fluxes and horizontal as well 227 250 !-- vertical velocity variances are calculated directly within the advection 228 !-- routines, according to the numerical discretization, to evaluate the 229 !-- statistical quantities as they will appear within the prognostic 251 !-- routines, according to the numerical discretization, to evaluate the 252 !-- statistical quantities as they will appear within the prognostic 230 253 !-- equations. 231 !-- Copy the turbulent quantities, evaluated in the advection routines to 254 !-- Copy the turbulent quantities, evaluated in the advection routines to 232 255 !-- the local array sums_l() for further computations. 233 256 IF ( ws_scheme_mom .AND. sr == 0 ) THEN … … 248 271 sums_l(:,15,i) = sums_wsvs_ws_l(:,i) & 249 272 * momentumflux_output_conversion ! w*v* 250 sums_l(:,30,i) = sums_us2_ws_l(:,i) ! u*2 251 sums_l(:,31,i) = sums_vs2_ws_l(:,i) ! v*2 252 sums_l(:,32,i) = sums_ws2_ws_l(:,i) ! w*2 253 sums_l(:,34,i) = sums_l(:,34,i) + 0.5_wp * & 273 sums_l(:,30,i) = sums_us2_ws_l(:,i) ! u*2 274 sums_l(:,31,i) = sums_vs2_ws_l(:,i) ! v*2 275 sums_l(:,32,i) = sums_ws2_ws_l(:,i) ! w*2 276 sums_l(:,34,i) = sums_l(:,34,i) + 0.5_wp * & 254 277 ( sums_us2_ws_l(:,i) + sums_vs2_ws_l(:,i) + & 255 278 sums_ws2_ws_l(:,i) ) ! e* … … 270 293 271 294 ENDIF 272 ! 295 ! 273 296 !-- Horizontally averaged profiles of horizontal velocities and temperature. 274 297 !-- They must have been computed before, because they are already required … … 446 469 447 470 ! 448 !-- Final values are obtained by division by the total number of grid points 471 !-- Final values are obtained by division by the total number of grid points 449 472 !-- used for summation. After that store profiles. 450 473 sums(:,1) = sums(:,1) / ngp_2dh(sr) … … 482 505 !-- Passive scalar 483 506 IF ( passive_scalar ) hom(:,1,115,sr) = sums(:,115) / & 484 ngp_2dh_s_inner(:,sr) ! s 507 ngp_2dh_s_inner(:,sr) ! s 485 508 486 509 ! … … 488 511 !-- variances, the total and the perturbation energy (single values in last 489 512 !-- column of sums_l) and some diagnostic quantities. 490 !-- NOTE: for simplicity, nzb_s_inner is used below, although strictly 491 !-- ---- speaking the following k-loop would have to be split up and 513 !-- NOTE: for simplicity, nzb_s_inner is used below, although strictly 514 !-- ---- speaking the following k-loop would have to be split up and 492 515 !-- rearranged according to the staggered grid. 493 516 !-- However, this implies no error since staggered velocity components … … 500 523 !$OMP DO 501 524 !$ACC PARALLEL LOOP COLLAPSE(2) PRIVATE(i, j, k, m) & 502 !$ACC PRIVATE(sums_l_etot, flag) & 525 !$ACC PRIVATE(sums_l_etot, flag, du_dx, du_dy, du_dz) & 526 !$ACC PRIVATE(dv_dx, dv_dy, dv_dz, dw_dx, dw_dy, dw_dz) & 527 !$ACC PRIVATE(s11, s21, s31, s12, s22, s32, s13, s23, s33) & 528 !$ACC PRIVATE(dissipation, eta) & 503 529 !$ACC PRESENT(wall_flags_total_0, rmask, momentumflux_output_conversion) & 504 !$ACC PRESENT(hom(:,1, 4,sr)) &530 !$ACC PRESENT(hom(:,1,1:2,sr), hom(:,1,4,sr)) & 505 531 !$ACC PRESENT(e, u, v, w, km, kh, p, pt) & 532 !$ACC PRESENT(ddx, ddy, ddzu, ddzw) & 506 533 !$ACC PRESENT(surf_def_h(0), surf_lsm_h, surf_usm_h) & 507 534 !$ACC PRESENT(sums_l) … … 557 584 w(k,j,i)**2 ) * rmask(j,i,sr)& 558 585 * flag 559 ENDDO 586 587 ! 588 !-- Computation of the Kolmogorov length scale. Calculation is based 589 !-- on gradients of the deviations from the horizontal mean. 590 !-- Kolmogorov scale at the boundaries (k=0/z=0m and k=nzt+1) is set to zero. 591 IF ( kolmogorov_length_scale .AND. k /= nzb .AND. k /= nzt+1) THEN 592 flag = MERGE( 1.0_wp, 0.0_wp, BTEST( wall_flags_total_0(k,j,i), 22 ) ) 593 594 ! 595 !-- Calculate components of the fluctuating rate-of-strain tensor 596 !-- (0.5*(del u'_i/del x_j + del u'_j/del x_i)) defined in the 597 !-- center of each grid box. 598 du_dx = ( ( u(k,j,i+1) - hom(k,1,1,sr) ) - & 599 ( u(k,j,i) - hom(k,1,1,sr) ) ) * ddx 600 du_dy = 0.25_wp * ddy * & 601 ( ( u(k,j+1,i) - hom(k,1,1,sr) ) - & 602 ( u(k,j-1,i) - hom(k,1,1,sr) ) + & 603 ( u(k,j+1,i+1) - hom(k,1,1,sr) ) - & 604 ( u(k,j-1,i+1) - hom(k,1,1,sr) ) ) 605 du_dz = 0.25_wp * ( ( ( u(k+1,j,i) - hom(k+1,1,1,sr) ) - & 606 ( u(k,j,i) - hom(k,1,1,sr) ) ) * & 607 ddzu(k+1) + & 608 ( ( u(k,j,i) - hom(k,1,1,sr) ) - & 609 ( u(k-1,j,i) - hom(k-1,1,1,sr) ) )* & 610 ddzu(k) + & 611 ( ( u(k+1,j,i+1) - hom(k+1,1,1,sr) )- & 612 ( u(k,j,i+1) - hom(k,1,1,sr) ) ) * & 613 ddzu(k+1) + & 614 ( ( u(k,j,i+1) - hom(k,1,1,sr) ) - & 615 ( u(k-1,j,i+1) - hom(k-1,1,1,sr) ) ) *& 616 ddzu(k) ) 617 618 dv_dx = 0.25_wp * ddx * & 619 ( ( v(k,j,i+1) - hom(k,1,2,sr) ) - & 620 ( v(k,j,i-1) - hom(k,1,2,sr) ) + & 621 ( v(k,j+1,i+1) - hom(k,1,2,sr) ) - & 622 ( v(k,j+1,i-1) - hom(k,1,2,sr) ) ) 623 dv_dy = ( ( v(k,j+1,i) - hom(k,1,2,sr) ) - & 624 ( v(k,j,i) - hom(k,1,2,sr) ) ) * ddy 625 dv_dz = 0.25_wp * ( ( ( v(k+1,j,i) - hom(k+1,1,2,sr) ) - & 626 ( v(k,j,i) - hom(k,1,2,sr) ) ) * & 627 ddzu(k+1) + & 628 ( ( v(k,j,i) - hom(k,1,2,sr) ) - & 629 ( v(k-1,j,i) - hom(k-1,1,2,sr) ) ) * & 630 ddzu(k) + & 631 ( ( v(k+1,j+1,i) - hom(k+1,1,2,sr) ) - & 632 ( v(k,j+1,i) - hom(k,1,2,sr) ) ) * & 633 ddzu(k+1) + & 634 ( ( v(k,j+1,i) - hom(k,1,2,sr) ) - & 635 ( v(k-1,j+1,i) - hom(k-1,1,2,sr) ) ) *& 636 ddzu(k) ) 637 638 dw_dx = 0.25_wp * ddx * ( w(k,j,i+1) - w(k,j,i-1) + & 639 w(k-1,j,i+1) - w(k-1,j,i-1) ) 640 dw_dy = 0.25_wp * ddy * ( w(k,j+1,i) - w(k,j-1,i) + & 641 w(k-1,j+1,i) - w(k-1,j-1,i) ) 642 dw_dz = ( w(k,j,i) - w(k-1,j,i) ) * ddzw(k) 643 644 s11 = 0.5_wp * ( du_dx + du_dx ) 645 s21 = 0.5_wp * ( dv_dx + du_dy ) 646 s31 = 0.5_wp * ( dw_dx + du_dz ) 647 648 s12 = s21 649 s22 = 0.5 * ( dv_dy + dv_dy ) 650 s32 = 0.5 * ( dw_dy + dv_dz ) 651 652 s13 = s31 653 s23 = s32 654 s33 = 0.5_wp * ( dw_dz + dw_dz ) 655 656 !-- Calculate 3D instantaneous energy dissipation rate after 657 !-- Pope (2000): Turbulent flows, p.259. It is defined in the center 658 !-- of each grid volume. 659 dissipation = 2.0_wp * km(k,j,i) * & 660 ( s11*s11 + s21*s21 + s31*s31 + & 661 s12*s12 + s22*s22 + s32*s32 + & 662 s13*s13 + s23*s23 + s33*s33 ) 663 eta = ( km(k,j,i)**3.0_wp / ( dissipation+1.0E-12 ) )**(1.0_wp/4.0_wp) 664 665 !$ACC ATOMIC 666 sums_l(k,121,tn) = sums_l(k,121,tn) + eta * rmask(j,i,sr) & 667 * flag 668 669 670 ENDIF !Kolmogorov length scale 671 672 ENDDO !k-loop 560 673 ! 561 674 !-- Total and perturbation energy for the total domain (being … … 661 774 rmask(j,i,sr) 662 775 ENDIF 663 ENDDO 664 ENDDO 776 ENDDO !j-loop 777 ENDDO !i-loop 665 778 !$ACC UPDATE & 666 779 !$ACC HOST(sums_l(:,3,tn), sums_l(:,8,tn), sums_l(:,9,tn)) & 667 780 !$ACC HOST(sums_l(:,10,tn), sums_l(:,40,tn), sums_l(:,33,tn)) & 668 !$ACC HOST(sums_l(:,38,tn) ) &781 !$ACC HOST(sums_l(:,38,tn), sums_l(:,121,tn)) & 669 782 !$ACC HOST(sums_l(nzb:nzb+4,pr_palm,tn), sums_l(nzb+14:nzb+14,pr_palm,tn)) 670 783 671 784 ! 672 !-- Computation of statistics when ws-scheme is not used. Else these 785 !-- Computation of statistics when ws-scheme is not used. Else these 673 786 !-- quantities are evaluated in the advection routines. 674 787 IF ( .NOT. ws_scheme_mom .OR. sr /= 0 .OR. simulated_time == 0.0_wp ) & … … 703 816 ENDIF 704 817 ! 705 !-- Computaion of domain-averaged perturbation energy. Please note, 706 !-- to prevent that perturbation energy is larger (even if only slightly) 818 !-- Computaion of domain-averaged perturbation energy. Please note, 819 !-- to prevent that perturbation energy is larger (even if only slightly) 707 820 !-- than the total kinetic energy, calculation is based on deviations from 708 821 !-- the horizontal mean, instead of spatial descretization of the advection 709 !-- term. 822 !-- term. 710 823 !$OMP DO 711 824 !$ACC PARALLEL LOOP COLLAPSE(3) PRIVATE(i, j, k, flag, w2, ust2, vst2) & … … 727 840 * rmask(j,i,sr) & 728 841 * flag 842 729 843 ENDDO 730 844 ENDDO … … 746 860 DO j = nys, nyn 747 861 ! 748 !-- Subgridscale fluxes (without Prandtl layer from k=nzb, 862 !-- Subgridscale fluxes (without Prandtl layer from k=nzb, 749 863 !-- oterwise from k=nzb+1) 750 864 !-- NOTE: for simplicity, nzb_diff_s_inner is used below, although 751 865 !-- ---- strictly speaking the following k-loop would have to be 752 866 !-- split up according to the staggered grid. 753 !-- However, this implies no error since staggered velocity 867 !-- However, this implies no error since staggered velocity 754 868 !-- components are zero at the walls and inside buildings. 755 869 !-- Flag 23 is used to mask surface fluxes as well as model-top fluxes, 756 !-- which are added further below. 870 !-- which are added further below. 757 871 DO k = nzb, nzt 758 872 flag = MERGE( 1.0_wp, 0.0_wp, & … … 1184 1298 0.0_wp * rmask(j,i,sr) ! u"pt" 1185 1299 sums_l(nzt:nzt+1,61,tn) = sums_l(nzt:nzt+1,61,tn) + & 1186 0.0_wp * rmask(j,i,sr) ! v"pt" 1300 0.0_wp * rmask(j,i,sr) ! v"pt" 1187 1301 #endif 1188 1302 #ifndef _OPENACC … … 1227 1341 ! 1228 1342 !-- Resolved fluxes (can be computed for all horizontal points) 1229 !-- NOTE: for simplicity, nzb_s_inner is used below, although strictly 1230 !-- ---- speaking the following k-loop would have to be split up and 1343 !-- NOTE: for simplicity, nzb_s_inner is used below, although strictly 1344 !-- ---- speaking the following k-loop would have to be split up and 1231 1345 !-- rearranged according to the staggered grid. 1232 1346 DO k = nzb, nzt … … 1303 1417 sums_l(k,73,tn) = sums_l(k,73,tn) + nr(k,j,i) * & 1304 1418 rmask(j,i,sr) *& 1305 flag 1419 flag 1306 1420 sums_l(k,74,tn) = sums_l(k,74,tn) + qr(k,j,i) * & 1307 1421 rmask(j,i,sr) *& … … 1320 1434 flag 1321 1435 ELSE IF ( ws_scheme_sca .AND. sr == 0 ) THEN 1322 sums_l(k,46,tn) = ( ( 1.0_wp + 0.61_wp * & 1436 sums_l(k,46,tn) = ( ( 1.0_wp + 0.61_wp * & 1323 1437 hom(k,1,41,sr) ) * & 1324 1438 sums_l(k,17,tn) + & … … 1359 1473 !$ACC HOST(sums_l(:,35,tn), sums_l(:,36,tn), sums_l(:,37,tn)) 1360 1474 ! 1361 !-- Treat land-surface quantities according to new wall model structure. 1475 !-- Treat land-surface quantities according to new wall model structure. 1362 1476 IF ( land_surface ) THEN 1363 1477 tn = 0 … … 1368 1482 i = surf_lsm_h%i(m) 1369 1483 j = surf_lsm_h%j(m) 1370 1484 1371 1485 IF ( i >= nxl .AND. i <= nxr .AND. & 1372 j >= nys .AND. j <= nyn ) THEN 1486 j >= nys .AND. j <= nyn ) THEN 1373 1487 sums_l(nzb,93,tn) = sums_l(nzb,93,tn) + surf_lsm_h%ghf(m) 1374 1488 sums_l(nzb,94,tn) = sums_l(nzb,94,tn) + surf_lsm_h%qsws_liq(m) … … 1387 1501 DO m = 1, surf_lsm_h%ns 1388 1502 1389 i = surf_lsm_h%i(m) 1503 i = surf_lsm_h%i(m) 1390 1504 j = surf_lsm_h%j(m) 1391 1505 1392 1506 IF ( i >= nxl .AND. i <= nxr .AND. & 1393 j >= nys .AND. j <= nyn ) THEN 1507 j >= nys .AND. j <= nyn ) THEN 1394 1508 1395 1509 DO k = nzb_soil, nzt_soil … … 1417 1531 DO k = nzb, nzt 1418 1532 ! 1419 !-- Flag 23 is used to mask surface fluxes as well as model-top 1420 !-- fluxes, which are added further below. 1533 !-- Flag 23 is used to mask surface fluxes as well as model-top 1534 !-- fluxes, which are added further below. 1421 1535 flag = MERGE( 1.0_wp, 0.0_wp, & 1422 1536 BTEST( wall_flags_total_0(k,j,i), 23 ) ) * & … … 1569 1683 1570 1684 ! 1571 !-- Horizontal heat fluxes (subgrid, resolved, total). 1572 !-- Do it only, if profiles shall be plotted. 1685 !-- Horizontal heat fluxes (subgrid, resolved, total). 1686 !-- Do it only, if profiles shall be plotted. 1573 1687 IF ( hom(nzb+1,2,58,0) /= 0.0_wp ) THEN 1574 1688 … … 1628 1742 IF ( large_scale_forcing .AND. ( simulated_time > 0.0_wp ) ) THEN 1629 1743 ! 1630 !-- Interpolation in time of LSF_DATA 1744 !-- Interpolation in time of LSF_DATA 1631 1745 nt = 1 1632 1746 DO WHILE ( simulated_time - dt_3d > time_vert(nt) ) … … 1669 1783 tn = 0 1670 1784 !$OMP PARALLEL PRIVATE( i, j, k, tn ) 1671 !$ tn = omp_get_thread_num() 1785 !$ tn = omp_get_thread_num() 1672 1786 IF ( radiation .AND. radiation_scheme == 'rrtmg' ) THEN 1673 1787 !$OMP DO … … 1718 1832 1719 1833 IF ( air_chemistry ) THEN 1720 IF ( max_pr_cs > 0 ) THEN 1834 IF ( max_pr_cs > 0 ) THEN 1721 1835 sums_l(:,pr_palm+max_pr_user+1:pr_palm + max_pr_user+ max_pr_cs,0) = & 1722 1836 sums_l(:,pr_palm+max_pr_user+1:pr_palm + max_pr_user+max_pr_cs,0) + & … … 1774 1888 1775 1889 ! 1776 !-- Final values are obtained by division by the total number of grid points 1890 !-- Final values are obtained by division by the total number of grid points 1777 1891 !-- used for summation. After that store profiles. 1778 1892 !-- Check, if statistical regions do contain at least one grid point at the … … 1834 1948 1835 1949 IF ( air_chemistry ) THEN 1836 IF ( max_pr_cs > 0 ) THEN 1950 IF ( max_pr_cs > 0 ) THEN 1837 1951 DO k = nzb, nzt+1 1838 1952 sums(k, pr_palm+1:pr_palm+max_pr_user+max_pr_cs) = & … … 1840 1954 ngp_2dh_s_inner(k,sr) 1841 1955 ENDDO 1842 ENDIF 1956 ENDIF 1843 1957 ENDIF 1844 1958 … … 1850 1964 / ngp_2dh_s_inner(k,sr) 1851 1965 ENDDO 1852 ENDIF 1966 ENDIF 1853 1967 ENDIF 1854 1968 … … 1873 1987 hom(:,1,22,sr) = sums(:,16) + sums(:,21) ! wptBC 1874 1988 ! profile 24 is initial profile (sa) 1875 ! profiles 25-29 left empty for initial 1989 ! profiles 25-29 left empty for initial 1876 1990 ! profiles 1877 1991 hom(:,1,30,sr) = sums(:,30) ! u*2 … … 1887 2001 hom(:,1,40,sr) = sums(:,40) ! p 1888 2002 hom(:,1,45,sr) = sums(:,45) ! w"vpt" 1889 hom(:,1,46,sr) = sums(:,46) ! w*vpt* 2003 hom(:,1,46,sr) = sums(:,46) ! w*vpt* 1890 2004 hom(:,1,47,sr) = sums(:,45) + sums(:,46) ! wvpt 1891 2005 hom(:,1,48,sr) = sums(:,48) ! w"q" (w"qv") … … 1893 2007 hom(:,1,50,sr) = sums(:,48) + sums(:,49) ! wq (wqv) 1894 2008 hom(:,1,51,sr) = sums(:,51) ! w"qv" 1895 hom(:,1,52,sr) = sums(:,52) ! w*qv* 2009 hom(:,1,52,sr) = sums(:,52) ! w*qv* 1896 2010 hom(:,1,53,sr) = sums(:,52) + sums(:,51) ! wq (wqv) 1897 2011 hom(:,1,54,sr) = sums(:,54) ! ql … … 1979 2093 hom(:,1,117,sr) = sums(:,117) ! w"s" 1980 2094 hom(:,1,114,sr) = sums(:,114) ! w*s* 1981 hom(:,1,118,sr) = sums(:,117) + sums(:,114) ! ws 2095 hom(:,1,118,sr) = sums(:,117) + sums(:,114) ! ws 1982 2096 hom(:,1,116,sr) = sums(:,116) ! s*2 1983 2097 ENDIF … … 1985 2099 hom(:,1,119,sr) = rho_air ! rho_air in Kg/m^3 1986 2100 hom(:,1,120,sr) = rho_air_zw ! rho_air_zw in Kg/m^3 2101 2102 IF ( kolmogorov_length_scale ) THEN 2103 hom(:,1,121,sr) = sums(:,121) * 1E3_wp ! eta in mm 2104 ENDIF 2105 1987 2106 1988 2107 hom(:,1,pr_palm,sr) = sums(:,pr_palm) … … 1995 2114 1996 2115 IF ( air_chemistry ) THEN 1997 IF ( max_pr_cs > 0 ) THEN ! chem_spcs profiles 2116 IF ( max_pr_cs > 0 ) THEN ! chem_spcs profiles 1998 2117 hom(:, 1, pr_palm+max_pr_user+1:pr_palm + max_pr_user+max_pr_cs, sr) = & 1999 2118 sums(:, pr_palm+max_pr_user+1:pr_palm+max_pr_user+max_pr_cs) … … 2013 2132 !-- The corresponding height is assumed as the boundary layer height, if it 2014 2133 !-- is less than 1.5 times the height where the heat flux becomes negative 2015 !-- (positive) for the first time. Attention: the resolved vertical sensible 2134 !-- (positive) for the first time. Attention: the resolved vertical sensible 2016 2135 !-- heat flux (hom(:,1,17,sr) = w*pt*) is not known at the beginning because 2017 !-- the calculation happens in advec_s_ws which is called after 2018 !-- flow_statistics. Therefore z_i is directly taken from restart data at 2019 !-- the beginning of restart runs. 2136 !-- the calculation happens in advec_s_ws which is called after 2137 !-- flow_statistics. Therefore z_i is directly taken from restart data at 2138 !-- the beginning of restart runs. 2020 2139 IF ( TRIM( initializing_actions ) /= 'read_restart_data' .OR. & 2021 2140 simulated_time_at_begin /= simulated_time ) THEN … … 2059 2178 2060 2179 ! 2061 !-- Second scheme: Gradient scheme from Sullivan et al. (1998), modified 2062 !-- by Uhlenbrock(2006). The boundary layer height is the height with the 2180 !-- Second scheme: Gradient scheme from Sullivan et al. (1998), modified 2181 !-- by Uhlenbrock(2006). The boundary layer height is the height with the 2063 2182 !-- maximal local temperature gradient: starting from the second (the 2064 !-- last but one) vertical gridpoint, the local gradient must be at least 2183 !-- last but one) vertical gridpoint, the local gradient must be at least 2065 2184 !-- 0.2K/100m and greater than the next four gradients. 2066 2185 !-- WARNING: The threshold value of 0.2K/100m must be adjusted for the 2067 !-- ocean case! 2186 !-- ocean case! 2068 2187 z_i(2) = 0.0_wp 2069 2188 DO k = nzb+1, nzt+1 … … 2126 2245 2127 2246 ! 2128 !-- Collect the time series quantities. Please note, timeseries quantities 2129 !-- which are collected from horizontally averaged profiles, e.g. wpt 2130 !-- or pt(zp), are treated specially. In case of elevated model surfaces, 2247 !-- Collect the time series quantities. Please note, timeseries quantities 2248 !-- which are collected from horizontally averaged profiles, e.g. wpt 2249 !-- or pt(zp), are treated specially. In case of elevated model surfaces, 2131 2250 !-- index nzb+1 might be within topography and data will be zero. Therefore, 2132 !-- take value for the first atmosphere index, which is topo_min_level+1. 2251 !-- take value for the first atmosphere index, which is topo_min_level+1. 2133 2252 ts_value(1,sr) = hom(nzb+4,1,pr_palm,sr) ! E 2134 2253 ts_value(2,sr) = hom(nzb+5,1,pr_palm,sr) ! E* -
palm/trunk/SOURCE/modules.f90
r4461 r4472 25 25 ! ----------------- 26 26 ! $Id$ 27 ! Additional switch added to activate calculations in flow_statistics for the 28 ! kolmogorov length scale 29 ! 30 ! 4461 2020-03-12 16:51:59Z raasch 27 31 ! +virtual_pe_grid, communicator_configurations 28 ! 32 ! 29 33 ! 4414 2020-02-19 20:16:04Z suehring 30 ! - nzb_diff_s_inner, nzb_diff_s_outer, nzb_inner,nzb_outer, nzb_s_inner, 31 ! nzb_s_outer, nzb_u_inner, nzb_u_outer, nzb_v_inner, nzb_v_outer, 34 ! - nzb_diff_s_inner, nzb_diff_s_outer, nzb_inner,nzb_outer, nzb_s_inner, 35 ! nzb_s_outer, nzb_u_inner, nzb_u_outer, nzb_v_inner, nzb_v_outer, 32 36 ! nzb_w_inner, nzb_w_outer 33 37 ! 34 ! 38 ! 35 39 ! 4360 2020-01-07 11:25:50Z suehring 36 40 ! Introduction of wall_flags_total_0, which currently sets bits based on static 37 41 ! topography information used in wall_flags_static_0 38 ! 42 ! 39 43 ! 4340 2019-12-16 08:17:03Z Giersch 40 44 ! Flag for topography closed channel flow with symmetric boundaries introduced 41 ! 45 ! 42 46 ! 4331 2019-12-10 18:25:02Z suehring 43 47 ! - do_output_at_2m, pt_2m_av 44 ! 48 ! 45 49 ! 4329 2019-12-10 15:46:36Z motisi 46 50 ! Renamed wall_flags_0 to wall_flags_static_0 47 ! 51 ! 48 52 ! 4301 2019-11-22 12:09:09Z oliver.maas 49 53 ! removed recycling_yshift 50 ! 54 ! 51 55 ! 4297 2019-11-21 10:37:50Z oliver.maas 52 56 ! changed variable type of recycling_yshift from LOGICAL to INTEGER 53 ! 57 ! 54 58 ! 4293 2019-11-12 14:44:01Z Giersch 55 59 ! Add origin_date_time 56 ! 60 ! 57 61 ! 4146 2019-08-07 07:47:36Z gronemeier 58 62 ! Added rotation_angle 59 ! 63 ! 60 64 ! 4184 2019-08-23 08:07:40Z oliver.maas 61 ! changed allocated length of recycling_method_for_thermodynamic_quantities 65 ! changed allocated length of recycling_method_for_thermodynamic_quantities 62 66 ! from 20 to 80 characters 63 ! 67 ! 64 68 ! 4183 2019-08-23 07:33:16Z oliver.maas 65 69 ! removed recycle_absolute_quantities and raq 66 70 ! added recycling_method_for_thermodynamic_quantities 67 ! 71 ! 68 72 ! 4182 2019-08-22 15:20:23Z scharf 69 73 ! Corrected "Former revisions" section 70 ! 74 ! 71 75 ! 4173 2019-08-20 12:04:06Z gronemeier 72 76 ! add vdi_internal_controls 73 ! 77 ! 74 78 ! 4172 2019-08-20 11:55:33Z oliver.maas 75 79 ! added recycle_absolute_quantities and raq 76 ! 80 ! 77 81 ! 4168 2019-08-16 13:50:17Z suehring 78 82 ! +topo_top_ind 79 ! 83 ! 80 84 ! 4131 2019-08-02 11:06:18Z monakurppa 81 85 ! Add max_pr_salsa to control_parameters. Used in creating profile output for 82 86 ! salsa. 83 ! 87 ! 84 88 ! 4110 2019-07-22 17:05:21Z suehring 85 89 ! -advc_flags_1, advc_flags_2 86 90 ! +advc_flags_m, advc_flags_s 87 ! 91 ! 88 92 ! 4109 2019-07-22 17:00:34Z suehring 89 93 ! remove old_dt 90 ! 94 ! 91 95 ! 4079 2019-07-09 18:04:41Z suehring 92 96 ! + monotonic_limiter_z 93 ! 97 ! 94 98 ! 4069 2019-07-01 14:05:51Z Giersch 95 ! Masked output running index mid has been introduced as a local variable to 99 ! Masked output running index mid has been introduced as a local variable to 96 100 ! avoid runtime error (Loop variable has been modified) in time_integration 97 ! 101 ! 98 102 ! 4017 2019-06-06 12:16:46Z schwenkel 99 103 ! increase maximum number of virtual flights 100 ! 104 ! 101 105 ! 3987 2019-05-22 09:52:13Z kanani 102 106 ! Introduce alternative switch for debug output during timestepping 103 ! 107 ! 104 108 ! 3885 2019-04-11 11:29:34Z kanani 105 ! Changes related to global restructuring of location messages and introduction 109 ! Changes related to global restructuring of location messages and introduction 106 110 ! of additional debug messages 107 ! 111 ! 108 112 ! 3871 2019-04-08 14:38:39Z knoop 109 113 ! Initialized parameter region 110 ! 114 ! 111 115 ! 3746 2019-02-16 12:41:27Z gronemeier 112 116 ! Removed most_method 113 ! 117 ! 114 118 ! 3648 2019-01-02 16:35:46Z suehring 115 119 ! -surface_data_output +surface_output … … 128 132 !------------------------------------------------------------------------------! 129 133 MODULE advection 130 134 131 135 USE kinds 132 136 … … 135 139 REAL(wp), DIMENSION(:), ALLOCATABLE :: dex !< exponential coefficient for the Bott-Chlond advection scheme 136 140 REAL(wp), DIMENSION(:), ALLOCATABLE :: eex !< exponential coefficient for the Bott-Chlond advection scheme 137 141 138 142 SAVE 139 143 … … 150 154 !------------------------------------------------------------------------------! 151 155 MODULE mas_global_attributes 152 156 153 157 USE kinds 154 158 … … 175 179 REAL(wp), DIMENSION(:), ALLOCATABLE :: c_w_m !< mean phase velocity at outflow for w-component used in radiation boundary condition 176 180 REAL(wp), DIMENSION(:), ALLOCATABLE :: c_w_m_l !< mean phase velocity at outflow for w-component used in radiation boundary condition (local subdomain value) 177 REAL(wp), DIMENSION(:), ALLOCATABLE :: ddzu !< 1/dzu 178 REAL(wp), DIMENSION(:), ALLOCATABLE :: ddzu_pres !< modified ddzu for pressure solver 179 REAL(wp), DIMENSION(:), ALLOCATABLE :: dd2zu !< 1/(dzu(k)+dzu(k+1)) 180 REAL(wp), DIMENSION(:), ALLOCATABLE :: dzu !< vertical grid size (u-grid) 181 REAL(wp), DIMENSION(:), ALLOCATABLE :: ddzw !< 1/dzw 182 REAL(wp), DIMENSION(:), ALLOCATABLE :: dzw !< vertical grid size (w-grid) 183 REAL(wp), DIMENSION(:), ALLOCATABLE :: hyp !< hydrostatic pressure 184 REAL(wp), DIMENSION(:), ALLOCATABLE :: inflow_damping_factor !< used for turbulent inflow (non-cyclic boundary conditions) 185 REAL(wp), DIMENSION(:), ALLOCATABLE :: ptdf_x !< damping factor for potential temperature in x-direction 186 REAL(wp), DIMENSION(:), ALLOCATABLE :: ptdf_y !< damping factor for potential temperature in y-direction 187 REAL(wp), DIMENSION(:), ALLOCATABLE :: pt_init !< initial profile of potential temperature 188 REAL(wp), DIMENSION(:), ALLOCATABLE :: q_init !< initial profile of total water mixing ratio 189 !< (or total water content with active cloud physics) 190 REAL(wp), DIMENSION(:), ALLOCATABLE :: rdf !< rayleigh damping factor for velocity components 191 REAL(wp), DIMENSION(:), ALLOCATABLE :: rdf_sc !< rayleigh damping factor for scalar quantities 192 REAL(wp), DIMENSION(:), ALLOCATABLE :: ref_state !< reference state of potential temperature 181 REAL(wp), DIMENSION(:), ALLOCATABLE :: ddzu !< 1/dzu 182 REAL(wp), DIMENSION(:), ALLOCATABLE :: ddzu_pres !< modified ddzu for pressure solver 183 REAL(wp), DIMENSION(:), ALLOCATABLE :: dd2zu !< 1/(dzu(k)+dzu(k+1)) 184 REAL(wp), DIMENSION(:), ALLOCATABLE :: dzu !< vertical grid size (u-grid) 185 REAL(wp), DIMENSION(:), ALLOCATABLE :: ddzw !< 1/dzw 186 REAL(wp), DIMENSION(:), ALLOCATABLE :: dzw !< vertical grid size (w-grid) 187 REAL(wp), DIMENSION(:), ALLOCATABLE :: hyp !< hydrostatic pressure 188 REAL(wp), DIMENSION(:), ALLOCATABLE :: inflow_damping_factor !< used for turbulent inflow (non-cyclic boundary conditions) 189 REAL(wp), DIMENSION(:), ALLOCATABLE :: ptdf_x !< damping factor for potential temperature in x-direction 190 REAL(wp), DIMENSION(:), ALLOCATABLE :: ptdf_y !< damping factor for potential temperature in y-direction 191 REAL(wp), DIMENSION(:), ALLOCATABLE :: pt_init !< initial profile of potential temperature 192 REAL(wp), DIMENSION(:), ALLOCATABLE :: q_init !< initial profile of total water mixing ratio 193 !< (or total water content with active cloud physics) 194 REAL(wp), DIMENSION(:), ALLOCATABLE :: rdf !< rayleigh damping factor for velocity components 195 REAL(wp), DIMENSION(:), ALLOCATABLE :: rdf_sc !< rayleigh damping factor for scalar quantities 196 REAL(wp), DIMENSION(:), ALLOCATABLE :: ref_state !< reference state of potential temperature 193 197 !< (and density in case of ocean simulation) 194 198 REAL(wp), DIMENSION(:), ALLOCATABLE :: s_init !< initial profile of passive scalar concentration … … 215 219 REAL(wp), DIMENSION(:,:), ALLOCATABLE :: diss_s_diss !< artificial numerical dissipation flux at south face of grid box - TKE dissipation 216 220 REAL(wp), DIMENSION(:,:), ALLOCATABLE :: diss_s_e !< artificial numerical dissipation flux at south face of grid box - subgrid-scale TKE 217 REAL(wp), DIMENSION(:,:), ALLOCATABLE :: diss_s_nc !< artificial numerical dissipation flux at south face of grid box - clouddrop-number concentration 218 REAL(wp), DIMENSION(:,:), ALLOCATABLE :: diss_s_nr !< artificial numerical dissipation flux at south face of grid box - raindrop-number concentration 219 REAL(wp), DIMENSION(:,:), ALLOCATABLE :: diss_s_pt !< artificial numerical dissipation flux at south face of grid box - potential temperature 220 REAL(wp), DIMENSION(:,:), ALLOCATABLE :: diss_s_q !< artificial numerical dissipation flux at south face of grid box - mixing ratio 221 REAL(wp), DIMENSION(:,:), ALLOCATABLE :: diss_s_qc !< artificial numerical dissipation flux at south face of grid box - cloudwater 222 REAL(wp), DIMENSION(:,:), ALLOCATABLE :: diss_s_qr !< artificial numerical dissipation flux at south face of grid box - rainwater 221 REAL(wp), DIMENSION(:,:), ALLOCATABLE :: diss_s_nc !< artificial numerical dissipation flux at south face of grid box - clouddrop-number concentration 222 REAL(wp), DIMENSION(:,:), ALLOCATABLE :: diss_s_nr !< artificial numerical dissipation flux at south face of grid box - raindrop-number concentration 223 REAL(wp), DIMENSION(:,:), ALLOCATABLE :: diss_s_pt !< artificial numerical dissipation flux at south face of grid box - potential temperature 224 REAL(wp), DIMENSION(:,:), ALLOCATABLE :: diss_s_q !< artificial numerical dissipation flux at south face of grid box - mixing ratio 225 REAL(wp), DIMENSION(:,:), ALLOCATABLE :: diss_s_qc !< artificial numerical dissipation flux at south face of grid box - cloudwater 226 REAL(wp), DIMENSION(:,:), ALLOCATABLE :: diss_s_qr !< artificial numerical dissipation flux at south face of grid box - rainwater 223 227 REAL(wp), DIMENSION(:,:), ALLOCATABLE :: diss_s_s !< artificial numerical dissipation flux at south face of grid box - passive scalar 224 228 REAL(wp), DIMENSION(:,:), ALLOCATABLE :: diss_s_sa !< artificial numerical dissipation flux at south face of grid box - salinity … … 230 234 REAL(wp), DIMENSION(:,:), ALLOCATABLE :: flux_s_diss !< 6th-order advective flux at south face of grid box - TKE dissipation 231 235 REAL(wp), DIMENSION(:,:), ALLOCATABLE :: flux_s_e !< 6th-order advective flux at south face of grid box - subgrid-scale TKE 232 REAL(wp), DIMENSION(:,:), ALLOCATABLE :: flux_s_nc !< 6th-order advective flux at south face of grid box - clouddrop-number concentration 233 REAL(wp), DIMENSION(:,:), ALLOCATABLE :: flux_s_nr !< 6th-order advective flux at south face of grid box - raindrop-number concentration 234 REAL(wp), DIMENSION(:,:), ALLOCATABLE :: flux_s_pt !< 6th-order advective flux at south face of grid box - potential temperature 235 REAL(wp), DIMENSION(:,:), ALLOCATABLE :: flux_s_q !< 6th-order advective flux at south face of grid box - mixing ratio 236 REAL(wp), DIMENSION(:,:), ALLOCATABLE :: flux_s_nc !< 6th-order advective flux at south face of grid box - clouddrop-number concentration 237 REAL(wp), DIMENSION(:,:), ALLOCATABLE :: flux_s_nr !< 6th-order advective flux at south face of grid box - raindrop-number concentration 238 REAL(wp), DIMENSION(:,:), ALLOCATABLE :: flux_s_pt !< 6th-order advective flux at south face of grid box - potential temperature 239 REAL(wp), DIMENSION(:,:), ALLOCATABLE :: flux_s_q !< 6th-order advective flux at south face of grid box - mixing ratio 236 240 REAL(wp), DIMENSION(:,:), ALLOCATABLE :: flux_s_qc !< 6th-order advective flux at south face of grid box - cloudwater 237 241 REAL(wp), DIMENSION(:,:), ALLOCATABLE :: flux_s_qr !< 6th-order advective flux at south face of grid box - rainwater … … 246 250 REAL(wp), DIMENSION(:,:), ALLOCATABLE :: mean_inflow_profiles !< used for turbulent inflow (non-cyclic boundary conditions) 247 251 REAL(wp), DIMENSION(:,:), ALLOCATABLE :: precipitation_amount !< precipitation amount due to gravitational settling (bulk microphysics) 248 REAL(wp), DIMENSION(:,:), ALLOCATABLE :: pt_slope_ref !< potential temperature in rotated coordinate system 249 !< (in case of sloped surface) 252 REAL(wp), DIMENSION(:,:), ALLOCATABLE :: pt_slope_ref !< potential temperature in rotated coordinate system 253 !< (in case of sloped surface) 250 254 REAL(wp), DIMENSION(:,:), ALLOCATABLE :: total_2d_a !< horizontal array to store the total domain data, used for atmosphere-ocean coupling (atmosphere data) 251 255 REAL(wp), DIMENSION(:,:), ALLOCATABLE :: total_2d_o !< horizontal array to store the total domain data, used for atmosphere-ocean coupling (ocean data) 252 256 253 257 REAL(wp), DIMENSION(:,:,:), ALLOCATABLE :: d !< divergence 254 258 REAL(wp), DIMENSION(:,:,:), ALLOCATABLE :: de_dx !< gradient of sgs tke in x-direction (lpm) … … 281 285 REAL(wp), DIMENSION(:,:,:), ALLOCATABLE :: flux_l_v !< 6th-order advective flux at south face of grid box - v-component 282 286 REAL(wp), DIMENSION(:,:,:), ALLOCATABLE :: flux_l_w !< 6th-order advective flux at south face of grid box - w-component 283 REAL(wp), DIMENSION(:,:,:), ALLOCATABLE, TARGET :: kh !< eddy diffusivity for heat 287 REAL(wp), DIMENSION(:,:,:), ALLOCATABLE, TARGET :: kh !< eddy diffusivity for heat 284 288 REAL(wp), DIMENSION(:,:,:), ALLOCATABLE, TARGET :: km !< eddy diffusivity for momentum 285 289 REAL(wp), DIMENSION(:,:,:), ALLOCATABLE :: prr !< rain rate … … 309 313 REAL(wp), DIMENSION(:,:,:), ALLOCATABLE, TARGET :: prho_1 !< pointer for swapping of timelevels for respective quantity 310 314 REAL(wp), DIMENSION(:,:,:), ALLOCATABLE, TARGET :: nc_1 !< pointer for swapping of timelevels for respective quantity 311 REAL(wp), DIMENSION(:,:,:), ALLOCATABLE, TARGET :: nc_2 !< pointer for swapping of timelevels for respective quantity 315 REAL(wp), DIMENSION(:,:,:), ALLOCATABLE, TARGET :: nc_2 !< pointer for swapping of timelevels for respective quantity 312 316 REAL(wp), DIMENSION(:,:,:), ALLOCATABLE, TARGET :: nc_3 !< pointer for swapping of timelevels for respective quantity 313 317 REAL(wp), DIMENSION(:,:,:), ALLOCATABLE, TARGET :: nr_1 !< pointer for swapping of timelevels for respective quantity 314 REAL(wp), DIMENSION(:,:,:), ALLOCATABLE, TARGET :: nr_2 !< pointer for swapping of timelevels for respective quantity 318 REAL(wp), DIMENSION(:,:,:), ALLOCATABLE, TARGET :: nr_2 !< pointer for swapping of timelevels for respective quantity 315 319 REAL(wp), DIMENSION(:,:,:), ALLOCATABLE, TARGET :: nr_3 !< pointer for swapping of timelevels for respective quantity 316 320 REAL(wp), DIMENSION(:,:,:), ALLOCATABLE, TARGET :: pt_1 !< pointer for swapping of timelevels for respective quantity … … 426 430 !------------------------------------------------------------------------------! 427 431 MODULE averaging 428 432 429 433 USE kinds 430 434 … … 458 462 !< (or total water content with active cloud physics) 459 463 REAL(wp), DIMENSION(:,:,:), ALLOCATABLE, TARGET :: qc_av !< avg. cloud water content 460 REAL(wp), DIMENSION(:,:,:), ALLOCATABLE, TARGET :: ql_av !< avg. liquid water content 461 REAL(wp), DIMENSION(:,:,:), ALLOCATABLE, TARGET :: ql_c_av !< avg. change in liquid water content due to 464 REAL(wp), DIMENSION(:,:,:), ALLOCATABLE, TARGET :: ql_av !< avg. liquid water content 465 REAL(wp), DIMENSION(:,:,:), ALLOCATABLE, TARGET :: ql_c_av !< avg. change in liquid water content due to 462 466 !< condensation/evaporation during last time step 463 467 REAL(wp), DIMENSION(:,:,:), ALLOCATABLE, TARGET :: ql_v_av !< avg. volume of liquid water … … 468 472 REAL(wp), DIMENSION(:,:,:), ALLOCATABLE, TARGET :: s_av !< avg. passive scalar 469 473 REAL(wp), DIMENSION(:,:,:), ALLOCATABLE, TARGET :: sa_av !< avg. salinity 470 REAL(wp), DIMENSION(:,:,:), ALLOCATABLE, TARGET :: u_av !< avg. horizontal velocity component u 474 REAL(wp), DIMENSION(:,:,:), ALLOCATABLE, TARGET :: u_av !< avg. horizontal velocity component u 471 475 REAL(wp), DIMENSION(:,:,:), ALLOCATABLE, TARGET :: v_av !< avg. horizontal velocity component v 472 476 REAL(wp), DIMENSION(:,:,:), ALLOCATABLE, TARGET :: vpt_av !< avg. virtual potential temperature 473 477 REAL(wp), DIMENSION(:,:,:), ALLOCATABLE, TARGET :: w_av !< avg. vertical velocity component 474 478 475 479 END MODULE averaging 476 480 477 481 478 482 !------------------------------------------------------------------------------! 479 483 ! Description: … … 489 493 LOGICAL :: opened_before !< file is currently closed, but has been openend before 490 494 END TYPE file_status 491 495 492 496 INTEGER, PARAMETER :: mask_xyz_dimension = 100 !< limit of mask dimensions (100 points in each direction) 493 497 INTEGER, PARAMETER :: max_masks = 50 !< maximum number of masks … … 532 536 CHARACTER (LEN=20) :: bc_uv_b = 'dirichlet' !< namelist parameter 533 537 CHARACTER (LEN=20) :: bc_uv_t = 'dirichlet' !< namelist parameter 534 CHARACTER (LEN=20) :: coupling_mode = 'uncoupled' !< coupling mode for atmosphere-ocean coupling 538 CHARACTER (LEN=20) :: coupling_mode = 'uncoupled' !< coupling mode for atmosphere-ocean coupling 535 539 CHARACTER (LEN=20) :: coupling_mode_remote = 'uncoupled' !< coupling mode of the remote process in case of coupled atmosphere-ocean runs 536 540 CHARACTER (LEN=20) :: dissipation_1d = 'detering' !< namelist parameter … … 539 543 CHARACTER (LEN=20) :: random_generator = 'random-parallel' !< namelist parameter 540 544 CHARACTER (LEN=80) :: recycling_method_for_thermodynamic_quantities = 'turbulent_fluctuation' !< namelist parameter 541 CHARACTER (LEN=20) :: reference_state = 'initial_profile' !< namelist parameter 542 CHARACTER (LEN=20) :: timestep_scheme = 'runge-kutta-3' !< namelist parameter 545 CHARACTER (LEN=20) :: reference_state = 'initial_profile' !< namelist parameter 546 CHARACTER (LEN=20) :: timestep_scheme = 'runge-kutta-3' !< namelist parameter 543 547 CHARACTER (LEN=20) :: turbulence_closure = 'Moeng_Wyngaard' !< namelist parameter 544 CHARACTER (LEN=40) :: topography = 'flat' !< namelist parameter 548 CHARACTER (LEN=40) :: topography = 'flat' !< namelist parameter 545 549 CHARACTER (LEN=64) :: host = '????' !< configuration identifier as given by palmrun option -c, ENVPAR namelist parameter provided by palmrun 546 550 CHARACTER (LEN=80) :: log_message !< user-defined message for debugging (sse data_log.f90) … … 554 558 CHARACTER (LEN=varnamelength), DIMENSION(500) :: data_output = ' ' !< namelist parameter 555 559 CHARACTER (LEN=varnamelength), DIMENSION(500) :: data_output_user = ' ' !< namelist parameter 556 CHARACTER (LEN=varnamelength), DIMENSION(500) :: doav = ' ' !< label array for multi-dimensional, 560 CHARACTER (LEN=varnamelength), DIMENSION(500) :: doav = ' ' !< label array for multi-dimensional, 557 561 !< averaged output quantities 558 562 559 563 CHARACTER (LEN=varnamelength), DIMENSION(max_masks,100) :: data_output_masks = ' ' !< namelist parameter 560 564 CHARACTER (LEN=varnamelength), DIMENSION(max_masks,100) :: data_output_masks_user = ' ' !< namelist parameter 561 565 562 566 CHARACTER (LEN=varnamelength), DIMENSION(300) :: data_output_pr = ' ' !< namelist parameter 563 567 564 568 CHARACTER (LEN=varnamelength), DIMENSION(200) :: data_output_pr_user = ' ' !< namelist parameter 565 566 CHARACTER (LEN=varnamelength), DIMENSION(max_masks,0:1,100) :: domask = ' ' !< label array for multi-dimensional, 569 570 CHARACTER (LEN=varnamelength), DIMENSION(max_masks,0:1,100) :: domask = ' ' !< label array for multi-dimensional, 567 571 !< masked output quantities 568 572 569 573 CHARACTER (LEN=varnamelength), DIMENSION(0:1,500) :: do2d = ' ' !< label array for 2d output quantities 570 574 CHARACTER (LEN=varnamelength), DIMENSION(0:1,500) :: do3d = ' ' !< label array for 3d output quantities … … 572 576 INTEGER(iwp), PARAMETER :: fl_max = 500 !< maximum number of virtual-flight measurements 573 577 INTEGER(iwp), PARAMETER :: var_fl_max = 20 !< maximum number of different sampling variables in virtual flight measurements 574 578 575 579 INTEGER(iwp) :: abort_mode = 1 !< abort condition (nested runs) 576 580 INTEGER(iwp) :: agt_time_count = 0 !< number of output intervals for agent data output … … 642 646 INTEGER(iwp) :: timestep_count = 0 !< number of timesteps carried out since the beginning of the initial run 643 647 INTEGER(iwp) :: y_shift = 0 !< namelist parameter 644 648 645 649 INTEGER(iwp) :: dist_nxl(0:1) !< left boundary of disturbance region 646 650 INTEGER(iwp) :: dist_nxr(0:1) !< right boundary of disturbance region … … 662 666 INTEGER(iwp) :: pt_vertical_gradient_level_ind(10) = -9999 !< grid index values of pt_vertical_gradient_level(s) 663 667 INTEGER(iwp) :: q_vertical_gradient_level_ind(10) = -9999 !< grid index values of q_vertical_gradient_level(s) 664 INTEGER(iwp) :: s_vertical_gradient_level_ind(10) = -9999 !< grid index values of s_vertical_gradient_level(s) 668 INTEGER(iwp) :: s_vertical_gradient_level_ind(10) = -9999 !< grid index values of s_vertical_gradient_level(s) 665 669 INTEGER(iwp) :: section(100,3) !< collective array for section_xy/xz/yz 666 670 INTEGER(iwp) :: section_xy(100) = -9999 !< namelist parameter … … 739 743 LOGICAL :: humidity_remote = .FALSE. !< switch for receiving near-surface humidity flux (atmosphere-ocean coupling) 740 744 LOGICAL :: indoor_model = .FALSE. !< switch for indoor-climate and energy-demand model 745 LOGICAL :: kolmogorov_length_scale = .FALSE. !< switch to activate calculations in flow_statistics for the kolmogorov length scale 741 746 LOGICAL :: large_scale_forcing = .FALSE. !< namelist parameter 742 747 LOGICAL :: large_scale_subsidence = .FALSE. !< namelist parameter … … 750 755 LOGICAL :: mg_switch_to_pe0 = .FALSE. !< internal multigrid switch for steering the ghost point exchange in case that data has been collected on PE0 751 756 LOGICAL :: monotonic_limiter_z = .FALSE. !< use monotonic flux limiter for vertical scalar advection 752 LOGICAL :: nesting_offline = .FALSE. !< flag controlling offline nesting in COSMO model 757 LOGICAL :: nesting_offline = .FALSE. !< flag controlling offline nesting in COSMO model 753 758 LOGICAL :: neutral = .FALSE. !< namelist parameter 754 759 LOGICAL :: nudging = .FALSE. !< namelist parameter … … 804 809 LOGICAL, DIMENSION(max_masks) :: mask_surface = .FALSE. !< flag for surface-following masked output 805 810 806 REAL(wp) :: advected_distance_x = 0.0_wp !< advected distance of model domain along x 807 !< (galilei transformation) 808 REAL(wp) :: advected_distance_y = 0.0_wp !< advected distance of model domain along y 811 REAL(wp) :: advected_distance_x = 0.0_wp !< advected distance of model domain along x 812 !< (galilei transformation) 813 REAL(wp) :: advected_distance_y = 0.0_wp !< advected distance of model domain along y 809 814 !< (galilei transformation) 810 815 REAL(wp) :: alpha_surface = 0.0_wp !< namelist parameter … … 830 835 REAL(wp) :: cos_alpha_surface !< cosine of alpha_surface 831 836 REAL(wp) :: coupling_start_time = 0.0_wp !< namelist parameter 832 REAL(wp) :: days_since_reference_point = 0.0_wp !< days after atmosphere-ocean coupling has been activated, 833 !< or after spinup phase of LSM has been finished 837 REAL(wp) :: days_since_reference_point = 0.0_wp !< days after atmosphere-ocean coupling has been activated, 838 !< or after spinup phase of LSM has been finished 834 839 REAL(wp) :: disturbance_amplitude = 0.25_wp !< namelist parameter 835 840 REAL(wp) :: disturbance_energy_limit = 0.01_wp !< namelist parameter … … 886 891 REAL(wp) :: pt_damping_width = 0.0_wp !< namelist parameter 887 892 REAL(wp) :: pt_reference = 9999999.9_wp !< namelist parameter 888 REAL(wp) :: pt_slope_offset = 0.0_wp !< temperature difference between left and right 893 REAL(wp) :: pt_slope_offset = 0.0_wp !< temperature difference between left and right 889 894 !< boundary of total domain 890 895 REAL(wp) :: pt_surface = 300.0_wp !< namelist parameter … … 935 940 REAL(wp) :: time_do3d = 0.0_wp !< time since last 3d output 936 941 REAL(wp) :: time_do_av = 0.0_wp !< time since last averaged-data output 937 REAL(wp) :: time_do_sla = 0.0_wp !< time since last 942 REAL(wp) :: time_do_sla = 0.0_wp !< time since last 938 943 REAL(wp) :: time_restart = 9999999.9_wp !< time at which run shall be terminated and restarted 939 944 REAL(wp) :: time_run_control = 0.0_wp !< time since last RUN_CONTROL output … … 949 954 REAL(wp) :: tunnel_width_y = 9999999.9_wp !< namelist parameter 950 955 REAL(wp) :: tunnel_wall_depth = 9999999.9_wp !< namelist parameter 951 REAL(wp) :: ug_surface = 0.0_wp !< namelist parameter 952 REAL(wp) :: u_bulk = 0.0_wp !< namelist parameter 956 REAL(wp) :: ug_surface = 0.0_wp !< namelist parameter 957 REAL(wp) :: u_bulk = 0.0_wp !< namelist parameter 953 958 REAL(wp) :: u_gtrans = 0.0_wp !< transformed wind component (galilei transformation) 954 959 REAL(wp) :: vg_surface = 0.0_wp !< namelist parameter … … 995 1000 REAL(wp) :: wall_humidityflux(0:5) = 0.0_wp !< namelist parameter 996 1001 REAL(wp) :: wall_salinityflux(0:5) = 0.0_wp !< namelist parameter 997 REAL(wp) :: wall_scalarflux(0:5) = 0.0_wp !< namelist parameter 998 REAL(wp) :: subs_vertical_gradient(10) = 0.0_wp !< namelist parameter 1002 REAL(wp) :: wall_scalarflux(0:5) = 0.0_wp !< namelist parameter 1003 REAL(wp) :: subs_vertical_gradient(10) = 0.0_wp !< namelist parameter 999 1004 REAL(wp) :: subs_vertical_gradient_level(10) = -9999999.9_wp !< namelist parameter 1000 1005 … … 1004 1009 REAL(wp), DIMENSION(max_masks,mask_xyz_dimension) :: mask_y = -1.0_wp !< namelist parameter 1005 1010 REAL(wp), DIMENSION(max_masks,mask_xyz_dimension) :: mask_z = -1.0_wp !< namelist parameter 1006 1011 1007 1012 REAL(wp), DIMENSION(max_masks,3) :: mask_x_loop = -1.0_wp !< namelist parameter 1008 1013 REAL(wp), DIMENSION(max_masks,3) :: mask_y_loop = -1.0_wp !< namelist parameter 1009 1014 REAL(wp), DIMENSION(max_masks,3) :: mask_z_loop = -1.0_wp !< namelist parameter 1010 1015 1011 1016 ! 1012 1017 !-- internal mask arrays ("mask,dimension,selection") … … 1030 1035 REAL(wp) :: ddx !< 1/dx 1031 1036 REAL(wp) :: ddx2 !< 1/dx2 1032 REAL(wp) :: dx = 1.0_wp !< horizontal grid size (along x-direction) 1037 REAL(wp) :: dx = 1.0_wp !< horizontal grid size (along x-direction) 1033 1038 REAL(wp) :: dx2 !< dx*dx 1034 1039 REAL(wp) :: ddy !< 1/dy … … 1040 1045 REAL(wp), DIMENSION(:), ALLOCATABLE :: ddy2_mg !< 1/dy_l**2 (dy_l: grid spacing along y on different multigrid level) 1041 1046 1042 REAL(wp), DIMENSION(:,:), ALLOCATABLE :: zu_s_inner !< height of topography top on scalar grid 1043 REAL(wp), DIMENSION(:,:), ALLOCATABLE :: zw_w_inner !< height of topography top on w grid 1047 REAL(wp), DIMENSION(:,:), ALLOCATABLE :: zu_s_inner !< height of topography top on scalar grid 1048 REAL(wp), DIMENSION(:,:), ALLOCATABLE :: zw_w_inner !< height of topography top on w grid 1044 1049 1045 1050 SAVE … … 1090 1095 INTEGER(idp), DIMENSION(:), ALLOCATABLE :: ngp_3d !< number of grid points of the total domain 1091 1096 INTEGER(idp), DIMENSION(:), ALLOCATABLE :: ngp_3d_inner !< ! need to have 64 bit for grids > 2E9 1092 1097 1093 1098 INTEGER(iwp), DIMENSION(:), ALLOCATABLE :: ngp_2dh !< number of grid points of a horizontal cross section through the total domain 1094 1099 INTEGER(iwp), DIMENSION(:), ALLOCATABLE :: nxl_mg !< left-most grid index of subdomain on different multigrid level … … 1105 1110 INTEGER(iwp), DIMENSION(:,:,:), POINTER :: flags !< pointer to wall_flags_1-10 1106 1111 1107 INTEGER(iwp), DIMENSION(:,:,:), ALLOCATABLE, TARGET :: wall_flags_1 !< topograpyh masking flag on multigrid level 1 1108 INTEGER(iwp), DIMENSION(:,:,:), ALLOCATABLE, TARGET :: wall_flags_2 !< topograpyh masking flag on multigrid level 2 1109 INTEGER(iwp), DIMENSION(:,:,:), ALLOCATABLE, TARGET :: wall_flags_3 !< topograpyh masking flag on multigrid level 3 1110 INTEGER(iwp), DIMENSION(:,:,:), ALLOCATABLE, TARGET :: wall_flags_4 !< topograpyh masking flag on multigrid level 4 1111 INTEGER(iwp), DIMENSION(:,:,:), ALLOCATABLE, TARGET :: wall_flags_5 !< topograpyh masking flag on multigrid level 5 1112 INTEGER(iwp), DIMENSION(:,:,:), ALLOCATABLE, TARGET :: wall_flags_6 !< topograpyh masking flag on multigrid level 6 1113 INTEGER(iwp), DIMENSION(:,:,:), ALLOCATABLE, TARGET :: wall_flags_7 !< topograpyh masking flag on multigrid level 7 1114 INTEGER(iwp), DIMENSION(:,:,:), ALLOCATABLE, TARGET :: wall_flags_8 !< topograpyh masking flag on multigrid level 8 1115 INTEGER(iwp), DIMENSION(:,:,:), ALLOCATABLE, TARGET :: wall_flags_9 !< topograpyh masking flag on multigrid level 9 1116 INTEGER(iwp), DIMENSION(:,:,:), ALLOCATABLE, TARGET :: wall_flags_10 !< topograpyh masking flag on multigrid level 10 1112 INTEGER(iwp), DIMENSION(:,:,:), ALLOCATABLE, TARGET :: wall_flags_1 !< topograpyh masking flag on multigrid level 1 1113 INTEGER(iwp), DIMENSION(:,:,:), ALLOCATABLE, TARGET :: wall_flags_2 !< topograpyh masking flag on multigrid level 2 1114 INTEGER(iwp), DIMENSION(:,:,:), ALLOCATABLE, TARGET :: wall_flags_3 !< topograpyh masking flag on multigrid level 3 1115 INTEGER(iwp), DIMENSION(:,:,:), ALLOCATABLE, TARGET :: wall_flags_4 !< topograpyh masking flag on multigrid level 4 1116 INTEGER(iwp), DIMENSION(:,:,:), ALLOCATABLE, TARGET :: wall_flags_5 !< topograpyh masking flag on multigrid level 5 1117 INTEGER(iwp), DIMENSION(:,:,:), ALLOCATABLE, TARGET :: wall_flags_6 !< topograpyh masking flag on multigrid level 6 1118 INTEGER(iwp), DIMENSION(:,:,:), ALLOCATABLE, TARGET :: wall_flags_7 !< topograpyh masking flag on multigrid level 7 1119 INTEGER(iwp), DIMENSION(:,:,:), ALLOCATABLE, TARGET :: wall_flags_8 !< topograpyh masking flag on multigrid level 8 1120 INTEGER(iwp), DIMENSION(:,:,:), ALLOCATABLE, TARGET :: wall_flags_9 !< topograpyh masking flag on multigrid level 9 1121 INTEGER(iwp), DIMENSION(:,:,:), ALLOCATABLE, TARGET :: wall_flags_10 !< topograpyh masking flag on multigrid level 10 1117 1122 1118 1123 INTEGER(iwp), DIMENSION(:,:,:), ALLOCATABLE :: advc_flags_m !< flags used to degrade order of advection scheme for momentum … … 1221 1226 CHARACTER(LEN=2) :: send_receive = 'al' !< 1222 1227 CHARACTER(LEN=7) :: myid_char = '' !< character string containing processor id number 1223 1228 1224 1229 INTEGER(iwp) :: comm1dx !< communicator for domain decomposition along x 1225 1230 INTEGER(iwp) :: comm1dy !< communicator for domain decomposition along y … … 1256 1261 INTEGER(iwp) :: tasks_per_node = -9999 !< MPI tasks per compute node 1257 1262 INTEGER(iwp) :: threads_per_task = 1 !< number of OPENMP threads per MPI task 1258 INTEGER(iwp) :: type_x !< derived MPI datatype for 2-D ghost-point exchange - north / south 1259 INTEGER(iwp) :: type_xy !< derived MPI datatype for 2-D ghost-point exchange - north / south 1260 INTEGER(iwp) :: type_y !< derived MPI datatype for 2-D exchange in atmosphere-ocean coupler 1263 INTEGER(iwp) :: type_x !< derived MPI datatype for 2-D ghost-point exchange - north / south 1264 INTEGER(iwp) :: type_xy !< derived MPI datatype for 2-D ghost-point exchange - north / south 1265 INTEGER(iwp) :: type_y !< derived MPI datatype for 2-D exchange in atmosphere-ocean coupler 1261 1266 1262 1267 INTEGER(iwp) :: pdims(2) = 1 !< number of processors along x-y dimension 1263 1268 INTEGER(iwp) :: req(100) !< MPI return variable indicating if send-receive operation is finished 1264 1269 1265 INTEGER(iwp), DIMENSION(:,:), ALLOCATABLE :: hor_index_bounds !< horizontal index bounds 1270 INTEGER(iwp), DIMENSION(:,:), ALLOCATABLE :: hor_index_bounds !< horizontal index bounds 1266 1271 INTEGER(iwp), DIMENSION(:,:), ALLOCATABLE :: hor_index_bounds_previous_run !< horizontal index bounds of previous run 1267 1272 … … 1283 1288 INTEGER(iwp) :: pcoord(2) !< PE coordinates along x and y 1284 1289 INTEGER(iwp) :: status(MPI_STATUS_SIZE) !< MPI status variable used in various MPI calls 1285 1290 1286 1291 INTEGER(iwp), DIMENSION(MPI_STATUS_SIZE,100) :: wait_stat !< MPI status variable used in various MPI calls 1287 1292 1288 1293 INTEGER(iwp) :: type_x_byte !< derived MPI datatype for 2-D 8-bit integer ghost-point exchange - north / south 1289 1294 INTEGER(iwp) :: type_y_byte !< derived MPI datatype for 2-D integer ghost-point exchange - left / right 1290 1295 1291 1296 INTEGER(iwp), DIMENSION(:), ALLOCATABLE :: ngp_xz !< number of ghost points in xz-plane on different multigrid level 1292 1297 INTEGER(iwp), DIMENSION(:), ALLOCATABLE :: ngp_xz_int !< number of ghost points in xz-plane on different multigrid level … … 1297 1302 INTEGER(iwp), DIMENSION(:), ALLOCATABLE :: type_xz_int !< derived MPI datatype for 3-D integer ghost-point exchange - north / south 1298 1303 INTEGER(iwp), DIMENSION(:), ALLOCATABLE :: type_y_int !< derived MPI datatype for 2-D integer ghost-point exchange - left / right 1299 INTEGER(iwp), DIMENSION(:), ALLOCATABLE :: type_yz !< derived MPI datatype for 3-D integer ghost-point exchange - left / right 1304 INTEGER(iwp), DIMENSION(:), ALLOCATABLE :: type_yz !< derived MPI datatype for 3-D integer ghost-point exchange - left / right 1300 1305 INTEGER(iwp), DIMENSION(:), ALLOCATABLE :: type_yz_int !< derived MPI datatype for 3-D integer ghost-point exchange - left / right 1301 1306 … … 1354 1359 INTEGER(iwp) :: dopr_index(300) = 0 !< index number of respective profile quantity 1355 1360 INTEGER(iwp) :: dopr_initial_index(300) = 0 !< index number of initial profiles to be output 1356 1361 1357 1362 SAVE 1358 1363 … … 1370 1375 CHARACTER (LEN=40) :: region(0:9) = & !< label for statistic region 1371 1376 'total domain ' 1372 1377 1373 1378 INTEGER(iwp) :: pr_palm = 200 !< maximum number of output profiles 1374 1379 INTEGER(iwp) :: statistic_regions = 0 !< identifier for statistic regions … … 1377 1382 INTEGER(iwp) :: v_max_ijk(3) = -1 !< index values (i,j,k) of location where v_max occurs 1378 1383 INTEGER(iwp) :: w_max_ijk(3) = -1 !< index values (i,j,k) of location where w_max occurs 1379 1384 1380 1385 LOGICAL :: flow_statistics_called = .FALSE. !< flag that tells other routines if flow statistics was executed 1381 1386 !< (after each timestep) 1382 1387 1383 1388 REAL(wp) :: u_max = 0.0_wp !< maximum of absolute u-veloctiy in entire domain 1384 1389 REAL(wp) :: v_max = 0.0_wp !< maximum of absolute v-veloctiy in entire domain … … 1386 1391 1387 1392 REAL(wp), DIMENSION(2) :: z_i !< inversion height 1388 1393 1389 1394 REAL(wp), DIMENSION(:), ALLOCATABLE :: mean_surface_level_height !< mean surface level height for the different statistic regions 1390 REAL(wp), DIMENSION(:), ALLOCATABLE :: sums_divnew_l !< subdomain sum (_l) of divergence after pressure 1395 REAL(wp), DIMENSION(:), ALLOCATABLE :: sums_divnew_l !< subdomain sum (_l) of divergence after pressure 1391 1396 !< solver call (new) 1392 1397 REAL(wp), DIMENSION(:), ALLOCATABLE :: sums_divold_l !< subdomain sum (_l) of divergence before pressure … … 1394 1399 REAL(wp), DIMENSION(:), ALLOCATABLE :: weight_substep !< weighting factor for substeps in timestepping 1395 1400 REAL(wp), DIMENSION(:), ALLOCATABLE :: weight_pres !< substep weighting factor for pressure solver 1396 1401 1397 1402 REAL(wp), DIMENSION(:,:), ALLOCATABLE :: sums !< global sum array for the various output quantities 1398 1403 REAL(wp), DIMENSION(:,:), ALLOCATABLE :: sums_salsa_ws_l !< subdomain sum of vertical salsa flux w's' (5th-order advection scheme only) … … 1413 1418 REAL(wp), DIMENSION(:,:), ALLOCATABLE :: sums_wsss_ws_l !< subdomain sum of vertical passive scalar flux w's' (5th-order advection scheme only) 1414 1419 REAL(wp), DIMENSION(:,:), ALLOCATABLE :: sums_ls_l !< subdomain sum of large scale forcing and nudging tendencies 1415 1420 1416 1421 REAL(wp), DIMENSION(:,:,:), ALLOCATABLE :: hom_sum !< sum array for horizontal mean 1417 1422 REAL(wp), DIMENSION(:,:,:), ALLOCATABLE :: rmask !< REAL flag array (0.0 or 1.0) for statistic regions 1418 1423 REAL(wp), DIMENSION(:,:,:), ALLOCATABLE :: sums_l !< subdomain sum (_l) gathered for various quantities 1419 1424 REAL(wp), DIMENSION(:,:,:), ALLOCATABLE :: sums_l_l !< subdomain sum (_l) of mixing length from diffusivities 1420 1425 1421 1426 REAL(wp), DIMENSION(:,:,:,:), ALLOCATABLE :: hom !< horizontal mean of various quantities (profiles/timeseries) 1422 1427 … … 1452 1457 INTEGER(iwp) :: nzt_y !< internal index bound for transpositions 1453 1458 INTEGER(iwp) :: nzt_yd !< internal index bound for transpositions 1454 1459 1455 1460 SAVE 1456 1461 -
palm/trunk/SOURCE/time_integration.f90
r4466 r4472 20 20 ! Current revisions: 21 21 ! ------------------ 22 ! 23 ! 22 ! 23 ! 24 24 ! Former revisions: 25 25 ! ----------------- 26 26 ! $Id$ 27 ! OPENACC COPYIN directive for ddx and ddy added 28 ! 29 ! 4466 2020-03-20 16:14:41Z suehring 27 30 ! Add advection fluxes to ACC copyin 28 31 ! … … 289 292 ONLY: flight_measurement 290 293 294 USE grid_variables, & 295 ONLY: ddx, ddy 296 291 297 USE indices, & 292 298 ONLY: nbgp, nx, nxl, nxlg, nxr, nxrg, nzb, nzt … … 524 530 !$ACC DATA & 525 531 !$ACC COPYIN(tsc(1:5)) 532 533 ! 534 !-- Copy data from grid_variables 535 !$ACC DATA & 536 !$ACC COPYIN(ddx, ddy) 526 537 527 538 ! … … 565 576 !$ACC COPY(sums_wsss_ws_l(nzb:nzt+1,0)) & 566 577 !$ACC COPY(sums_salsa_ws_l(nzb:nzt+1,0)) 578 579 ! 580 !-- Next statement is to avoid compiler warnings about unused variables. Please 581 !-- remove in case that you are using them. ddx and ddy need to be defined in 582 !-- time_integration because of ACC COPYIN directive. 583 ddx = ddx 584 ddy = ddy 567 585 568 586 #if defined( _OPENACC ) … … 1727 1745 !$ACC END DATA 1728 1746 !$ACC END DATA 1747 !$ACC END DATA 1729 1748 1730 1749 #if defined( __parallel )
Note: See TracChangeset
for help on using the changeset viewer.