Changeset 4172 for palm/trunk
- Timestamp:
- Aug 20, 2019 11:55:33 AM (5 years ago)
- Location:
- palm/trunk/SOURCE
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
palm/trunk/SOURCE/check_parameters.f90
r4142 r4172 25 25 ! ----------------- 26 26 ! $Id$ 27 ! added conversion from recycle_absolute_quantities to raq for recycling of 28 ! absolute quantities and added error message PA184 for not implemented quantities 29 ! 30 ! 4142 2019-08-05 12:38:31Z suehring 27 31 ! Consider spinup in number of output timesteps for averaged 2D output (merge 28 32 ! from branch resler). … … 866 870 INTEGER(iwp) :: k !< loop index 867 871 INTEGER(iwp) :: kk !< loop index 872 INTEGER(iwp) :: r !< loop index 868 873 INTEGER(iwp) :: mid !< masked output running index 869 874 INTEGER(iwp) :: netcdf_data_format_save !< initial value of netcdf_data_format … … 3647 3652 CALL message( 'check_parameters', 'PA0421', 1, 2, 0, 6, 0 ) 3648 3653 ENDIF 3654 3655 ! 3656 !-- Convert recycle_absolute_quantities (list of strings that define the quantities for 3657 !-- absolute recycling) to raq (list of logicals with length 7 corresponding to u,v,w,pt,e,q,s). 3658 !-- Output error message for not implemented quantities. 3659 DO r = LBOUND( recycle_absolute_quantities, 1 ), UBOUND( recycle_absolute_quantities, 1 ) 3660 SELECT CASE ( TRIM( recycle_absolute_quantities(r) ) ) 3661 CASE ( 'theta' ) 3662 raq(4) = .TRUE. 3663 CASE ( 'q' ) 3664 raq(6) = .TRUE. 3665 CASE ( '' ) 3666 CONTINUE 3667 CASE DEFAULT 3668 message_string = 'absolute recycling not implemented for variable ' // & 3669 TRIM( recycle_absolute_quantities(r) ) 3670 CALL message( 'inflow_turbulence', 'PA184', 1, 2, 0, 6, 0 ) 3671 END SELECT 3672 ENDDO 3649 3673 ENDIF 3650 3674 -
palm/trunk/SOURCE/inflow_turbulence.f90
r3655 r4172 25 25 ! ----------------- 26 26 ! $Id$ 27 ! added optional recycling of absolute values for pt and q 28 ! 29 ! 3655 2019-01-07 16:51:22Z knoop 27 30 ! Corrected "Former revisions" section 28 31 ! … … 87 90 88 91 USE control_parameters, & 89 ONLY: humidity, passive_scalar, recycling_plane, recycling_yshift 92 ONLY: humidity, passive_scalar, recycling_plane, recycling_yshift, raq 90 93 91 94 USE cpulog, & … … 101 104 102 105 IMPLICIT NONE 103 106 104 107 INTEGER(iwp) :: i !< loop index 105 108 INTEGER(iwp) :: j !< loop index … … 119 122 REAL(wp), DIMENSION(nzb:nzt+1,nysg:nyng,7,nbgp) :: & 120 123 local_inflow_dist !< auxiliary variable for inflow_dist, used for yshift 121 124 122 125 CALL cpu_log( log_point(40), 'inflow_turbulence', 'start' ) 123 126 124 127 ! 125 128 !-- Carry out spanwise averaging in the recycling plane … … 187 190 ! 188 191 !-- Calculate the disturbances at the recycling plane 192 !-- for recycling of absolute quantities, the disturbance is defined as the absolute value 193 !-- (and not as the deviation from the mean profile) 189 194 i = recycling_plane 190 195 … … 198 203 inflow_dist(k,j,2,l) = v(k,j,i) - avpr(k,2,l) 199 204 inflow_dist(k,j,3,l) = w(k,j,i) - avpr(k,3,l) 200 inflow_dist(k,j,4,l) = pt(k,j,i) - avpr(k,4,l) 205 IF ( raq(4) ) THEN 206 inflow_dist(k,j,4,l) = pt(k,j,i) 207 ELSE 208 inflow_dist(k,j,4,l) = pt(k,j,i) - avpr(k,4,l) 209 ENDIF 201 210 inflow_dist(k,j,5,l) = e(k,j,i) - avpr(k,5,l) 202 IF ( humidity ) & 203 inflow_dist(k,j,6,l) = q(k,j,i) - avpr(k,6,l) 211 IF ( humidity ) THEN 212 IF ( raq(6) ) THEN 213 inflow_dist(k,j,6,l) = q(k,j,i) 214 ELSE 215 inflow_dist(k,j,6,l) = q(k,j,i) - avpr(k,6,l) 216 ENDIF 217 ENDIF 204 218 IF ( passive_scalar ) & 205 219 inflow_dist(k,j,7,l) = s(k,j,i) - avpr(k,7,l) … … 214 228 DO j = nysg, nyng 215 229 DO k = nzb, nzt+1 216 217 230 inflow_dist(k,j,1,l) = u(k,j,i+1) - avpr(k,1,l) 218 231 inflow_dist(k,j,2,l) = v(k,j,i) - avpr(k,2,l) 219 232 inflow_dist(k,j,3,l) = w(k,j,i) - avpr(k,3,l) 220 inflow_dist(k,j,4,l) = pt(k,j,i) - avpr(k,4,l) 233 IF ( raq(4) ) THEN 234 inflow_dist(k,j,4,l) = pt(k,j,i) 235 ELSE 236 inflow_dist(k,j,4,l) = pt(k,j,i) - avpr(k,4,l) 237 ENDIF 221 238 inflow_dist(k,j,5,l) = e(k,j,i) - avpr(k,5,l) 222 IF ( humidity ) & 223 inflow_dist(k,j,6,l) = q(k,j,i) - avpr(k,6,l) 239 IF ( humidity ) THEN 240 IF ( raq(6) ) THEN 241 inflow_dist(k,j,6,l) = q(k,j,i) 242 ELSE 243 inflow_dist(k,j,6,l) = q(k,j,i) - avpr(k,6,l) 244 ENDIF 245 ENDIF 224 246 IF ( passive_scalar ) & 225 247 inflow_dist(k,j,7,l) = s(k,j,i) - avpr(k,7,l) … … 291 313 w(k,j,-nbgp:-1) = & 292 314 inflow_dist(k,j,3,1:nbgp) * inflow_damping_factor(k) 293 pt(k,j,-nbgp:-1) = mean_inflow_profiles(k,4) + & 294 inflow_dist(k,j,4,1:nbgp) * inflow_damping_factor(k) 295 e(k,j,-nbgp:-1) = mean_inflow_profiles(k,5) + & 315 IF ( raq(4) ) THEN 316 pt(k,j,-nbgp:-1) = inflow_dist(k,j,4,1:nbgp) 317 ELSE 318 pt(k,j,-nbgp:-1) = mean_inflow_profiles(k,4) + & 319 inflow_dist(k,j,4,1:nbgp) * inflow_damping_factor(k) 320 ENDIF 321 e(k,j,-nbgp:-1) = mean_inflow_profiles(k,5) + & 296 322 inflow_dist(k,j,5,1:nbgp) * inflow_damping_factor(k) 297 323 e(k,j,-nbgp:-1) = MAX( e(k,j,-nbgp:-1), 0.0_wp ) 298 324 299 IF ( humidity ) & 300 q(k,j,-nbgp:-1) = mean_inflow_profiles(k,6) + & 325 IF ( humidity ) THEN 326 IF ( raq(6) ) THEN 327 q(k,j,-nbgp:-1) = inflow_dist(k,j,6,1:nbgp) 328 ELSE 329 q(k,j,-nbgp:-1) = mean_inflow_profiles(k,6) + & 301 330 inflow_dist(k,j,6,1:nbgp) * inflow_damping_factor(k) 331 ENDIF 332 ENDIF 302 333 IF ( passive_scalar ) & 303 334 s(k,j,-nbgp:-1) = mean_inflow_profiles(k,7) + & 304 335 inflow_dist(k,j,7,1:nbgp) * inflow_damping_factor(k) 305 306 336 ENDDO 307 337 ENDDO -
palm/trunk/SOURCE/modules.f90
r4168 r4172 25 25 ! ----------------- 26 26 ! $Id$ 27 ! added recycle_absolute_quantities and raq 28 ! 29 ! 4168 2019-08-16 13:50:17Z suehring 27 30 ! +topo_top_ind 28 31 ! … … 1197 1200 CHARACTER (LEN=varnamelength), DIMENSION(0:1,500) :: do2d = ' ' !< label array for 2d output quantities 1198 1201 CHARACTER (LEN=varnamelength), DIMENSION(0:1,500) :: do3d = ' ' !< label array for 3d output quantities 1199 1202 1203 CHARACTER (LEN=varnamelength), DIMENSION(7) :: recycle_absolute_quantities = ' ' !< namelist parameter 1204 1200 1205 INTEGER(iwp), PARAMETER :: fl_max = 500 !< maximum number of virtual-flight measurements 1201 1206 INTEGER(iwp), PARAMETER :: var_fl_max = 20 !< maximum number of different sampling variables in virtual flight measurements … … 1313 1318 1314 1319 INTEGER(iwp), DIMENSION(max_masks,mask_xyz_dimension) :: mask_k_over_surface = -1 !< namelist parameter, k index of height over surface 1315 1320 1316 1321 LOGICAL :: agent_time_unlimited = .FALSE. !< namelist parameter 1317 1322 LOGICAL :: air_chemistry = .FALSE. !< chemistry model switch … … 1431 1436 LOGICAL :: data_output_yz(0:1) = .FALSE. !< output of yz cross-section data? 1432 1437 1433 LOGICAL, DIMENSION(max_masks) :: mask_surface = .FALSE. !< flag for surface-following masked output 1434 1438 LOGICAL, DIMENSION(max_masks) :: mask_surface = .FALSE. !< flag for surface-following masked output 1439 1440 LOGICAL, DIMENSION(7) :: raq = .FALSE. !< recycle absolute quantities (u,v,w,theta,e,q,s) in inflow_turbulence 1441 1435 1442 REAL(wp) :: advected_distance_x = 0.0_wp !< advected distance of model domain along x 1436 1443 !< (galilei transformation)
Note: See TracChangeset
for help on using the changeset viewer.