- Timestamp:
- Jun 14, 2013 5:57:58 AM (11 years ago)
- Location:
- palm/trunk/SOURCE
- Files:
-
- 16 edited
Legend:
- Unmodified
- Added
- Removed
-
palm/trunk/SOURCE/buoyancy.f90
r1172 r1179 19 19 ! 20 20 ! Currrent revisions: 21 ! ----------------- 22 ! 21 ! ------------------ 22 ! steering of reference state revised (var_reference and pr removed from 23 ! parameter list), use_reference renamed use_single_reference_value 23 24 ! 24 25 ! Former revisions: … … 108 109 ! Call for all grid points 109 110 !------------------------------------------------------------------------------! 110 SUBROUTINE buoyancy( var, var_reference, wind_component, pr)111 SUBROUTINE buoyancy( var, wind_component ) 111 112 112 113 USE arrays_3d … … 114 115 USE indices 115 116 USE pegrid 116 USE statistics117 117 118 118 IMPLICIT NONE 119 119 120 INTEGER :: i, j, k, pr, wind_component 121 REAL :: var_reference 120 INTEGER :: i, j, k, wind_component 122 121 #if defined( __nopointer ) 123 122 REAL, DIMENSION(nzb:nzt+1,nysg:nyng,nxlg:nxrg) :: var … … 130 129 ! 131 130 !-- Normal case: horizontal surface 132 IF ( use_reference ) THEN 133 DO i = nxl, nxr 134 DO j = nys, nyn 135 DO k = nzb_s_inner(j,i)+1, nzt-1 136 tend(k,j,i) = tend(k,j,i) + atmos_ocean_sign * g * 0.5 * & 137 ( & 138 ( var(k,j,i) - hom(k,1,pr,0) ) / var_reference + & 139 ( var(k+1,j,i) - hom(k+1,1,pr,0) ) / var_reference & 140 ) 141 ENDDO 142 ENDDO 143 ENDDO 144 ELSE 145 DO i = nxl, nxr 146 DO j = nys, nyn 147 DO k = nzb_s_inner(j,i)+1, nzt-1 148 tend(k,j,i) = tend(k,j,i) + atmos_ocean_sign * g * 0.5 * & 149 ( & 150 ( var(k,j,i) - hom(k,1,pr,0) ) / hom(k,1,pr,0) + & 151 ( var(k+1,j,i) - hom(k+1,1,pr,0) ) / hom(k+1,1,pr,0) & 152 ) 153 ENDDO 154 ENDDO 155 ENDDO 156 ENDIF 131 DO i = nxl, nxr 132 DO j = nys, nyn 133 DO k = nzb_s_inner(j,i)+1, nzt-1 134 tend(k,j,i) = tend(k,j,i) + atmos_ocean_sign * g * 0.5 * ( & 135 ( var(k,j,i) - ref_state(k) ) / ref_state(k) + & 136 ( var(k+1,j,i) - ref_state(k+1) ) / ref_state(k+1) & 137 ) 138 ENDDO 139 ENDDO 140 ENDDO 157 141 158 142 ELSE … … 205 189 ! Call for all grid points - accelerator version 206 190 !------------------------------------------------------------------------------! 207 SUBROUTINE buoyancy_acc( var, var_reference, wind_component, pr)191 SUBROUTINE buoyancy_acc( var, wind_component ) 208 192 209 193 USE arrays_3d … … 211 195 USE indices 212 196 USE pegrid 213 USE statistics214 197 215 198 IMPLICIT NONE 216 199 217 INTEGER :: i, j, k, pr, wind_component 218 REAL :: var_reference 200 INTEGER :: i, j, k, wind_component 219 201 #if defined( __nopointer ) 220 202 REAL, DIMENSION(nzb:nzt+1,nysg:nyng,nxlg:nxrg) :: var … … 227 209 ! 228 210 !-- Normal case: horizontal surface 229 IF ( use_reference ) THEN 230 !$acc kernels present( nzb_s_inner, hom, tend, var ) 231 !$acc loop 232 DO i = i_left, i_right 233 DO j = j_south, j_north 234 !$acc loop independent vector(32) 235 DO k = nzb_s_inner(j,i)+1, nzt-1 236 tend(k,j,i) = tend(k,j,i) + atmos_ocean_sign * g * 0.5 * & 237 ( & 238 ( var(k,j,i) - hom(k,1,pr,0) ) / var_reference + & 239 ( var(k+1,j,i) - hom(k+1,1,pr,0) ) / var_reference & 240 ) 241 ENDDO 242 ENDDO 243 ENDDO 244 !$acc end kernels 245 ELSE 246 !$acc kernels present( nzb_s_inner, hom, tend, var ) 247 !$acc loop 248 DO i = i_left, i_right 249 DO j = j_south, j_north 250 !$acc loop independent vector(32) 251 DO k = nzb_s_inner(j,i)+1, nzt-1 252 tend(k,j,i) = tend(k,j,i) + atmos_ocean_sign * g * 0.5 * & 253 ( & 254 ( var(k,j,i) - hom(k,1,pr,0) ) / hom(k,1,pr,0) + & 255 ( var(k+1,j,i) - hom(k+1,1,pr,0) ) / hom(k+1,1,pr,0) & 256 ) 257 ENDDO 258 ENDDO 259 ENDDO 260 !$acc end kernels 261 ENDIF 211 !$acc kernels present( nzb_s_inner, ref_state, tend, var ) 212 !$acc loop 213 DO i = i_left, i_right 214 DO j = j_south, j_north 215 !$acc loop independent vector(32) 216 DO k = nzb_s_inner(j,i)+1, nzt-1 217 tend(k,j,i) = tend(k,j,i) + atmos_ocean_sign * g * 0.5 * ( & 218 ( var(k,j,i) - ref_state(k) ) / ref_state(k) + & 219 ( var(k+1,j,i) - ref_state(k+1) ) / ref_state(k+1) & 220 ) 221 ENDDO 222 ENDDO 223 ENDDO 224 !$acc end kernels 262 225 263 226 ELSE … … 313 276 !------------------------------------------------------------------------------! 314 277 !pgi$r opt=1 315 SUBROUTINE buoyancy_ij( i, j, var, var_reference, wind_component, pr)278 SUBROUTINE buoyancy_ij( i, j, var, wind_component ) 316 279 317 280 USE arrays_3d … … 319 282 USE indices 320 283 USE pegrid 321 USE statistics322 284 323 285 IMPLICIT NONE 324 286 325 287 INTEGER :: i, j, k, pr, wind_component 326 REAL :: var_reference327 288 #if defined( __nopointer ) 328 289 REAL, DIMENSION(nzb:nzt+1,nysg:nyng,nxlg:nxrg) :: var … … 335 296 ! 336 297 !-- Normal case: horizontal surface 337 IF ( use_reference ) THEN 338 DO k = nzb_s_inner(j,i)+1, nzt-1 339 tend(k,j,i) = tend(k,j,i) + atmos_ocean_sign * g * 0.5 * ( & 340 ( var(k,j,i) - hom(k,1,pr,0) ) / var_reference + & 341 ( var(k+1,j,i) - hom(k+1,1,pr,0) ) / var_reference & 342 ) 343 ENDDO 344 ELSE 345 DO k = nzb_s_inner(j,i)+1, nzt-1 346 tend(k,j,i) = tend(k,j,i) + atmos_ocean_sign * g * 0.5 * ( & 347 ( var(k,j,i) - hom(k,1,pr,0) ) / hom(k,1,pr,0) + & 348 ( var(k+1,j,i) - hom(k+1,1,pr,0) ) / hom(k+1,1,pr,0) & 349 ) 350 ENDDO 351 ENDIF 298 DO k = nzb_s_inner(j,i)+1, nzt-1 299 tend(k,j,i) = tend(k,j,i) + atmos_ocean_sign * g * 0.5 * ( & 300 ( var(k,j,i) - ref_state(k) ) / ref_state(k) + & 301 ( var(k+1,j,i) - ref_state(k+1) ) / ref_state(k+1) & 302 ) 303 ENDDO 352 304 353 305 ELSE … … 395 347 ! ------------ 396 348 ! Calculate the horizontally averaged vertical temperature profile (pr=4 in case 397 ! of potential temperature and 44 in case of virtual potential temperature). 398 !------------------------------------------------------------------------------! 399 349 ! of potential temperature, 44 in case of virtual potential temperature, and 64 350 ! in case of density (ocean runs)). 351 !------------------------------------------------------------------------------! 352 353 USE arrays_3d, ONLY: ref_state 400 354 USE control_parameters 401 355 USE indices … … 457 411 ENDIF 458 412 413 ref_state(:) = hom(:,1,pr,0) ! this is used in the buoyancy term 414 459 415 END SUBROUTINE calc_mean_profile 460 416 -
palm/trunk/SOURCE/check_parameters.f90
r1175 r1179 20 20 ! Current revisions: 21 21 ! ----------------- 22 ! 22 ! checks and settings of buoyancy parameters and switches revised, 23 ! initial profile for rho added to hom (id=77) 23 24 ! 24 25 ! Former revisions: … … 1323 1324 large_scale_subsidence = .TRUE. 1324 1325 CALL init_w_subsidence 1325 END IF 1326 1327 1326 ENDIF 1328 1327 1329 1328 ! … … 1333 1332 1334 1333 ! 1335 !-- Ocean runs always use reference values in the buoyancy term. Therefore 1336 !-- set the reference temperature equal to the surface temperature. 1337 IF ( ocean .AND. pt_reference == 9999999.9 ) pt_reference = pt_surface 1338 1339 ! 1340 !-- Reference value has to be used in buoyancy terms 1341 IF ( pt_reference /= 9999999.9 ) use_reference = .TRUE. 1334 !-- Check and set buoyancy related parameters and switches 1335 IF ( reference_state == 'horizontal_average' ) THEN 1336 CONTINUE 1337 ELSEIF ( reference_state == 'initial_profile' ) THEN 1338 use_initial_profile_as_reference = .TRUE. 1339 ELSEIF ( reference_state == 'single_value' ) THEN 1340 use_single_reference_value = .TRUE. 1341 IF ( pt_reference == 9999999.9 ) pt_reference = pt_surface 1342 vpt_reference = pt_reference * ( 1.0 + 0.61 * q_surface ) 1343 ELSE 1344 message_string = 'illegal value for reference_state: "' // & 1345 TRIM( reference_state ) // '"' 1346 CALL message( 'check_parameters', 'PA0056', 1, 2, 0, 6, 0 ) 1347 ENDIF 1348 1349 ! 1350 !-- Ocean runs always use reference values in the buoyancy term 1351 IF ( ocean ) THEN 1352 reference_state = 'single_value' 1353 use_single_reference_value = .TRUE. 1354 ENDIF 1342 1355 1343 1356 ! … … 2463 2476 dopr_unit(i) = 'kg/m3' 2464 2477 hom(:,2,64,:) = SPREAD( zu, 2, statistic_regions+1 ) 2478 IF ( data_output_pr(i)(1:1) == '#' ) THEN 2479 dopr_initial_index(i) = 77 2480 hom(:,2,77,:) = SPREAD( zu, 2, statistic_regions+1 ) 2481 hom(nzb,2,77,:) = 0.0 ! because zu(nzb) is negative 2482 data_output_pr(i) = data_output_pr(i)(2:) 2483 ENDIF 2465 2484 ENDIF 2466 2485 -
palm/trunk/SOURCE/diffusion_e.f90
r1172 r1179 20 20 ! Current revisions: 21 21 ! ----------------- 22 ! 22 ! use_reference renamed use_single_reference_value 23 23 ! 24 24 ! Former revisions: … … 134 134 !-- This if clause must be outside the k-loop because otherwise 135 135 !-- runtime errors occur with -C hopt on NEC 136 IF ( use_ reference ) THEN136 IF ( use_single_reference_value ) THEN 137 137 138 138 DO i = nxl, nxr … … 319 319 !-- This if clause must be outside the k-loop because otherwise 320 320 !-- runtime errors occur with -C hopt on NEC 321 IF ( use_ reference ) THEN321 IF ( use_single_reference_value ) THEN 322 322 323 323 !$acc kernels present( ddzu, ddzw, dd2zu, diss, e, km, l_grid ) & … … 506 506 ( var(k+1,j,i) - var(k-1,j,i) ) * dd2zu(k) 507 507 IF ( dvar_dz > 0.0 ) THEN 508 IF ( use_ reference ) THEN508 IF ( use_single_reference_value ) THEN 509 509 l_stable = 0.76 * SQRT( e(k,j,i) ) / & 510 510 SQRT( g / var_reference * dvar_dz ) + 1E-5 -
palm/trunk/SOURCE/diffusivities.f90
r1037 r1179 20 20 ! Current revisions: 21 21 ! ----------------- 22 ! 22 ! use_reference renamed use_single_reference_value 23 23 ! 24 24 ! Former revisions: … … 132 132 ( var(k+1,j,i) - var(k-1,j,i) ) * dd2zu(k) 133 133 IF ( dvar_dz > 0.0 ) THEN 134 IF ( use_ reference ) THEN134 IF ( use_single_reference_value ) THEN 135 135 l_stable = 0.76 * sqrt_e / & 136 136 SQRT( g / var_reference * dvar_dz ) + 1E-5 -
palm/trunk/SOURCE/flow_statistics.f90
r1116 r1179 20 20 ! Current revisions: 21 21 ! ----------------- 22 ! 22 ! comment for profile 77 added 23 23 ! 24 24 ! Former revisions: … … 1148 1148 hom(:,1,75,sr) = sums(:,75) ! qc 1149 1149 hom(:,1,76,sr) = sums(:,76) ! prr (precipitation rate) 1150 ! 77 is initial density profile 1150 1151 1151 1152 hom(:,1,pr_palm-1,sr) = sums(:,pr_palm-1) -
palm/trunk/SOURCE/header.f90
r1160 r1179 20 20 ! Current revisions: 21 21 ! ----------------- 22 ! 22 ! output of reference_state, use_reference renamed use_single_reference_value 23 23 ! 24 24 ! Former revisions: … … 1230 1230 !-- Other quantities 1231 1231 WRITE ( io, 411 ) g 1232 IF ( use_reference ) THEN 1232 WRITE ( io, 412 ) TRIM( reference_state ) 1233 IF ( use_single_reference_value ) THEN 1233 1234 IF ( ocean ) THEN 1234 WRITE ( io, 41 2) prho_reference1235 ELSE 1236 WRITE ( io, 41 3) pt_reference1235 WRITE ( io, 413 ) prho_reference 1236 ELSE 1237 WRITE ( io, 414 ) pt_reference 1237 1238 ENDIF 1238 1239 ENDIF … … 1900 1901 ' f* = ',F9.6,' 1/s') 1901 1902 411 FORMAT (/' Gravity : g = ',F4.1,' m/s**2') 1902 412 FORMAT (/' Reference density in buoyancy terms: ',F8.3,' kg/m**3') 1903 413 FORMAT (/' Reference temperature in buoyancy terms: ',F8.4,' K') 1903 412 FORMAT (/' Reference state used in buoyancy terms: ',A) 1904 413 FORMAT (' Reference density in buoyancy terms: ',F8.3,' kg/m**3') 1905 414 FORMAT (' Reference temperature in buoyancy terms: ',F8.4,' K') 1904 1906 415 FORMAT (/' Cloud physics parameters:'/ & 1905 1907 ' ------------------------'/) -
palm/trunk/SOURCE/init_3d_model.f90
r1172 r1179 23 23 ! Current revisions: 24 24 ! ------------------ 25 ! 25 ! allocate and set ref_state to be used in buoyancy terms 26 26 ! 27 27 ! Former revisions: … … 279 279 sums_divnew_l(0:statistic_regions), & 280 280 sums_divold_l(0:statistic_regions) ) 281 ALLOCATE( dp_smooth_factor(nzb:nzt), rdf(nzb+1:nzt), rdf_sc(nzb+1:nzt) ) 281 ALLOCATE( dp_smooth_factor(nzb:nzt), rdf(nzb+1:nzt), rdf_sc(nzb+1:nzt), & 282 ref_state(nzb:nzt+1) ) 282 283 ALLOCATE( ngp_2dh_outer(nzb:nzt+1,0:statistic_regions), & 283 284 ngp_2dh_outer_l(nzb:nzt+1,0:statistic_regions), & … … 1039 1040 ENDIF 1040 1041 1042 ! 1043 !-- Set the reference state to be used in the buoyancy terms (for ocean runs 1044 !-- the reference state will be set (overwritten) in init_ocean) 1045 IF ( use_single_reference_value ) THEN 1046 IF ( .NOT. humidity ) THEN 1047 ref_state(:) = pt_reference 1048 ELSE 1049 ref_state(:) = vpt_reference 1050 ENDIF 1051 ELSE 1052 IF ( .NOT. humidity ) THEN 1053 ref_state(:) = pt_init(:) 1054 ELSE 1055 ref_state(:) = vpt(:,nys,nxl) 1056 ENDIF 1057 ENDIF 1041 1058 1042 1059 ! -
palm/trunk/SOURCE/init_ocean.f90
r1037 r1179 20 20 ! Current revisions: 21 21 ! ----------------- 22 ! 22 ! Initial density profile is stored in array hom 23 23 ! 24 24 ! Former revisions: … … 47 47 USE control_parameters 48 48 USE eqn_state_seawater_mod 49 USE pegrid50 49 USE grid_variables 51 50 USE indices 51 USE pegrid 52 USE statistics 52 53 53 54 IMPLICIT NONE … … 126 127 CALL eqn_state_seawater 127 128 129 ! 130 !-- Store initial density profile 131 hom(:,1,77,:) = SPREAD( rho_init(:), 2, statistic_regions+1 ) 132 133 ! 134 !-- Set the reference state to be used in the buoyancy terms 135 IF ( use_single_reference_value ) THEN 136 ref_state(:) = prho_reference 137 ELSE 138 ref_state(:) = rho_init(:) 139 ENDIF 140 128 141 129 142 END SUBROUTINE init_ocean -
palm/trunk/SOURCE/modules.f90
r1160 r1179 20 20 ! Current revisions: 21 21 ! ------------------ 22 ! 22 ! +reference_state, ref_state, use_initial_profile_as_reference, vpt_reference, 23 ! use_reference renamed use_single_reference_value 23 24 ! 24 25 ! Former revisions: … … 420 421 dd2zu, dzu, ddzw, dzw, hyp, inflow_damping_factor, lad, l_grid, & 421 422 nc_1d, nr_1d, ptdf_x, ptdf_y, pt_1d, pt_init, q_1d, q_init, qc_1d, & 422 qr_1d, rdf, rdf_sc, sa_init, ug, u_init, u_nzb_p1_for_vfc, vg,&423 v_init, v_nzb_p1_for_vfc, w_subs, zu, zw423 qr_1d, rdf, rdf_sc, ref_state, sa_init, ug, u_init, & 424 u_nzb_p1_for_vfc, vg, v_init, v_nzb_p1_for_vfc, w_subs, zu, zw 424 425 425 426 REAL, DIMENSION(:,:), ALLOCATABLE :: & … … 656 657 mixing_length_1d = 'as_in_3d_model', & 657 658 random_generator = 'numerical-recipes', & 659 reference_state = 'initial_profile', & 658 660 return_addres, return_username, & 659 661 timestep_scheme = 'runge-kutta-3' … … 770 772 terminate_run = .FALSE., turbulence = .FALSE., & 771 773 turbulent_inflow = .FALSE., use_cmax = .TRUE., & 772 use_prescribed_profile_data = .FALSE., use_reference = .FALSE.,& 774 use_initial_profile_as_reference = .FALSE., & 775 use_prescribed_profile_data = .FALSE., & 776 use_single_reference_value = .FALSE., & 773 777 use_surface_fluxes = .FALSE., use_top_fluxes = .FALSE., & 774 778 use_ug_for_galilei_tr = .TRUE., use_upstream_for_tke = .FALSE.,& … … 846 850 top_momentumflux_v = 9999999.9, top_salinityflux = 9999999.9, & 847 851 ug_surface = 0.0, u_bulk = 0.0, u_gtrans = 0.0, & 848 vg_surface = 0.0, &852 vg_surface = 0.0, vpt_reference = 9999999.9, & 849 853 v_bulk = 0.0, v_gtrans = 0.0, wall_adjustment_factor = 1.8, & 850 854 z_max_do2d = -1.0, z0h_factor = 1.0 -
palm/trunk/SOURCE/palm.f90
r1114 r1179 20 20 ! Current revisions: 21 21 ! ----------------- 22 ! 22 ! ref_state added to copyin-list 23 23 ! 24 24 ! Former revisions: … … 241 241 !-- host values 242 242 !$acc data copyin( d, diss, e, e_p, kh, km, p, pt, pt_p, q, ql, tend, te_m, tpt_m, tu_m, tv_m, tw_m, u, u_p, v, vpt, v_p, w, w_p ) & 243 !$acc copyin( tric, dzu, ddzu, ddzw, dd2zu, l_grid, l_wall, ptdf_x, ptdf_y, pt_init, rdf, rdf_sc, ug, u_init, vg, v_init, zu, zw ) &243 !$acc copyin( tric, dzu, ddzu, ddzw, dd2zu, l_grid, l_wall, ptdf_x, ptdf_y, pt_init, rdf, rdf_sc, ref_state, ug, u_init, vg, v_init, zu, zw ) & 244 244 !$acc copyin( hom, qs, qsws, qswst, rif, rif_wall, shf, ts, tswst, us, usws, uswst, vsws, vswst, z0, z0h ) & 245 245 !$acc copyin( fxm, fxp, fym, fyp, fwxm, fwxp, fwym, fwyp, nzb_diff_s_inner, nzb_diff_s_outer, nzb_diff_u ) & -
palm/trunk/SOURCE/parin.f90
r1160 r1179 20 20 ! Current revisions: 21 21 ! ----------------- 22 ! 22 ! +reference_state in inipar 23 23 ! 24 24 ! Former revisions: … … 234 234 mg_switch_to_pe0_level, mixing_length_1d, momentum_advec, & 235 235 nc_const, netcdf_precision, neutral, ngsrb, & 236 nsor, & 237 nsor_ini, nx, ny, nz, ocean, omega, omega_sor, & 236 nsor, nsor_ini, nx, ny, nz, ocean, omega, omega_sor, & 238 237 passive_scalar, pch_index, phi, plant_canopy, prandtl_layer, & 239 238 prandtl_number, precipitation, psolver, pt_damping_factor, & … … 242 241 pt_vertical_gradient_level, q_surface, q_surface_initial_change, & 243 242 q_vertical_gradient, q_vertical_gradient_level, & 244 radiation, &245 ra ndom_generator, random_heatflux, rayleigh_damping_factor,&246 r ayleigh_damping_height, recycling_width, residual_limit, &243 radiation, random_generator, random_heatflux, & 244 rayleigh_damping_factor, rayleigh_damping_height, recycling_width,& 245 reference_state, residual_limit, & 247 246 rif_max, rif_min, roughness_length, sa_surface, & 248 247 sa_vertical_gradient, sa_vertical_gradient_level, scalar_advec, & -
palm/trunk/SOURCE/production_e.f90
r1132 r1179 20 20 ! Current revisions: 21 21 ! ----------------- 22 ! 22 ! use_reference renamed use_single_reference_value 23 23 ! 24 24 ! Former revisions: … … 497 497 IF ( .NOT. humidity ) THEN 498 498 499 IF ( use_ reference ) THEN499 IF ( use_single_reference_value ) THEN 500 500 501 501 IF ( ocean ) THEN … … 1099 1099 IF ( .NOT. humidity ) THEN 1100 1100 1101 IF ( use_ reference ) THEN1101 IF ( use_single_reference_value ) THEN 1102 1102 1103 1103 IF ( ocean ) THEN … … 1677 1677 IF ( .NOT. humidity ) THEN 1678 1678 1679 IF ( use_ reference ) THEN1679 IF ( use_single_reference_value ) THEN 1680 1680 1681 1681 IF ( ocean ) THEN -
palm/trunk/SOURCE/prognostic_equations.f90
r1132 r1179 20 20 ! Current revisions: 21 21 ! ------------------ 22 ! 22 ! two arguments removed from routine buoyancy, ref_state updated on device 23 23 ! 24 24 ! Former revisions: … … 267 267 CALL coriolis( i, j, 1 ) 268 268 IF ( sloping_surface .AND. .NOT. neutral ) THEN 269 CALL buoyancy( i, j, pt, pt_reference, 1, 4)269 CALL buoyancy( i, j, pt, 1 ) 270 270 ENDIF 271 271 … … 380 380 IF ( .NOT. neutral ) THEN 381 381 IF ( ocean ) THEN 382 CALL buoyancy( i, j, rho, rho_reference, 3, 64)382 CALL buoyancy( i, j, rho, 3 ) 383 383 ELSE 384 384 IF ( .NOT. humidity ) THEN 385 CALL buoyancy( i, j, pt, pt_reference, 3, 4)385 CALL buoyancy( i, j, pt, 3 ) 386 386 ELSE 387 CALL buoyancy( i, j, vpt, pt_reference, 3, 44)387 CALL buoyancy( i, j, vpt, 3 ) 388 388 ENDIF 389 389 ENDIF … … 825 825 CALL coriolis( 1 ) 826 826 IF ( sloping_surface .AND. .NOT. neutral ) THEN 827 CALL buoyancy( pt, pt_reference, 1, 4)827 CALL buoyancy( pt, 1 ) 828 828 ENDIF 829 829 … … 974 974 IF ( .NOT. neutral ) THEN 975 975 IF ( ocean ) THEN 976 CALL buoyancy( rho, rho_reference, 3, 64)976 CALL buoyancy( rho, 3 ) 977 977 ELSE 978 978 IF ( .NOT. humidity ) THEN 979 CALL buoyancy( pt, pt_reference, 3, 4)979 CALL buoyancy( pt, 3 ) 980 980 ELSE 981 CALL buoyancy( vpt, pt_reference, 3, 44)981 CALL buoyancy( vpt, 3 ) 982 982 ENDIF 983 983 ENDIF … … 1450 1450 !-- u-velocity component 1451 1451 !++ Statistics still not ported to accelerators 1452 !$acc update device( hom )1452 !$acc update device( hom, ref_state ) 1453 1453 CALL cpu_log( log_point(5), 'u-equation', 'start' ) 1454 1454 … … 1466 1466 CALL coriolis_acc( 1 ) 1467 1467 IF ( sloping_surface .AND. .NOT. neutral ) THEN 1468 CALL buoyancy( pt, pt_reference, 1, 4)1468 CALL buoyancy( pt, 1 ) 1469 1469 ENDIF 1470 1470 … … 1595 1595 IF ( .NOT. neutral ) THEN 1596 1596 IF ( ocean ) THEN 1597 CALL buoyancy( rho, rho_reference, 3, 64)1597 CALL buoyancy( rho, 3 ) 1598 1598 ELSE 1599 1599 IF ( .NOT. humidity ) THEN 1600 CALL buoyancy_acc( pt, pt_reference, 3, 4)1600 CALL buoyancy_acc( pt, 3 ) 1601 1601 ELSE 1602 CALL buoyancy( vpt, pt_reference, 3, 44)1602 CALL buoyancy( vpt, 3 ) 1603 1603 ENDIF 1604 1604 ENDIF -
palm/trunk/SOURCE/read_var_list.f90
r1116 r1179 20 20 ! Current revisions: 21 21 ! ------------------ 22 ! 22 ! +ref_state 23 23 ! 24 24 ! Former revisions: … … 188 188 !-- Make version number check first 189 189 READ ( 13 ) version_on_file 190 binary_version = '3.9 '190 binary_version = '3.9a' 191 191 IF ( TRIM( version_on_file ) /= TRIM( binary_version ) ) THEN 192 192 WRITE( message_string, * ) 'version mismatch concerning control ', & … … 551 551 CASE ( 'recycling_width' ) 552 552 READ ( 13 ) recycling_width 553 CASE ( 'reference_state' ) 554 READ ( 13 ) reference_state 555 CASE ( 'ref_state' ) 556 READ ( 13 ) ref_state 553 557 CASE ( 'residual_limit' ) 554 558 READ ( 13 ) residual_limit -
palm/trunk/SOURCE/time_integration.f90
r1172 r1179 20 20 ! Current revisions: 21 21 ! ------------------ 22 ! 22 ! mean profiles for reference state are only calculated if required, 23 ! small bugfix for background communication 23 24 ! 24 25 ! Former revisions: … … 230 231 !-- Calculate those variables needed in the tendency terms which need 231 232 !-- global communication 232 IF ( .NOT. neutral ) CALL calc_mean_profile( pt, 4 ) 233 IF ( ocean ) CALL calc_mean_profile( rho, 64 ) 234 IF ( humidity ) CALL calc_mean_profile( vpt, 44 ) 233 IF ( .NOT. use_single_reference_value .AND. & 234 .NOT. use_initial_profile_as_reference ) THEN 235 ! 236 !-- Horizontally averaged profiles to be used as reference state in 237 !-- buoyancy terms (WARNING: only the respective last call of 238 !-- calc_mean_profile defines the reference state!) 239 IF ( .NOT. neutral ) CALL calc_mean_profile( pt, 4 ) 240 IF ( ocean ) CALL calc_mean_profile( rho, 64 ) 241 IF ( humidity ) CALL calc_mean_profile( vpt, 44 ) 242 ENDIF 243 235 244 IF ( .NOT. constant_diffusion ) CALL production_e_init 236 245 IF ( ( ws_scheme_mom .OR. ws_scheme_sca ) .AND. & … … 438 447 IF (humidity .OR. passive_scalar) THEN 439 448 CALL exchange_horiz( q_p, nbgp ) 440 IF ( cloud_physics .AND. icloud_scheme == 0 ) THEN 449 IF ( cloud_physics .AND. icloud_scheme == 0 .AND. & 450 precipitation ) THEN 441 451 CALL exchange_horiz( qr_p, nbgp ) 442 452 CALL exchange_horiz( nr_p, nbgp ) -
palm/trunk/SOURCE/write_var_list.f90
r1116 r1179 20 20 ! Current revisions: 21 21 ! ----------------- 22 ! 22 ! +reference_state, ref_state 23 23 ! 24 24 ! Former revisions: … … 169 169 170 170 171 binary_version = '3.9 '171 binary_version = '3.9a' 172 172 173 173 WRITE ( 14 ) binary_version … … 468 468 WRITE ( 14 ) 'recycling_width ' 469 469 WRITE ( 14 ) recycling_width 470 WRITE ( 14 ) 'reference_state ' 471 WRITE ( 14 ) reference_state 472 WRITE ( 14 ) 'ref_state ' 473 WRITE ( 14 ) ref_state 470 474 WRITE ( 14 ) 'residual_limit ' 471 475 WRITE ( 14 ) residual_limit
Note: See TracChangeset
for help on using the changeset viewer.