Changeset 2696 for palm/trunk/SOURCE/flow_statistics.f90
- Timestamp:
- Dec 14, 2017 5:12:51 PM (7 years ago)
- Location:
- palm/trunk
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
palm/trunk
-
palm/trunk/SOURCE
-
palm/trunk/SOURCE/flow_statistics.f90
r2674 r2696 1 1 !> @file flow_statistics.f90 2 2 !------------------------------------------------------------------------------! 3 ! This file is part of PALM.3 ! This file is part of the PALM model system. 4 4 ! 5 5 ! PALM is free software: you can redistribute it and/or modify it under the … … 25 25 ! ----------------- 26 26 ! $Id$ 27 ! Bugfix in evaluation of surface quantities in case different surface types 28 ! are used (MS) 29 ! 30 ! 2674 2017-12-07 11:49:21Z suehring 27 31 ! Bugfix in output conversion of resolved-scale momentum fluxes in case of 28 32 ! PW advections scheme. … … 288 292 289 293 USE radiation_model_mod, & 290 ONLY: radiation, radiation_scheme, rad_net,&294 ONLY: radiation, radiation_scheme, & 291 295 rad_lw_in, rad_lw_out, rad_lw_cs_hr, rad_lw_hr, & 292 296 rad_sw_in, rad_sw_out, rad_sw_cs_hr, rad_sw_hr … … 698 702 ! 699 703 !-- 2D-arrays (being collected in the last column of sums_l) 700 IF ( surf_def_h(0)%ns >= 1 ) THEN 704 IF ( surf_def_h(0)%end_index(j,i) >= & 705 surf_def_h(0)%start_index(j,i) ) THEN 701 706 m = surf_def_h(0)%start_index(j,i) 702 707 sums_l(nzb,pr_palm,tn) = sums_l(nzb,pr_palm,tn) + & … … 717 722 ENDIF 718 723 ENDIF 719 IF ( surf_lsm_h% ns >= 1) THEN724 IF ( surf_lsm_h%end_index(j,i) >= surf_lsm_h%start_index(j,i) ) THEN 720 725 m = surf_lsm_h%start_index(j,i) 721 726 sums_l(nzb,pr_palm,tn) = sums_l(nzb,pr_palm,tn) + & … … 736 741 ENDIF 737 742 ENDIF 738 IF ( surf_usm_h% ns >= 1) THEN739 m = surf_ lsm_h%start_index(j,i)743 IF ( surf_usm_h%end_index(j,i) >= surf_usm_h%start_index(j,i) ) THEN 744 m = surf_usm_h%start_index(j,i) 740 745 sums_l(nzb,pr_palm,tn) = sums_l(nzb,pr_palm,tn) + & 741 746 surf_usm_h%us(m) * rmask(j,i,sr) … … 925 930 ki = MERGE( -1, 0, l == 0 ) 926 931 IF ( surf_def_h(l)%ns >= 1 ) THEN 927 DO m = surf_def_h(l)%start_index(j,i), surf_def_h(l)%end_index(j,i) 932 DO m = surf_def_h(l)%start_index(j,i), & 933 surf_def_h(l)%end_index(j,i) 928 934 k = surf_def_h(l)%k(m) 929 935 … … 978 984 ENDIF 979 985 ENDDO 980 IF ( surf_lsm_h%ns >= 1 ) THEN 986 IF ( surf_lsm_h%end_index(j,i) >= & 987 surf_lsm_h%start_index(j,i) ) THEN 981 988 m = surf_lsm_h%start_index(j,i) 982 989 sums_l(nzb,12,tn) = sums_l(nzb,12,tn) + & … … 1028 1035 1029 1036 ENDIF 1030 IF ( surf_usm_h%ns >= 1 ) THEN 1037 IF ( surf_usm_h%end_index(j,i) >= & 1038 surf_usm_h%start_index(j,i) ) THEN 1031 1039 m = surf_usm_h%start_index(j,i) 1032 1040 sums_l(nzb,12,tn) = sums_l(nzb,12,tn) + & … … 1082 1090 1083 1091 IF ( .NOT. neutral ) THEN 1084 IF ( surf_def_h(0)%ns >= 1 ) THEN 1092 IF ( surf_def_h(0)%end_index(j,i) >= & 1093 surf_def_h(0)%start_index(j,i) ) THEN 1085 1094 m = surf_def_h(0)%start_index(j,i) 1086 sums_l(nzb,112,tn) = sums_l(nzb,112,tn) + 1095 sums_l(nzb,112,tn) = sums_l(nzb,112,tn) + & 1087 1096 surf_def_h(0)%ol(m) * rmask(j,i,sr) ! L 1088 1097 ENDIF 1089 IF ( surf_lsm_h%ns >= 1 ) THEN 1098 IF ( surf_lsm_h%end_index(j,i) >= & 1099 surf_lsm_h%start_index(j,i) ) THEN 1090 1100 m = surf_lsm_h%start_index(j,i) 1091 sums_l(nzb,112,tn) = sums_l(nzb,112,tn) + 1101 sums_l(nzb,112,tn) = sums_l(nzb,112,tn) + & 1092 1102 surf_lsm_h%ol(m) * rmask(j,i,sr) ! L 1093 1103 ENDIF 1094 IF ( surf_usm_h%ns >= 1 ) THEN 1104 IF ( surf_usm_h%end_index(j,i) >= & 1105 surf_usm_h%start_index(j,i) ) THEN 1095 1106 m = surf_usm_h%start_index(j,i) 1096 sums_l(nzb,112,tn) = sums_l(nzb,112,tn) + 1107 sums_l(nzb,112,tn) = sums_l(nzb,112,tn) + & 1097 1108 surf_usm_h%ol(m) * rmask(j,i,sr) ! L 1098 1109 ENDIF … … 1100 1111 1101 1112 IF ( radiation ) THEN 1102 sums_l(nzb,99,tn) = sums_l(nzb,99,tn) + rad_net(j,i) 1103 sums_l(nzb,100,tn) = sums_l(nzb,100,tn) + rad_lw_in(nzb,j,i) 1104 sums_l(nzb,101,tn) = sums_l(nzb,101,tn) + rad_lw_out(nzb,j,i) 1105 sums_l(nzb,102,tn) = sums_l(nzb,102,tn) + rad_sw_in(nzb,j,i) 1106 sums_l(nzb,103,tn) = sums_l(nzb,103,tn) + rad_sw_out(nzb,j,i) 1113 IF ( surf_def_h(0)%end_index(j,i) >= & 1114 surf_def_h(0)%start_index(j,i) ) THEN 1115 m = surf_def_h(0)%start_index(j,i) 1116 sums_l(nzb,99,tn) = sums_l(nzb,99,tn) + & 1117 surf_def_h(0)%rad_net(m) * rmask(j,i,sr) 1118 sums_l(nzb,100,tn) = sums_l(nzb,100,tn) + & 1119 surf_def_h(0)%rad_lw_in(m) * rmask(j,i,sr) 1120 sums_l(nzb,101,tn) = sums_l(nzb,101,tn) + & 1121 surf_def_h(0)%rad_lw_out(m) * rmask(j,i,sr) 1122 sums_l(nzb,102,tn) = sums_l(nzb,102,tn) + & 1123 surf_def_h(0)%rad_sw_in(m) * rmask(j,i,sr) 1124 sums_l(nzb,103,tn) = sums_l(nzb,103,tn) + & 1125 surf_def_h(0)%rad_sw_out(m) * rmask(j,i,sr) 1126 ENDIF 1127 IF ( surf_lsm_h%end_index(j,i) >= & 1128 surf_lsm_h%start_index(j,i) ) THEN 1129 m = surf_lsm_h%start_index(j,i) 1130 sums_l(nzb,99,tn) = sums_l(nzb,99,tn) + & 1131 surf_lsm_h%rad_net(m) * rmask(j,i,sr) 1132 sums_l(nzb,100,tn) = sums_l(nzb,100,tn) + & 1133 surf_lsm_h%rad_lw_in(m) * rmask(j,i,sr) 1134 sums_l(nzb,101,tn) = sums_l(nzb,101,tn) + & 1135 surf_lsm_h%rad_lw_out(m) * rmask(j,i,sr) 1136 sums_l(nzb,102,tn) = sums_l(nzb,102,tn) + & 1137 surf_lsm_h%rad_sw_in(m) * rmask(j,i,sr) 1138 sums_l(nzb,103,tn) = sums_l(nzb,103,tn) + & 1139 surf_lsm_h%rad_sw_out(m) * rmask(j,i,sr) 1140 ENDIF 1141 IF ( surf_usm_h%end_index(j,i) >= & 1142 surf_usm_h%start_index(j,i) ) THEN 1143 m = surf_usm_h%start_index(j,i) 1144 sums_l(nzb,99,tn) = sums_l(nzb,99,tn) + & 1145 surf_usm_h%rad_net(m) * rmask(j,i,sr) 1146 sums_l(nzb,100,tn) = sums_l(nzb,100,tn) + & 1147 surf_usm_h%rad_lw_in(m) * rmask(j,i,sr) 1148 sums_l(nzb,101,tn) = sums_l(nzb,101,tn) + & 1149 surf_usm_h%rad_lw_out(m) * rmask(j,i,sr) 1150 sums_l(nzb,102,tn) = sums_l(nzb,102,tn) + & 1151 surf_usm_h%rad_sw_in(m) * rmask(j,i,sr) 1152 sums_l(nzb,103,tn) = sums_l(nzb,103,tn) + & 1153 surf_usm_h%rad_sw_out(m) * rmask(j,i,sr) 1154 ENDIF 1107 1155 1108 1156 #if defined ( __rrtmg ) 1109 1157 IF ( radiation_scheme == 'rrtmg' ) THEN 1110 sums_l(nzb,108,tn) = sums_l(nzb,108,tn) + rrtm_aldif(0,j,i) 1111 sums_l(nzb,109,tn) = sums_l(nzb,109,tn) + rrtm_aldir(0,j,i) 1112 sums_l(nzb,110,tn) = sums_l(nzb,110,tn) + rrtm_asdif(0,j,i) 1113 sums_l(nzb,111,tn) = sums_l(nzb,111,tn) + rrtm_asdir(0,j,i) 1158 1159 IF ( surf_def_h(0)%end_index(j,i) >= & 1160 surf_def_h(0)%start_index(j,i) ) THEN 1161 m = surf_def_h(0)%start_index(j,i) 1162 sums_l(nzb,108,tn) = sums_l(nzb,108,tn) + & 1163 surf_def_h(0)%rrtm_aldif(m) * rmask(j,i,sr) 1164 sums_l(nzb,109,tn) = sums_l(nzb,109,tn) + & 1165 surf_def_h(0)%rrtm_aldir(m) * rmask(j,i,sr) 1166 sums_l(nzb,110,tn) = sums_l(nzb,110,tn) + & 1167 surf_def_h(0)%rrtm_asdif(m) * rmask(j,i,sr) 1168 sums_l(nzb,111,tn) = sums_l(nzb,111,tn) + & 1169 surf_def_h(0)%rrtm_asdir(m) * rmask(j,i,sr) 1170 ENDIF 1171 IF ( surf_lsm_h%end_index(j,i) >= & 1172 surf_lsm_h%start_index(j,i) ) THEN 1173 m = surf_lsm_h%start_index(j,i) 1174 sums_l(nzb,108,tn) = sums_l(nzb,108,tn) + & 1175 surf_lsm_h%rrtm_aldif(m) * rmask(j,i,sr) 1176 sums_l(nzb,109,tn) = sums_l(nzb,109,tn) + & 1177 surf_lsm_h%rrtm_aldir(m) * rmask(j,i,sr) 1178 sums_l(nzb,110,tn) = sums_l(nzb,110,tn) + & 1179 surf_lsm_h%rrtm_asdif(m) * rmask(j,i,sr) 1180 sums_l(nzb,111,tn) = sums_l(nzb,111,tn) + & 1181 surf_lsm_h%rrtm_asdir(m) * rmask(j,i,sr) 1182 ENDIF 1183 IF ( surf_usm_h%end_index(j,i) >= & 1184 surf_usm_h%start_index(j,i) ) THEN 1185 m = surf_usm_h%start_index(j,i) 1186 sums_l(nzb,108,tn) = sums_l(nzb,108,tn) + & 1187 surf_usm_h%rrtm_aldif(m) * rmask(j,i,sr) 1188 sums_l(nzb,109,tn) = sums_l(nzb,109,tn) + & 1189 surf_usm_h%rrtm_aldir(m) * rmask(j,i,sr) 1190 sums_l(nzb,110,tn) = sums_l(nzb,110,tn) + & 1191 surf_usm_h%rrtm_asdif(m) * rmask(j,i,sr) 1192 sums_l(nzb,111,tn) = sums_l(nzb,111,tn) + & 1193 surf_usm_h%rrtm_asdir(m) * rmask(j,i,sr) 1194 ENDIF 1195 1114 1196 ENDIF 1115 1197 #endif
Note: See TracChangeset
for help on using the changeset viewer.