- Timestamp:
- Nov 13, 2012 5:11:03 PM (12 years ago)
- Location:
- palm/trunk
- Files:
-
- 27 edited
- 1 copied
Legend:
- Unmodified
- Added
- Removed
-
palm/trunk
- Property svn:mergeinfo changed
/palm/branches/hoffmann (added) merged: 989,994,999-1000,1005-1006,1012,1022,1048-1052
- Property svn:mergeinfo changed
-
palm/trunk/EXAMPLES/dvr
- Property svn:mergeinfo changed
/palm/branches/hoffmann/EXAMPLES/dvr (added) merged: 1005-1006,1050
- Property svn:mergeinfo changed
-
palm/trunk/SOURCE
- Property svn:mergeinfo changed
/palm/branches/hoffmann/SOURCE (added) merged: 994,999-1000,1005-1006,1012,1022,1048-1052
- Property svn:mergeinfo changed
-
palm/trunk/SOURCE/Makefile
r1037 r1053 20 20 # Current revisions: 21 21 # ------------------ 22 # 22 # +microphysics for two-moment cloud physics 23 23 # 24 24 # Former revisions: … … 159 159 user_parin.f90 user_read_restart_data.f90 \ 160 160 user_spectra.f90 user_statistics.f90 wall_fluxes.f90 \ 161 write_3d_binary.f90 write_compressed.f90 write_var_list.f90 161 write_3d_binary.f90 write_compressed.f90 write_var_list.f90 \ 162 microphysics.f90 162 163 163 164 OBJS = advec_s_bc.o advec_s_pw.o advec_s_up.o advec_u_pw.o advec_u_up.o \ … … 205 206 user_lpm_init.o user_lpm_set_attributes.o user_module.o user_parin.o \ 206 207 user_read_restart_data.o user_spectra.o user_statistics.o \ 207 wall_fluxes.o write_3d_binary.o write_compressed.o write_var_list.o 208 wall_fluxes.o write_3d_binary.o write_compressed.o write_var_list.o \ 209 microphysics.o 208 210 209 211 CC = cc … … 346 348 eqn_state_seawater.o impact_of_latent_heat.o \ 347 349 plant_canopy_model.o production_e.o \ 348 subsidence.o user_actions.o 350 subsidence.o user_actions.o \ 351 microphysics.o 349 352 random_gauss.o: random_function.o 350 353 read_3d_binary.o: modules.o random_function.o … … 394 397 write_compressed.o: modules.o 395 398 write_var_list.o: modules.o 399 microphysics.o: modules.o -
palm/trunk/SOURCE/advec_ws.f90
r1037 r1053 20 20 ! Current revisions: 21 21 ! ------------------ 22 ! necessary expansions according to the two new prognostic equations (nr, qr) 23 ! of the two-moment cloud physics scheme: 24 ! +flux_l_*, flux_s_*, diss_l_*, diss_s_*, sums_ws*s_ws_l 22 25 ! 23 26 ! Former revisions: … … 210 213 ENDIF 211 214 215 IF ( cloud_physics .AND. icloud_scheme == 0 ) THEN 216 ALLOCATE( sums_wsqrs_ws_l(nzb:nzt+1,0:threads_per_task-1) ) 217 ALLOCATE( sums_wsnrs_ws_l(nzb:nzt+1,0:threads_per_task-1) ) 218 sums_wsqrs_ws_l = 0.0 219 sums_wsnrs_ws_l = 0.0 220 ENDIF 221 212 222 IF ( ocean ) THEN 213 223 ALLOCATE( sums_wssas_ws_l(nzb:nzt+1,0:threads_per_task-1) ) … … 253 263 254 264 IF ( humidity .OR. passive_scalar ) THEN 255 ALLOCATE( flux_s_q(nzb+1:nzt,0:threads_per_task-1), &265 ALLOCATE( flux_s_q(nzb+1:nzt,0:threads_per_task-1), & 256 266 diss_s_q(nzb+1:nzt,0:threads_per_task-1) ) 257 ALLOCATE( flux_l_q(nzb+1:nzt,nys:nyn,0:threads_per_task-1), &267 ALLOCATE( flux_l_q(nzb+1:nzt,nys:nyn,0:threads_per_task-1), & 258 268 diss_l_q(nzb+1:nzt,nys:nyn,0:threads_per_task-1) ) 259 269 ENDIF 270 271 IF ( cloud_physics .AND. icloud_scheme == 0 ) THEN 272 ALLOCATE( flux_s_qr(nzb+1:nzt,0:threads_per_task-1), & 273 diss_s_qr(nzb+1:nzt,0:threads_per_task-1), & 274 flux_s_nr(nzb+1:nzt,0:threads_per_task-1), & 275 diss_s_nr(nzb+1:nzt,0:threads_per_task-1) ) 276 ALLOCATE( flux_l_qr(nzb+1:nzt,nys:nyn,0:threads_per_task-1), & 277 diss_l_qr(nzb+1:nzt,nys:nyn,0:threads_per_task-1), & 278 flux_l_nr(nzb+1:nzt,nys:nyn,0:threads_per_task-1), & 279 diss_l_nr(nzb+1:nzt,nys:nyn,0:threads_per_task-1) ) 280 END IF 260 281 261 282 IF ( ocean ) THEN … … 297 318 sums_wspts_ws_l = 0.0 298 319 IF ( humidity .OR. passive_scalar ) sums_wsqs_ws_l = 0.0 320 IF ( cloud_physics .AND. icloud_scheme == 0 ) THEN 321 sums_wsqrs_ws_l = 0.0 322 sums_wsnrs_ws_l = 0.0 323 ENDIF 299 324 IF ( ocean ) sums_wssas_ws_l = 0.0 300 325 … … 307 332 ! Scalar advection - Call for grid point i,j 308 333 !------------------------------------------------------------------------------! 309 SUBROUTINE advec_s_ws_ij( i, j, sk, sk_char, swap_flux_y_local, &310 swap_diss_y_local, swap_flux_x_local, &334 SUBROUTINE advec_s_ws_ij( i, j, sk, sk_char, swap_flux_y_local, & 335 swap_diss_y_local, swap_flux_x_local, & 311 336 swap_diss_x_local, i_omp, tn ) 312 337 … … 727 752 * weight_substep(intermediate_timestep_count) 728 753 ENDDO 754 755 CASE ( 'qr' ) 756 757 DO k = nzb, nzt 758 sums_wsqrs_ws_l(k,tn) = sums_wsqrs_ws_l(k,tn) + & 759 ( flux_t(k) + diss_t(k) ) & 760 * weight_substep(intermediate_timestep_count) 761 ENDDO 762 763 CASE ( 'nr' ) 764 765 DO k = nzb, nzt 766 sums_wsnrs_ws_l(k,tn) = sums_wsnrs_ws_l(k,tn) + & 767 ( flux_t(k) + diss_t(k) ) & 768 * weight_substep(intermediate_timestep_count) 769 ENDDO 770 729 771 730 772 END SELECT -
palm/trunk/SOURCE/average_3d_data.f90
r1037 r1053 20 20 ! Current revisions: 21 21 ! ----------------- 22 ! 22 ! averaging of nr, qr added 23 23 ! 24 24 ! Former revisions: … … 117 117 ENDDO 118 118 119 CASE ( 'nr' ) 120 DO i = nxlg, nxrg 121 DO j = nysg, nyng 122 DO k = nzb, nzt+1 123 nr_av(k,j,i) = nr_av(k,j,i) / REAL( average_count_3d ) 124 ENDDO 125 ENDDO 126 ENDDO 127 119 128 CASE ( 'p' ) 120 129 DO i = nxlg, nxrg … … 207 216 ENDDO 208 217 218 CASE ( 'qr' ) 219 DO i = nxlg, nxrg 220 DO j = nysg, nyng 221 DO k = nzb, nzt+1 222 qr_av(k,j,i) = qr_av(k,j,i) / REAL( average_count_3d ) 223 ENDDO 224 ENDDO 225 ENDDO 226 209 227 CASE ( 'qv' ) 210 228 DO i = nxlg, nxrg -
palm/trunk/SOURCE/boundary_conds.f90
r1037 r1053 20 20 ! Current revisions: 21 21 ! ----------------- 22 ! 22 ! boundary conditions for the two new prognostic equations (nr, qr) of the 23 ! two-moment cloud scheme 23 24 ! 24 25 ! Former revisions: … … 216 217 !-- Top boundary 217 218 q_p(nzt+1,:,:) = q_p(nzt,:,:) + bc_q_t_val * dzu(nzt+1) 219 220 IF ( cloud_physics .AND. icloud_scheme == 0 ) THEN 221 ! 222 !-- Surface conditions for constant_humidity_flux 223 IF ( ibc_qr_b == 0 ) THEN 224 DO i = nxlg, nxrg 225 DO j = nysg, nyng 226 qr_p(nzb_s_inner(j,i),j,i) = qr(nzb_s_inner(j,i),j,i) 227 ENDDO 228 ENDDO 229 ELSE 230 DO i = nxlg, nxrg 231 DO j = nysg, nyng 232 qr_p(nzb_s_inner(j,i),j,i) = qr_p(nzb_s_inner(j,i)+1,j,i) 233 ENDDO 234 ENDDO 235 ENDIF 236 ! 237 !-- Top boundary 238 qr_p(nzt+1,:,:) = qr_p(nzt,:,:) + bc_qr_t_val * dzu(nzt+1) 239 ! 240 !-- Surface conditions for constant_humidity_flux 241 IF ( ibc_nr_b == 0 ) THEN 242 DO i = nxlg, nxrg 243 DO j = nysg, nyng 244 nr_p(nzb_s_inner(j,i),j,i) = nr(nzb_s_inner(j,i),j,i) 245 ENDDO 246 ENDDO 247 ELSE 248 DO i = nxlg, nxrg 249 DO j = nysg, nyng 250 nr_p(nzb_s_inner(j,i),j,i) = nr_p(nzb_s_inner(j,i)+1,j,i) 251 ENDDO 252 ENDDO 253 ENDIF 254 ! 255 !-- Top boundary 256 nr_p(nzt+1,:,:) = nr_p(nzt,:,:) + bc_nr_t_val * dzu(nzt+1) 257 ENDIF 218 258 219 259 ENDIF … … 242 282 pt_p(:,nys-1,:) = pt_p(:,nys,:) 243 283 IF ( .NOT. constant_diffusion ) e_p(:,nys-1,:) = e_p(:,nys,:) 244 IF ( humidity .OR. passive_scalar ) q_p(:,nys-1,:) = q_p(:,nys,:) 284 IF ( humidity .OR. passive_scalar ) THEN 285 q_p(:,nys-1,:) = q_p(:,nys,:) 286 IF ( cloud_physics .AND. icloud_scheme == 0 ) THEN 287 qr_p(:,nys-1,:) = qr_p(:,nys,:) 288 nr_p(:,nys-1,:) = nr_p(:,nys,:) 289 ENDIF 290 ENDIF 245 291 ELSEIF ( outflow_n ) THEN 246 292 pt_p(:,nyn+1,:) = pt_p(:,nyn,:) 247 293 IF ( .NOT. constant_diffusion ) e_p(:,nyn+1,:) = e_p(:,nyn,:) 248 IF ( humidity .OR. passive_scalar ) q_p(:,nyn+1,:) = q_p(:,nyn,:) 294 IF ( humidity .OR. passive_scalar ) THEN 295 q_p(:,nyn+1,:) = q_p(:,nyn,:) 296 IF ( cloud_physics .AND. icloud_scheme == 0 ) THEN 297 qr_p(:,nyn+1,:) = qr_p(:,nyn,:) 298 nr_p(:,nyn+1,:) = nr_p(:,nyn,:) 299 ENDIF 300 ENDIF 249 301 ELSEIF ( outflow_l ) THEN 250 302 pt_p(:,:,nxl-1) = pt_p(:,:,nxl) 251 303 IF ( .NOT. constant_diffusion ) e_p(:,:,nxl-1) = e_p(:,:,nxl) 252 IF ( humidity .OR. passive_scalar ) q_p(:,:,nxl-1) = q_p(:,:,nxl) 304 IF ( humidity .OR. passive_scalar ) THEN 305 q_p(:,:,nxl-1) = q_p(:,:,nxl) 306 IF ( cloud_physics .AND. icloud_scheme == 0 ) THEN 307 qr_p(:,:,nxl-1) = qr_p(:,:,nxl) 308 nr_p(:,:,nxl-1) = nr_p(:,:,nxl) 309 ENDIF 310 ENDIF 253 311 ELSEIF ( outflow_r ) THEN 254 312 pt_p(:,:,nxr+1) = pt_p(:,:,nxr) 255 313 IF ( .NOT. constant_diffusion ) e_p(:,:,nxr+1) = e_p(:,:,nxr) 256 IF ( humidity .OR. passive_scalar ) q_p(:,:,nxr+1) = q_p(:,:,nxr) 314 IF ( humidity .OR. passive_scalar ) THEN 315 q_p(:,:,nxr+1) = q_p(:,:,nxr) 316 IF ( cloud_physics .AND. icloud_scheme == 0 ) THEN 317 qr_p(:,:,nxr+1) = qr_p(:,:,nxr) 318 nr_p(:,:,nxr+1) = nr_p(:,:,nxr) 319 ENDIF 320 ENDIF 257 321 ENDIF 258 322 -
palm/trunk/SOURCE/calc_liquid_water_content.f90
r1037 r1053 20 20 ! Current revisions: 21 21 ! ----------------- 22 ! description expanded to the two-moment cloud scheme 22 23 ! 23 24 ! Former revisions: … … 51 52 ! Description: 52 53 ! ------------ 53 ! Calculation of the liquid water content (0%-or-100%-scheme) 54 ! Calculation of the liquid water content (0%-or-100%-scheme). This scheme is 55 ! used by the one and the two moment cloud physics scheme. Using the two moment 56 ! scheme, this calculation results in the cloud water content. 54 57 !------------------------------------------------------------------------------! 55 58 -
palm/trunk/SOURCE/check_parameters.f90
r1037 r1053 20 20 ! Current revisions: 21 21 ! ----------------- 22 ! 22 ! necessary changes for the new two-moment cloud physics scheme added: 23 ! - check cloud physics scheme (Kessler or Seifert and Beheng) 24 ! - plant_canopy is not allowed 25 ! - currently, only cache loop_optimization is allowed 26 ! - initial profiles of nr, qr 27 ! - boundary condition of nr, qr 28 ! - check output quantities (qr, nr, prr) 23 29 ! 24 30 ! Former revisions: … … 617 623 618 624 ENDIF 619 625 ! 626 !-- Check cloud scheme 627 IF ( cloud_scheme == 'seifert_beheng' ) THEN 628 icloud_scheme = 0 629 ELSEIF ( cloud_scheme == 'kessler' ) THEN 630 icloud_scheme = 1 631 ELSE 632 message_string = 'unknown cloud microphysics scheme cloud_scheme ="' // & 633 TRIM( cloud_scheme ) // '"' 634 CALL message( 'check_parameters', 'PA0357', 1, 2, 0, 6, 0 ) 635 ENDIF 620 636 ! 621 637 !-- Check whether there are any illegal values … … 853 869 ENDIF 854 870 871 IF ( plant_canopy .AND. cloud_physics .AND. icloud_scheme == 0 ) THEN 872 message_string = 'plant_canopy = .TRUE. requires cloud_scheme /=' // & 873 ' seifert_beheng' 874 CALL message( 'check_parameters', 'PA0360', 1, 2, 0, 6, 0 ) 875 ENDIF 876 877 IF ( loop_optimization /= 'cache' .AND. cloud_physics .AND. & 878 icloud_scheme == 0 ) THEN 879 message_string = 'cloud_scheme = seifert_beheng requires ' // & 880 'loop_optimization = cache' 881 CALL message( 'check_parameters', 'PA0362', 1, 2, 0, 6, 0 ) 882 ENDIF 883 855 884 ! 856 885 !-- In case of no model continuation run, check initialising parameters and … … 861 890 !-- Initial profiles for 1D and 3D model, respectively (u,v further below) 862 891 pt_init = pt_surface 863 IF ( humidity ) q_init = q_surface 892 IF ( humidity ) THEN 893 q_init = q_surface 894 ! 895 !-- It is not allowed to choose initial profiles of rain water content 896 !-- and rain drop concentration. They are set to 0.0. 897 IF ( cloud_physics .AND. icloud_scheme == 0 ) THEN 898 qr_init = 0.0 899 nr_init = 0.0 900 ENDIF 901 ENDIF 864 902 IF ( ocean ) sa_init = sa_surface 865 903 IF ( passive_scalar ) q_init = s_surface … … 1167 1205 ENDIF 1168 1206 1169 ! 1170 !-- Store humidity gradient at the top boundary for possile Neumann 1171 !-- boundary condition 1172 bc_q_t_val = ( q_init(nzt+1) - q_init(nzt) ) / dzu(nzt+1) 1207 IF ( cloud_physics .AND. icloud_scheme == 0 ) THEN 1208 1209 i = 1 1210 gradient = 0.0 1211 qr_vertical_gradient_level_ind(1) = 0 1212 DO k = 1, nzt+1 1213 IF ( i < 11 ) THEN 1214 IF ( qr_vertical_gradient_level(i) < zu(k) .AND. & 1215 qr_vertical_gradient_level(i) >= 0.0 ) THEN 1216 gradient = qr_vertical_gradient(i) / 100.0 1217 qr_vertical_gradient_level_ind(i) = k - 1 1218 i = i + 1 1219 ENDIF 1220 ENDIF 1221 IF ( gradient /= 0.0 ) THEN 1222 IF ( k /= 1 ) THEN 1223 qr_init(k) = qr_init(k-1) + dzu(k) * gradient 1224 ELSE 1225 qr_init(k) = qr_init(k-1) + 0.5 * dzu(k) * gradient 1226 ENDIF 1227 ELSE 1228 qr_init(k) = qr_init(k-1) 1229 ENDIF 1230 ! 1231 !-- Avoid negative rain water content 1232 IF ( qr_init(k) < 0.0 ) THEN 1233 qr_init(k) = 0.0 1234 ENDIF 1235 ENDDO 1236 ! 1237 !-- In case of no given rain water content gradients, choose zero gradient 1238 !-- conditions 1239 IF ( qr_vertical_gradient_level(1) == -1.0 ) THEN 1240 qr_vertical_gradient_level(1) = 0.0 1241 ENDIF 1242 1243 i = 1 1244 gradient = 0.0 1245 nr_vertical_gradient_level_ind(1) = 0 1246 DO k = 1, nzt+1 1247 IF ( i < 11 ) THEN 1248 IF ( nr_vertical_gradient_level(i) < zu(k) .AND. & 1249 nr_vertical_gradient_level(i) >= 0.0 ) THEN 1250 gradient = nr_vertical_gradient(i) / 100.0 1251 nr_vertical_gradient_level_ind(i) = k - 1 1252 i = i + 1 1253 ENDIF 1254 ENDIF 1255 IF ( gradient /= 0.0 ) THEN 1256 IF ( k /= 1 ) THEN 1257 nr_init(k) = nr_init(k-1) + dzu(k) * gradient 1258 ELSE 1259 nr_init(k) = nr_init(k-1) + 0.5 * dzu(k) * gradient 1260 ENDIF 1261 ELSE 1262 nr_init(k) = nr_init(k-1) 1263 ENDIF 1264 ! 1265 !-- Avoid negative rain water content 1266 IF ( nr_init(k) < 0.0 ) THEN 1267 nr_init(k) = 0.0 1268 ENDIF 1269 ENDDO 1270 ! 1271 !-- In case of no given rain water content gradients, choose zero gradient 1272 !-- conditions 1273 IF ( nr_vertical_gradient_level(1) == -1.0 ) THEN 1274 nr_vertical_gradient_level(1) = 0.0 1275 ENDIF 1276 1277 ENDIF 1278 ! 1279 !-- Store humidity, rain water content and rain drop concentration 1280 !-- gradient at the top boundary for possile Neumann boundary condition 1281 bc_q_t_val = ( q_init(nzt+1) - q_init(nzt) ) / dzu(nzt+1) 1282 1283 IF ( cloud_physics .AND. icloud_scheme == 0 ) THEN 1284 bc_qr_t_val = ( qr_init(nzt+1) - qr_init(nzt) ) / dzu(nzt+1) 1285 bc_nr_t_val = ( nr_init(nzt+1) - nr_init(nzt) ) / dzu(nzt+1) 1286 ENDIF 1173 1287 1174 1288 ENDIF … … 1344 1458 !-- Set wind speed in the Galilei-transformed system 1345 1459 IF ( galilei_transformation ) THEN 1346 IF ( use_ug_for_galilei_tr .AND. & 1347 ug_vertical_gradient_level(1) == 0.0 .AND. & 1348 vg_vertical_gradient_level(1) == 0.0 ) THEN 1460 IF ( use_ug_for_galilei_tr .AND. & 1461 ug_vertical_gradient_level(1) == 0.0 .AND. & 1462 ug_vertical_gradient(1) == 0.0 .AND. & 1463 vg_vertical_gradient_level(1) == 0.0 .AND. & 1464 vg_vertical_gradient(1) == 0.0 ) THEN 1349 1465 u_gtrans = ug_surface * 0.6 1350 1466 v_gtrans = vg_surface * 0.6 1351 ELSEIF ( use_ug_for_galilei_tr .AND. & 1352 ug_vertical_gradient_level(1) /= 0.0 ) THEN 1467 ELSEIF ( use_ug_for_galilei_tr .AND. & 1468 ( ug_vertical_gradient_level(1) /= 0.0 .OR. & 1469 ug_vertical_gradient(1) /= 0.0 ) ) THEN 1353 1470 message_string = 'baroclinicity (ug) not allowed simultaneously' // & 1354 1471 ' with galilei transformation' 1355 1472 CALL message( 'check_parameters', 'PA0046', 1, 2, 0, 6, 0 ) 1356 ELSEIF ( use_ug_for_galilei_tr .AND. & 1357 vg_vertical_gradient_level(1) /= 0.0 ) THEN 1473 ELSEIF ( use_ug_for_galilei_tr .AND. & 1474 ( vg_vertical_gradient_level(1) /= 0.0 .OR. & 1475 vg_vertical_gradient(1) /= 0.0 ) ) THEN 1358 1476 message_string = 'baroclinicity (vg) not allowed simultaneously' // & 1359 1477 ' with galilei transformation' … … 1650 1768 CALL message( 'check_parameters', 'PA0074', 1, 2, 0, 6, 0 ) 1651 1769 ENDIF 1652 1770 1771 IF ( cloud_physics .AND. icloud_scheme == 0 ) THEN 1772 IF ( bc_qr_b == 'dirichlet' ) THEN 1773 ibc_qr_b = 0 1774 ELSEIF ( bc_qr_b == 'neumann' ) THEN 1775 ibc_qr_b = 1 1776 ELSE 1777 message_string = 'unknown boundary condition: bc_qr_b ="' // & 1778 TRIM( bc_qr_b ) // '"' 1779 CALL message( 'check_parameters', 'PA0352', 1, 2, 0, 6, 0 ) 1780 ENDIF 1781 IF ( bc_qr_t == 'dirichlet' ) THEN 1782 ibc_qr_t = 0 1783 ELSEIF ( bc_qr_t == 'neumann' ) THEN 1784 ibc_qr_t = 1 1785 ELSE 1786 message_string = 'unknown boundary condition: bc_qr_t ="' // & 1787 TRIM( bc_qr_t ) // '"' 1788 CALL message( 'check_parameters', 'PA0353', 1, 2, 0, 6, 0 ) 1789 ENDIF 1790 IF ( bc_nr_b == 'dirichlet' ) THEN 1791 ibc_nr_b = 0 1792 ELSEIF ( bc_nr_b == 'neumann' ) THEN 1793 ibc_nr_b = 1 1794 ELSE 1795 message_string = 'unknown boundary condition: bc_nr_b ="' // & 1796 TRIM( bc_nr_b ) // '"' 1797 CALL message( 'check_parameters', 'PA0355', 1, 2, 0, 6, 0 ) 1798 ENDIF 1799 IF ( bc_nr_t == 'dirichlet' ) THEN 1800 ibc_nr_t = 0 1801 ELSEIF ( bc_nr_t == 'neumann' ) THEN 1802 ibc_nr_t = 1 1803 ELSE 1804 message_string = 'unknown boundary condition: bc_nr_t ="' // & 1805 TRIM( bc_nr_t ) // '"' 1806 CALL message( 'check_parameters', 'PA0356', 1, 2, 0, 6, 0 ) 1807 ENDIF 1808 ENDIF 1809 1653 1810 ENDIF 1654 1811 … … 2483 2640 hom(:,2,72,:) = SPREAD( zu, 2, statistic_regions+1 ) 2484 2641 2642 CASE ( 'nr' ) 2643 IF ( .NOT. cloud_physics ) THEN 2644 message_string = 'data_output_pr = ' // & 2645 TRIM( data_output_pr(i) ) // ' is not imp' // & 2646 'lemented for cloud_physics = .FALSE.' 2647 CALL message( 'check_parameters', 'PA0094', 1, 2, 0, 6, 0 ) 2648 ELSEIF ( icloud_scheme /= 0 ) THEN 2649 message_string = 'data_output_pr = ' // & 2650 TRIM( data_output_pr(i) ) // ' is not imp' // & 2651 'lemented for cloud_scheme /= seifert_beheng' 2652 CALL message( 'check_parameters', 'PA0358', 1, 2, 0, 6, 0 ) 2653 ELSE 2654 dopr_index(i) = 73 2655 dopr_unit(i) = '1/m3' 2656 hom(:,2,73,:) = SPREAD( zu, 2, statistic_regions+1 ) 2657 ENDIF 2658 2659 CASE ( 'qr' ) 2660 IF ( .NOT. cloud_physics ) THEN 2661 message_string = 'data_output_pr = ' // & 2662 TRIM( data_output_pr(i) ) // ' is not imp' // & 2663 'lemented for cloud_physics = .FALSE.' 2664 CALL message( 'check_parameters', 'PA0094', 1, 2, 0, 6, 0 ) 2665 ELSEIF ( icloud_scheme /= 0 ) THEN 2666 message_string = 'data_output_pr = ' // & 2667 TRIM( data_output_pr(i) ) // ' is not imp' // & 2668 'lemented for cloud_scheme /= seifert_beheng' 2669 CALL message( 'check_parameters', 'PA0358', 1, 2, 0, 6, 0 ) 2670 ELSE 2671 dopr_index(i) = 74 2672 dopr_unit(i) = 'kg/kg' 2673 hom(:,2,74,:) = SPREAD( zu, 2, statistic_regions+1 ) 2674 ENDIF 2675 2676 CASE ( 'qc' ) 2677 IF ( .NOT. cloud_physics ) THEN 2678 message_string = 'data_output_pr = ' // & 2679 TRIM( data_output_pr(i) ) // ' is not imp' // & 2680 'lemented for cloud_physics = .FALSE.' 2681 CALL message( 'check_parameters', 'PA0094', 1, 2, 0, 6, 0 ) 2682 ELSEIF ( icloud_scheme /= 0 ) THEN 2683 message_string = 'data_output_pr = ' // & 2684 TRIM( data_output_pr(i) ) // ' is not imp' // & 2685 'lemented for cloud_scheme /= seifert_beheng' 2686 CALL message( 'check_parameters', 'PA0358', 1, 2, 0, 6, 0 ) 2687 ELSE 2688 dopr_index(i) = 75 2689 dopr_unit(i) = 'kg/kg' 2690 hom(:,2,75,:) = SPREAD( zu, 2, statistic_regions+1 ) 2691 ENDIF 2692 2693 CASE ( 'prr' ) 2694 IF ( .NOT. cloud_physics ) THEN 2695 message_string = 'data_output_pr = ' // & 2696 TRIM( data_output_pr(i) ) // ' is not imp' // & 2697 'lemented for cloud_physics = .FALSE.' 2698 CALL message( 'check_parameters', 'PA0094', 1, 2, 0, 6, 0 ) 2699 ELSEIF ( icloud_scheme /= 0 ) THEN 2700 message_string = 'data_output_pr = ' // & 2701 TRIM( data_output_pr(i) ) // ' is not imp' // & 2702 'lemented for cloud_scheme /= seifert_beheng' 2703 CALL message( 'check_parameters', 'PA0358', 1, 2, 0, 6, 0 ) 2704 ELSEIF ( .NOT. precipitation ) THEN 2705 message_string = 'data_output_pr = ' // & 2706 TRIM( data_output_pr(i) ) // ' is not imp' // & 2707 'lemented for precipitation = .FALSE.' 2708 CALL message( 'check_parameters', 'PA0361', 1, 2, 0, 6, 0 ) 2709 2710 ELSE 2711 dopr_index(i) = 76 2712 dopr_unit(i) = 'kg/kg m/s' 2713 hom(:,2,76,:) = SPREAD( zu, 2, statistic_regions+1 ) 2714 ENDIF 2715 2485 2716 CASE DEFAULT 2486 2717 … … 2572 2803 unit = 'K' 2573 2804 2805 CASE ( 'nr' ) 2806 IF ( .NOT. cloud_physics ) THEN 2807 message_string = 'output of "' // TRIM( var ) // '" requi' // & 2808 'res cloud_physics = .TRUE.' 2809 CALL message( 'check_parameters', 'PA0108', 1, 2, 0, 6, 0 ) 2810 ELSEIF ( icloud_scheme /= 0 ) THEN 2811 message_string = 'output of "' // TRIM( var ) // '" requi' // & 2812 'res cloud_scheme = seifert_beheng' 2813 CALL message( 'check_parameters', 'PA0359', 1, 2, 0, 6, 0 ) 2814 ENDIF 2815 unit = '1/m3' 2816 2574 2817 CASE ( 'pc', 'pr' ) 2575 2818 IF ( .NOT. particle_advection ) THEN … … 2581 2824 IF ( TRIM( var ) == 'pr' ) unit = 'm' 2582 2825 2826 CASE ( 'prr' ) 2827 IF ( .NOT. cloud_physics ) THEN 2828 message_string = 'output of "' // TRIM( var ) // '" requi' // & 2829 'res cloud_physics = .TRUE.' 2830 CALL message( 'check_parameters', 'PA0108', 1, 2, 0, 6, 0 ) 2831 ELSEIF ( icloud_scheme /= 0 ) THEN 2832 message_string = 'output of "' // TRIM( var ) // '" requi' // & 2833 'res cloud_scheme = seifert_beheng' 2834 CALL message( 'check_parameters', 'PA0359', 1, 2, 0, 6, 0 ) 2835 ELSEIF ( .NOT. precipitation ) THEN 2836 message_string = 'output of "' // TRIM( var ) // '" requi' // & 2837 'res precipitation = .TRUE.' 2838 CALL message( 'check_parameters', 'PA0112', 1, 2, 0, 6, 0 ) 2839 ENDIF 2840 unit = 'kg/kg m/s' 2841 2583 2842 CASE ( 'q', 'vpt' ) 2584 2843 IF ( .NOT. humidity ) THEN … … 2590 2849 IF ( TRIM( var ) == 'vpt' ) unit = 'K' 2591 2850 2851 CASE ( 'qc' ) 2852 IF ( .NOT. cloud_physics ) THEN 2853 message_string = 'output of "' // TRIM( var ) // '" requi' // & 2854 'res cloud_physics = .TRUE.' 2855 CALL message( 'check_parameters', 'PA0108', 1, 2, 0, 6, 0 ) 2856 ELSEIF ( icloud_scheme /= 0 ) THEN 2857 message_string = 'output of "' // TRIM( var ) // '" requi' // & 2858 'res cloud_scheme = seifert_beheng' 2859 CALL message( 'check_parameters', 'PA0359', 1, 2, 0, 6, 0 ) 2860 ENDIF 2861 unit = 'kg/kg' 2862 2592 2863 CASE ( 'ql' ) 2593 2864 IF ( .NOT. ( cloud_physics .OR. cloud_droplets ) ) THEN … … 2607 2878 IF ( TRIM( var ) == 'ql_v' ) unit = 'm3' 2608 2879 IF ( TRIM( var ) == 'ql_vp' ) unit = 'none' 2880 2881 CASE ( 'qr' ) 2882 IF ( .NOT. cloud_physics ) THEN 2883 message_string = 'output of "' // TRIM( var ) // '" requi' // & 2884 'res cloud_physics = .TRUE.' 2885 CALL message( 'check_parameters', 'PA0108', 1, 2, 0, 6, 0 ) 2886 ELSEIF ( icloud_scheme /= 0 ) THEN 2887 message_string = 'output of "' // TRIM( var ) // '" requi' // & 2888 'res cloud_scheme = seifert_beheng' 2889 CALL message( 'check_parameters', 'PA0359', 1, 2, 0, 6, 0 ) 2890 ENDIF 2891 unit = 'kg/kg' 2609 2892 2610 2893 CASE ( 'qv' ) -
palm/trunk/SOURCE/data_output_2d.f90
r1037 r1053 20 20 ! Current revisions: 21 21 ! ----------------- 22 ! 22 ! +qr, nr, qc and cross sections 23 23 ! 24 24 ! Former revisions: … … 290 290 two_d = .TRUE. 291 291 level_z(nzb+1) = zu(nzb+1) 292 293 CASE ( 'nr_xy', 'nr_xz', 'nr_yz' ) 294 IF ( av == 0 ) THEN 295 to_be_resorted => nr 296 ELSE 297 to_be_resorted => nr_av 298 ENDIF 299 IF ( mode == 'xy' ) level_z = zu 292 300 293 301 CASE ( 'p_xy', 'p_xz', 'p_yz' ) … … 376 384 377 385 CASE ( 'prr*_xy' ) ! 2d-array 378 IF ( av == 0 ) THEN 379 CALL exchange_horiz_2d( precipitation_rate ) 380 DO i = nxlg, nxrg 381 DO j = nysg, nyng 382 local_pf(i,j,nzb+1) = precipitation_rate(j,i) 383 ENDDO 384 ENDDO 385 ELSE 386 CALL exchange_horiz_2d( precipitation_rate_av ) 387 DO i = nxlg, nxrg 388 DO j = nysg, nyng 389 local_pf(i,j,nzb+1) = precipitation_rate_av(j,i) 390 ENDDO 391 ENDDO 386 IF ( icloud_scheme == 1 ) THEN 387 IF ( av == 0 ) THEN 388 CALL exchange_horiz_2d( precipitation_rate ) 389 DO i = nxlg, nxrg 390 DO j = nysg, nyng 391 local_pf(i,j,nzb+1) = precipitation_rate(j,i) 392 ENDDO 393 ENDDO 394 ELSE 395 CALL exchange_horiz_2d( precipitation_rate_av ) 396 DO i = nxlg, nxrg 397 DO j = nysg, nyng 398 local_pf(i,j,nzb+1) = precipitation_rate_av(j,i) 399 ENDDO 400 ENDDO 401 ENDIF 402 ELSE 403 IF ( av == 0 ) THEN 404 CALL exchange_horiz_2d( prr(nzb+1,:,:) ) 405 DO i = nxlg, nxrg 406 DO j = nysg, nyng 407 local_pf(i,j,nzb+1) = prr(nzb+1,j,i) * hyrho(nzb+1) 408 ENDDO 409 ENDDO 410 ELSE 411 CALL exchange_horiz_2d( prr_av(nzb+1,:,:) ) 412 DO i = nxlg, nxrg 413 DO j = nysg, nyng 414 local_pf(i,j,nzb+1) = prr_av(nzb+1,j,i) * hyrho(nzb+1) 415 ENDDO 416 ENDDO 417 ENDIF 392 418 ENDIF 393 419 resorted = .TRUE. 394 420 two_d = .TRUE. 395 421 level_z(nzb+1) = zu(nzb+1) 422 423 CASE ( 'prr_xy', 'prr_xz', 'prr_yz' ) 424 IF ( av == 0 ) THEN 425 CALL exchange_horiz( prr, nbgp ) 426 DO i = nxlg, nxrg 427 DO j = nysg, nyng 428 DO k = nzb, nzt+1 429 local_pf(i,j,k) = prr(k,j,i) 430 ENDDO 431 ENDDO 432 ENDDO 433 ELSE 434 CALL exchange_horiz( prr_av, nbgp ) 435 DO i = nxlg, nxrg 436 DO j = nysg, nyng 437 DO k = nzb, nzt+1 438 local_pf(i,j,k) = prr_av(k,j,i) 439 ENDDO 440 ENDDO 441 ENDDO 442 ENDIF 443 resorted = .TRUE. 444 IF ( mode == 'xy' ) level_z = zu 396 445 397 446 CASE ( 'pt_xy', 'pt_xz', 'pt_yz' ) … … 424 473 IF ( mode == 'xy' ) level_z = zu 425 474 475 CASE ( 'qc_xy', 'qc_xz', 'qc_yz' ) 476 IF ( av == 0 ) THEN 477 to_be_resorted => ql 478 ELSE 479 to_be_resorted => ql_av 480 ENDIF 481 IF ( mode == 'xy' ) level_z = zu 482 426 483 CASE ( 'ql_xy', 'ql_xz', 'ql_yz' ) 427 484 IF ( av == 0 ) THEN 428 to_be_resorted => ql 429 ELSE 430 to_be_resorted => ql_av 485 IF ( icloud_scheme == 0 ) THEN 486 DO i = nxlg, nxrg 487 DO j = nysg, nyng 488 DO k = nzb, nz_do3d 489 local_pf(i,j,k) = ql(k,j,i) + qr(k,j,i) 490 ENDDO 491 ENDDO 492 ENDDO 493 resorted = .TRUE. 494 ELSE 495 to_be_resorted => ql 496 ENDIF 497 ELSE 498 IF ( icloud_scheme == 0 ) THEN 499 DO i = nxlg, nxrg 500 DO j = nysg, nyng 501 DO k = nzb, nz_do3d 502 local_pf(i,j,k) = ql_av(k,j,i) + qr_av(k,j,i) 503 ENDDO 504 ENDDO 505 ENDDO 506 resorted = .TRUE. 507 ELSE 508 to_be_resorted => ql_av 509 ENDIF 431 510 ENDIF 432 511 IF ( mode == 'xy' ) level_z = zu … … 478 557 CALL exchange_horiz( ql_vp_av, nbgp ) 479 558 to_be_resorted => ql_vp 559 ENDIF 560 IF ( mode == 'xy' ) level_z = zu 561 562 CASE ( 'qr_xy', 'qr_xz', 'qr_yz' ) 563 IF ( av == 0 ) THEN 564 to_be_resorted => qr 565 ELSE 566 to_be_resorted => qr_av 480 567 ENDIF 481 568 IF ( mode == 'xy' ) level_z = zu -
palm/trunk/SOURCE/data_output_3d.f90
r1037 r1053 20 20 ! Current revisions: 21 21 ! ----------------- 22 ! 22 ! +nr, qr, prr, qc and averaged quantities 23 23 ! 24 24 ! Former revisions: … … 207 207 ENDIF 208 208 209 CASE ( 'nr' ) 210 IF ( av == 0 ) THEN 211 to_be_resorted => nr 212 ELSE 213 to_be_resorted => nr_av 214 ENDIF 215 209 216 CASE ( 'p' ) 210 217 IF ( av == 0 ) THEN … … 270 277 ENDIF 271 278 279 CASE ( 'prr' ) 280 IF ( av == 0 ) THEN 281 CALL exchange_horiz( prr, nbgp ) 282 DO i = nxlg, nxrg 283 DO j = nysg, nyng 284 DO k = nzb, nzt+1 285 local_pf(i,j,k) = prr(k,j,i) 286 ENDDO 287 ENDDO 288 ENDDO 289 ELSE 290 CALL exchange_horiz( prr_av, nbgp ) 291 DO i = nxlg, nxrg 292 DO j = nysg, nyng 293 DO k = nzb, nzt+1 294 local_pf(i,j,k) = prr_av(k,j,i) 295 ENDDO 296 ENDDO 297 ENDDO 298 ENDIF 299 resorted = .TRUE. 300 272 301 CASE ( 'pt' ) 273 302 IF ( av == 0 ) THEN … … 297 326 ENDIF 298 327 328 CASE ( 'qc' ) 329 IF ( av == 0 ) THEN 330 to_be_resorted => ql 331 ELSE 332 to_be_resorted => ql_av 333 ENDIF 334 299 335 CASE ( 'ql' ) 300 336 IF ( av == 0 ) THEN 301 to_be_resorted => ql 302 ELSE 303 to_be_resorted => ql_av 337 IF ( icloud_scheme == 0 ) THEN 338 DO i = nxlg, nxrg 339 DO j = nysg, nyng 340 DO k = nzb, nz_do3d 341 local_pf(i,j,k) = ql(k,j,i) + qr(k,j,i) 342 ENDDO 343 ENDDO 344 ENDDO 345 resorted = .TRUE. 346 ELSE 347 to_be_resorted => ql 348 ENDIF 349 ELSE 350 IF ( icloud_scheme == 0 ) THEN 351 DO i = nxlg, nxrg 352 DO j = nysg, nyng 353 DO k = nzb, nz_do3d 354 local_pf(i,j,k) = ql_av(k,j,i) + qr_av(k,j,i) 355 ENDDO 356 ENDDO 357 ENDDO 358 resorted = .TRUE. 359 ELSE 360 to_be_resorted => ql_av 361 ENDIF 304 362 ENDIF 305 363 … … 344 402 CALL exchange_horiz( ql_vp_av, nbgp ) 345 403 to_be_resorted => ql_vp_av 404 ENDIF 405 406 CASE ( 'qr' ) 407 IF ( av == 0 ) THEN 408 to_be_resorted => qr 409 ELSE 410 to_be_resorted => qr_av 346 411 ENDIF 347 412 -
palm/trunk/SOURCE/flow_statistics.f90
r1037 r1053 20 20 ! Current revisions: 21 21 ! ----------------- 22 ! 22 ! necessary additions for two-moment cloud physics scheme: 23 ! +nr, qr, qc, prr 23 24 ! 24 25 ! Former revisions: … … 748 749 749 750 ! 750 !-- Buoyancy flux, water flux, humidity flux andliquid water751 !-- content 751 !-- Buoyancy flux, water flux, humidity flux, liquid water 752 !-- content, rain drop concentration and rain water content 752 753 IF ( humidity ) THEN 753 754 IF ( cloud_physics .OR. cloud_droplets ) THEN 754 pts = 0.5 * ( vpt(k,j,i) - hom(k,1,44,sr) + &755 pts = 0.5 * ( vpt(k,j,i) - hom(k,1,44,sr) + & 755 756 vpt(k+1,j,i) - hom(k+1,1,44,sr) ) 756 757 sums_l(k,46,tn) = sums_l(k,46,tn) + pts * w(k,j,i) * & 757 758 rmask(j,i,sr) 758 sums_l(k,54,tn) = sums_l(k,54,tn) + ql(k,j,i) * & 759 rmask(j,i,sr) 759 IF ( .NOT. cloud_droplets ) THEN 760 pts = 0.5 * & 761 ( ( q(k,j,i) - ql(k,j,i) ) - & 762 hom(k,1,42,sr) + & 763 ( q(k+1,j,i) - ql(k+1,j,i) ) - & 764 hom(k+1,1,42,sr) ) 765 sums_l(k,52,tn) = sums_l(k,52,tn) + pts * w(k,j,i) * & 766 rmask(j,i,sr) 767 IF ( icloud_scheme == 0 ) THEN 768 sums_l(k,54,tn) = sums_l(k,54,tn) + ( ql(k,j,i) + & 769 qr(k,j,i) ) * & 770 rmask(j,i,sr) 771 sums_l(k,73,tn) = sums_l(k,73,tn) + nr(k,j,i) * & 772 rmask(j,i,sr) 773 sums_l(k,74,tn) = sums_l(k,74,tn) + qr(k,j,i) * & 774 rmask(j,i,sr) 775 sums_l(k,75,tn) = sums_l(k,75,tn) + ql(k,j,i) * & 776 rmask(j,i,sr) 777 sums_l(k,76,tn) = sums_l(k,76,tn) + prr(k,j,i) * & 778 rmask(j,i,sr) 779 ELSE 780 sums_l(k,54,tn) = sums_l(k,54,tn) + ql(k,j,i) * & 781 rmask(j,i,sr) 782 ENDIF 783 ELSE 784 sums_l(k,54,tn) = sums_l(k,54,tn) + ql(k,j,i) * & 785 rmask(j,i,sr) 786 ENDIF 760 787 ELSE 761 788 IF( .NOT. ws_scheme_sca .OR. sr /= 0 ) THEN … … 765 792 rmask(j,i,sr) 766 793 ELSE IF ( ws_scheme_sca .AND. sr == 0 ) THEN 767 sums_l(k,46,tn) = ( 1.0 + 0.61 * hom(k,1,41,sr) ) * &794 sums_l(k,46,tn) = ( 1.0 + 0.61 * hom(k,1,41,sr) ) * & 768 795 sums_l(k,17,tn) + & 769 796 0.61 * hom(k,1,4,sr) * sums_l(k,49,tn) … … 1105 1132 hom(:,1,71,sr) = sums(:,71) ! prho 1106 1133 hom(:,1,72,sr) = hyp * 1E-4 ! hyp in dbar 1134 hom(:,1,73,sr) = sums(:,73) ! nr 1135 hom(:,1,74,sr) = sums(:,74) ! qr 1136 hom(:,1,75,sr) = sums(:,75) ! qc 1137 hom(:,1,76,sr) = sums(:,76) ! prr (precipitation rate) 1107 1138 1108 1139 hom(:,1,pr_palm-1,sr) = sums(:,pr_palm-1) -
palm/trunk/SOURCE/init_3d_model.f90
r1037 r1053 23 23 ! Current revisions: 24 24 ! ------------------ 25 ! 25 ! allocation and initialisation of necessary data arrays for the two-moment 26 ! cloud physics scheme the two new prognostic equations (nr, qr): 27 ! +dr, lambda_r, mu_r, sed_*, xr, *s, *sws, *swst, *, *_p, t*_m, *_1, *_2, *_3, 28 ! +tend_*, prr 26 29 ! 27 30 ! Former revisions: … … 353 356 354 357 IF ( cloud_physics ) THEN 358 355 359 ! 356 360 !-- Liquid water content … … 364 368 ALLOCATE( precipitation_amount(nysg:nyng,nxlg:nxrg), & 365 369 precipitation_rate(nysg:nyng,nxlg:nxrg) ) 370 371 IF ( icloud_scheme == 0 ) THEN 372 ! 373 !-- 1D-rain sedimentation fluxes and rain drop size distribution 374 !-- properties 375 ALLOCATE ( dr(nzb:nzt+1), lambda_r(nzb:nzt+1), & 376 mu_r(nzb:nzt+1), sed_q(nzb:nzt+1), & 377 sed_qr(nzb:nzt+1), sed_nr(nzb:nzt+1),& 378 xr(nzb:nzt+1) ) 379 ! 380 !-- 2D-rain water content and rain drop concentration arrays 381 ALLOCATE ( qrs(nysg:nyng,nxlg:nxrg), & 382 qrsws(nysg:nyng,nxlg:nxrg), & 383 qrswst(nysg:nyng,nxlg:nxrg), & 384 nrs(nysg:nyng,nxlg:nxrg), & 385 nrsws(nysg:nyng,nxlg:nxrg), & 386 nrswst(nysg:nyng,nxlg:nxrg) ) 387 ! 388 !-- 3D-rain water content, rain drop concentration arrays 389 #if defined( __nopointer ) 390 ALLOCATE( nr(nzb:nzt+1,nysg:nyng,nxlg:nxrg), & 391 nr_p(nzb:nzt+1,nysg:nyng,nxlg:nxrg), & 392 qr(nzb:nzt+1,nysg:nyng,nxlg:nxrg), & 393 qr_p(nzb:nzt+1,nysg:nyng,nxlg:nxrg), & 394 tnr_m(nzb:nzt+1,nysg:nyng,nxlg:nxrg), & 395 tqr_m(nzb:nzt+1,nysg:nyng,nxlg:nxrg) ) 396 #else 397 ALLOCATE( nr_1(nzb:nzt+1,nysg:nyng,nxlg:nxrg), & 398 nr_2(nzb:nzt+1,nysg:nyng,nxlg:nxrg), & 399 nr_3(nzb:nzt+1,nysg:nyng,nxlg:nxrg), & 400 qr_1(nzb:nzt+1,nysg:nyng,nxlg:nxrg), & 401 qr_2(nzb:nzt+1,nysg:nyng,nxlg:nxrg), & 402 qr_3(nzb:nzt+1,nysg:nyng,nxlg:nxrg) ) 403 #endif 404 ! 405 !-- 3D-tendency arrays 406 ALLOCATE( tend_nr(nzb:nzt+1,nysg:nyng,nxlg:nxrg), & 407 tend_pt(nzb:nzt+1,nysg:nyng,nxlg:nxrg), & 408 tend_q(nzb:nzt+1,nysg:nyng,nxlg:nxrg), & 409 tend_qr(nzb:nzt+1,nysg:nyng,nxlg:nxrg) ) 410 ! 411 !-- 3d-precipitation rate 412 IF ( precipitation ) THEN 413 ALLOCATE( prr(nzb:nzt+1,nysg:nyng,nxlg:nxrg) ) 414 ENDIF 415 416 ENDIF 366 417 ENDIF 367 418 … … 508 559 IF ( humidity .OR. passive_scalar ) THEN 509 560 q => q_1; q_p => q_2; tq_m => q_3 510 IF ( humidity ) vpt => vpt_1 511 IF ( cloud_physics ) ql => ql_1 561 IF ( humidity ) THEN 562 vpt => vpt_1 563 IF ( cloud_physics ) THEN 564 ql => ql_1 565 IF ( icloud_scheme == 0 ) THEN 566 qr => qr_1; qr_p => qr_2; tqr_m => qr_3 567 nr => nr_1; nr_p => nr_2; tnr_m => nr_3 568 ENDIF 569 ENDIF 570 ENDIF 512 571 IF ( cloud_droplets ) THEN 513 572 ql => ql_1 … … 564 623 ENDDO 565 624 ENDDO 625 IF ( cloud_physics .AND. icloud_scheme == 0 ) THEN 626 DO i = nxlg, nxrg 627 DO j = nysg, nyng 628 qr(:,j,i) = qr_init 629 nr(:,j,i) = nr_init 630 ENDDO 631 ENDDO 632 ENDIF 566 633 ENDIF 567 634 … … 606 673 !-- This could actually be computed more accurately in the 1D model. 607 674 !-- Update when opportunity arises! 608 IF ( humidity .OR. passive_scalar ) qs = 0.0 675 IF ( humidity .OR. passive_scalar ) THEN 676 qs = 0.0 677 IF ( cloud_physics .AND. icloud_scheme == 0 ) THEN 678 qrs = 0.0 679 nrs = 0.0 680 ENDIF 681 ENDIF 609 682 610 683 ! … … 671 744 ENDDO 672 745 ENDDO 746 IF ( cloud_physics .AND. icloud_scheme == 0 ) THEN 747 DO i = nxlg, nxrg 748 DO j = nysg, nyng 749 qr(:,j,i) = qr_init 750 nr(:,j,i) = nr_init 751 ENDDO 752 ENDDO 753 ENDIF 673 754 ENDIF 674 755 … … 811 892 !-- Determine the near-surface water flux 812 893 IF ( humidity .OR. passive_scalar ) THEN 894 IF ( cloud_physics .AND. icloud_scheme ) THEN 895 IF ( constant_waterflux_qr ) THEN 896 qrsws = surface_waterflux_qr 897 ENDIF 898 IF (constant_waterflux_nr ) THEN 899 nrsws = surface_waterflux_nr 900 ENDIF 901 ENDIF 813 902 IF ( constant_waterflux ) THEN 814 903 qsws = surface_waterflux … … 842 931 tswst = top_heatflux 843 932 844 IF ( humidity .OR. passive_scalar ) qswst = 0.0 933 IF ( humidity .OR. passive_scalar ) THEN 934 qswst = 0.0 935 IF ( cloud_physics .AND. icloud_scheme == 0 ) THEN 936 nrswst = 0.0 937 qrswst = 0.0 938 ENDIF 939 ENDIF 845 940 846 941 IF ( ocean ) THEN … … 877 972 IF ( humidity .OR. passive_scalar ) THEN 878 973 IF ( .NOT. constant_waterflux ) qsws = 0.0 974 IF ( cloud_physics .AND. icloud_scheme == 0 ) THEN 975 IF ( .NOT. constant_waterflux_qr ) THEN 976 qrsws = 0.0 977 ENDIF 978 IF ( .NOT. constant_waterflux_nr ) THEN 979 nrsws = 0.0 980 ENDIF 981 ENDIF 879 982 ENDIF 880 983 … … 925 1028 q_surface_initial_change /= 0.0 ) THEN 926 1029 q(nzb,:,:) = q(nzb,:,:) + q_surface_initial_change 1030 IF ( cloud_physics .AND. icloud_scheme == 0 ) THEN 1031 IF ( qr_surface_initial_change /= 0.0 ) THEN 1032 qr(nzb,:,:) = qr(nzb,:,:) + qr_surface_initial_change 1033 ELSEIF ( nr_surface_initial_change /= 0.0 ) THEN 1034 nr(nzb,:,:) = nr(nzb,:,:) + nr_surface_initial_change 1035 ENDIF 1036 ENDIF 927 1037 ENDIF 928 1038 … … 939 1049 tq_m = 0.0 940 1050 q_p = q 1051 IF ( cloud_physics .AND. icloud_scheme == 0 ) THEN 1052 tqr_m = 0.0 1053 qr_p = qr 1054 tnr_m = 0.0 1055 nr_p = nr 1056 ENDIF 941 1057 ENDIF 942 1058 … … 1109 1225 !-- including ghost points) 1110 1226 e_p = e; pt_p = pt; u_p = u; v_p = v; w_p = w 1111 IF ( humidity .OR. passive_scalar ) q_p = q 1227 IF ( humidity .OR. passive_scalar ) THEN 1228 q_p = q 1229 IF ( cloud_physics .AND. icloud_scheme == 0 ) THEN 1230 qr_p = qr 1231 nr_p = nr 1232 ENDIF 1233 ENDIF 1112 1234 IF ( ocean ) sa_p = sa 1113 1235 … … 1117 1239 !-- there before they are set. 1118 1240 te_m = 0.0; tpt_m = 0.0; tu_m = 0.0; tv_m = 0.0; tw_m = 0.0 1119 IF ( humidity .OR. passive_scalar ) tq_m = 0.0 1241 IF ( humidity .OR. passive_scalar ) THEN 1242 tq_m = 0.0 1243 IF ( cloud_physics .AND. icloud_scheme == 0 ) THEN 1244 tqr_m = 0.0 1245 tnr_m = 0.0 1246 ENDIF 1247 ENDIF 1120 1248 IF ( ocean ) tsa_m = 0.0 1121 1249 -
palm/trunk/SOURCE/init_cloud_physics.f90
r1037 r1053 20 20 ! Current revisions: 21 21 ! ----------------- 22 ! 22 ! calculation of the maximum timestep according to the terminal velocity of rain 23 ! drops in the two moment cloud scheme 24 ! 25 ! calculation of frequently used constants (pirho_l, dpirho_l, schmidt_p_1d3, 26 ! hyrho) 23 27 ! 24 28 ! Former revisions: … … 66 70 REAL :: t_surface 67 71 68 ALLOCATE( hyp(nzb:nzt+1), pt_d_t(nzb:nzt+1), t_d_pt(nzb:nzt+1) ) 72 ALLOCATE( hyp(nzb:nzt+1), pt_d_t(nzb:nzt+1), t_d_pt(nzb:nzt+1), & 73 hyrho(nzb:nzt+1) ) 69 74 70 75 ! … … 73 78 l_d_r = l_v / r_d 74 79 l_d_rv = l_v / r_v 80 81 schmidt_p_1d3 = schmidt**( 1.0 / 3.0 ) 82 83 pirho_l = pi * rho_l / 6.0 84 dpirho_l = 1.0 / pirho_l 85 ! 86 !-- Calculate timestep according to precipitation 87 IF ( icloud_scheme == 0 .AND. precipitation ) THEN 88 dt_precipitation = MINVAL( dzu(nzb+2:nzt) ) / w_precipitation 89 ENDIF 75 90 ! 76 91 !-- Calculate factor used in equation for droplet growth by condensation … … 94 109 ( (t_surface - g/cp * zu(k)) / t_surface )**(1.0/0.286) 95 110 pt_d_t(k) = ( 100000.0 / hyp(k) )**0.286 96 t_d_pt(k) = 1.0 / pt_d_t(k) 111 t_d_pt(k) = 1.0 / pt_d_t(k) 112 hyrho(k) = hyp(k) / ( r_d * t_d_pt(k) * pt_init(k) ) 97 113 ENDDO 98 114 -
palm/trunk/SOURCE/modules.f90
r1037 r1053 20 20 ! Current revisions: 21 21 ! ----------------- 22 ! 22 ! necessary expansions according to the two new prognostic equations (nr, qr) 23 ! of the two-moment cloud physics scheme: 24 ! +*_init, flux_l_*, diss_l_*, flux_s_*, diss_s_*, *sws, *swst, tend_*, *, *_p 25 ! +t*_m, *_1, *_2, *_3, *_av, bc_*_b, bc_*_t, ibc_*_b, ibc_*_t, bc_*_t_val, 26 ! +*_vertical_gradient, *_surface_initial_change, *_vertical_gradient_level, 27 ! +*_vertical_gradient_level_ind, *_surface, constant_waterflux_*, 28 ! +cloud_scheme, icloud_scheme, surface_waterflux_*, sums_ws*s_ws_l, wall_*flux 29 ! 30 ! constants for the two-moment scheme: 31 ! +a_vent, a_term, b_vent, b_term, c_evap, c_term, cof, eps_sb, k_cc, k_cr, k_rr, 32 ! +k_br, kappa_rr, kin_vis_air, mu_constant_value, nc, pirho_l, dpirho_l, rho_1, 33 ! +schmidt, schmidt_p_1d3, stp, x0, xmin, xmax, dt_precipitation, w_precipitation 34 ! 35 ! steering parameters for the two_moment scheme: 36 ! +mu_constant, ventilation_effect 23 37 ! 24 38 ! Former revisions: … … 369 383 c_u_m, c_u_m_l, c_v_m, c_v_m_l, c_w_m, c_w_m_l, ddzu, ddzu_pres, & 370 384 dd2zu, dzu, ddzw, dzw, hyp, inflow_damping_factor, lad, l_grid, & 371 ptdf_x, ptdf_y, pt_init, q_init, rdf, rdf_sc, sa_init, ug, u_init, & 372 u_nzb_p1_for_vfc, vg, v_init, v_nzb_p1_for_vfc, w_subs, zu, zw 385 nr_init, ptdf_x, ptdf_y, pt_init, q_init, qr_init, rdf, rdf_sc, & 386 sa_init, ug, u_init, u_nzb_p1_for_vfc, vg, v_init, v_nzb_p1_for_vfc, & 387 w_subs, zu, zw 373 388 374 389 REAL, DIMENSION(:,:), ALLOCATABLE :: & 375 c_u, c_v, c_w, diss_s_e, diss_s_pt, diss_s_q, diss_s_sa, diss_s_u, & 376 diss_s_v, diss_s_w, dzu_mg, dzw_mg, flux_s_e, flux_s_pt, flux_s_q, & 377 flux_s_sa, flux_s_u, flux_s_v, flux_s_w, f1_mg, f2_mg, f3_mg, & 378 mean_inflow_profiles, pt_slope_ref, qs, qsws, qswst, qswst_remote, & 379 rif, saswsb, saswst, shf, total_2d_a, total_2d_o, ts, tswst, us, & 380 usws, uswst, vsws, vswst, z0, z0h 390 c_u, c_v, c_w, diss_s_e, diss_s_nr, diss_s_pt, diss_s_q, diss_s_qr, & 391 diss_s_sa, diss_s_u, diss_s_v, diss_s_w, dzu_mg, dzw_mg, flux_s_e, & 392 flux_s_nr, flux_s_pt, flux_s_q, flux_s_qr, flux_s_sa, flux_s_u, & 393 flux_s_v, flux_s_w, f1_mg, f2_mg, f3_mg, mean_inflow_profiles, nrs, & 394 nrsws, nrswst, pt_slope_ref, qs, qsws, qswst, qswst_remote, qrs, & 395 qrsws, qrswst, rif, saswsb, saswst, shf, total_2d_a, total_2d_o, ts, & 396 tswst, us, usws, uswst, vsws, vswst, z0, z0h 397 381 398 382 399 REAL, DIMENSION(:,:,:), ALLOCATABLE :: & 383 400 canopy_heat_flux, cdc, d, de_dx, de_dy, de_dz, diss, diss_l_e, & 384 diss_l_pt, diss_l_q, diss_l_sa, diss_l_u, diss_l_v, diss_l_w, & 385 flux_l_e, flux_l_pt, flux_l_q, flux_l_sa, flux_l_u, flux_l_v, & 386 flux_l_w, kh, km, lad_s, lad_u, lad_v, lad_w, lai, l_wall, p_loc, & 387 sec, sls, tend, u_m_l, u_m_n, u_m_r, u_m_s, v_m_l, v_m_n, v_m_r, & 388 v_m_s, w_m_l, w_m_n, w_m_r, w_m_s 401 diss_l_nr, diss_l_pt, diss_l_q, diss_l_qr, diss_l_sa, diss_l_u, & 402 diss_l_v, diss_l_w, flux_l_e, flux_l_nr, flux_l_pt, flux_l_q, & 403 flux_l_qr, flux_l_sa, flux_l_u, flux_l_v, flux_l_w, kh, km, lad_s, & 404 lad_u, lad_v, lad_w, lai, l_wall, p_loc, sec, sls, tend, tend_pt, & 405 tend_nr, tend_q, tend_qr, u_m_l, u_m_n, u_m_r, u_m_s, v_m_l, v_m_n, & 406 v_m_r, v_m_s, w_m_l, w_m_n, w_m_r, w_m_s 407 389 408 390 409 #if defined( __nopointer ) 391 410 REAL, DIMENSION(:,:,:), ALLOCATABLE, TARGET :: & 392 e, e_p, p, prho, pt, pt_p, q, q_p, ql, ql_c, ql_v, ql_vp, rho, sa,&393 sa_p, te_m, tpt_m, tq_m, tsa_m, tu_m, tv_m, tw_m, u, u_p, v, v_p,&394 vpt, w, w_p411 e, e_p, nr, nr_p, p, prho, pt, pt_p, q, q_p, ql, ql_c, ql_v, ql_vp, & 412 qr, qr_p, rho, sa, sa_p, te_m, tnr_m, tpt_m, tq_m, tqr_m, tsa_m, & 413 tu_m, tv_m, tw_m, u, u_p, v, v_p, vpt, w, w_p 395 414 #else 396 415 REAL, DIMENSION(:,:,:), ALLOCATABLE, TARGET :: & 397 e_1, e_2, e_3, p, prho_1, pt_1, pt_2, pt_3, q_1, q_2, q_3, ql_v,&398 q l_vp, ql_1, ql_2, rho_1, sa_1, sa_2, sa_3, u_1, u_2, u_3,&399 v_1, v_2, v_3, vpt_1, w_1, w_2, w_3416 e_1, e_2, e_3, p, prho_1, nr_1, nr_2, nr_3, pt_1, pt_2, pt_3, q_1, & 417 q_2, q_3, ql_v, ql_vp, ql_1, ql_2, qr_1, qr_2, qr_3, rho_1, sa_1, & 418 sa_2, sa_3, u_1, u_2, u_3, v_1, v_2, v_3, vpt_1, w_1, w_2, w_3 400 419 401 420 REAL, DIMENSION(:,:,:), POINTER :: & 402 e, e_p, prho, pt, pt_p, q, q_p, ql, ql_c, rho, sa, sa_p, te_m, & 403 tpt_m, tq_m, tsa_m, tu_m, tv_m, tw_m, u, u_p, v, v_p, vpt, w, w_p 421 e, e_p, nr, nr_p, prho, pt, pt_p, q, q_p, ql, ql_c, qr, qr_p, rho, & 422 sa, sa_p, te_m, tnr_m, tpt_m, tq_m, tqr_m, tsa_m, tu_m, tv_m, tw_m, & 423 u, u_p, v, v_p, vpt, w, w_p 404 424 #endif 405 425 … … 429 449 430 450 REAL, DIMENSION(:,:,:), ALLOCATABLE, TARGET :: & 431 e_av, lpt_av, p_av, pc_av, pr_av, pt_av, q_av, ql_av, ql_c_av, & 432 ql_v_av, ql_vp_av, qv_av, rho_av, s_av, sa_av, u_av, v_av, vpt_av, & 433 w_av 451 e_av, lpt_av, nr_av, p_av, pc_av, pr_av, prr_av, pt_av, q_av, ql_av, & 452 ql_c_av, ql_v_av, ql_vp_av, qr_av, qv_av, rho_av, s_av, sa_av, u_av, & 453 v_av, vpt_av, w_av 454 434 455 END MODULE averaging 435 456 … … 444 465 !------------------------------------------------------------------------------! 445 466 446 LOGICAL :: curvature_solution_effects = .FALSE. 447 448 REAL :: bfactor, cp = 1005.0, diff_coeff_l = 0.23E-4, & 449 effective_coll_efficiency, & 450 eps_ros = 1.0E-4, & ! accuracy of Rosenbrock method 451 l_d_cp, l_d_r, l_d_rv, l_v = 2.5E+06, & 452 mass_of_solute = 1.0E-17, & ! soluted NaCl in kg 453 molecular_weight_of_solute = 0.05844, & ! mol. mass NaCl (kg/mol) 454 molecular_weight_of_water = 0.01801528,& ! mol. mass H2O (kg/mol) 455 prec_time_const = 0.001, ql_crit = 0.0005, rho_l = 1.0E3, & 456 r_d = 287.0, r_v = 461.51, thermal_conductivity_l = 2.43E-2, & 457 vanthoff = 2.0 ! van't Hoff factor (NaCl) 458 459 REAL, DIMENSION(:), ALLOCATABLE :: pt_d_t, t_d_pt 460 461 REAL, DIMENSION(:,:), ALLOCATABLE :: precipitation_amount, & 462 precipitation_rate 467 LOGICAL :: curvature_solution_effects = .FALSE., & 468 ventilation_effect = .FALSE., & 469 mu_constant = .FALSE. 470 471 REAL :: a_vent = 0.78, & ! coef. for ventilation effect 472 a_term = 9.65, & ! coef. for terminal velocity (m s-1) 473 b_vent = 0.308, & ! coef. for ventilation effect 474 b_term = 9.8, & ! coef. for terminal velocity (m s-1) 475 bfactor, & 476 c_evap = 0.7, & ! constant in evaporation 477 c_term = 600.0, & ! coef. for terminal velocity (m-1) 478 cof(6) = (/ 76.18009172947146, & ! coefficients in the 479 -86.50532032941677, & ! numerical 480 24.01409824083091, & ! calculation of the 481 -1.231739572450155, & ! gamma function 482 0.1208650973866179E-2, & 483 -0.5395239384953E-5 /), & 484 cp = 1005.0, & ! heat capacity of dry air (J kg-1 K-1) 485 diff_coeff_l = 0.23E-4, & ! diffusivity of water vapor (m2 s-1) 486 effective_coll_efficiency, & 487 eps_ros = 1.0E-4, & ! accuracy of Rosenbrock method 488 eps_sb = 1.0E-20, & ! threshold in two-moments scheme 489 k_cc = 4.44E09, & ! const. rain-rain kernel (m3 kg-2 s-1) 490 k_cr = 5.25, & ! const. cloud-rain kernel (m3 kg-1 s-1) 491 k_rr = 7.12, & ! const. rain-rain kernel (m3 kg-1 s-1) 492 k_br = 1000., & ! const. in breakup parametrization (m-1) 493 kappa_rr = 60.7, & ! const. in collision kernel (kg-1/3) 494 kin_vis_air = 1.4086E-5, & ! kin. viscosity of air (m2 s-1) 495 l_v = 2.5E+06, & ! latent heat of vaporization (J kg-1) 496 l_d_cp, l_d_r, l_d_rv, & ! l_v / cp, l_v / r_d, l_v / r_v 497 mass_of_solute = 1.0E-17, & ! soluted NaCl (kg) 498 molecular_weight_of_solute = 0.05844, & ! mol. m. NaCl (kg mol-1) 499 molecular_weight_of_water = 0.01801528, & ! mol. m. H2O (kg mol-1) 500 mu_constant_value = 0.0, & ! shape param. of gamma distribution 501 nc = 70.0E6, & ! cloud droplet concentration 502 prec_time_const = 0.001, & !coef. in Kessler scheme 503 pirho_l, dpirho_l, & ! pi * rho_l / 6.0; 6.0 / ( pi * rho_l ) 504 rho_l = 1.0E3, & ! density of water (kg m-3) 505 ql_crit = 0.0005, & ! coef. in Kessler scheme 506 r_d = 287.0, & ! sp. gas const. dry air (J kg-1 K-1) 507 r_v = 461.51, & ! sp. gas const. water vapor (J kg-1 K-1) 508 schmidt = 0.71, & ! Schmidt number 509 schmidt_p_1d3, & ! schmidt**( 1.0 / 3.0 ) 510 stp = 2.5066282746310005, & ! parameter in gamma function 511 thermal_conductivity_l = 2.43E-2, & ! therm. cond. air (J m-1 s-1 K-1) 512 vanthoff = 2.0, & ! van't Hoff factor for NaCl 513 x0 = 2.6E-10, & ! separating drop mass (kg) 514 xrmin = 2.6E-10, & ! minimum rain drop size (kg) 515 xrmax = 5.0E-6, & ! maximum rain drop site (kg) 516 dt_precipitation = 100.0, & ! timestep precipitation (s) 517 w_precipitation = 9.65 ! maximum terminal velocity (m s-1) 518 519 REAL, DIMENSION(:), ALLOCATABLE :: dr, hyrho, lambda_r, mu_r, pt_d_t, & 520 sed_nr, sed_q, sed_qr, t_d_pt, xr 521 522 REAL, DIMENSION(:,:), ALLOCATABLE :: precipitation_amount, & 523 precipitation_rate 524 ! 525 !-- 3D array of precipitation rate 526 REAL, DIMENSION(:,:,:), ALLOCATABLE :: prr 463 527 464 528 SAVE … … 529 593 scalar_advec = 'ws-scheme' 530 594 CHARACTER (LEN=20) :: bc_e_b = 'neumann', bc_lr = 'cyclic', & 595 bc_nr_b = 'dirichlet', bc_nr_t = 'neumann', & 531 596 bc_ns = 'cyclic', bc_p_b = 'neumann', & 532 597 bc_p_t = 'dirichlet', bc_pt_b = 'dirichlet', & 533 598 bc_pt_t = 'initial_gradient', & 534 599 bc_q_b = 'dirichlet', bc_q_t = 'neumann', & 600 bc_qr_b = 'dirichlet', bc_qr_t = 'neumann',& 535 601 bc_s_b = 'dirichlet', bc_s_t = 'neumann', & 536 602 bc_sa_t = 'neumann', & 537 603 bc_uv_b = 'dirichlet', bc_uv_t = 'dirichlet', & 538 604 canopy_mode = 'block', & 605 cloud_scheme = 'seifert_beheng', & 539 606 coupling_mode = 'uncoupled', & 540 607 coupling_mode_remote = 'uncoupled', & … … 544 611 random_generator = 'numerical-recipes', & 545 612 return_addres, return_username, & 546 timestep_scheme = 'runge-kutta-3' 613 timestep_scheme = 'runge-kutta-3' 547 614 CHARACTER (LEN=40) :: avs_data_file, output_format_netcdf, & 548 615 topography = 'flat' … … 577 644 dp_level_ind_b = 0, dvrp_filecount = 0, & 578 645 dz_stretch_level_index, gamma_mg, gathered_size, & 579 grid_level, ibc_e_b, ibc_p_b, ibc_p_t, ibc_pt_b, ibc_pt_t, & 580 ibc_q_b, ibc_q_t, ibc_sa_t, ibc_uv_b, ibc_uv_t, & 646 grid_level, ibc_e_b, ibc_nr_b, ibc_nr_t, ibc_p_b, ibc_p_t, & 647 ibc_pt_b, ibc_pt_t, ibc_q_b, ibc_q_t, ibc_qr_b, ibc_qr_t, & 648 ibc_sa_t, ibc_uv_b, ibc_uv_t, icloud_scheme, & 581 649 inflow_disturbance_begin = -1, inflow_disturbance_end = -1, & 582 650 intermediate_timestep_count, intermediate_timestep_count_max, & … … 600 668 mask_size(max_masks,3) = -1, mask_size_l(max_masks,3) = -1, & 601 669 mask_start_l(max_masks,3) = -1, & 670 nr_vertical_gradient_level_ind(10) = -9999, & 602 671 pt_vertical_gradient_level_ind(10) = -9999, & 603 672 q_vertical_gradient_level_ind(10) = -9999, & 673 qr_vertical_gradient_level_ind(10) = -9999, & 604 674 sa_vertical_gradient_level_ind(10) = -9999, & 605 675 section(100,3), section_xy(100) = -9999, & … … 631 701 constant_top_momentumflux = .FALSE., & 632 702 constant_top_salinityflux = .TRUE., & 633 constant_waterflux = .TRUE., create_disturbances = .TRUE., & 703 constant_waterflux = .TRUE., constant_waterflux_nr = .TRUE., & 704 constant_waterflux_qr = .TRUE., create_disturbances = .TRUE., & 634 705 data_output_2d_on_each_pe = .TRUE., & 635 706 dissipation_control = .FALSE., disturbance_created = .FALSE., & 636 707 do2d_at_begin = .FALSE., do3d_at_begin = .FALSE., & 637 708 do3d_compress = .FALSE., do_sum = .FALSE., & 638 dp_external = .FALSE., dp_smooth = .FALSE., dt_fixed = .FALSE., & 709 dp_external = .FALSE., dp_smooth = .FALSE., & 710 drizzle = .TRUE., dt_fixed = .FALSE., & 639 711 dt_3d_reached, dt_3d_reached_l, exchange_mg = .FALSE., & 640 712 first_call_lpm = .TRUE., & … … 668 740 averaging_interval = 0.0, averaging_interval_pr = 9999999.9, & 669 741 averaging_interval_sp = 9999999.9, bc_pt_t_val, bc_q_t_val, & 670 b ottom_salinityflux = 0.0, &742 bc_qr_t_val, bc_nr_t_val, bottom_salinityflux = 0.0, & 671 743 building_height = 50.0, building_length_x = 50.0, & 672 744 building_length_y = 50.0, building_wall_left = 9999999.9, & … … 699 771 maximum_cpu_time_allowed = 0.0, & 700 772 molecular_viscosity = 1.461E-5, & 773 nr_surface = 0.0, nr_surface_initial_change = 0.0, & 701 774 old_dt = 1.0E-10, omega = 7.29212E-5, omega_sor = 1.8, & 702 775 particle_maximum_age = 9999999.9, & … … 707 780 pt_surface = 300.0, pt_surface_initial_change = 0.0, & 708 781 q_surface = 0.0, q_surface_initial_change = 0.0, & 782 qr_surface = 0.0, qr_surface_initial_change = 0.0, & 709 783 rayleigh_damping_factor = -1.0, rayleigh_damping_height = -1.0, & 710 784 recycling_width = 9999999.9, residual_limit = 1.0E-4, & … … 719 793 surface_heatflux = 9999999.9, surface_pressure = 1013.25, & 720 794 surface_scalarflux = 9999999.9, surface_waterflux = 9999999.9, & 795 surface_waterflux_nr = 0.0, surface_waterflux_qr = 0.0, & 721 796 s_surface = 0.0, s_surface_initial_change = 0.0, & 722 797 termination_time_needed = -1.0, time_coupling = 0.0, & … … 740 815 lad_vertical_gradient_level(10) = -9999999.9, & 741 816 mask_scale(3), & 817 nr_vertical_gradient(10) = 0.0, & 818 nr_vertical_gradient_level(10) = -1.0, & 742 819 pt_vertical_gradient(10) = 0.0, & 743 820 pt_vertical_gradient_level(10) = -9999999.9, & 744 821 q_vertical_gradient(10) = 0.0, & 745 822 q_vertical_gradient_level(10) = -1.0, & 823 qr_vertical_gradient(10) = 0.0, & 824 qr_vertical_gradient_level(10) = -1.0, & 746 825 s_vertical_gradient(10) = 0.0, & 747 826 s_vertical_gradient_level(10) = -1.0, & … … 759 838 volume_flow(1:2) = 0.0, volume_flow_area(1:2) = 0.0, & 760 839 volume_flow_initial(1:2) = 0.0, wall_heatflux(0:4) = 0.0, & 761 wall_humidityflux(0:4) = 0.0, wall_qflux(0:4) = 0.0, & 840 wall_humidityflux(0:4) = 0.0, wall_nrflux(0:4) = 0.0, & 841 wall_qflux(0:4) = 0.0, wall_qrflux(0:4) = 0.0, & 762 842 wall_salinityflux(0:4) = 0.0, wall_scalarflux(0:4) = 0.0, & 763 843 subs_vertical_gradient(10) = 0.0, & … … 1532 1612 sums_us2_ws_l, sums_vs2_ws_l, & 1533 1613 sums_ws2_ws_l, & 1614 sums_wsnrs_ws_l, & 1534 1615 sums_wspts_ws_l, & 1535 sums_wssas_ws_l,sums_wsqs_ws_l 1616 sums_wssas_ws_l, & 1617 sums_wsqs_ws_l, & 1618 sums_wsqrs_ws_l 1619 1536 1620 REAL, DIMENSION(:,:,:), ALLOCATABLE :: hom_sum, rmask, spectrum_x, & 1537 1621 spectrum_y, sums_l, sums_l_l, & -
palm/trunk/SOURCE/netcdf.f90
r1037 r1053 23 23 ! Current revisions: 24 24 ! ------------------ 25 ! 25 ! +qr, nr, prr 26 26 ! 27 27 ! Former revisions: … … 466 466 ! 467 467 !-- Most variables are defined on the scalar grid 468 CASE ( 'e', 'lpt', 'p', 'pc', 'pr', 'pt', 'q', 'ql', 'ql_c', & 469 'ql_v', 'ql_vp', 'qv', 'rho', 's', 'sa', 'vpt' ) 468 CASE ( 'e', 'lpt', 'nr', 'p', 'pc', 'pr', 'prr', 'pt', 'q',& 469 'qc', 'ql', 'ql_c', 'ql_v', 'ql_vp', 'qr', 'qv', & 470 'rho', 's', 'sa', 'vpt' ) 470 471 471 472 grid_x = 'x' … … 994 995 ! 995 996 !-- Most variables are defined on the scalar grid 996 CASE ( 'e', 'lpt', 'p', 'pc', 'pr', 'pt', 'q', 'ql', 'ql_c', & 997 'ql_v', 'ql_vp', 'qv', 'rho', 's', 'sa', 'vpt' ) 997 CASE ( 'e', 'lpt', 'nr', 'p', 'pc', 'pr', 'prr', 'pt', 'q', & 998 'qc', 'ql', 'ql_c', 'ql_v', 'ql_vp', 'qr', 'qv', 'rho',& 999 's', 'sa', 'vpt' ) 998 1000 999 1001 grid_x = 'x' … … 1556 1558 ! 1557 1559 !-- Most variables are defined on the zu grid 1558 CASE ( 'e_xy', 'lpt_xy', 'p_xy', 'pc_xy', 'pr_xy', 'pt_xy',& 1559 'q_xy', 'ql_xy', 'ql_c_xy', 'ql_v_xy', 'ql_vp_xy', & 1560 'qv_xy', 'rho_xy', 's_xy', 'sa_xy', 'vpt_xy' ) 1560 CASE ( 'e_xy', 'lpt_xy', 'nr_xy', 'p_xy', 'pc_xy', 'pr_xy',& 1561 'prr_xy', 'pt_xy', 'q_xy', 'qc_xy', 'ql_xy', & 1562 'ql_c_xy', 'ql_v_xy', 'ql_vp_xy', 'qr_xy', 'qv_xy', & 1563 'rho_xy', 's_xy', 'sa_xy', 'vpt_xy' ) 1561 1564 1562 1565 grid_x = 'x' … … 2142 2145 ! 2143 2146 !-- Most variables are defined on the zu grid 2144 CASE ( 'e_xz', 'lpt_xz', 'p_xz', 'pc_xz', 'pr_xz', 'pt_xz', & 2145 'q_xz', 'ql_xz', 'ql_c_xz', 'ql_v_xz', 'ql_vp_xz', & 2146 'qv_xz', 'rho_xz', 's_xz', 'sa_xz', 'vpt_xz' ) 2147 CASE ( 'e_xz', 'lpt_xz', 'nr_xz', 'p_xz', 'pc_xz', 'pr_xz', & 2148 'prr_xz', 'pt_xz', 'q_xz', 'qc_xz', 'ql_xz', & 2149 'ql_c_xz', 'ql_v_xz', 'ql_vp_xz', 'qr_xz', 'qv_xz', & 2150 'rho_xz', 's_xz', 'sa_xz', 'vpt_xz' ) 2147 2151 2148 2152 grid_x = 'x' … … 2728 2732 ! 2729 2733 !-- Most variables are defined on the zu grid 2730 CASE ( 'e_yz', 'lpt_yz', 'p_yz', 'pc_yz', 'pr_yz', 'pt_yz',& 2731 'q_yz', 'ql_yz', 'ql_c_yz', 'ql_v_yz', 'ql_vp_yz', & 2732 'qv_yz', 'rho_yz', 's_yz', 'sa_yz', 'vpt_yz' ) 2734 CASE ( 'e_yz', 'lpt_yz', 'nr_yz', 'p_yz', 'pc_yz', 'pr_yz',& 2735 'prr_yz', 'pt_yz', 'q_yz', 'qc_yz', 'ql_yz', & 2736 'ql_c_yz', 'ql_v_yz', 'ql_vp_yz', 'qr_yz', 'qv_yz', & 2737 'rho_yz', 's_yz', 'sa_yz', 'vpt_yz' ) 2733 2738 2734 2739 grid_x = 'x' … … 3915 3920 ! 3916 3921 !-- Most variables are defined on the zu levels 3917 CASE ( 'e', 'lpt', 'p', 'pc', 'pr', 'pt', 'q', 'ql', 'ql_c', & 3918 'ql_v', 'ql_vp', 'qv', 'rho', 's', 'sa', 'u', 'v', 'vpt' ) 3922 CASE ( 'e', 'lpt', 'nr', 'p', 'pc', 'pr', 'prr', 'pt', 'q', & 3923 'qc', 'ql', 'ql_c', 'ql_v', 'ql_vp', 'qr', 'qv', 'rho',& 3924 's', 'sa', 'u', 'v', 'vpt' ) 3919 3925 3920 3926 grid_z = 'zu' -
palm/trunk/SOURCE/parin.f90
r1037 r1053 20 20 ! Current revisions: 21 21 ! ----------------- 22 ! 22 ! necessary expansions according to the two new prognostic equations (nr, qr) 23 ! of the two-moment cloud physics scheme and steering parameters: 24 ! +*_init, *_surface, *_surface_initial_change, *_vertical_gradient, 25 ! +*_vertical_gradient_level, surface_waterflux_*, 26 ! +cloud_scheme, drizzle, mu_constant, mu_constant_value, ventilation_effect 23 27 ! 24 28 ! Former revisions: … … 194 198 canyon_width_x, canyon_width_y, canyon_wall_left, & 195 199 canyon_wall_south, cfl_factor, cloud_droplets, cloud_physics, & 196 collective_wait, conserve_volume_flow, conserve_volume_flow_mode, & 197 coupling_start_time, cthf, curvature_solution_effects, & 198 cycle_mg, damp_level_1d, dissipation_1d, & !dissipation_control, & 200 cloud_scheme, collective_wait, conserve_volume_flow, & 201 conserve_volume_flow_mode, coupling_start_time, cthf, & 202 curvature_solution_effects, cycle_mg, damp_level_1d, & 203 dissipation_1d, & !dissipation_control, & 199 204 dp_external, dp_level_b, dp_smooth, dpdxy, drag_coefficient, & 200 d t, dt_pr_1d, dt_run_control_1d, dx, dy, dz, dz_max, &205 drizzle, dt, dt_pr_1d, dt_run_control_1d, dx, dy, dz, dz_max, & 201 206 dz_stretch_factor, dz_stretch_level, e_init, e_min, end_time_1d, & 202 207 fft_method, galilei_transformation, humidity, & … … 208 213 loop_optimization, masking_method, mg_cycles, & 209 214 mg_switch_to_pe0_level, mixing_length_1d, momentum_advec, & 210 netcdf_precision, neutral, ngsrb, nsor, & 215 mu_constant, mu_constant_value, & 216 netcdf_precision, neutral, ngsrb, nr_surface, & 217 nr_surface_initial_change, nr_vertical_gradient, & 218 nr_vertical_gradient_level, nsor, & 211 219 nsor_ini, nx, ny, nz, ocean, omega, omega_sor, & 212 220 passive_scalar, pch_index, phi, plant_canopy, prandtl_layer, & … … 215 223 pt_surface_initial_change, pt_vertical_gradient, & 216 224 pt_vertical_gradient_level, q_surface, q_surface_initial_change, & 217 q_vertical_gradient, q_vertical_gradient_level, radiation, & 225 q_vertical_gradient, q_vertical_gradient_level, & 226 qr_surface, qr_surface_initial_change, & 227 qr_vertical_gradient, qr_vertical_gradient_level, radiation, & 218 228 random_generator, random_heatflux, rayleigh_damping_factor, & 219 229 rayleigh_damping_height, recycling_width, residual_limit, & … … 223 233 statistic_regions, subs_vertical_gradient, & 224 234 subs_vertical_gradient_level, surface_heatflux, surface_pressure, & 225 surface_scalarflux, surface_waterflux, s_surface, & 235 surface_scalarflux, surface_waterflux, surface_waterflux_nr, & 236 surface_waterflux_qr, s_surface, & 226 237 s_surface_initial_change, s_vertical_gradient, & 227 238 s_vertical_gradient_level, timestep_scheme, & … … 232 243 use_top_fluxes, use_ug_for_galilei_tr, use_upstream_for_tke, & 233 244 uv_heights, u_bulk, u_profile, vg_surface, vg_vertical_gradient, & 234 vg_vertical_gradient_level, v_bulk, v_profile, wall_adjustment, &235 wall_ heatflux, wall_humidityflux, wall_scalarflux, z0h_factor236 237 245 vg_vertical_gradient_level, v_bulk, v_profile, ventilation_effect, & 246 wall_adjustment, wall_heatflux, wall_humidityflux, wall_scalarflux, & 247 z0h_factor 248 238 249 NAMELIST /d3par/ averaging_interval, averaging_interval_pr, & 239 250 create_disturbances, & … … 391 402 !-- also check the allocate statement in routine read_var_list 392 403 ALLOCATE( lad(0:nz+1),pt_init(0:nz+1), q_init(0:nz+1), & 404 qr_init(0:nz+1), nr_init(0:nz+1), & 393 405 sa_init(0:nz+1), ug(0:nz+1), u_init(0:nz+1), & 394 406 v_init(0:nz+1), vg(0:nz+1), & -
palm/trunk/SOURCE/prognostic_equations.f90
r1037 r1053 20 20 ! Current revisions: 21 21 ! ----------------- 22 ! 22 ! implementation of two new prognostic equations for rain drop concentration (nr) 23 ! and rain water content (qr) 24 ! 25 ! currently, only available for cache loop optimization 23 26 ! 24 27 ! Former revisions: … … 154 157 USE diffusion_w_mod 155 158 USE impact_of_latent_heat_mod 159 USE microphysics_mod 156 160 USE plant_canopy_model_mod 157 161 USE production_e_mod … … 409 413 410 414 ! 415 !-- If required, calculate tendencies for total water content, rain water 416 !-- content, rain drop concentration and liquid temperature 417 418 IF ( cloud_physics .AND. icloud_scheme == 0 ) THEN 419 420 tend_q(:,j,i) = 0.0 421 tend_qr(:,j,i) = 0.0 422 tend_nr(:,j,i) = 0.0 423 tend_pt(:,j,i) = 0.0 424 ! 425 !-- Droplet size distribution (dsd) properties are needed for the 426 !-- computation of selfcollection, breakup, evaporation and 427 !-- sedimentation of rain. 428 IF ( precipitation ) THEN 429 CALL dsd_properties( i,j ) 430 CALL autoconversion( i,j ) 431 CALL accretion( i,j ) 432 CALL selfcollection_breakup( i,j ) 433 CALL evaporation_rain( i,j ) 434 CALL sedimentation_rain( i,j ) 435 ENDIF 436 437 IF ( drizzle ) CALL sedimentation_cloud( i,j ) 438 439 ENDIF 440 441 ! 411 442 !-- If required, compute prognostic equation for potential temperature 412 443 IF ( .NOT. neutral ) THEN … … 433 464 ENDIF 434 465 435 ! 436 !-- If required compute impact of latent heat due to precipitation 437 IF ( precipitation ) THEN 438 CALL impact_of_latent_heat( i, j ) 466 !-- Using microphysical tendencies (latent heat) 467 IF ( cloud_physics ) THEN 468 IF ( icloud_scheme == 0 ) THEN 469 tend(:,j,i) = tend(:,j,i) + tend_pt(:,j,i) 470 ELSEIF ( icloud_scheme == 1 .AND. precipitation) THEN 471 CALL impact_of_latent_heat( i, j ) 472 ENDIF 439 473 ENDIF 440 474 … … 555 589 ENDIF 556 590 CALL diffusion_s( i, j, q, qsws, qswst, wall_qflux ) 557 558 ! 559 !-- If required compute decrease of total water content due to 560 !-- precipitation 561 IF ( precipitation ) THEN 562 CALL calc_precipitation( i, j ) 563 ENDIF 564 591 592 ! 593 !-- Using microphysical tendencies 594 IF ( cloud_physics ) THEN 595 IF ( icloud_scheme == 0 ) THEN 596 tend(:,j,i) = tend(:,j,i) + tend_q(:,j,i) 597 ELSEIF ( icloud_scheme == 1 .AND. precipitation ) THEN 598 CALL calc_precipitation( i, j ) 599 ENDIF 600 ENDIF 565 601 ! 566 602 !-- Sink or source of scalar concentration due to canopy elements 567 603 IF ( plant_canopy ) CALL plant_canopy_model( i, j, 5 ) 568 604 605 ! 569 606 !-- If required compute influence of large-scale subsidence/ascent 570 607 IF ( large_scale_subsidence ) THEN … … 598 635 ENDDO 599 636 ENDIF 637 ENDIF 638 639 ! 640 !-- If required, calculate prognostic equations for rain water content 641 !-- and rain drop concentration 642 IF ( cloud_physics .AND. icloud_scheme == 0 ) THEN 643 ! 644 !-- Calculate prognostic equation for rain water content 645 tend(:,j,i) = 0.0 646 IF ( timestep_scheme(1:5) == 'runge' ) & 647 THEN 648 IF ( ws_scheme_sca ) THEN 649 CALL advec_s_ws( i, j, qr, 'qr', flux_s_qr, & 650 diss_s_qr, flux_l_qr, diss_l_qr, & 651 i_omp_start, tn ) 652 ELSE 653 CALL advec_s_pw( i, j, qr ) 654 ENDIF 655 ELSE 656 CALL advec_s_up( i, j, qr ) 657 ENDIF 658 CALL diffusion_s( i, j, qr, qrsws, qrswst, wall_qrflux ) 659 660 ! 661 !-- Using microphysical tendencies (autoconversion, accretion, 662 !-- evaporation; if required: sedimentation) 663 tend(:,j,i) = tend(:,j,i) + tend_qr(:,j,i) 664 665 ! 666 !-- If required, compute influence of large-scale subsidence/ascent 667 IF ( large_scale_subsidence ) THEN 668 CALL subsidence( i, j, tend, qr, qr_init ) 669 ENDIF 670 671 ! CALL user_actions( i, j, 'qr-tendency' ) 672 673 ! 674 !-- Prognostic equation for rain water content 675 DO k = nzb_s_inner(j,i)+1, nzt 676 qr_p(k,j,i) = qr(k,j,i) + dt_3d * ( tsc(2) * tend(k,j,i) + & 677 tsc(3) * tqr_m(k,j,i) ) & 678 - tsc(5) * rdf_sc(k) * & 679 ( qr(k,j,i) - qr_init(k) ) 680 IF ( qr_p(k,j,i) < 0.0 ) qr_p(k,j,i) = 0.1 * qr(k,j,i) 681 ENDDO 682 ! 683 !-- Calculate tendencies for the next Runge-Kutta step 684 IF ( timestep_scheme(1:5) == 'runge' ) THEN 685 IF ( intermediate_timestep_count == 1 ) THEN 686 DO k = nzb_s_inner(j,i)+1, nzt 687 tqr_m(k,j,i) = tend(k,j,i) 688 ENDDO 689 ELSEIF ( intermediate_timestep_count < & 690 intermediate_timestep_count_max ) THEN 691 DO k = nzb_s_inner(j,i)+1, nzt 692 tqr_m(k,j,i) = -9.5625 * tend(k,j,i) + & 693 5.3125 * tqr_m(k,j,i) 694 ENDDO 695 ENDIF 696 ENDIF 697 698 ! 699 !-- Calculate prognostic equation for rain drop concentration. 700 tend(:,j,i) = 0.0 701 IF ( timestep_scheme(1:5) == 'runge' ) THEN 702 IF ( ws_scheme_sca ) THEN 703 CALL advec_s_ws( i, j, nr, 'nr', flux_s_nr, & 704 diss_s_nr, flux_l_nr, diss_l_nr, & 705 i_omp_start, tn ) 706 ELSE 707 CALL advec_s_pw( i, j, nr ) 708 ENDIF 709 ELSE 710 CALL advec_s_up( i, j, nr ) 711 ENDIF 712 CALL diffusion_s( i, j, nr, nrsws, nrswst, wall_nrflux ) 713 714 !-- Using microphysical tendencies (autoconversion, accretion, 715 !-- selfcollection, breakup, evaporation; 716 !-- if required: sedimentation) 717 tend(:,j,i) = tend(:,j,i) + tend_nr(:,j,i) 718 719 ! 720 !-- If required, compute influence of large-scale subsidence/ascent 721 IF ( large_scale_subsidence ) THEN 722 CALL subsidence( i, j, tend, nr, nr_init ) 723 ENDIF 724 725 ! CALL user_actions( i, j, 'nr-tendency' ) 726 727 ! 728 !-- Prognostic equation for rain drop concentration 729 DO k = nzb_s_inner(j,i)+1, nzt 730 nr_p(k,j,i) = nr(k,j,i) + dt_3d * ( tsc(2) * tend(k,j,i) + & 731 tsc(3) * tnr_m(k,j,i) ) & 732 - tsc(5) * rdf_sc(k) * & 733 ( nr(k,j,i) - nr_init(k) ) 734 IF ( nr_p(k,j,i) < 0.0 ) nr_p(k,j,i) = 0.1 * nr(k,j,i) 735 ENDDO 736 ! 737 !-- Calculate tendencies for the next Runge-Kutta step 738 IF ( timestep_scheme(1:5) == 'runge' ) THEN 739 IF ( intermediate_timestep_count == 1 ) THEN 740 DO k = nzb_s_inner(j,i)+1, nzt 741 tnr_m(k,j,i) = tend(k,j,i) 742 ENDDO 743 ELSEIF ( intermediate_timestep_count < & 744 intermediate_timestep_count_max ) THEN 745 DO k = nzb_s_inner(j,i)+1, nzt 746 tnr_m(k,j,i) = -9.5625 * tend(k,j,i) + & 747 5.3125 * tnr_m(k,j,i) 748 ENDDO 749 ENDIF 750 ENDIF 751 600 752 ENDIF 601 753 -
palm/trunk/SOURCE/read_3d_binary.f90
r1037 r1053 20 20 ! Current revisions: 21 21 ! ----------------- 22 ! 22 ! necessary expansions according to the two new prognostic equations (nr, qr) 23 ! of the two-moment cloud physics scheme: 24 ! +prr, prr_av, *, *_av, *s, *sws, *swst 23 25 ! 24 26 ! Former revisions: … … 279 281 !-- First compare the version numbers 280 282 READ ( 13 ) version_on_file 281 binary_version = '3. 2'283 binary_version = '3.3' 282 284 IF ( TRIM( version_on_file ) /= TRIM( binary_version ) ) THEN 283 285 WRITE( message_string, * ) 'version mismatch concerning data ', & … … 457 459 tmp_3d(:,nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) 458 460 461 CASE ( 'prr' ) 462 IF ( .NOT. ALLOCATED( prr ) ) THEN 463 ALLOCATE( prr(nzb:nzt+1,nysg:nyng,nxlg:nxrg) ) 464 ENDIF 465 IF ( k == 1 ) READ ( 13 ) tmp_3d 466 prr(:,nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & 467 tmp_3d(:,nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) 468 469 CASE ( 'prr_av' ) 470 IF ( .NOT. ALLOCATED( prr_av ) ) THEN 471 ALLOCATE( prr_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) ) 472 ENDIF 473 IF ( k == 1 ) READ ( 13 ) tmp_3d 474 prr_av(:,nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & 475 tmp_3d(:,nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) 476 459 477 CASE ( 'precipitation_amount' ) 460 478 IF ( k == 1 ) READ ( 13 ) tmp_2d … … 508 526 ql_av(:,nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & 509 527 tmp_3d(:,nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) 528 529 CASE ( 'qr' ) 530 IF ( k == 1 ) READ ( 13 ) tmp_3d 531 qr(:,nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & 532 tmp_3d(:,nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) 533 534 CASE ( 'nr' ) 535 IF ( k == 1 ) READ ( 13 ) tmp_3d 536 nr(:,nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & 537 tmp_3d(:,nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) 538 539 CASE ( 'qr_av' ) 540 IF ( .NOT. ALLOCATED( qr_av ) ) THEN 541 ALLOCATE( qr_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) ) 542 ENDIF 543 IF ( k == 1 ) READ ( 13 ) tmp_3d 544 qr_av(:,nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & 545 tmp_3d(:,nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) 546 547 CASE ( 'nr_av' ) 548 IF ( .NOT. ALLOCATED( nr_av ) ) THEN 549 ALLOCATE( nr_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) ) 550 ENDIF 551 IF ( k == 1 ) READ ( 13 ) tmp_3d 552 nr_av(:,nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & 553 tmp_3d(:,nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) 554 555 CASE ( 'qrs' ) 556 IF ( k == 1 ) READ ( 13 ) tmp_2d 557 qrs(nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & 558 tmp_2d(nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) 559 560 CASE ( 'qrsws' ) 561 IF ( k == 1 ) READ ( 13 ) tmp_2d 562 qrsws(nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & 563 tmp_2d(nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) 564 565 CASE ( 'qrswst' ) 566 IF ( k == 1 ) READ ( 13 ) tmp_2d 567 qrswst(nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & 568 tmp_2d(nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) 569 570 CASE ( 'nrs' ) 571 IF ( k == 1 ) READ ( 13 ) tmp_2d 572 nrs(nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & 573 tmp_2d(nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) 574 575 CASE ( 'nrsws' ) 576 IF ( k == 1 ) READ ( 13 ) tmp_2d 577 nrsws(nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & 578 tmp_2d(nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) 579 580 CASE ( 'nrswst' ) 581 IF ( k == 1 ) READ ( 13 ) tmp_2d 582 nrswst(nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & 583 tmp_2d(nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) 510 584 511 585 CASE ( 'ql_c_av' ) -
palm/trunk/SOURCE/read_var_list.f90
r1037 r1053 20 20 ! Current revisions: 21 21 ! ------------------ 22 ! 22 ! necessary expansions according to the two new prognostic equations (nr, qr) 23 ! of the two-moment cloud physics scheme: 24 ! +bc_*_b, +bc_*_t, +bc_*_t_val, *_init, *_surface, *_surface_initial_change, 25 ! +*_vertical_gradient, +*_vertical_gradient_level, *_vertical_gradient_level_ind, 26 ! +surface_waterflux_* 27 ! 28 ! in addition, steering parameters parameters of the two-moment cloud physics 29 ! scheme: 30 ! +cloud_scheme, +drizzle, +mu_constant, +mu_constant_value, +ventilation_effect 23 31 ! 24 32 ! Former revisions: … … 169 177 !-- Make version number check first 170 178 READ ( 13 ) version_on_file 171 binary_version = '3. 5'179 binary_version = '3.6' 172 180 IF ( TRIM( version_on_file ) /= TRIM( binary_version ) ) THEN 173 181 WRITE( message_string, * ) 'version mismatch concerning control ', & … … 235 243 ALLOCATE( lad(0:nz+1), ug(0:nz+1), u_init(0:nz+1), vg(0:nz+1), & 236 244 v_init(0:nz+1), pt_init(0:nz+1), q_init(0:nz+1), & 237 sa_init(0:nz+1),&245 qr_init(0:nz+1), nr_init(0:nz+1), sa_init(0:nz+1), & 238 246 hom(0:nz+1,2,pr_palm+max_pr_user,0:statistic_regions), & 239 247 hom_sum(0:nz+1,pr_palm+max_pr_user,0:statistic_regions) ) … … 268 276 CASE ( 'bc_ns' ) 269 277 READ ( 13 ) bc_ns 278 CASE ( 'bc_nr_b' ) 279 READ ( 13 ) bc_nr_b 280 CASE ( 'bc_nr_t' ) 281 READ ( 13 ) bc_nr_t 282 CASE ( 'bc_nr_t_val' ) 283 READ ( 13 ) bc_nr_t_val 270 284 CASE ( 'bc_p_b' ) 271 285 READ ( 13 ) bc_p_b … … 284 298 CASE ( 'bc_q_t_val' ) 285 299 READ ( 13 ) bc_q_t_val 300 CASE ( 'bc_qr_b' ) 301 READ ( 13 ) bc_qr_b 302 CASE ( 'bc_qr_t' ) 303 READ ( 13 ) bc_qr_t 304 CASE ( 'bc_qr_t_val' ) 305 READ ( 13 ) bc_qr_t_val 286 306 CASE ( 'bc_s_b' ) 287 307 READ ( 13 ) bc_s_b … … 326 346 CASE ( 'cloud_physics' ) 327 347 READ ( 13 ) cloud_physics 348 CASE ( 'cloud_scheme' ) 349 READ ( 13 ) cloud_scheme 328 350 CASE ( 'collective_wait' ) 329 351 READ ( 13 ) collective_wait … … 356 378 CASE ( 'drag_coefficient' ) 357 379 READ ( 13 ) drag_coefficient 380 CASE ( 'drizzle' ) 381 READ ( 13 ) drizzle 358 382 CASE ( 'dt_pr_1d' ) 359 383 READ ( 13 ) dt_pr_1d … … 438 462 CASE ( 'momentum_advec' ) 439 463 READ ( 13 ) momentum_advec 464 CASE ( 'mu_constant' ) 465 READ ( 13 ) mu_constant 466 CASE ( 'mu_constant_value' ) 467 READ ( 13 ) mu_constant_value 440 468 CASE ( 'netcdf_precision' ) 441 469 READ ( 13 ) netcdf_precision … … 444 472 CASE ( 'ngsrb' ) 445 473 READ ( 13 ) ngsrb 474 CASE ( 'nr_init' ) 475 READ ( 13 ) nr_init 476 CASE ( 'nr_surface' ) 477 READ ( 13 ) nr_surface 478 CASE ( 'nr_surface_initial_change' ) 479 READ ( 13 ) nr_surface_initial_change 480 CASE ( 'nr_vertical_gradient' ) 481 READ ( 13 ) nr_vertical_gradient 482 CASE ( 'nr_vertical_gradient_level' ) 483 READ ( 13 ) nr_vertical_gradient_level 484 CASE ( 'nr_vertical_gradient_level_ind' ) 485 READ ( 13 ) nr_vertical_gradient_level_ind 446 486 CASE ( 'nsor' ) 447 487 READ ( 13 ) nsor … … 510 550 CASE ( 'q_vertical_gradient_level_ind' ) 511 551 READ ( 13 ) q_vertical_gradient_level_ind 552 CASE ( 'qr_init' ) 553 READ ( 13 ) qr_init 554 CASE ( 'qr_surface' ) 555 READ ( 13 ) qr_surface 556 CASE ( 'qr_surface_initial_change' ) 557 READ ( 13 ) qr_surface_initial_change 558 CASE ( 'qr_vertical_gradient' ) 559 READ ( 13 ) qr_vertical_gradient 560 CASE ( 'qr_vertical_gradient_level' ) 561 READ ( 13 ) qr_vertical_gradient_level 562 CASE ( 'qr_vertical_gradient_level_ind' ) 563 READ ( 13 ) qr_vertical_gradient_level_ind 512 564 CASE ( 'radiation' ) 513 565 READ ( 13 ) radiation … … 555 607 READ ( 13 ) surface_scalarflux 556 608 CASE ( 'surface_waterflux' ) 557 READ ( 13 ) surface_waterflux 609 READ ( 13 ) surface_waterflux 610 CASE ( 'surface_waterflux_nr' ) 611 READ ( 13 ) surface_waterflux_nr 612 CASE ( 'surface_waterflux_qr' ) 613 READ ( 13 ) surface_waterflux_qr 558 614 CASE ( 's_surface' ) 559 615 READ ( 13 ) s_surface … … 656 712 CASE ( 'v_max_ijk' ) 657 713 READ ( 13 ) v_max_ijk 714 CASE ( 'ventilation_effect' ) 715 READ ( 13 ) ventilation_effect 658 716 CASE ( 'vg' ) 659 717 READ ( 13 ) vg -
palm/trunk/SOURCE/sum_up_3d_data.f90
r1037 r1053 20 20 ! Current revisions: 21 21 ! ----------------- 22 ! 22 ! +nr, prr, qr 23 23 ! 24 24 ! Former revisions: … … 115 115 lwp_av = 0.0 116 116 117 CASE ( 'nr' ) 118 IF ( .NOT. ALLOCATED( nr_av ) ) THEN 119 ALLOCATE( nr_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) ) 120 ENDIF 121 nr_av = 0.0 122 117 123 CASE ( 'p' ) 118 124 IF ( .NOT. ALLOCATED( p_av ) ) THEN … … 133 139 pr_av = 0.0 134 140 141 CASE ( 'prr' ) 142 IF ( .NOT. ALLOCATED( prr_av ) ) THEN 143 ALLOCATE( prr_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) ) 144 ENDIF 145 prr_av = 0.0 146 135 147 CASE ( 'prr*' ) 136 148 IF ( .NOT. ALLOCATED( precipitation_rate_av ) ) THEN … … 175 187 ql_vp_av = 0.0 176 188 189 CASE ( 'qr' ) 190 IF ( .NOT. ALLOCATED( qr_av ) ) THEN 191 ALLOCATE( qr_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) ) 192 ENDIF 193 qr_av = 0.0 194 177 195 CASE ( 'qsws*' ) 178 196 IF ( .NOT. ALLOCATED( qsws_av ) ) THEN … … 301 319 lwp_av(j,i) = lwp_av(j,i) + SUM( ql(nzb:nzt,j,i) * & 302 320 dzw(1:nzt+1) ) 321 ENDDO 322 ENDDO 323 324 CASE ( 'nr' ) 325 DO i = nxlg, nxrg 326 DO j = nysg, nyng 327 DO k = nzb, nzt+1 328 nr_av(k,j,i) = nr_av(k,j,i) + nr(k,j,i) 329 ENDDO 303 330 ENDDO 304 331 ENDDO … … 423 450 ENDDO 424 451 452 CASE ( 'qr' ) 453 DO i = nxlg, nxrg 454 DO j = nysg, nyng 455 DO k = nzb, nzt+1 456 qr_av(k,j,i) = qr_av(k,j,i) + qr(k,j,i) 457 ENDDO 458 ENDDO 459 ENDDO 460 425 461 CASE ( 'qsws*' ) 426 462 DO i = nxlg, nxrg -
palm/trunk/SOURCE/swap_timelevel.f90
r1037 r1053 20 20 ! Current revisions: 21 21 ! ----------------- 22 ! swap of timelevels for nr, qr added 22 23 ! 23 !24 24 ! Former revisions: 25 25 ! ----------------- … … 91 91 ENDIF 92 92 IF ( humidity .OR. passive_scalar ) THEN 93 q = q_p 93 q = q_p 94 IF ( cloud_physics .AND. icloud_scheme == 0 ) THEN 95 qr = qr_p 96 nr = nr_p 97 ENDIF 94 98 ENDIF 95 99 … … 116 120 IF ( humidity .OR. passive_scalar ) THEN 117 121 q => q_1; q_p => q_2 122 IF ( cloud_physics .AND. icloud_scheme == 0 ) THEN 123 qr => qr_1; qr_p => qr_2 124 nr => nr_1; nr_p => nr_2 125 ENDIF 118 126 ENDIF 119 127 … … 135 143 IF ( humidity .OR. passive_scalar ) THEN 136 144 q => q_2; q_p => q_1 145 IF ( cloud_physics .AND. icloud_scheme == 0 ) THEN 146 qr => qr_2; qr_p => qr_1 147 nr => nr_2; nr_p => nr_1 148 ENDIF 137 149 ENDIF 138 150 -
palm/trunk/SOURCE/time_integration.f90
r1037 r1053 20 20 ! Current revisions: 21 21 ! ----------------- 22 ! 22 ! exchange of ghost points for nr, qr added 23 23 ! 24 24 ! Former revisions: … … 240 240 CALL exchange_horiz( prho, nbgp ) 241 241 ENDIF 242 IF (humidity .OR. passive_scalar) CALL exchange_horiz( q_p, nbgp ) 242 IF (humidity .OR. passive_scalar) THEN 243 CALL exchange_horiz( q_p, nbgp ) 244 IF ( cloud_physics .AND. icloud_scheme == 0 ) THEN 245 CALL exchange_horiz( qr_p, nbgp ) 246 CALL exchange_horiz( nr_p, nbgp ) 247 ENDIF 248 ENDIF 243 249 IF ( cloud_droplets ) THEN 244 250 CALL exchange_horiz( ql, nbgp ) -
palm/trunk/SOURCE/timestep.f90
r1037 r1053 20 20 ! Current revisions: 21 21 ! ------------------ 22 ! 22 ! timestep is reduced in two-moment cloud scheme according to the maximum 23 ! terminal velocity of rain drops 23 24 ! 24 25 ! Former revisions: … … 75 76 76 77 USE arrays_3d 78 USE cloud_parameters 77 79 USE control_parameters 78 80 USE cpulog … … 301 303 !-- step minus a reduction (cfl_factor) to be on the safe side. 302 304 !-- The time step must not exceed the maximum allowed value. 303 dt_3d = cfl_factor * MIN( dt_diff, dt_plant_canopy, dt_u, dt_v, dt_w ) 305 dt_3d = cfl_factor * MIN( dt_diff, dt_plant_canopy, dt_u, dt_v, dt_w, & 306 dt_precipitation ) 304 307 dt_3d = MIN( dt_3d, dt_max ) 305 308 -
palm/trunk/SOURCE/user_actions.f90
r1037 r1053 20 20 ! Current revisions: 21 21 ! ----------------- 22 ! +qr-tendency, nr-tendency 22 23 ! 23 24 ! Former revisions: … … 136 137 137 138 139 CASE ( 'qr-tendency' ) 140 141 142 CASE ( 'nr-tendency' ) 143 144 138 145 CASE DEFAULT 139 146 message_string = 'unknown location "' // location // '"' … … 188 195 189 196 CASE ( 'q-tendency' ) 197 198 199 CASE ( 'qr-tendency' ) 200 201 202 CASE ( 'nr-tendency' ) 190 203 191 204 -
palm/trunk/SOURCE/write_3d_binary.f90
r1037 r1053 20 20 ! Current revisions: 21 21 ! ----------------- 22 ! 22 ! necessary expansions according to the two new prognostic equations (nr, qr) 23 ! of the two-moment cloud physics scheme: 24 ! +prr, prr_av, *, *_av, *s, *sws, *swst 23 25 ! 24 26 ! Former revisions: … … 110 112 ! 111 113 !-- Write arrays. 112 binary_version = '3. 2'114 binary_version = '3.3' 113 115 114 116 WRITE ( 14 ) binary_version … … 145 147 WRITE ( 14 ) 'pr_av '; WRITE ( 14 ) pr_av 146 148 ENDIF 149 IF ( ALLOCATED( prr ) ) THEN 150 WRITE ( 14 ) 'prr '; WRITE ( 14 ) prr 151 ENDIF 152 IF ( ALLOCATED( prr_av ) ) THEN 153 WRITE ( 14 ) 'prr_av '; WRITE ( 14 ) prr_av 154 ENDIF 147 155 IF ( ALLOCATED( precipitation_amount ) ) THEN 148 156 WRITE ( 14 ) 'precipitation_amount'; WRITE ( 14 ) precipitation_amount … … 166 174 WRITE ( 14 ) 'ql_av '; WRITE ( 14 ) ql_av 167 175 ENDIF 176 IF ( icloud_scheme == 0 ) THEN 177 WRITE ( 14 ) 'qr '; WRITE ( 14 ) qr 178 WRITE ( 14 ) 'nr '; WRITE ( 14 ) nr 179 IF ( ALLOCATED( qr_av ) ) THEN 180 WRITE ( 14 ) 'qr_av '; WRITE ( 14 ) qr_av 181 ENDIF 182 IF ( ALLOCATED( nr_av ) ) THEN 183 WRITE ( 14 ) 'nr_av '; WRITE ( 14 ) nr_av 184 ENDIF 185 WRITE ( 14 ) 'qrs '; WRITE ( 14 ) qrs 186 WRITE ( 14 ) 'qrsws '; WRITE ( 14 ) qrsws 187 WRITE ( 14 ) 'qrswst '; WRITE ( 14 ) qrswst 188 WRITE ( 14 ) 'nrs '; WRITE ( 14 ) nrs 189 WRITE ( 14 ) 'nrsws '; WRITE ( 14 ) nrsws 190 WRITE ( 14 ) 'nrswst '; WRITE ( 14 ) nrswst 191 ENDIF 168 192 ENDIF 169 193 WRITE ( 14 ) 'qs '; WRITE ( 14 ) qs -
palm/trunk/SOURCE/write_var_list.f90
r1037 r1053 20 20 ! Current revisions: 21 21 ! ----------------- 22 ! 22 ! necessary expansions according to the two new prognostic equations (nr, qr) 23 ! of the two-moment cloud physics scheme: 24 ! +bc_*_b, bc_*_t, bc_*_t_val, *_init, *_surface, *_surface_initial_change, 25 ! +*_vertical_gradient, *_vertical_gradient_level, *_vertical_gradient_level_ind, 26 ! +surface_waterflux_* 27 ! 28 ! in addition, steering parameters parameters of the two-moment cloud physics 29 ! scheme: 30 ! +cloud_scheme, +drizzle, +mu_constant, +mu_constant_value, +ventilation_effect 23 31 ! 24 32 ! Former revisions: … … 151 159 152 160 153 binary_version = '3. 5'161 binary_version = '3.6' 154 162 155 163 WRITE ( 14 ) binary_version … … 190 198 WRITE ( 14 ) 'bc_ns ' 191 199 WRITE ( 14 ) bc_ns 200 WRITE ( 14 ) 'bc_nr_b ' 201 WRITE ( 14 ) bc_nr_b 202 WRITE ( 14 ) 'bc_nr_t ' 203 WRITE ( 14 ) bc_nr_t 204 WRITE ( 14 ) 'bc_nr_t_val ' 205 WRITE ( 14 ) bc_nr_t_val 192 206 WRITE ( 14 ) 'bc_p_b ' 193 207 WRITE ( 14 ) bc_p_b … … 206 220 WRITE ( 14 ) 'bc_q_t_val ' 207 221 WRITE ( 14 ) bc_q_t_val 222 WRITE ( 14 ) 'bc_qr_b ' 223 WRITE ( 14 ) bc_qr_b 224 WRITE ( 14 ) 'bc_qr_t ' 225 WRITE ( 14 ) bc_qr_t 226 WRITE ( 14 ) 'bc_qr_t_val ' 227 WRITE ( 14 ) bc_qr_t_val 208 228 WRITE ( 14 ) 'bc_s_b ' 209 229 WRITE ( 14 ) bc_s_b … … 248 268 WRITE ( 14 ) 'cloud_physics ' 249 269 WRITE ( 14 ) cloud_physics 270 WRITE ( 14 ) 'cloud_scheme ' 271 WRITE ( 14 ) cloud_scheme 250 272 WRITE ( 14 ) 'collective_wait ' 251 273 WRITE ( 14 ) collective_wait … … 278 300 WRITE ( 14 ) 'drag_coefficient ' 279 301 WRITE ( 14 ) drag_coefficient 302 WRITE ( 14 ) 'drizzle ' 303 WRITE ( 14 ) drizzle 280 304 WRITE ( 14 ) 'dt_pr_1d ' 281 305 WRITE ( 14 ) dt_pr_1d … … 358 382 WRITE ( 14 ) 'momentum_advec ' 359 383 WRITE ( 14 ) momentum_advec 384 WRITE ( 14 ) 'mu_constant ' 385 WRITE ( 14 ) mu_constant 386 WRITE ( 14 ) 'mu_constant_value ' 387 WRITE ( 14 ) mu_constant_value 360 388 WRITE ( 14 ) 'netcdf_precision ' 361 389 WRITE ( 14 ) netcdf_precision … … 364 392 WRITE ( 14 ) 'ngsrb ' 365 393 WRITE ( 14 ) ngsrb 394 WRITE ( 14 ) 'nr_init ' 395 WRITE ( 14 ) nr_init 396 WRITE ( 14 ) 'nr_surface ' 397 WRITE ( 14 ) nr_surface 398 WRITE ( 14 ) 'nr_surface_initial_change ' 399 WRITE ( 14 ) nr_surface_initial_change 400 WRITE ( 14 ) 'nr_vertical_gradient ' 401 WRITE ( 14 ) nr_vertical_gradient 402 WRITE ( 14 ) 'nr_vertical_gradient_level ' 403 WRITE ( 14 ) nr_vertical_gradient_level 404 WRITE ( 14 ) 'nr_vertical_gradient_level_ind' 405 WRITE ( 14 ) nr_vertical_gradient_level_ind 366 406 WRITE ( 14 ) 'nsor ' 367 407 WRITE ( 14 ) nsor … … 428 468 WRITE ( 14 ) 'q_vertical_gradient_level_ind ' 429 469 WRITE ( 14 ) q_vertical_gradient_level_ind 470 WRITE ( 14 ) 'qr_init ' 471 WRITE ( 14 ) qr_init 472 WRITE ( 14 ) 'qr_surface ' 473 WRITE ( 14 ) qr_surface 474 WRITE ( 14 ) 'qr_surface_initial_change ' 475 WRITE ( 14 ) qr_surface_initial_change 476 WRITE ( 14 ) 'qr_vertical_gradient ' 477 WRITE ( 14 ) qr_vertical_gradient 478 WRITE ( 14 ) 'qr_vertical_gradient_level ' 479 WRITE ( 14 ) qr_vertical_gradient_level 480 WRITE ( 14 ) 'qr_vertical_gradient_level_ind' 481 WRITE ( 14 ) qr_vertical_gradient_level_ind 430 482 WRITE ( 14 ) 'radiation ' 431 483 WRITE ( 14 ) radiation … … 474 526 WRITE ( 14 ) 'surface_waterflux ' 475 527 WRITE ( 14 ) surface_waterflux 528 WRITE ( 14 ) 'surface_waterflux_nr ' 529 WRITE ( 14 ) surface_waterflux_nr 530 WRITE ( 14 ) 'surface_waterflux_qr ' 531 WRITE ( 14 ) surface_waterflux_qr 476 532 WRITE ( 14 ) 's_surface ' 477 533 WRITE ( 14 ) s_surface … … 574 630 WRITE ( 14 ) 'v_max_ijk ' 575 631 WRITE ( 14 ) v_max_ijk 632 WRITE ( 14 ) 'ventilation_effect ' 633 WRITE ( 14 ) ventilation_effect 576 634 WRITE ( 14 ) 'vg ' 577 635 WRITE ( 14 ) vg
Note: See TracChangeset
for help on using the changeset viewer.