Changeset 2659 in lmdz_wrf for trunk


Ignore:
Timestamp:
Jul 3, 2019, 5:01:12 AM (5 years ago)
Author:
lfita
Message:

Adding: arc' and side' into 'join_circ_sec'

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tools/geometry_tools.py

    r2658 r2659  
    403403    return reflex
    404404
    405 def join_circ_sec(points, radfrac=3., N=200):
     405def join_circ_sec(points, radfrac=3., arc='short', side='left', N=200):
    406406    """ Function to join aa series of points by circular segments
    407407      points: main points of the island (clockwise ordered, to be joined by circular
     
    410410      radfrac: multiplicative factor of the distance between consecutive points to
    411411        draw the circular segment (3., default)
     412      arc: type of arc ('short', default)
     413      pos: position of arc ('left', default)
    412414      N: number of points (200, default)
    413415    """
     
    424426        p2 = lpoints[ip+1]
    425427        dps = dist_points(p1, p2)
    426         jcirc_sec[Np*ip:Np*(ip+1),:] = circ_sec(p1, p2, dps*radfrac, 'short', Np)
     428        jcirc_sec[Np*ip:Np*(ip+1),:] = circ_sec(p1,p2,dps*radfrac, arc, side, Np)
    427429
    428430    Np2 = N - (Npts-1)*Np
     
    430432    p2 = lpoints[0]
    431433    dps = dist_points(p1, p2)
    432     jcirc_sec[(Npts-1)*Np:N,:] = circ_sec(p1, p2, dps*3., 'short', Np2)
     434    jcirc_sec[(Npts-1)*Np:N,:] = circ_sec(p1, p2, dps*3., arc, side, Np2)
    433435
    434436    return jcirc_sec
Note: See TracChangeset for help on using the changeset viewer.