Changeset 1992
- Timestamp:
- Aug 12, 2016 3:14:59 PM (8 years ago)
- Location:
- palm/trunk/SOURCE
- Files:
-
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
palm/trunk/SOURCE/boundary_conds.f90
r1961 r1992 19 19 ! Current revisions: 20 20 ! ----------------- 21 ! 21 ! Adjustments for top boundary condition for passive scalar 22 22 ! 23 23 ! Former revisions: … … 259 259 ELSEIF ( ibc_pt_t == 2 ) THEN 260 260 !$acc kernels present( dzu, pt_p ) 261 pt_p(nzt+1,:,:) = pt_p(nzt,:,:) 261 pt_p(nzt+1,:,:) = pt_p(nzt,:,:) + bc_pt_t_val * dzu(nzt+1) 262 262 !$acc end kernels 263 263 ENDIF … … 327 327 q_p(nzt+1,:,:) = q(nzt+1,:,:) 328 328 ELSEIF ( ibc_q_t == 1 ) THEN 329 q_p(nzt+1,:,:) = q_p(nzt,:,:) 329 q_p(nzt+1,:,:) = q_p(nzt,:,:) + bc_q_t_val * dzu(nzt+1) 330 330 ENDIF 331 331 … … 366 366 ENDIF 367 367 ! 368 !-- Top boundary 369 IF ( ibc_s_t == 0 ) THEN368 !-- Top boundary condition 369 IF ( ibc_s_t == 0 ) THEN 370 370 s_p(nzt+1,:,:) = s(nzt+1,:,:) 371 ELSEIF ( ibc_s_t == 1 ) THEN 372 s_p(nzt+1,:,:) = s_p(nzt,:,:) + bc_s_t_val * dzu(nzt+1) 371 ELSEIF ( ibc_s_t == 1 ) THEN 372 s_p(nzt+1,:,:) = s_p(nzt,:,:) 373 ELSEIF ( ibc_s_t == 2 ) THEN 374 s_p(nzt+1,:,:) = s_p(nzt,:,:) + bc_s_t_val * dzu(nzt+1) 373 375 ENDIF 374 376 -
palm/trunk/SOURCE/check_parameters.f90
r1985 r1992 19 19 ! Current revisions: 20 20 ! ----------------- 21 ! 21 ! New checks for top_scalarflux 22 ! Bugfixes concerning data output of profiles in case of passive_scalar 22 23 ! 23 24 ! Former revisions: … … 1706 1707 message_string = 'boundary condition: bc_sa_t = "' // & 1707 1708 TRIM( bc_sa_t ) // '" is not allowed with ' // & 1708 ' constant_top_salinityflux = .TRUE.'1709 'top_salinityflux /= 0.0' 1709 1710 CALL message( 'check_parameters', 'PA0070', 1, 2, 0, 6, 0 ) 1710 1711 ENDIF … … 1749 1750 CALL check_bc_scalars( 's', bc_s_b, ibc_s_b, 'PA0073', 'PA0074', & 1750 1751 constant_scalarflux, s_surface_initial_change ) 1752 1753 IF ( top_scalarflux == 9999999.9_wp ) constant_top_scalarflux = .FALSE. 1754 ! 1755 !-- A fixed scalar concentration at the top implies Dirichlet boundary 1756 !-- condition for scalar. Hence, in this case specification of a constant 1757 !-- scalar flux is forbidden. 1758 IF ( ( ibc_s_t == 0 .OR. ibc_s_t == 2 ) .AND. constant_top_scalarflux & 1759 .AND. top_scalarflux /= 0.0_wp ) THEN 1760 message_string = 'boundary condition: bc_s_t = "' // & 1761 TRIM( bc_sa_t ) // '" is not allowed with ' // & 1762 'top_scalarflux /= 0.0' 1763 CALL message( 'check_parameters', 'PA0441', 1, 2, 0, 6, 0 ) 1764 ENDIF 1751 1765 ENDIF 1752 1766 ! … … 2210 2224 CALL message( 'check_parameters', 'PA0093', 1, 2, 0, 6, 0 ) 2211 2225 ELSE 2212 dopr_index(i) = 412226 dopr_index(i) = 117 2213 2227 dopr_unit(i) = 'kg/m3' 2214 hom(:,2, 41,:) = SPREAD( zu, 2, statistic_regions+1 )2228 hom(:,2,117,:) = SPREAD( zu, 2, statistic_regions+1 ) 2215 2229 IF ( data_output_pr(i)(1:1) == '#' ) THEN 2216 dopr_initial_index(i) = 262217 hom(:,2, 26,:)= SPREAD( zu, 2, statistic_regions+1 )2218 hom(nzb,2, 26,:)= 0.0_wp ! because zu(nzb) is negative2230 dopr_initial_index(i) = 117 2231 hom(:,2,117,:) = SPREAD( zu, 2, statistic_regions+1 ) 2232 hom(nzb,2,117,:) = 0.0_wp ! because zu(nzb) is negative 2219 2233 data_output_pr(i) = data_output_pr(i)(2:) 2220 2234 ENDIF … … 2331 2345 CALL message( 'check_parameters', 'PA0093', 1, 2, 0, 6, 0 ) 2332 2346 ELSE 2333 dopr_index(i) = 482347 dopr_index(i) = 119 2334 2348 dopr_unit(i) = 'kg/m3 m/s' 2335 hom(:,2, 48,:) = SPREAD( zw, 2, statistic_regions+1 )2349 hom(:,2,119,:) = SPREAD( zw, 2, statistic_regions+1 ) 2336 2350 ENDIF 2337 2351 … … 2343 2357 CALL message( 'check_parameters', 'PA0093', 1, 2, 0, 6, 0 ) 2344 2358 ELSE 2345 dopr_index(i) = 492359 dopr_index(i) = 116 2346 2360 dopr_unit(i) = 'kg/m3 m/s' 2347 hom(:,2, 49,:) = SPREAD( zw, 2, statistic_regions+1 )2361 hom(:,2,116,:) = SPREAD( zw, 2, statistic_regions+1 ) 2348 2362 ENDIF 2349 2363 … … 2355 2369 CALL message( 'check_parameters', 'PA0093', 1, 2, 0, 6, 0 ) 2356 2370 ELSE 2357 dopr_index(i) = 502371 dopr_index(i) = 120 2358 2372 dopr_unit(i) = 'kg/m3 m/s' 2359 hom(:,2, 50,:) = SPREAD( zw, 2, statistic_regions+1 )2373 hom(:,2,120,:) = SPREAD( zw, 2, statistic_regions+1 ) 2360 2374 ENDIF 2361 2375 … … 3916 3930 ELSEIF ( bc_t == 'neumann' ) THEN 3917 3931 ibc_t = 1 3932 ELSEIF ( bc_t == 'initial_gradient' ) THEN 3933 ibc_t = 2 3918 3934 ELSEIF ( bc_t == 'nested' ) THEN 3919 3935 ibc_t = 3 -
palm/trunk/SOURCE/close_file.f90
r1818 r1992 19 19 ! Current revisions: 20 20 ! ----------------- 21 ! 21 ! -Close file containing flight data 22 ! -Some tabs removed. 22 23 ! 23 24 ! Former revisions: … … 85 86 USE netcdf_interface, & 86 87 ONLY: id_set_mask, id_set_pr, id_set_prt, id_set_pts, id_set_sp, & 87 id_set_ts, id_set_xy, id_set_xz, id_set_yz, id_set_3d, nc_stat,&88 netcdf_data_format, netcdf_handle_error88 id_set_ts, id_set_xy, id_set_xz, id_set_yz, id_set_3d, & 89 id_set_fl, nc_stat, netcdf_data_format, netcdf_handle_error 89 90 90 91 USE pegrid … … 223 224 ENDIF 224 225 226 CASE ( 199 ) 227 228 IF ( myid == 0 .OR. netcdf_data_format > 4 ) THEN 229 nc_stat = NF90_CLOSE( id_set_fl ) 230 CALL netcdf_handle_error( 'close_file', 353 ) 231 ENDIF 232 225 233 CASE ( 201:200+2*max_masks ) 226 234 227 235 IF ( myid == 0 .OR. netcdf_data_format > 4 ) THEN 228 236 ! … … 237 245 nc_stat = NF90_CLOSE( id_set_mask(mid,av) ) 238 246 CALL netcdf_handle_error( 'close_file', 459 ) 239 247 240 248 ENDIF 241 249 -
palm/trunk/SOURCE/header.f90
r1961 r1992 19 19 ! Current revisions: 20 20 ! ----------------- 21 ! 21 ! Adapted for top_scalarflux 22 22 ! 23 23 ! Former revisions: … … 1017 1017 1018 1018 ELSE 1019 r_lower = 'q(0) = q(1)'1019 r_lower = 'q(0) = q(1)' 1020 1020 ENDIF 1021 1021 IF ( ibc_q_t == 0 ) THEN 1022 r_upper = 'q(nzt )= q_top'1022 r_upper = 'q(nzt+1) = q_top' 1023 1023 ELSE 1024 r_upper = 'q(nzt ) = q(nzt-1) + dq/dz'1024 r_upper = 'q(nzt+1) = q(nzt) + dq/dz' 1025 1025 ENDIF 1026 1026 WRITE ( io, 301 ) 'q', r_lower, r_upper … … 1029 1029 IF ( passive_scalar ) THEN 1030 1030 IF ( ibc_s_b == 0 ) THEN 1031 r_lower = 's(0) = s_surface'1031 r_lower = 's(0) = s_surface' 1032 1032 ELSE 1033 r_lower = 's(0) = s(1)'1033 r_lower = 's(0) = s(1)' 1034 1034 ENDIF 1035 1035 IF ( ibc_s_t == 0 ) THEN 1036 r_upper = 's(nzt) = s_top' 1037 ELSE 1038 r_upper = 's(nzt) = s(nzt-1) + ds/dz' 1036 r_upper = 's(nzt+1) = s_top' 1037 ELSEIF ( ibc_s_t == 1 ) THEN 1038 r_upper = 's(nzt+1) = s(nzt)' 1039 ELSEIF ( ibc_s_t == 2 ) THEN 1040 r_upper = 's(nzt+1) = s(nzt) + ds/dz' 1039 1041 ENDIF 1040 1042 WRITE ( io, 301 ) 's', r_lower, r_upper … … 1073 1075 WRITE ( io, 316 ) 1074 1076 ENDIF 1075 IF ( ocean .AND. constant_top_salinityflux ) THEN1077 IF ( ocean .AND. constant_top_salinityflux ) & 1076 1078 WRITE ( io, 309 ) top_salinityflux 1077 ENDIF1078 1079 IF ( humidity ) WRITE ( io, 315 ) 1079 IF ( passive_scalar ) WRITE ( io, 315 ) 1080 IF ( passive_scalar .AND. constant_top_scalarflux ) & 1081 WRITE ( io, 302 ) top_scalarflux 1080 1082 ENDIF 1081 1083 … … 2033 2035 313 FORMAT (' Predefined constant scalar flux: ',E10.3,' kg/(m**2 s)') 2034 2036 314 FORMAT (' Predefined scalar value at the surface') 2035 315 FORMAT (' Humidity / scalar flux at top surface is 0.0') 2037 302 FORMAT (' Predefined constant scalarflux: ',F9.6,' kg/(m**2 s)') 2038 315 FORMAT (' Humidity flux at top surface is 0.0') 2036 2039 316 FORMAT (' Sensible heatflux and momentum flux from coupled ', & 2037 2040 'atmosphere model') -
palm/trunk/SOURCE/init_3d_model.f90
r1961 r1992 19 19 ! Current revisions: 20 20 ! ------------------ 21 ! 21 ! Initializaton of scalarflux at model top 22 ! Bugfixes in initialization of surface and top salinity flux, top scalar and 23 ! humidity fluxes 22 24 ! 23 25 ! Former revisions: … … 1205 1207 ENDIF 1206 1208 ENDIF 1207 ENDIF 1209 ENDIF 1210 ! 1211 !-- Initialize near-surface salinity flux 1212 IF ( ocean ) saswsb = bottom_salinityflux 1208 1213 1209 1214 ENDIF … … 1214 1219 !-- The latent flux is zero in this case! 1215 1220 IF ( use_top_fluxes ) THEN 1216 1217 IF ( constant_top_heatflux ) THEN 1218 ! 1219 !-- Heat flux is prescribed 1220 tswst = top_heatflux 1221 1222 IF ( humidity ) THEN 1223 qswst = 0.0_wp 1224 IF ( cloud_physics .AND. microphysics_seifert ) THEN 1225 nrswst = 0.0_wp 1226 qrswst = 0.0_wp 1227 ENDIF 1221 ! 1222 !-- Prescribe to heat flux 1223 IF ( constant_top_heatflux ) tswst = top_heatflux 1224 ! 1225 !-- Prescribe zero latent flux at the top 1226 IF ( humidity ) THEN 1227 qswst = 0.0_wp 1228 IF ( cloud_physics .AND. microphysics_seifert ) THEN 1229 nrswst = 0.0_wp 1230 qrswst = 0.0_wp 1228 1231 ENDIF 1229 IF ( passive_scalar ) sswst = 0.0_wp 1230 1231 IF ( ocean ) THEN 1232 saswsb = bottom_salinityflux 1233 saswst = top_salinityflux 1234 ENDIF 1235 ENDIF 1236 1232 ENDIF 1233 ! 1234 !-- Prescribe top scalar flux 1235 IF ( passive_scalar .AND. constant_top_scalarflux ) & 1236 sswst = top_scalarflux 1237 ! 1238 !-- Prescribe top salinity flux 1239 IF ( ocean .AND. constant_top_salinityflux) & 1240 saswst = top_salinityflux 1237 1241 ! 1238 1242 !-- Initialization in case of a coupled model run -
palm/trunk/SOURCE/modules.f90
r1969 r1992 19 19 ! Current revisions: 20 20 ! ------------------ 21 ! 21 ! +constant_top_scalarflux, top_scalarflux 22 ! default of bc_s_t adjusted 22 23 ! 23 24 ! Former revisions: … … 603 604 bc_pt_t = 'initial_gradient', & 604 605 bc_q_b = 'dirichlet', bc_q_t = 'neumann', & 605 bc_s_b = 'dirichlet', bc_s_t = ' neumann', &606 bc_s_b = 'dirichlet', bc_s_t = 'initial_gradient', & 606 607 bc_sa_t = 'neumann', & 607 608 bc_uv_b = 'dirichlet', bc_uv_t = 'dirichlet', & … … 701 702 constant_top_momentumflux = .FALSE., & 702 703 constant_top_salinityflux = .TRUE., & 704 constant_top_scalarflux = .TRUE., & 703 705 constant_scalarflux = .TRUE., & 704 706 constant_waterflux = .TRUE., create_disturbances = .TRUE., & … … 818 820 top_momentumflux_u = 9999999.9_wp, & 819 821 top_momentumflux_v = 9999999.9_wp, top_salinityflux = 9999999.9_wp, & 822 top_scalarflux = 9999999.9_wp, & 820 823 ug_surface = 0.0_wp, u_bulk = 0.0_wp, u_gtrans = 0.0_wp, & 821 824 vg_surface = 0.0_wp, vpt_reference = 9999999.9_wp, & -
palm/trunk/SOURCE/parin.f90
r1961 r1992 19 19 ! Current revisions: 20 20 ! ----------------- 21 ! 21 ! +top_scalarflux 22 22 ! 23 23 ! Former revisions: … … 340 340 topography, topography_grid_convention, top_heatflux, & 341 341 top_momentumflux_u, top_momentumflux_v, top_salinityflux, & 342 t ranspose_compute_overlap, turbulent_inflow,&342 top_scalarflux, transpose_compute_overlap, turbulent_inflow, & 343 343 use_subsidence_tendencies, ug_surface, ug_vertical_gradient, & 344 344 ug_vertical_gradient_level, use_surface_fluxes, use_cmax, & -
palm/trunk/SOURCE/read_var_list.f90
r1961 r1992 19 19 ! Current revisions: 20 20 ! ------------------ 21 ! 21 ! top_scalarflux added 22 22 ! 23 23 ! Former revisions: … … 689 689 CASE ( 'top_salinityflux' ) 690 690 READ ( 13 ) top_salinityflux 691 CASE ( 'top_scalarflux' ) 692 READ ( 13 ) top_scalarflux 691 693 CASE ( 'tsc' ) 692 694 READ ( 13 ) tsc -
palm/trunk/SOURCE/sum_up_3d_data.f90
r1977 r1992 19 19 ! Current revisions: 20 20 ! ----------------- 21 ! 21 ! Bugfix in summation of passive scalar 22 22 ! 23 23 ! Former revisions: … … 110 110 USE arrays_3d, & 111 111 ONLY: dzw, e, nr, ol, p, pt, precipitation_rate, q, qc, ql, ql_c, & 112 ql_v, qr, qsws, rho, s a, shf, ssws, ts, u, us, v, vpt, w, z0,&112 ql_v, qr, qsws, rho, s, sa, shf, ssws, ts, u, us, v, vpt, w, z0,& 113 113 z0h, z0q 114 114 … … 619 619 DO j = nysg, nyng 620 620 DO k = nzb, nzt+1 621 s_av(k,j,i) = s_av(k,j,i) + q(k,j,i)621 s_av(k,j,i) = s_av(k,j,i) + s(k,j,i) 622 622 ENDDO 623 623 ENDDO -
palm/trunk/SOURCE/surface_layer_fluxes_mod.f90
r1961 r1992 19 19 ! Current revisions: 20 20 ! ------------------ 21 ! 21 ! Minor bug, declaration of look-up index as INTEGER 22 22 ! 23 23 ! Former revisions: … … 179 179 IMPLICIT NONE 180 180 181 INTEGER(iwp) :: i !< loop index x direction 182 INTEGER(iwp) :: j !< loop index y direction 183 INTEGER(iwp) :: k !< loop index z direction 181 INTEGER(iwp) :: i !< loop index x direction 182 INTEGER(iwp) :: j !< loop index y direction 183 INTEGER(iwp) :: k !< loop index z direction 184 INTEGER(iwp) :: l_bnd = 7500 !< Lookup table index of the last time step 184 185 185 186 INTEGER(iwp), PARAMETER :: num_steps = 15000 !< number of steps in the lookup table … … 195 196 196 197 REAL(wp) :: e_s, & !< Saturation water vapor pressure 197 l_bnd = 7500, & !< Lookup table index of the last time step198 198 ol_max = 1.0E6_wp, & !< Maximum Obukhov length 199 199 rib_max, & !< Maximum Richardson number in lookup table -
palm/trunk/SOURCE/write_var_list.f90
r1960 r1992 19 19 ! Current revisions: 20 20 ! ----------------- 21 ! 21 ! top scalarflux added 22 22 ! 23 23 ! Former revisions: … … 600 600 WRITE ( 14 ) 'top_salinityflux ' 601 601 WRITE ( 14 ) top_salinityflux 602 WRITE ( 14 ) 'top_scalarflux ' 603 WRITE ( 14 ) top_scalarflux 602 604 WRITE ( 14 ) 'tsc ' 603 605 WRITE ( 14 ) tsc
Note: See TracChangeset
for help on using the changeset viewer.