Changeset 3658 for palm/trunk
- Timestamp:
- Jan 7, 2019 8:28:54 PM (6 years ago)
- Location:
- palm/trunk/SOURCE
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
palm/trunk/SOURCE/flow_statistics.f90
r3651 r3658 427 427 !-- Initialize (local) summation array 428 428 sums_l = 0.0_wp 429 #ifdef _OPENACC 430 !$ACC KERNELS PRESENT(sums_l) 431 sums_l = 0.0_wp 432 !$ACC END KERNELS 433 #endif 429 434 430 435 ! … … 500 505 !$ tn = omp_get_thread_num() 501 506 !$OMP DO 507 !$ACC PARALLEL LOOP COLLAPSE(3) PRIVATE(i, j, k, flag) & 508 !$ACC PRESENT(wall_flags_0, u, v, pt, rmask, sums_l) 502 509 DO i = nxl, nxr 503 510 DO j = nys, nyn 504 511 DO k = nzb, nzt+1 505 512 flag = MERGE( 1.0_wp, 0.0_wp, BTEST( wall_flags_0(k,j,i), 22 ) ) 513 !$ACC ATOMIC 506 514 sums_l(k,1,tn) = sums_l(k,1,tn) + u(k,j,i) * rmask(j,i,sr) & 507 515 * flag 516 !$ACC ATOMIC 508 517 sums_l(k,2,tn) = sums_l(k,2,tn) + v(k,j,i) * rmask(j,i,sr) & 509 518 * flag 519 !$ACC ATOMIC 510 520 sums_l(k,4,tn) = sums_l(k,4,tn) + pt(k,j,i) * rmask(j,i,sr) & 511 521 * flag … … 513 523 ENDDO 514 524 ENDDO 525 !$ACC UPDATE HOST(sums_l(:,1,tn), sums_l(:,2,tn), sums_l(:,4,tn)) 515 526 516 527 ! … … 670 681 hom(:,1,2,sr) = sums(:,2) ! v 671 682 hom(:,1,4,sr) = sums(:,4) ! pt 683 !$ACC UPDATE DEVICE(hom(:,1,1,sr), hom(:,1,2,sr), hom(:,1,4,sr)) 672 684 673 685 … … 714 726 !$ tn = omp_get_thread_num() 715 727 !$OMP DO 728 !$ACC PARALLEL LOOP COLLAPSE(2) PRIVATE(i, j, k, m) & 729 !$ACC PRIVATE(sums_l_etot, flag) & 730 !$ACC PRESENT(wall_flags_0, rmask, momentumflux_output_conversion) & 731 !$ACC PRESENT(hom(:,1,4,sr)) & 732 !$ACC PRESENT(e, u, v, w, km, kh, p, pt) & 733 !$ACC PRESENT(surf_def_h(0), surf_lsm_h, surf_usm_h) & 734 !$ACC PRESENT(sums_l) 716 735 DO i = nxl, nxr 717 736 DO j = nys, nyn … … 721 740 ! 722 741 !-- Prognostic and diagnostic variables 742 !$ACC ATOMIC 723 743 sums_l(k,3,tn) = sums_l(k,3,tn) + w(k,j,i) * rmask(j,i,sr) & 724 744 * flag 745 !$ACC ATOMIC 725 746 sums_l(k,8,tn) = sums_l(k,8,tn) + e(k,j,i) * rmask(j,i,sr) & 726 747 * flag 748 !$ACC ATOMIC 727 749 sums_l(k,9,tn) = sums_l(k,9,tn) + km(k,j,i) * rmask(j,i,sr) & 728 750 * flag 751 !$ACC ATOMIC 729 752 sums_l(k,10,tn) = sums_l(k,10,tn) + kh(k,j,i) * rmask(j,i,sr) & 730 753 * flag 754 !$ACC ATOMIC 731 755 sums_l(k,40,tn) = sums_l(k,40,tn) + ( p(k,j,i) & 732 756 / momentumflux_output_conversion(k) ) & 733 757 * flag 734 758 759 !$ACC ATOMIC 735 760 sums_l(k,33,tn) = sums_l(k,33,tn) + & 736 761 ( pt(k,j,i)-hom(k,1,4,sr) )**2 * rmask(j,i,sr)& 737 762 * flag 738 763 #ifndef _OPENACC 739 764 IF ( humidity ) THEN 740 765 sums_l(k,70,tn) = sums_l(k,70,tn) + & … … 747 772 * flag 748 773 ENDIF 774 #endif 749 775 ! 750 776 !-- Higher moments 751 777 !-- (Computation of the skewness of w further below) 778 !$ACC ATOMIC 752 779 sums_l(k,38,tn) = sums_l(k,38,tn) + w(k,j,i)**3 * rmask(j,i,sr) & 753 780 * flag … … 763 790 !-- quantities is seperated from the previous loop in order to 764 791 !-- allow vectorization of that loop. 792 !$ACC ATOMIC 765 793 sums_l(nzb+4,pr_palm,tn) = sums_l(nzb+4,pr_palm,tn) + sums_l_etot 766 794 ! … … 769 797 surf_def_h(0)%start_index(j,i) ) THEN 770 798 m = surf_def_h(0)%start_index(j,i) 799 !$ACC ATOMIC 771 800 sums_l(nzb,pr_palm,tn) = sums_l(nzb,pr_palm,tn) + & 772 801 surf_def_h(0)%us(m) * rmask(j,i,sr) 802 !$ACC ATOMIC 773 803 sums_l(nzb+1,pr_palm,tn) = sums_l(nzb+1,pr_palm,tn) + & 774 804 surf_def_h(0)%usws(m) * rmask(j,i,sr) 805 !$ACC ATOMIC 775 806 sums_l(nzb+2,pr_palm,tn) = sums_l(nzb+2,pr_palm,tn) + & 776 807 surf_def_h(0)%vsws(m) * rmask(j,i,sr) 808 !$ACC ATOMIC 777 809 sums_l(nzb+3,pr_palm,tn) = sums_l(nzb+3,pr_palm,tn) + & 778 810 surf_def_h(0)%ts(m) * rmask(j,i,sr) 811 #ifndef _OPENACC 779 812 IF ( humidity ) THEN 780 813 sums_l(nzb+12,pr_palm,tn) = sums_l(nzb+12,pr_palm,tn) + & … … 785 818 surf_def_h(0)%ss(m) * rmask(j,i,sr) 786 819 ENDIF 820 #endif 787 821 ! 788 822 !-- Summation of surface temperature. 823 !$ACC ATOMIC 789 824 sums_l(nzb+14,pr_palm,tn) = sums_l(nzb+14,pr_palm,tn) + & 790 825 surf_def_h(0)%pt_surface(m) * & … … 793 828 IF ( surf_lsm_h%end_index(j,i) >= surf_lsm_h%start_index(j,i) ) THEN 794 829 m = surf_lsm_h%start_index(j,i) 830 !$ACC ATOMIC 795 831 sums_l(nzb,pr_palm,tn) = sums_l(nzb,pr_palm,tn) + & 796 832 surf_lsm_h%us(m) * rmask(j,i,sr) 833 !$ACC ATOMIC 797 834 sums_l(nzb+1,pr_palm,tn) = sums_l(nzb+1,pr_palm,tn) + & 798 835 surf_lsm_h%usws(m) * rmask(j,i,sr) 836 !$ACC ATOMIC 799 837 sums_l(nzb+2,pr_palm,tn) = sums_l(nzb+2,pr_palm,tn) + & 800 838 surf_lsm_h%vsws(m) * rmask(j,i,sr) 839 !$ACC ATOMIC 801 840 sums_l(nzb+3,pr_palm,tn) = sums_l(nzb+3,pr_palm,tn) + & 802 841 surf_lsm_h%ts(m) * rmask(j,i,sr) 842 #ifndef _OPENACC 803 843 IF ( humidity ) THEN 804 844 sums_l(nzb+12,pr_palm,tn) = sums_l(nzb+12,pr_palm,tn) + & … … 809 849 surf_lsm_h%ss(m) * rmask(j,i,sr) 810 850 ENDIF 851 #endif 811 852 ! 812 853 !-- Summation of surface temperature. 854 !$ACC ATOMIC 813 855 sums_l(nzb+14,pr_palm,tn) = sums_l(nzb+14,pr_palm,tn) + & 814 856 surf_lsm_h%pt_surface(m) * & … … 817 859 IF ( surf_usm_h%end_index(j,i) >= surf_usm_h%start_index(j,i) ) THEN 818 860 m = surf_usm_h%start_index(j,i) 861 !$ACC ATOMIC 819 862 sums_l(nzb,pr_palm,tn) = sums_l(nzb,pr_palm,tn) + & 820 863 surf_usm_h%us(m) * rmask(j,i,sr) 864 !$ACC ATOMIC 821 865 sums_l(nzb+1,pr_palm,tn) = sums_l(nzb+1,pr_palm,tn) + & 822 866 surf_usm_h%usws(m) * rmask(j,i,sr) 867 !$ACC ATOMIC 823 868 sums_l(nzb+2,pr_palm,tn) = sums_l(nzb+2,pr_palm,tn) + & 824 869 surf_usm_h%vsws(m) * rmask(j,i,sr) 870 !$ACC ATOMIC 825 871 sums_l(nzb+3,pr_palm,tn) = sums_l(nzb+3,pr_palm,tn) + & 826 872 surf_usm_h%ts(m) * rmask(j,i,sr) 873 #ifndef _OPENACC 827 874 IF ( humidity ) THEN 828 875 sums_l(nzb+12,pr_palm,tn) = sums_l(nzb+12,pr_palm,tn) + & … … 833 880 surf_usm_h%ss(m) * rmask(j,i,sr) 834 881 ENDIF 882 #endif 835 883 ! 836 884 !-- Summation of surface temperature. 885 !$ACC ATOMIC 837 886 sums_l(nzb+14,pr_palm,tn) = sums_l(nzb+14,pr_palm,tn) + & 838 887 surf_usm_h%pt_surface(m) * & … … 841 890 ENDDO 842 891 ENDDO 892 !$ACC UPDATE & 893 !$ACC HOST(sums_l(:,3,tn), sums_l(:,8,tn), sums_l(:,9,tn)) & 894 !$ACC HOST(sums_l(:,10,tn), sums_l(:,40,tn), sums_l(:,33,tn)) & 895 !$ACC HOST(sums_l(:,38,tn)) & 896 !$ACC HOST(sums_l(nzb:nzb+4,pr_palm,tn), sums_l(nzb+14:nzb+14,pr_palm,tn)) 843 897 844 898 ! … … 882 936 !-- term. 883 937 !$OMP DO 938 !$ACC PARALLEL LOOP COLLAPSE(3) PRIVATE(i, j, k, flag, w2, ust2, vst2) & 939 !$ACC PRESENT(wall_flags_0, u, v, w, rmask, hom(:,1,1:2,sr)) & 940 !$ACC PRESENT(sums_l) 884 941 DO i = nxl, nxr 885 942 DO j = nys, nyn … … 892 949 w2 = w(k,j,i)**2 893 950 951 !$ACC ATOMIC 894 952 sums_l(nzb+5,pr_palm,tn) = sums_l(nzb+5,pr_palm,tn) & 895 953 + 0.5_wp * ( ust2 + vst2 + w2 ) & … … 899 957 ENDDO 900 958 ENDDO 959 !$ACC UPDATE HOST(sums_l(nzb+5:nzb+5,pr_palm,tn)) 901 960 902 961 ! … … 904 963 905 964 !$OMP DO 965 !$ACC PARALLEL LOOP COLLAPSE(2) PRIVATE(i, j, k, l, m) & 966 !$ACC PRIVATE(ki, flag, ust, vst, pts) & 967 !$ACC PRESENT(kh, km, u, v, w, pt) & 968 !$ACC PRESENT(wall_flags_0, rmask, ddzu, rho_air_zw, hom(:,1,1:4,sr)) & 969 !$ACC PRESENT(heatflux_output_conversion, momentumflux_output_conversion) & 970 !$ACC PRESENT(surf_def_h(0:2), surf_lsm_h, surf_usm_h) & 971 !$ACC PRESENT(sums_l) 906 972 DO i = nxl, nxr 907 973 DO j = nys, nyn … … 923 989 ! 924 990 !-- Momentum flux w"u" 991 !$ACC ATOMIC 925 992 sums_l(k,12,tn) = sums_l(k,12,tn) - 0.25_wp * ( & 926 993 km(k,j,i)+km(k+1,j,i)+km(k,j,i-1)+km(k+1,j,i-1) & … … 934 1001 ! 935 1002 !-- Momentum flux w"v" 1003 !$ACC ATOMIC 936 1004 sums_l(k,14,tn) = sums_l(k,14,tn) - 0.25_wp * ( & 937 1005 km(k,j,i)+km(k+1,j,i)+km(k,j-1,i)+km(k+1,j-1,i) & … … 945 1013 ! 946 1014 !-- Heat flux w"pt" 1015 !$ACC ATOMIC 947 1016 sums_l(k,16,tn) = sums_l(k,16,tn) & 948 1017 - 0.5_wp * ( kh(k,j,i) + kh(k+1,j,i) )& … … 953 1022 * flag 954 1023 955 956 1024 ! 957 1025 !-- Salinity flux w"sa" 1026 #ifndef _OPENACC 958 1027 IF ( ocean_mode ) THEN 959 1028 sums_l(k,65,tn) = sums_l(k,65,tn) & … … 1000 1069 * flag 1001 1070 ENDIF 1071 #endif 1002 1072 1003 1073 ENDDO … … 1007 1077 IF ( use_surface_fluxes ) THEN 1008 1078 DO l = 0, 1 1009 ki = MERGE( -1, 0, l == 0 ) 1079 ! The original code using MERGE doesn't work with the PGI 1080 ! compiler when running on the GPU. 1081 ! ki = MERGE( -1, 0, l == 0 ) 1082 ki = -1 + l 1010 1083 IF ( surf_def_h(l)%ns >= 1 ) THEN 1011 1084 DO m = surf_def_h(l)%start_index(j,i), & … … 1013 1086 k = surf_def_h(l)%k(m) 1014 1087 1088 !$ACC ATOMIC 1015 1089 sums_l(k+ki,12,tn) = sums_l(k+ki,12,tn) + & 1016 1090 momentumflux_output_conversion(k+ki) * & 1017 1091 surf_def_h(l)%usws(m) * rmask(j,i,sr) ! w"u" 1092 !$ACC ATOMIC 1018 1093 sums_l(k+ki,14,tn) = sums_l(k+ki,14,tn) + & 1019 1094 momentumflux_output_conversion(k+ki) * & 1020 1095 surf_def_h(l)%vsws(m) * rmask(j,i,sr) ! w"v" 1096 !$ACC ATOMIC 1021 1097 sums_l(k+ki,16,tn) = sums_l(k+ki,16,tn) + & 1022 1098 heatflux_output_conversion(k+ki) * & 1023 1099 surf_def_h(l)%shf(m) * rmask(j,i,sr) ! w"pt" 1100 #if 0 1024 1101 sums_l(k+ki,58,tn) = sums_l(k+ki,58,tn) + & 1025 1102 0.0_wp * rmask(j,i,sr) ! u"pt" 1026 1103 sums_l(k+ki,61,tn) = sums_l(k+ki,61,tn) + & 1027 1104 0.0_wp * rmask(j,i,sr) ! v"pt" 1105 #endif 1106 #ifndef _OPENACC 1028 1107 IF ( ocean_mode ) THEN 1029 1108 sums_l(k+ki,65,tn) = sums_l(k+ki,65,tn) + & … … 1058 1137 surf_def_h(l)%ssws(m) * rmask(j,i,sr) ! w"s" 1059 1138 ENDIF 1139 #endif 1060 1140 1061 1141 ENDDO … … 1066 1146 surf_lsm_h%start_index(j,i) ) THEN 1067 1147 m = surf_lsm_h%start_index(j,i) 1148 !$ACC ATOMIC 1068 1149 sums_l(nzb,12,tn) = sums_l(nzb,12,tn) + & 1069 1150 momentumflux_output_conversion(nzb) * & 1070 1151 surf_lsm_h%usws(m) * rmask(j,i,sr) ! w"u" 1152 !$ACC ATOMIC 1071 1153 sums_l(nzb,14,tn) = sums_l(nzb,14,tn) + & 1072 1154 momentumflux_output_conversion(nzb) * & 1073 1155 surf_lsm_h%vsws(m) * rmask(j,i,sr) ! w"v" 1156 !$ACC ATOMIC 1074 1157 sums_l(nzb,16,tn) = sums_l(nzb,16,tn) + & 1075 1158 heatflux_output_conversion(nzb) * & 1076 1159 surf_lsm_h%shf(m) * rmask(j,i,sr) ! w"pt" 1160 #if 0 1077 1161 sums_l(nzb,58,tn) = sums_l(nzb,58,tn) + & 1078 1162 0.0_wp * rmask(j,i,sr) ! u"pt" 1079 1163 sums_l(nzb,61,tn) = sums_l(nzb,61,tn) + & 1080 1164 0.0_wp * rmask(j,i,sr) ! v"pt" 1165 #endif 1166 #ifndef _OPENACC 1081 1167 IF ( ocean_mode ) THEN 1082 1168 sums_l(nzb,65,tn) = sums_l(nzb,65,tn) + & … … 1111 1197 surf_lsm_h%ssws(m) * rmask(j,i,sr) ! w"s" 1112 1198 ENDIF 1113 1199 #endif 1114 1200 1115 1201 ENDIF … … 1117 1203 surf_usm_h%start_index(j,i) ) THEN 1118 1204 m = surf_usm_h%start_index(j,i) 1205 !$ACC ATOMIC 1119 1206 sums_l(nzb,12,tn) = sums_l(nzb,12,tn) + & 1120 1207 momentumflux_output_conversion(nzb) * & 1121 1208 surf_usm_h%usws(m) * rmask(j,i,sr) ! w"u" 1209 !$ACC ATOMIC 1122 1210 sums_l(nzb,14,tn) = sums_l(nzb,14,tn) + & 1123 1211 momentumflux_output_conversion(nzb) * & 1124 1212 surf_usm_h%vsws(m) * rmask(j,i,sr) ! w"v" 1213 !$ACC ATOMIC 1125 1214 sums_l(nzb,16,tn) = sums_l(nzb,16,tn) + & 1126 1215 heatflux_output_conversion(nzb) * & 1127 1216 surf_usm_h%shf(m) * rmask(j,i,sr) ! w"pt" 1217 #if 0 1128 1218 sums_l(nzb,58,tn) = sums_l(nzb,58,tn) + & 1129 1219 0.0_wp * rmask(j,i,sr) ! u"pt" 1130 1220 sums_l(nzb,61,tn) = sums_l(nzb,61,tn) + & 1131 1221 0.0_wp * rmask(j,i,sr) ! v"pt" 1222 #endif 1223 #ifndef _OPENACC 1132 1224 IF ( ocean_mode ) THEN 1133 1225 sums_l(nzb,65,tn) = sums_l(nzb,65,tn) + & … … 1162 1254 surf_usm_h%ssws(m) * rmask(j,i,sr) ! w"s" 1163 1255 ENDIF 1164 1256 #endif 1165 1257 1166 1258 ENDIF … … 1168 1260 ENDIF 1169 1261 1262 #ifndef _OPENACC 1170 1263 IF ( .NOT. neutral ) THEN 1171 1264 IF ( surf_def_h(0)%end_index(j,i) >= & … … 1284 1377 #endif 1285 1378 ENDIF 1379 #endif 1286 1380 ! 1287 1381 !-- Subgridscale fluxes at the top surface 1288 1382 IF ( use_top_fluxes ) THEN 1289 1383 m = surf_def_h(2)%start_index(j,i) 1290 sums_l(nzt:nzt+1,12,tn) = sums_l(nzt:nzt+1,12,tn) + & 1291 momentumflux_output_conversion(nzt:nzt+1) * & 1384 !$ACC ATOMIC 1385 sums_l(nzt,12,tn) = sums_l(nzt,12,tn) + & 1386 momentumflux_output_conversion(nzt) * & 1292 1387 surf_def_h(2)%usws(m) * rmask(j,i,sr) ! w"u" 1293 sums_l(nzt:nzt+1,14,tn) = sums_l(nzt:nzt+1,14,tn) + & 1294 momentumflux_output_conversion(nzt:nzt+1) * & 1388 !$ACC ATOMIC 1389 sums_l(nzt+1,12,tn) = sums_l(nzt+1,12,tn) + & 1390 momentumflux_output_conversion(nzt+1) * & 1391 surf_def_h(2)%usws(m) * rmask(j,i,sr) ! w"u" 1392 !$ACC ATOMIC 1393 sums_l(nzt,14,tn) = sums_l(nzt,14,tn) + & 1394 momentumflux_output_conversion(nzt) * & 1295 1395 surf_def_h(2)%vsws(m) * rmask(j,i,sr) ! w"v" 1296 sums_l(nzt:nzt+1,16,tn) = sums_l(nzt:nzt+1,16,tn) + & 1297 heatflux_output_conversion(nzt:nzt+1) * & 1396 !$ACC ATOMIC 1397 sums_l(nzt+1,14,tn) = sums_l(nzt+1,14,tn) + & 1398 momentumflux_output_conversion(nzt+1) * & 1399 surf_def_h(2)%vsws(m) * rmask(j,i,sr) ! w"v" 1400 !$ACC ATOMIC 1401 sums_l(nzt,16,tn) = sums_l(nzt,16,tn) + & 1402 heatflux_output_conversion(nzt) * & 1298 1403 surf_def_h(2)%shf(m) * rmask(j,i,sr) ! w"pt" 1404 !$ACC ATOMIC 1405 sums_l(nzt+1,16,tn) = sums_l(nzt+1,16,tn) + & 1406 heatflux_output_conversion(nzt+1) * & 1407 surf_def_h(2)%shf(m) * rmask(j,i,sr) ! w"pt" 1408 #if 0 1299 1409 sums_l(nzt:nzt+1,58,tn) = sums_l(nzt:nzt+1,58,tn) + & 1300 1410 0.0_wp * rmask(j,i,sr) ! u"pt" 1301 1411 sums_l(nzt:nzt+1,61,tn) = sums_l(nzt:nzt+1,61,tn) + & 1302 1412 0.0_wp * rmask(j,i,sr) ! v"pt" 1303 1413 #endif 1414 #ifndef _OPENACC 1304 1415 IF ( ocean_mode ) THEN 1305 1416 sums_l(nzt,65,tn) = sums_l(nzt,65,tn) + & … … 1337 1448 surf_def_h(2)%ssws(m) * rmask(j,i,sr) ! w"s" 1338 1449 ENDIF 1450 #endif 1339 1451 ENDIF 1340 1452 … … 1354 1466 1355 1467 !-- Higher moments 1468 !$ACC ATOMIC 1356 1469 sums_l(k,35,tn) = sums_l(k,35,tn) + pts * w(k,j,i)**2 * & 1357 1470 rmask(j,i,sr) * flag 1471 !$ACC ATOMIC 1358 1472 sums_l(k,36,tn) = sums_l(k,36,tn) + pts**2 * w(k,j,i) * & 1359 1473 rmask(j,i,sr) * flag … … 1362 1476 !-- Salinity flux and density (density does not belong to here, 1363 1477 !-- but so far there is no other suitable place to calculate) 1478 #ifndef _OPENACC 1364 1479 IF ( ocean_mode ) THEN 1365 1480 IF( .NOT. ws_scheme_sca .OR. sr /= 0 ) THEN … … 1447 1562 rmask(j,i,sr) * flag 1448 1563 ENDIF 1564 #endif 1449 1565 1450 1566 ! 1451 1567 !-- Energy flux w*e* 1452 1568 !-- has to be adjusted 1569 !$ACC ATOMIC 1453 1570 sums_l(k,37,tn) = sums_l(k,37,tn) + w(k,j,i) * 0.5_wp * & 1454 1571 ( ust**2 + vst**2 + w(k,j,i)**2 ) & … … 1460 1577 ENDDO 1461 1578 !$OMP END PARALLEL 1579 1580 !$ACC UPDATE & 1581 !$ACC HOST(sums_l(:,12,tn), sums_l(:,14,tn), sums_l(:,16,tn)) & 1582 !$ACC HOST(sums_l(:,35,tn), sums_l(:,36,tn), sums_l(:,37,tn)) 1462 1583 ! 1463 1584 !-- Treat land-surface quantities according to new wall model structure. -
palm/trunk/SOURCE/time_integration.f90
r3648 r3658 442 442 rho_air_zw, rho_ocean, s, s_p, sa_p, te_m, tend, tpt_m, tu_m, & 443 443 tv_m, tw_m, u, ug, u_init, u_p, u_stokes_zu, v, vg, v_init, vpt,& 444 v_p, v_stokes_zu, w, w_p, zu 444 v_p, v_stokes_zu, w, w_p, zu, heatflux_output_conversion, & 445 momentumflux_output_conversion 445 446 446 447 USE biometeorology_mod, & … … 585 586 USE statistics, & 586 587 ONLY: flow_statistics_called, hom, pr_palm, sums_ls_l, & 587 rmask, statistic_regions, weight_substep, sums_l _l,&588 rmask, statistic_regions, weight_substep, sums_l, sums_l_l, & 588 589 sums_us2_ws_l, sums_wsus_ws_l, sums_vs2_ws_l, sums_wsvs_ws_l, & 589 590 sums_ws2_ws_l, sums_wspts_ws_l, sums_wsqs_ws_l, sums_wssas_ws_l,& … … 685 686 !$ACC COPYIN(ddzu(1:nzt+1), dd2zu(1:nzt)) & 686 687 !$ACC COPYIN(ddzw(1:nzt+1)) & 688 !$ACC COPYIN(heatflux_output_conversion(nzb:nzt+1)) & 689 !$ACC COPYIN(momentumflux_output_conversion(nzb:nzt+1)) & 687 690 !$ACC COPYIN(rdf(nzb+1:nzt), rdf_sc(nzb+1:nzt)) & 688 691 !$ACC COPYIN(ptdf_x(nxlg:nxrg), ptdf_y(nysg:nyng)) & … … 715 718 ! Copy data from statistics 716 719 !$ACC DATA & 717 !$ACC COPYIN(hom( nzb+1:nzb_max,1,1:3,0)) &720 !$ACC COPYIN(hom(0:nz+1,1:2,1:4,0)) & 718 721 !$ACC COPYIN(rmask(nysg:nyng,nxlg:nxrg,0:statistic_regions)) & 719 722 !$ACC COPYIN(weight_substep(1:intermediate_timestep_count_max)) & 723 !$ACC COPY(sums_l(nzb:nzt+1,1:pr_palm,0)) & 720 724 !$ACC COPY(sums_l_l(nzb:nzt+1,0:statistic_regions,0)) & 721 725 !$ACC COPY(sums_us2_ws_l(nzb:nzt+1,0)) & … … 734 738 !$ACC COPY(sums_salsa_ws_l(nzb:nzt+1,0)) 735 739 740 #ifdef _OPENACC 741 CALL enter_surface_arrays 742 #endif 743 736 744 ! 737 745 !-- At beginning determine the first time step … … 849 857 ENDIF 850 858 851 #ifdef _OPENACC852 CALL enter_surface_arrays853 #endif854 855 859 ! 856 860 !-- Start of intermediate step loop … … 1369 1373 ! 1370 1374 !-- Will be used at some point by flow_statistics. 1371 !$ACC UPDATE HOST(e, u, v, w, pt) & 1372 !$ACC HOST(kh(nzb:nzt+1,nysg:nyng,nxlg:nxrg)) & 1373 !$ACC HOST(km(nzb:nzt+1,nysg:nyng,nxlg:nxrg)) & 1375 !$ACC UPDATE & 1374 1376 !$ACC HOST(sums_l_l(nzb:nzt+1,0:statistic_regions,0)) & 1375 1377 !$ACC HOST(sums_us2_ws_l(nzb:nzt+1,0)) & … … 1387 1389 !$ACC HOST(sums_wsss_ws_l(nzb:nzt+1,0)) & 1388 1390 !$ACC HOST(sums_salsa_ws_l(nzb:nzt+1,0)) 1389 #ifdef _OPENACC1390 CALL exit_surface_arrays1391 #endif1392 1391 1393 1392 ! … … 1810 1809 ENDDO ! time loop 1811 1810 1811 #ifdef _OPENACC 1812 CALL exit_surface_arrays 1813 #endif 1812 1814 !$ACC END DATA 1813 1815 !$ACC END DATA -
palm/trunk/SOURCE/timestep.f90
r3655 r3658 211 211 212 212 CALL cpu_log( log_point(12), 'calculate_timestep', 'start' ) 213 214 !$ACC UPDATE & 215 !$ACC HOST(u(nzb:nzt+1,nysg:nyng,nxlg:nxrg)) & 216 !$ACC HOST(v(nzb:nzt+1,nysg:nyng,nxlg:nxrg)) & 217 !$ACC HOST(w(nzb:nzt+1,nysg:nyng,nxlg:nxrg)) & 218 !$ACC HOST(kh(nzb:nzt+1,nysg:nyng,nxlg:nxrg)) & 219 !$ACC HOST(km(nzb:nzt+1,nysg:nyng,nxlg:nxrg)) 220 213 221 ! 214 222 !-- Save former time step as reference
Note: See TracChangeset
for help on using the changeset viewer.