Changeset 1115 for palm/trunk/SOURCE/init_3d_model.f90
- Timestamp:
- Mar 26, 2013 6:16:16 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
palm/trunk/SOURCE/init_3d_model.f90
r1114 r1115 23 23 ! Current revisions: 24 24 ! ------------------ 25 ! 25 ! unused variables removed 26 26 ! 27 27 ! Former revisions: … … 392 392 IF ( icloud_scheme == 0 ) THEN 393 393 ! 394 !-- 1D-rain sedimentation fluxes and rain drop size distribution 395 !-- properties 396 ALLOCATE ( dr(nzb:nzt+1), lambda_r(nzb:nzt+1), & 397 mu_r(nzb:nzt+1), sed_q(nzb:nzt+1), & 398 sed_qr(nzb:nzt+1), sed_nr(nzb:nzt+1),& 399 xr(nzb:nzt+1) ) 400 ! 401 !-- 2D-rain water content and rain drop concentration arrays 402 ALLOCATE ( qrs(nysg:nyng,nxlg:nxrg), & 403 qrsws(nysg:nyng,nxlg:nxrg), & 404 qrswst(nysg:nyng,nxlg:nxrg), & 405 nrs(nysg:nyng,nxlg:nxrg), & 406 nrsws(nysg:nyng,nxlg:nxrg), & 407 nrswst(nysg:nyng,nxlg:nxrg) ) 408 ! 409 !-- 3D-rain water content, rain drop concentration arrays 394 !-- 1D-arrays 395 ALLOCATE ( nc_1d(nzb:nzt+1), pt_1d(nzb:nzt+1), & 396 q_1d(nzb:nzt+1), qc_1d(nzb:nzt+1) ) 397 ! 398 !-- 3D-cloud water content 410 399 #if defined( __nopointer ) 411 ALLOCATE( nr(nzb:nzt+1,nysg:nyng,nxlg:nxrg), & 412 nr_p(nzb:nzt+1,nysg:nyng,nxlg:nxrg), & 413 qr(nzb:nzt+1,nysg:nyng,nxlg:nxrg), & 414 qr_p(nzb:nzt+1,nysg:nyng,nxlg:nxrg), & 415 tnr_m(nzb:nzt+1,nysg:nyng,nxlg:nxrg), & 416 tqr_m(nzb:nzt+1,nysg:nyng,nxlg:nxrg) ) 400 ALLOCATE( qc(nzb:nzt+1,nysg:nyng,nxlg:nxrg) ) 417 401 #else 418 ALLOCATE( nr_1(nzb:nzt+1,nysg:nyng,nxlg:nxrg), & 419 nr_2(nzb:nzt+1,nysg:nyng,nxlg:nxrg), & 420 nr_3(nzb:nzt+1,nysg:nyng,nxlg:nxrg), & 421 qr_1(nzb:nzt+1,nysg:nyng,nxlg:nxrg), & 422 qr_2(nzb:nzt+1,nysg:nyng,nxlg:nxrg), & 423 qr_3(nzb:nzt+1,nysg:nyng,nxlg:nxrg) ) 402 ALLOCATE( qc_1(nzb:nzt+1,nysg:nyng,nxlg:nxrg) ) 424 403 #endif 425 404 ! 426 405 !-- 3D-tendency arrays 427 ALLOCATE( tend_nr(nzb:nzt+1,nysg:nyng,nxlg:nxrg), & 428 tend_pt(nzb:nzt+1,nysg:nyng,nxlg:nxrg), & 429 tend_q(nzb:nzt+1,nysg:nyng,nxlg:nxrg), & 430 tend_qr(nzb:nzt+1,nysg:nyng,nxlg:nxrg) ) 431 ! 432 !-- 3d-precipitation rate 406 ALLOCATE( tend_pt(nzb:nzt+1,nysg:nyng,nxlg:nxrg), & 407 tend_q(nzb:nzt+1,nysg:nyng,nxlg:nxrg) ) 408 433 409 IF ( precipitation ) THEN 410 ! 411 !-- 1D-arrays 412 ALLOCATE ( nr_1d(nzb:nzt+1), qr_1d(nzb:nzt+1) ) 413 ! 414 ! 415 !-- 3D-tendency arrays 416 ALLOCATE( tend_nr(nzb:nzt+1,nysg:nyng,nxlg:nxrg), & 417 tend_qr(nzb:nzt+1,nysg:nyng,nxlg:nxrg) ) 418 ! 419 !-- 2D-rain water content and rain drop concentration arrays 420 ALLOCATE ( qrs(nysg:nyng,nxlg:nxrg), & 421 qrsws(nysg:nyng,nxlg:nxrg), & 422 qrswst(nysg:nyng,nxlg:nxrg), & 423 nrs(nysg:nyng,nxlg:nxrg), & 424 nrsws(nysg:nyng,nxlg:nxrg), & 425 nrswst(nysg:nyng,nxlg:nxrg) ) 426 ! 427 !-- 3D-rain water content, rain drop concentration arrays 428 #if defined( __nopointer ) 429 ALLOCATE( nr(nzb:nzt+1,nysg:nyng,nxlg:nxrg), & 430 nr_p(nzb:nzt+1,nysg:nyng,nxlg:nxrg), & 431 qr(nzb:nzt+1,nysg:nyng,nxlg:nxrg), & 432 qr_p(nzb:nzt+1,nysg:nyng,nxlg:nxrg), & 433 tnr_m(nzb:nzt+1,nysg:nyng,nxlg:nxrg), & 434 tqr_m(nzb:nzt+1,nysg:nyng,nxlg:nxrg) ) 435 #else 436 ALLOCATE( nr_1(nzb:nzt+1,nysg:nyng,nxlg:nxrg), & 437 nr_2(nzb:nzt+1,nysg:nyng,nxlg:nxrg), & 438 nr_3(nzb:nzt+1,nysg:nyng,nxlg:nxrg), & 439 qr_1(nzb:nzt+1,nysg:nyng,nxlg:nxrg), & 440 qr_2(nzb:nzt+1,nysg:nyng,nxlg:nxrg), & 441 qr_3(nzb:nzt+1,nysg:nyng,nxlg:nxrg) ) 442 #endif 443 ! 444 !-- 3d-precipitation rate 434 445 ALLOCATE( prr(nzb:nzt+1,nysg:nyng,nxlg:nxrg) ) 435 446 ENDIF … … 582 593 ql => ql_1 583 594 IF ( icloud_scheme == 0 ) THEN 584 qr => qr_1; qr_p => qr_2; tqr_m => qr_3 585 nr => nr_1; nr_p => nr_2; tnr_m => nr_3 595 qc => qc_1 596 IF ( precipitation ) THEN 597 qr => qr_1; qr_p => qr_2; tqr_m => qr_3 598 nr => nr_1; nr_p => nr_2; tnr_m => nr_3 599 ENDIF 586 600 ENDIF 587 601 ENDIF … … 641 655 ENDDO 642 656 ENDDO 643 IF ( cloud_physics .AND. icloud_scheme == 0 ) THEN 657 IF ( cloud_physics .AND. icloud_scheme == 0 .AND. & 658 precipitation ) THEN 644 659 DO i = nxlg, nxrg 645 660 DO j = nysg, nyng 646 qr(:,j,i) = qr_init647 nr(:,j,i) = nr_init661 qr(:,j,i) = 0.0 662 nr(:,j,i) = 0.0 648 663 ENDDO 649 664 ENDDO 665 ! 666 !-- Initialze nc_1d with default value 667 nc_1d(:) = nc_const 668 650 669 ENDIF 651 670 ENDIF … … 693 712 IF ( humidity .OR. passive_scalar ) THEN 694 713 qs = 0.0 695 IF ( cloud_physics .AND. icloud_scheme == 0 ) THEN 714 IF ( cloud_physics .AND. icloud_scheme == 0 .AND. & 715 precipitation ) THEN 696 716 qrs = 0.0 697 717 nrs = 0.0 … … 762 782 ENDDO 763 783 ENDDO 764 IF ( cloud_physics .AND. icloud_scheme == 0 ) THEN 765 DO i = nxlg, nxrg 766 DO j = nysg, nyng 767 qr(:,j,i) = qr_init 768 nr(:,j,i) = nr_init 784 IF ( cloud_physics .AND. icloud_scheme == 0 ) THEN 785 ! 786 !-- Initialze nc_1d with default value 787 nc_1d(:) = nc_const 788 789 IF ( precipitation ) THEN 790 DO i = nxlg, nxrg 791 DO j = nysg, nyng 792 qr(:,j,i) = 0.0 793 nr(:,j,i) = 0.0 794 ENDDO 769 795 ENDDO 770 ENDDO 796 ENDIF 797 771 798 ENDIF 772 799 ENDIF … … 910 937 !-- Determine the near-surface water flux 911 938 IF ( humidity .OR. passive_scalar ) THEN 912 IF ( cloud_physics .AND. icloud_scheme == 0 ) THEN 913 IF ( constant_waterflux_qr ) THEN 914 qrsws = surface_waterflux_qr 915 ENDIF 916 IF (constant_waterflux_nr ) THEN 917 nrsws = surface_waterflux_nr 918 ENDIF 939 IF ( cloud_physics .AND. icloud_scheme == 0 .AND. & 940 precipitation ) THEN 941 qrsws = 0.0 942 nrsws = 0.0 919 943 ENDIF 920 944 IF ( constant_waterflux ) THEN … … 951 975 IF ( humidity .OR. passive_scalar ) THEN 952 976 qswst = 0.0 953 IF ( cloud_physics .AND. icloud_scheme == 0 ) THEN 977 IF ( cloud_physics .AND. icloud_scheme == 0 .AND. & 978 precipitation ) THEN 954 979 nrswst = 0.0 955 980 qrswst = 0.0 … … 990 1015 IF ( humidity .OR. passive_scalar ) THEN 991 1016 IF ( .NOT. constant_waterflux ) qsws = 0.0 992 IF ( cloud_physics .AND. icloud_scheme == 0 ) THEN 993 IF ( .NOT. constant_waterflux_qr ) THEN 994 qrsws = 0.0 995 ENDIF 996 IF ( .NOT. constant_waterflux_nr ) THEN 997 nrsws = 0.0 998 ENDIF 1017 IF ( cloud_physics .AND. icloud_scheme == 0 .AND. & 1018 precipitation ) THEN 1019 qrsws = 0.0 1020 nrsws = 0.0 999 1021 ENDIF 1000 1022 ENDIF … … 1021 1043 ql = 0.0 1022 1044 IF ( precipitation ) precipitation_amount = 0.0 1045 IF ( icloud_scheme == 0 ) THEN 1046 qc = 0.0 1047 nc_1d = nc_const 1048 ENDIF 1023 1049 ENDIF 1024 1050 ! … … 1046 1072 q_surface_initial_change /= 0.0 ) THEN 1047 1073 q(nzb,:,:) = q(nzb,:,:) + q_surface_initial_change 1048 IF ( cloud_physics .AND. icloud_scheme == 0 ) THEN 1049 IF ( qr_surface_initial_change /= 0.0 ) THEN 1050 qr(nzb,:,:) = qr(nzb,:,:) + qr_surface_initial_change 1051 ELSEIF ( nr_surface_initial_change /= 0.0 ) THEN 1052 nr(nzb,:,:) = nr(nzb,:,:) + nr_surface_initial_change 1053 ENDIF 1054 ENDIF 1055 ENDIF 1056 1074 ENDIF 1057 1075 ! 1058 1076 !-- Initialize the random number generator (from numerical recipes) … … 1067 1085 tq_m = 0.0 1068 1086 q_p = q 1069 IF ( cloud_physics .AND. icloud_scheme == 0 ) THEN 1087 IF ( cloud_physics .AND. icloud_scheme == 0 .AND. & 1088 precipitation ) THEN 1070 1089 tqr_m = 0.0 1071 1090 qr_p = qr … … 1245 1264 IF ( humidity .OR. passive_scalar ) THEN 1246 1265 q_p = q 1247 IF ( cloud_physics .AND. icloud_scheme == 0 ) THEN 1266 IF ( cloud_physics .AND. icloud_scheme == 0 .AND. & 1267 precipitation ) THEN 1248 1268 qr_p = qr 1249 1269 nr_p = nr … … 1259 1279 IF ( humidity .OR. passive_scalar ) THEN 1260 1280 tq_m = 0.0 1261 IF ( cloud_physics .AND. icloud_scheme == 0 ) THEN 1281 IF ( cloud_physics .AND. icloud_scheme == 0 .AND. & 1282 precipitation ) THEN 1262 1283 tqr_m = 0.0 1263 1284 tnr_m = 0.0
Note: See TracChangeset
for help on using the changeset viewer.