Changeset 2584 in lmdz_wrf


Ignore:
Timestamp:
Jun 2, 2019, 6:30:41 PM (6 years ago)
Author:
lfita
Message:

Adding negative sign values to `val_between'

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tools/geometry_tools.py

    r2583 r2584  
    452452    btw = False
    453453    if (valA <= val and valB > val) or (valA < val and valB >= val): btw =True
     454    if (valA >= val and valB < val) or (valA > val and valB <= val): btw =True
    454455
    455456    return btw
     
    655656            if eep == N: eep = 0
    656657     
     658            print ip, polygon[ip,1], polygon[eep,1], xval, ':', val_between(polygon[ip,1], polygon[eep,1], xval)
    657659            if val_between(polygon[ip,1], polygon[eep,1], xval):
    658660                icut.append(ip)
     
    743745
    744746    rmpolygon = []
     747    Npts = cutpolygon.shape[0]
    745748    if keep == 'left':
    746749        for ip in range(Npts):
Note: See TracChangeset for help on using the changeset viewer.