Changeset 19 for palm/trunk/SOURCE/prognostic_equations.f90
 Timestamp:
 Feb 23, 2007 4:53:48 AM (15 years ago)
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

palm/trunk/SOURCE/prognostic_equations.f90
r4 r19 4 4 ! Actual revisions: 5 5 !  6 ! 6 ! Calculation of e, q, and pt extended for gridpoint nzt, 7 ! handling of given temperature/humidity/scalar fluxes at top surface 7 8 ! 8 9 ! Former revisions: … … 22 23 ! Description: 23 24 !  24 ! Solving the prognostic equations and advecting particles.25 ! Solving the prognostic equations. 25 26 !! 26 27 … … 333 334 ! Tendency terms 334 335 IF ( scalar_advec == 'bcscheme' ) THEN 335 CALL diffusion_s( i, j, ddzu, ddzw, kh, pt, shf, t end )336 CALL diffusion_s( i, j, ddzu, ddzw, kh, pt, shf, tswst, tend ) 336 337 ELSE 337 338 IF ( tsc(2) == 2.0 .OR. timestep_scheme(1:5) == 'runge' ) THEN … … 346 347 IF ( tsc(2) == 2.0 .AND. timestep_scheme(1:8) == 'leapfrog' ) & 347 348 THEN 348 CALL diffusion_s( i, j, ddzu, ddzw, kh_m, pt_m, shf_m, tend ) 349 CALL diffusion_s( i, j, ddzu, ddzw, kh_m, pt_m, shf_m, & 350 tswst_m, tend ) 349 351 ELSE 350 CALL diffusion_s( i, j, ddzu, ddzw, kh, pt, shf, t end )352 CALL diffusion_s( i, j, ddzu, ddzw, kh, pt, shf, tswst, tend ) 351 353 ENDIF 352 354 ENDIF … … 368 370 ! 369 371 ! Prognostic equation for potential temperature 370 DO k = nzb_s_inner(j,i)+1, nzt 1372 DO k = nzb_s_inner(j,i)+1, nzt 371 373 pt_p(k,j,i) = ( 1  sat ) * pt_m(k,j,i) + sat * pt(k,j,i) + & 372 374 dt_3d * ( & … … 380 382 IF ( timestep_scheme(1:5) == 'runge' ) THEN 381 383 IF ( intermediate_timestep_count == 1 ) THEN 382 DO k = nzb_s_inner(j,i)+1, nzt 1384 DO k = nzb_s_inner(j,i)+1, nzt 383 385 tpt_m(k,j,i) = tend(k,j,i) 384 386 ENDDO 385 387 ELSEIF ( intermediate_timestep_count < & 386 388 intermediate_timestep_count_max ) THEN 387 DO k = nzb_s_inner(j,i)+1, nzt 1389 DO k = nzb_s_inner(j,i)+1, nzt 388 390 tpt_m(k,j,i) = 9.5625 * tend(k,j,i) + 5.3125 * tpt_m(k,j,i) 389 391 ENDDO … … 429 431 ! Tendencyterms 430 432 IF ( scalar_advec == 'bcscheme' ) THEN 431 CALL diffusion_s( i, j, ddzu, ddzw, kh, q, qsws, tend )433 CALL diffusion_s( i, j, ddzu, ddzw, kh, q, qsws, qswst, tend ) 432 434 ELSE 433 435 IF ( tsc(2) == 2.0 .OR. timestep_scheme(1:5) == 'runge' ) THEN … … 443 445 THEN 444 446 CALL diffusion_s( i, j, ddzu, ddzw, kh_m, q_m, qsws_m, & 447 qswst_m, tend ) 448 ELSE 449 CALL diffusion_s( i, j, ddzu, ddzw, kh, q, qsws, qswst, & 445 450 tend ) 446 ELSE447 CALL diffusion_s( i, j, ddzu, ddzw, kh, q, qsws, tend )448 451 ENDIF 449 452 ENDIF … … 459 462 ! 460 463 ! Prognostic equation for total water content / scalar 461 DO k = nzb_s_inner(j,i)+1, nzt 1464 DO k = nzb_s_inner(j,i)+1, nzt 462 465 q_p(k,j,i) = ( 1  sat ) * q_m(k,j,i) + sat * q(k,j,i) + & 463 466 dt_3d * ( & … … 471 474 IF ( timestep_scheme(1:5) == 'runge' ) THEN 472 475 IF ( intermediate_timestep_count == 1 ) THEN 473 DO k = nzb_s_inner(j,i)+1, nzt 1476 DO k = nzb_s_inner(j,i)+1, nzt 474 477 tq_m(k,j,i) = tend(k,j,i) 475 478 ENDDO 476 479 ELSEIF ( intermediate_timestep_count < & 477 480 intermediate_timestep_count_max ) THEN 478 DO k = nzb_s_inner(j,i)+1, nzt 1481 DO k = nzb_s_inner(j,i)+1, nzt 479 482 tq_m(k,j,i) = 9.5625 * tend(k,j,i) + 5.3125 * tq_m(k,j,i) 480 483 ENDDO … … 577 580 ! reasons in the course of the integration. In such cases the old TKE 578 581 ! value is reduced by 90%. 579 DO k = nzb_s_inner(j,i)+1, nzt 1582 DO k = nzb_s_inner(j,i)+1, nzt 580 583 e_p(k,j,i) = ( 1  sat ) * e_m(k,j,i) + sat * e(k,j,i) + & 581 584 dt_3d * ( & … … 589 592 IF ( timestep_scheme(1:5) == 'runge' ) THEN 590 593 IF ( intermediate_timestep_count == 1 ) THEN 591 DO k = nzb_s_inner(j,i)+1, nzt 1594 DO k = nzb_s_inner(j,i)+1, nzt 592 595 te_m(k,j,i) = tend(k,j,i) 593 596 ENDDO 594 597 ELSEIF ( intermediate_timestep_count < & 595 598 intermediate_timestep_count_max ) THEN 596 DO k = nzb_s_inner(j,i)+1, nzt 1599 DO k = nzb_s_inner(j,i)+1, nzt 597 600 te_m(k,j,i) = 9.5625 * tend(k,j,i) + 5.3125 * te_m(k,j,i) 598 601 ENDDO … … 809 812 IF ( tsc(2) == 2.0 .AND. timestep_scheme(1:8) == 'leapfrog' ) & 810 813 THEN 811 CALL diffusion_s( i, j, ddzu, ddzw, kh_m, pt_m, shf_m, tend ) 814 CALL diffusion_s( i, j, ddzu, ddzw, kh_m, pt_m, shf_m, & 815 tswst_m, tend ) 812 816 ELSE 813 CALL diffusion_s( i, j, ddzu, ddzw, kh, pt, shf, t end )817 CALL diffusion_s( i, j, ddzu, ddzw, kh, pt, shf, tswst, tend ) 814 818 ENDIF 815 819 … … 830 834 ! 831 835 ! Prognostic equation for potential temperature 832 DO k = nzb_s_inner(j,i)+1, nzt 1836 DO k = nzb_s_inner(j,i)+1, nzt 833 837 pt_p(k,j,i) = ( 1.0tsc(1) ) * pt_m(k,j,i) + tsc(1)*pt(k,j,i) +& 834 838 dt_3d * ( & … … 842 846 IF ( timestep_scheme(1:5) == 'runge' ) THEN 843 847 IF ( intermediate_timestep_count == 1 ) THEN 844 DO k = nzb_s_inner(j,i)+1, nzt 1848 DO k = nzb_s_inner(j,i)+1, nzt 845 849 tpt_m(k,j,i) = tend(k,j,i) 846 850 ENDDO 847 851 ELSEIF ( intermediate_timestep_count < & 848 852 intermediate_timestep_count_max ) THEN 849 DO k = nzb_s_inner(j,i)+1, nzt 1853 DO k = nzb_s_inner(j,i)+1, nzt 850 854 tpt_m(k,j,i) = 9.5625 * tend(k,j,i) + & 851 855 5.3125 * tpt_m(k,j,i) … … 870 874 IF ( tsc(2) == 2.0 .AND. timestep_scheme(1:8) == 'leapfrog' )& 871 875 THEN 872 CALL diffusion_s( i, j, ddzu, ddzw, kh_m, q_m, qsws_m, tend ) 876 CALL diffusion_s( i, j, ddzu, ddzw, kh_m, q_m, qsws_m, & 877 qswst_m, tend ) 873 878 ELSE 874 CALL diffusion_s( i, j, ddzu, ddzw, kh, q, qsws, tend ) 879 CALL diffusion_s( i, j, ddzu, ddzw, kh, q, qsws, qswst, & 880 tend ) 875 881 ENDIF 876 882 … … 885 891 ! 886 892 ! Prognostic equation for total water content / scalar 887 DO k = nzb_s_inner(j,i)+1, nzt 1893 DO k = nzb_s_inner(j,i)+1, nzt 888 894 q_p(k,j,i) = ( 1.0tsc(1) ) * q_m(k,j,i) + tsc(1)*q(k,j,i) +& 889 895 dt_3d * ( & … … 897 903 IF ( timestep_scheme(1:5) == 'runge' ) THEN 898 904 IF ( intermediate_timestep_count == 1 ) THEN 899 DO k = nzb_s_inner(j,i)+1, nzt 1905 DO k = nzb_s_inner(j,i)+1, nzt 900 906 tq_m(k,j,i) = tend(k,j,i) 901 907 ENDDO 902 908 ELSEIF ( intermediate_timestep_count < & 903 909 intermediate_timestep_count_max ) THEN 904 DO k = nzb_s_inner(j,i)+1, nzt 1910 DO k = nzb_s_inner(j,i)+1, nzt 905 911 tq_m(k,j,i) = 9.5625 * tend(k,j,i) + & 906 912 5.3125 * tq_m(k,j,i) … … 951 957 ! reasons in the course of the integration. In such cases the old 952 958 ! TKE value is reduced by 90%. 953 DO k = nzb_s_inner(j,i)+1, nzt 1959 DO k = nzb_s_inner(j,i)+1, nzt 954 960 e_p(k,j,i) = ( 1.0tsc(1) ) * e_m(k,j,i) + tsc(1)*e(k,j,i) +& 955 961 dt_3d * ( & … … 963 969 IF ( timestep_scheme(1:5) == 'runge' ) THEN 964 970 IF ( intermediate_timestep_count == 1 ) THEN 965 DO k = nzb_s_inner(j,i)+1, nzt 1971 DO k = nzb_s_inner(j,i)+1, nzt 966 972 te_m(k,j,i) = tend(k,j,i) 967 973 ENDDO 968 974 ELSEIF ( intermediate_timestep_count < & 969 975 intermediate_timestep_count_max ) THEN 970 DO k = nzb_s_inner(j,i)+1, nzt 1976 DO k = nzb_s_inner(j,i)+1, nzt 971 977 te_m(k,j,i) = 9.5625 * tend(k,j,i) + & 972 978 5.3125 * te_m(k,j,i) … … 1252 1258 ! pttendency terms with no communication 1253 1259 IF ( scalar_advec == 'bcscheme' ) THEN 1254 CALL diffusion_s( ddzu, ddzw, kh, pt, shf, t end )1260 CALL diffusion_s( ddzu, ddzw, kh, pt, shf, tswst, tend ) 1255 1261 ELSE 1256 1262 IF ( tsc(2) == 2.0 .OR. timestep_scheme(1:5) == 'runge' ) THEN … … 1264 1270 ENDIF 1265 1271 IF ( tsc(2) == 2.0 .AND. timestep_scheme(1:8) == 'leapfrog' ) THEN 1266 CALL diffusion_s( ddzu, ddzw, kh_m, pt_m, shf_m, t end )1272 CALL diffusion_s( ddzu, ddzw, kh_m, pt_m, shf_m, tswst_m, tend ) 1267 1273 ELSE 1268 CALL diffusion_s( ddzu, ddzw, kh, pt, shf, t end )1274 CALL diffusion_s( ddzu, ddzw, kh, pt, shf, tswst, tend ) 1269 1275 ENDIF 1270 1276 ENDIF … … 1288 1294 DO i = nxl, nxr 1289 1295 DO j = nys, nyn 1290 DO k = nzb_s_inner(j,i)+1, nzt 11296 DO k = nzb_s_inner(j,i)+1, nzt 1291 1297 pt_p(k,j,i) = ( 1  sat ) * pt_m(k,j,i) + sat * pt(k,j,i) + & 1292 1298 dt_3d * ( & … … 1304 1310 DO i = nxl, nxr 1305 1311 DO j = nys, nyn 1306 DO k = nzb_s_inner(j,i)+1, nzt 11312 DO k = nzb_s_inner(j,i)+1, nzt 1307 1313 tpt_m(k,j,i) = tend(k,j,i) 1308 1314 ENDDO … … 1313 1319 DO i = nxl, nxr 1314 1320 DO j = nys, nyn 1315 DO k = nzb_s_inner(j,i)+1, nzt 11321 DO k = nzb_s_inner(j,i)+1, nzt 1316 1322 tpt_m(k,j,i) = 9.5625 * tend(k,j,i) + 5.3125 * tpt_m(k,j,i) 1317 1323 ENDDO … … 1352 1358 ! Scalar/qtendency terms with no communication 1353 1359 IF ( scalar_advec == 'bcscheme' ) THEN 1354 CALL diffusion_s( ddzu, ddzw, kh, q, qsws, tend )1360 CALL diffusion_s( ddzu, ddzw, kh, q, qsws, qswst, tend ) 1355 1361 ELSE 1356 1362 IF ( tsc(2) == 2.0 .OR. timestep_scheme(1:5) == 'runge' ) THEN … … 1364 1370 ENDIF 1365 1371 IF ( tsc(2) == 2.0 .AND. timestep_scheme(1:8) == 'leapfrog' ) THEN 1366 CALL diffusion_s( ddzu, ddzw, kh_m, q_m, qsws_m, tend )1372 CALL diffusion_s( ddzu, ddzw, kh_m, q_m, qsws_m, qswst_m, tend ) 1367 1373 ELSE 1368 CALL diffusion_s( ddzu, ddzw, kh, q, qsws, tend )1374 CALL diffusion_s( ddzu, ddzw, kh, q, qsws, qswst, tend ) 1369 1375 ENDIF 1370 1376 ENDIF … … 1382 1388 DO i = nxl, nxr 1383 1389 DO j = nys, nyn 1384 DO k = nzb_s_inner(j,i)+1, nzt 11390 DO k = nzb_s_inner(j,i)+1, nzt 1385 1391 q_p(k,j,i) = ( 1  sat ) * q_m(k,j,i) + sat * q(k,j,i) + & 1386 1392 dt_3d * ( & … … 1398 1404 DO i = nxl, nxr 1399 1405 DO j = nys, nyn 1400 DO k = nzb_s_inner(j,i)+1, nzt 11406 DO k = nzb_s_inner(j,i)+1, nzt 1401 1407 tq_m(k,j,i) = tend(k,j,i) 1402 1408 ENDDO … … 1407 1413 DO i = nxl, nxr 1408 1414 DO j = nys, nyn 1409 DO k = nzb_s_inner(j,i)+1, nzt 11415 DO k = nzb_s_inner(j,i)+1, nzt 1410 1416 tq_m(k,j,i) = 9.5625 * tend(k,j,i) + 5.3125 * tq_m(k,j,i) 1411 1417 ENDDO … … 1503 1509 DO i = nxl, nxr 1504 1510 DO j = nys, nyn 1505 DO k = nzb_s_inner(j,i)+1, nzt 11511 DO k = nzb_s_inner(j,i)+1, nzt 1506 1512 e_p(k,j,i) = ( 1  sat ) * e_m(k,j,i) + sat * e(k,j,i) + & 1507 1513 dt_3d * ( & … … 1519 1525 DO i = nxl, nxr 1520 1526 DO j = nys, nyn 1521 DO k = nzb_s_inner(j,i)+1, nzt 11527 DO k = nzb_s_inner(j,i)+1, nzt 1522 1528 te_m(k,j,i) = tend(k,j,i) 1523 1529 ENDDO … … 1528 1534 DO i = nxl, nxr 1529 1535 DO j = nys, nyn 1530 DO k = nzb_s_inner(j,i)+1, nzt 11536 DO k = nzb_s_inner(j,i)+1, nzt 1531 1537 te_m(k,j,i) = 9.5625 * tend(k,j,i) + 5.3125 * te_m(k,j,i) 1532 1538 ENDDO
Note: See TracChangeset
for help on using the changeset viewer.