Changeset 2558 in lmdz_wrf


Ignore:
Timestamp:
May 25, 2019, 7:20:05 PM (6 years ago)
Author:
lfita
Message:

Filling up all the cardinal buoys

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tools/geometry_tools.py

    r2557 r2558  
    16771677    buoydic = {'buoy': [buoy[0:N2,:],'-','k',1.5],                                   \
    16781678      'sign1': [buoy[N2+1:N2+N32+1,:],'-','k',1.5],                                  \
    1679       'sign2': [buoy[N2+N32+2:N,:],'-','k',1.5], 'halfk': [halfup, '-', 'k', 1.],    \
    1680       'halfy': [halfdown, '-', '#FFFF00', 1.]}
     1679      'sign2': [buoy[N2+N32+2:N,:],'-','k',1.5], 'half1': [halfup, '-', 'k', 1.],    \
     1680      'half2': [halfdown, '-', '#FFFF00', 1.]}
    16811681
    16821682    return buoy, buoysecs, buoydic
     
    17301730    buoy = ma.masked_equal(buoy, gen.fillValueF)
    17311731
    1732     buoysecs = ['buoy', 'sign1', 'sign2']
     1732    buoysecs = ['buoy', 'sign1', 'sign2', 'third1', 'third2', 'third3']
    17331733    buoydic = {'buoy': [buoy[0:N2,:],'-','k',1.5],                                   \
    17341734      'sign1': [buoy[N2+1:N2+N32+1,:],'-','k',1.5],                                  \
    17351735      'sign2': [buoy[N2+N32+2:N,:],'-','k',1.5],                                     \
    1736       'third1y': [halfup, '-', '#FFFF00', 1.], 'thirdk': [halfbtw, '-', 'k', 1.],    \
    1737       'third2y': [halfdown, '-', '#FFFF00', 1.]}
     1736      'third1': [halfup, '-', 'k', 1.], 'third2': [halfbtw, '-', '#FFFF00', 1.],     \
     1737      'third3': [halfdown, '-', 'k', 1.]}
    17381738
    17391739    return buoy, buoysecs, buoydic
     
    17781778    buoy[N2+N32+2:N,:] = trib + [bottsigns+0.9*lsign,0.]
    17791779
     1780    # painting it
     1781    Height = np.max(buoy1v[:,0])
     1782
     1783    Ncut, halfdown = cut_ypolygon(buoy1v, yval=Height/2., keep='bottom')
     1784    Ncut, halfup = cut_ypolygon(buoy1v, yval=Height/2., keep='above')
     1785
    17801786    buoy = ma.masked_equal(buoy, gen.fillValueF)
    17811787
    1782     buoysecs = ['buoy', 'sign1', 'sign2']
     1788    buoysecs = ['buoy', 'sign1', 'sign2', 'half1', 'half2']
    17831789    buoydic = {'buoy': [buoy[0:N2,:],'-','k',1.5],                                   \
    17841790      'sign1': [buoy[N2+1:N2+N32+1,:],'-','k',1.5],                                  \
    1785       'sign2': [buoy[N2+N32+2:N,:],'-','k',1.5]}
     1791      'sign2': [buoy[N2+N32+2:N,:],'-','k',1.5], 'half1': [halfup, '-', '#FFFF00', 1.], \
     1792      'half2': [halfdown, '-', 'k', 1.]}
    17861793
    17871794    return buoy, buoysecs, buoydic
     
    18261833    buoy[N2+N323+2:N,:] = trib + [bottsigns+1.*lsign,0.]
    18271834
     1835    # painting it
     1836    Height = np.max(buoy1v[:,0])
     1837
     1838    Ncut, halfdown = cut_ypolygon(buoy1v, yval=Height/3., keep='bottom')
     1839    Ncut, halfbtw1 = cut_between_ypolygon(buoy1v, yval1=Height/3., yval2=Height*2./3.)
     1840    Ncut, halfup = cut_ypolygon(buoy1v, yval=Height*2./3., keep='above')
     1841    Ncut, halfbtw2 = cut_between_ypolygon(buoy1v, yval1=Height*2./3., yval2=Height)
     1842
    18281843    buoy = ma.masked_equal(buoy, gen.fillValueF)
    18291844
    1830     buoysecs = ['buoy', 'sign1', 'sign2']
     1845    buoysecs = ['buoy', 'sign1', 'sign2', 'third1', 'third2', 'third3']
    18311846    buoydic = {'buoy': [buoy[0:N2,:],'-','k',1.5],                                   \
     1847      'third1': [halfdown, '-', '#FFFF00', 1.], 'third2': [halfbtw1, '-', 'k', 1.],  \
     1848      'third3': [halfup, '-', '#FFFF00', 1.],                                        \
    18321849      'sign1': [buoy[N2+1:N2+N32+1,:],'-','k',1.5],                                  \
    1833       'sign2': [buoy[N2+N32+2:N,:],'-','k',1.5]}
     1850      'sign2': [buoy[N2+N32+2:N,:],'-','#FFFF00',1.5]}
    18341851
    18351852    return buoy, buoysecs, buoydic
Note: See TracChangeset for help on using the changeset viewer.