Changeset 2626 in lmdz_wrf
- Timestamp:
- Jun 23, 2019, 8:04:17 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tools/geometry_tools.py
r2625 r2626 279 279 280 280 v = np.array(vec, dtype=np.float) 281 mod = np.sqrt(v[0]*v[0] + v[1]*v[1]) 281 vv = v*v 282 mod = np.sqrt(np.sum(vv[:])) 282 283 283 284 return mod … … 1591 1592 intp = intp-1 1592 1593 1593 # There is a need to sort the cutting points from the perspective of the 1594 # below polygon 1594 # Re-constructing below polygon looking for respective crossings 1595 linti = list(inti) 1596 for ip in range(iNpts): 1597 Nc = linti.count(ip) 1598 dists = np.zeros((Nc), dtype=np.float) 1599 if Nc > 0: 1600 iic = gen.multi_index_vec(inti,ip) 1601 # Sortering from distance respect the vertex ip 1602 for ic in range(Nc): 1603 dists[ic] = dist_points(ipoly[ip,:], pts[inti[ic],:]) 1604 else: 1605 newipoly.append(ipoly[ip,:]) 1606 1607 1595 1608 1596 1609 Npi=0
Note: See TracChangeset
for help on using the changeset viewer.