Changeset 2278 in lmdz_wrf for trunk/tools
- Timestamp:
- Dec 28, 2018, 5:41:36 PM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tools/module_ForDiagnostics.f90
r2277 r2278 1176 1176 INTEGER :: ix,ex,iy,ey 1177 1177 CHARACTER(len=2), DIMENSION(4) :: Svertex 1178 INTEGER, DIMENSION(4,2,2,2) :: indices 1179 REAL(r_k), DIMENSION(2) :: ptintsct 1180 REAL(r_k), DIMENSION(2,2) :: merid, paral 1181 LOGICAL :: intsct 1178 INTEGER, DIMENSION(4,2,2) :: indices 1182 1179 1183 1180 !!!!!!! Variables … … 1192 1189 1193 1190 ! SW 1194 indices(1,1,1,1) = 0 1195 indices(1,1,1,2) = 0 1196 indices(1,1,2,1) = -1 1197 indices(1,1,2,2) = 0 1198 indices(1,2,1,1) = -1 1199 indices(1,2,1,2) = 0 1200 indices(1,2,2,1) = -1 1201 indices(1,2,2,2) = -1 1191 indices(1,1,1) = -1 1192 indices(1,1,2) = 0 1193 indices(1,2,1) = -1 1194 indices(1,2,2) = 0 1202 1195 ! NW 1203 indices(2,1,1,1) = 0 1204 indices(2,1,1,2) = 0 1205 indices(2,1,2,1) = 0 1206 indices(2,1,2,2) = 1 1207 indices(2,2,1,1) = -1 1208 indices(2,2,1,2) = 0 1209 indices(2,2,2,1) = 1 1210 indices(2,2,2,2) = 1 1196 indices(2,1,1) = -1 1197 indices(2,1,2) = 0 1198 indices(2,2,1) = 0 1199 indices(2,2,2) = 1 1211 1200 ! NE 1212 indices(3,1,1,1) = 1 1213 indices(3,1,1,2) = 1 1214 indices(3,1,2,1) = 0 1215 indices(3,1,2,2) = 1 1216 indices(3,2,1,1) = 0 1217 indices(3,2,1,2) = 1 1218 indices(3,2,2,1) = 1 1219 indices(3,2,2,2) = 1 1201 indices(3,1,1) = 0 1202 indices(3,1,2) = 1 1203 indices(3,2,1) = 0 1204 indices(3,2,2) = 1 1220 1205 ! SE 1221 indices(4,1,1,1) = 1 1222 indices(4,1,1,2) = 1 1223 indices(4,1,2,1) = -1 1224 indices(4,1,2,2) = 0 1225 indices(4,2,1,1) = 0 1226 indices(4,2,1,2) = 1 1227 indices(4,2,2,1) = -1 1228 indices(4,2,2,2) = -1 1206 indices(4,1,1) = 0 1207 indices(4,1,2) = 1 1208 indices(4,2,1) = -1 1209 indices(4,2,2) = 0 1229 1210 1230 1211 DO i=1,dx … … 1232 1213 DO iv=1,4 1233 1214 1234 ix = MAX(i+indices(iv,1,1,1),1) 1235 !ex = MIN(i+indices(iv,1,1,2),dx) 1236 ex = i+indices(iv,1,1,2) 1237 iy = MAX(j+indices(iv,1,2,1),1) 1238 ey = MIN(j+indices(iv,1,2,2),dy) 1239 1240 merid(1,1) = lon(ix,iy) 1241 merid(1,2) = lat(ix,iy) 1242 merid(2,1) = lon(ex,ey) 1243 merid(2,2) = lat(ex,ey) 1244 1245 ix = MAX(i+indices(iv,2,1,1),1) 1246 ex = MIN(i+indices(iv,2,1,2),dx) 1247 iy = MAX(j+indices(iv,2,2,1),1) 1248 !ey = MIN(i+indices(iv,2,2,2),dy) 1249 ey = j+indices(iv,2,2,2) 1250 paral(1,1) = lon(ix,iy) 1251 paral(1,2) = lat(ix,iy) 1252 paral(2,1) = lon(ex,ey) 1253 paral(2,2) = lat(ex,ey) 1254 1255 CALL intersection_2Dlines(merid, paral, intsct, ptintsct) 1256 IF (.NOT.intsct) THEN 1257 msg = 'not interection found for ' // Svertex(iv) // ' vertex' 1258 CALL ErrMsg(msg, fname, -1) 1259 END IF 1260 xbnds(i,j,iv) = ptintsct(1) 1261 ybnds(i,j,iv) = ptintsct(2) 1215 ix = MAX(i+indices(iv,1,1),1) 1216 ix = MIN(ix,dx) 1217 ex = MAX(i+indices(iv,1,2),1) 1218 ex = MIN(ex,dx) 1219 iy = MAX(j+indices(iv,2,1),1) 1220 iy = MIN(iy,dy) 1221 ey = MAX(j+indices(iv,2,2),1) 1222 ey = MIN(ey,dy) 1223 1224 xbnds(i,j,iv) = 0.5*(lon(ix,iy) + lon(ex,ey)) 1225 ybnds(i,j,iv) = 0.5*(lat(ix,iy) + lat(ex,ey)) 1226 1262 1227 END DO 1263 1228 END DO
Note: See TracChangeset
for help on using the changeset viewer.