Changeset 978 for palm/trunk/SOURCE/init_grid.f90
 Timestamp:
 Aug 9, 2012 8:28:32 AM (9 years ago)
 Location:
 palm/trunk
 Files:

 3 edited
Legend:
 Unmodified
 Added
 Removed

palm/trunk
 Property svn:mergeinfo changed
/palm/branches/fricke (added) merged: 942944,967968,971972,977
 Property svn:mergeinfo changed

palm/trunk/SOURCE
 Property svn:mergeinfo changed
/palm/branches/fricke/SOURCE (added) merged: 967968,971972,977
 Property svn:mergeinfo changed

palm/trunk/SOURCE/init_grid.f90
r928 r978 4 4 ! Current revisions: 5 5 !  6 ! 6 ! Bugfix: nzb_max is set to nzt at noncyclic lateral boundaries 7 ! Bugfix: Set wall_flags_0 for inflow boundary 7 8 ! 8 9 ! Former revisions: … … 608 609 ! Determine the maximum level of topography. Furthermore it is used for 609 610 ! steering the degradation of order of the applied advection scheme. 611 ! In case of noncyclic lateral boundaries, the order of the advection 612 ! scheme is reduced at the lateral boundaries up to nzt. 610 613 nzb_max = MAXVAL( nzb_local ) 614 IF ( inflow_l .OR. outflow_l .OR. inflow_r .OR. outflow_r .OR. & 615 inflow_n .OR. outflow_n .OR. inflow_s .OR. outflow_s ) THEN 616 nzb_max = nzt 617 ENDIF 618 611 619 ! 612 620 ! Consistency checks and index array initialization are only required for … … 1079 1087 ! scalar  xdirection 1080 1088 ! WS1 (0), WS3 (1), WS5 (2) 1081 IF ( k <= nzb_s_inner(j,i+1) .OR. ( outflow_l .AND. i == nxl ) & 1082 .OR. ( outflow_r .AND. i == nxr ) ) THEN 1089 IF ( k <= nzb_s_inner(j,i+1) .OR. ( ( inflow_l .OR. outflow_l )& 1090 .AND. i == nxl ) .OR. ( ( inflow_r .OR. outflow_r ) & 1091 .AND. i == nxr ) ) THEN 1083 1092 wall_flags_0(k,j,i) = IBSET( wall_flags_0(k,j,i), 0 ) 1084 1093 ELSEIF ( k <= nzb_s_inner(j,i+2) .OR. k <= nzb_s_inner(j,i1) & 1085 .OR. ( outflow_r .AND. i == nxr1 ) & 1086 .OR. ( outflow_l .AND. i == nxlu ) ) THEN 1094 .OR. ( ( inflow_r .OR. outflow_r ) .AND. i == nxr1 ) & 1095 .OR. ( ( inflow_l .OR. outflow_l ) .AND. i == nxlu ) & 1096 ) THEN 1087 1097 wall_flags_0(k,j,i) = IBSET( wall_flags_0(k,j,i), 1 ) 1088 1098 ELSE … … 1092 1102 ! scalar  ydirection 1093 1103 ! WS1 (3), WS3 (4), WS5 (5) 1094 IF ( k <= nzb_s_inner(j+1,i) .OR. ( outflow_s .AND. j == nys ) & 1095 .OR. ( outflow_n .AND. j == nyn ) ) THEN 1104 IF ( k <= nzb_s_inner(j+1,i) .OR. ( ( inflow_s .OR. outflow_s )& 1105 .AND. j == nys ) .OR. ( ( inflow_n .OR. outflow_n ) & 1106 .AND. j == nyn ) ) THEN 1096 1107 wall_flags_0(k,j,i) = IBSET( wall_flags_0(k,j,i), 3 ) 1097 1108 ! WS3 1098 1109 ELSEIF ( k <= nzb_s_inner(j+2,i) .OR. k <= nzb_s_inner(j1,i) & 1099 .OR. ( outflow_s .AND. j == nysv ) & 1100 .OR. ( outflow_n .AND. j == nyn1 ) ) THEN 1110 .OR. ( ( inflow_s .OR. outflow_s ) .AND. j == nysv ) & 1111 .OR. ( ( inflow_n .OR. outflow_n ) .AND. j == nyn1 ) & 1112 ) THEN 1101 1113 wall_flags_0(k,j,i) = IBSET( wall_flags_0(k,j,i), 4 ) 1102 1114 ! WS5 … … 1135 1147 ! WS1 (9), WS3 (10), WS5 (11) 1136 1148 IF ( k <= nzb_u_inner(j,i+1) & 1137 .OR. ( outflow_r .AND. i == nxr ) ) THEN 1149 .OR. ( ( inflow_l .OR. outflow_l ) .AND. i == nxlu ) & 1150 .OR. ( ( inflow_r .OR. outflow_r ) .AND. i == nxr ) & 1151 ) THEN 1138 1152 wall_flags_0(k,j,i) = IBSET( wall_flags_0(k,j,i), 9 ) 1139 1153 ELSEIF ( k <= nzb_u_inner(j,i+2) .OR. k <= nzb_u_inner(j,i1) & 1140 .OR. ( outflow_r .AND. i == nxr1 ) & 1141 .OR. ( outflow_l .AND. i == nxlu ) ) THEN 1154 .OR. ( ( inflow_r .OR. outflow_r ) .AND. i == nxr1 )& 1155 .OR. ( ( inflow_l .OR. outflow_l ) .AND. i == nxlu+1)& 1156 ) THEN 1142 1157 wall_flags_0(k,j,i) = IBSET( wall_flags_0(k,j,i), 10 ) 1143 1158 ELSE 1144 1159 wall_flags_0(k,j,i) = IBSET( wall_flags_0(k,j,i), 11 ) 1145 1160 ENDIF 1161 1146 1162 ! 1147 1163 ! u component  ydirection 1148 1164 ! WS1 (12), WS3 (13), WS5 (14) 1149 IF ( k <= nzb_u_inner(j+1,i) .OR. ( outflow_s .AND. j == nys ) & 1150 .OR. ( outflow_n .AND. j == nyn ) ) THEN 1165 IF ( k <= nzb_u_inner(j+1,i) .OR. ( ( inflow_s .OR. outflow_s )& 1166 .AND. j == nys ) .OR. ( ( inflow_n .OR. outflow_n ) & 1167 .AND. j == nyn ) ) THEN 1151 1168 wall_flags_0(k,j,i) = IBSET( wall_flags_0(k,j,i), 12 ) 1152 1169 ELSEIF ( k <= nzb_u_inner(j+2,i) .OR. k <= nzb_u_inner(j1,i) & 1153 .OR. ( outflow_s .AND. j == nysv ) & 1154 .OR. ( outflow_n .AND. j == nyn1 ) ) THEN 1170 .OR. ( ( inflow_s .OR. outflow_s ) .AND. j == nysv ) & 1171 .OR. ( ( inflow_n .OR. outflow_n ) .AND. j == nyn1 ) & 1172 ) THEN 1155 1173 wall_flags_0(k,j,i) = IBSET( wall_flags_0(k,j,i), 13 ) 1156 1174 ELSE … … 1181 1199 ! v component  xdirection 1182 1200 ! WS1 (18), WS3 (19), WS5 (20) 1183 IF ( k <= nzb_v_inner(j,i+1) .OR. ( outflow_l .AND. i == nxl ) & 1184 .OR. ( outflow_r .AND. i == nxr ) ) THEN 1201 IF ( k <= nzb_v_inner(j,i+1) .OR. ( ( inflow_l .OR. outflow_l )& 1202 .AND. i == nxl ) .OR. (( inflow_r .OR. outflow_r ) & 1203 .AND. i == nxr ) ) THEN 1185 1204 wall_flags_0(k,j,i) = IBSET( wall_flags_0(k,j,i), 18 ) 1186 1205 ! WS3 1187 1206 ELSEIF ( k <= nzb_v_inner(j,i+2) .OR. k <= nzb_v_inner(j,i1) & 1188 .OR. ( outflow_r .AND. i == nxr1 ) & 1189 .OR. ( outflow_l .AND. i == nxlu ) ) THEN 1207 .OR. ( ( inflow_r .OR. outflow_r ) .AND. i == nxr1 ) & 1208 .OR. ( ( inflow_l .OR. outflow_l ) .AND. i == nxlu ) & 1209 ) THEN 1190 1210 wall_flags_0(k,j,i) = IBSET( wall_flags_0(k,j,i), 19 ) 1191 1211 ELSE … … 1196 1216 ! WS1 (21), WS3 (22), WS5 (23) 1197 1217 IF ( k <= nzb_v_inner(j+1,i) & 1198 .OR. ( outflow_n .AND. j == nyn ) ) THEN 1218 .OR. ( ( inflow_s .OR. outflow_s ) .AND. i == nysv ) & 1219 .OR. ( ( inflow_n .OR. outflow_n ) .AND. j == nyn ) & 1220 ) THEN 1199 1221 wall_flags_0(k,j,i) = IBSET( wall_flags_0(k,j,i), 21 ) 1200 1222 ELSEIF ( k <= nzb_v_inner(j+2,i) .OR. k <= nzb_v_inner(j1,i) & 1201 .OR. ( outflow_s .AND. j == nysv ) & 1202 .OR. ( outflow_n .AND. j == nyn1 ) ) THEN 1223 .OR. ( ( inflow_s .OR. outflow_s ) .AND. j == nysv+1 )& 1224 .OR. ( ( inflow_n .OR. outflow_n ) .AND. j == nyn1 )& 1225 ) THEN 1203 1226 wall_flags_0(k,j,i) = IBSET( wall_flags_0(k,j,i), 22 ) 1204 1227 ELSE … … 1228 1251 ! w component  xdirection 1229 1252 ! WS1 (27), WS3 (28), WS5 (29) 1230 IF ( k <= nzb_w_inner(j,i+1) .OR. ( outflow_l .AND. i == nxl ) & 1231 .OR. ( outflow_r .AND. i == nxr ) ) THEN 1253 IF ( k <= nzb_w_inner(j,i+1) .OR. ( ( inflow_l .OR. outflow_l )& 1254 .AND. i == nxl ) .OR. ( ( inflow_r .OR. outflow_r ) & 1255 .AND. i == nxr ) ) THEN 1232 1256 wall_flags_0(k,j,i) = IBSET( wall_flags_0(k,j,i), 27 ) 1233 1257 ELSEIF ( k <= nzb_w_inner(j,i+2) .OR. k <= nzb_w_inner(j,i1) & 1234 .OR. ( outflow_r .AND. i == nxr1 ) & 1235 .OR. ( outflow_l .AND. i == nxlu ) ) THEN 1258 .OR. ( ( inflow_r .OR. outflow_r ) .AND. i == nxr1 ) & 1259 .OR. ( ( inflow_l .OR. outflow_l ) .AND. i == nxlu ) & 1260 ) THEN 1236 1261 wall_flags_0(k,j,i) = IBSET( wall_flags_0(k,j,i), 28 ) 1237 1262 ELSE … … 1241 1266 ! w component  ydirection 1242 1267 ! WS1 (30), WS3 (31), WS5 (32) 1243 IF ( k <= nzb_w_inner(j+1,i) .OR. ( outflow_s .AND. j == nys ) & 1244 .OR. ( outflow_n .AND. j == nyn ) ) THEN 1268 IF ( k <= nzb_w_inner(j+1,i) .OR. ( ( inflow_s .OR. outflow_s )& 1269 .AND. j == nys ) .OR. ( ( inflow_n .OR. outflow_n ) & 1270 .AND. j == nyn ) ) THEN 1245 1271 wall_flags_0(k,j,i) = IBSET( wall_flags_0(k,j,i), 30 ) 1246 1272 ELSEIF ( k <= nzb_w_inner(j+2,i) .OR. k <= nzb_w_inner(j1,i) & 1247 .OR. ( outflow_s .AND. j == nysv ) & 1248 .OR. ( outflow_n .AND. j == nyn1 ) ) THEN 1273 .OR. ( ( inflow_s .OR. outflow_s ) .AND. j == nysv ) & 1274 .OR. ( ( inflow_n .OR. outflow_n ) .AND. j == nyn1 ) & 1275 ) THEN 1249 1276 wall_flags_0(k,j,i) = IBSET( wall_flags_0(k,j,i), 31 ) 1250 1277 ELSE
Note: See TracChangeset
for help on using the changeset viewer.