Changeset 2530 in lmdz_wrf


Ignore:
Timestamp:
May 12, 2019, 12:01:05 AM (6 years ago)
Author:
lfita
Message:

Improving lighthouse

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tools/geometry_tools.py

    r2527 r2530  
    12451245
    12461246    Ntower = iip-1
    1247     lighthousesecs = ['tower']
     1247    lighthousesecs.append('tower')
    12481248    lighthousedic['tower'] = [lighthouse[0:iip-1], '-', 'k', 1.5]
    12491249
    12501250    # Left light
    1251     p1 = np.array([height, -width/2.])
    1252     p2 = np.array([height+hlight, 0.])
     1251    p1 = np.array([height, -width*0.8/2.])
     1252    p2 = np.array([height+hlight, -width*0.8/2.])
    12531253    lighthouse[iip:iip+Nsec,:] = circ_sec(p1, p2, 3*hlight, Nang=Nsec)
    12541254    iip = iip + Nsec
    12551255   
     1256    # Top Light
     1257    p1=np.array([height+hlight, width*0.8/2.])
     1258    p2=np.array([height+hlight, -width*0.8/2.])
     1259    lighthouse[iip:iip+Nsec,:] = circ_sec(p1, p2, 3*width, pos='left', Nang=Nsec)
     1260    iip = iip + Nsec + 1
     1261
    12561262    # Right light
    1257     p1 = np.array([height+hlight, 0.])
    1258     p2 = np.array([height, width/2.])
     1263    p1 = np.array([height+hlight, width*0.8/2.])
     1264    p2 = np.array([height, width*0.8/2.])
    12591265    lighthouse[iip:iip+Nsec,:] = circ_sec(p1, p2, 3*hlight, Nang=Nsec)
    12601266    iip = iip + Nsec
    12611267
    12621268    # Base Light
    1263     p1=np.array([height, width/2.])
    1264     p2=np.array([height, -width/2.])
     1269    p1=np.array([height, width*0.8/2.])
     1270    p2=np.array([height, -width*0.8/2.])
    12651271    lighthouse[iip:iip+Nsec,:] = circ_sec(p1, p2, 3*width, pos='left', Nang=Nsec)
    12661272    iip = iip + Nsec + 1
    1267     lighthousesecs = ['light']
    1268     lighthousedic['light'] = [lighthouse[Ntower+1:iip-1], '-', '#AAAA00', 1.5]
     1273    lighthousesecs.append('light')
     1274    lighthousedic['light'] = [lighthouse[Ntower+1:iip-1], '-', '#EEEE00', 1.5]
    12691275
    12701276    # Spiral bands
    12711277    hb = height/(2.*bands)
    1272     Nsec2 = (N - Nsec*7 - 3)/bands
     1278    Nsec2 = (N - Nsec*8 - 3)/bands
    12731279    for ib in range(bands-1):
    12741280        iband = iip
     
    13011307        lighthouse[iip:iip+Nsec,:] = circ_sec(p1, p2, 3*width, pos='left', Nang=Nsec)
    13021308        iip = iip + Nsec + 1
    1303         lighthousesecs = [bandS]
    1304         lighthousedic[bandS] = [lighthouse[iband:iip-1], '-', '#160016', 2.]
     1309        lighthousesecs.append(bandS)
     1310        lighthousedic[bandS] = [lighthouse[iband:iip-1], '-', '#6408AA', 2.]
    13051311
    13061312    ib = bands-1
     
    13351341    p2 = np.array([hb*ib*2, -width/2.])
    13361342    lighthouse[iip:iip+Nsec,:] = circ_sec(p1, p2, 3*width, pos='left', Nang=Nsec)       
    1337     lighthousesecs = [bandS]
    1338     lighthousedic[bandS] = [lighthouse[iband:iip-1], '-', '#160016', 2.]
     1343    lighthousesecs.append(bandS)
     1344    lighthousedic[bandS] = [lighthouse[iband:iip-1], '-', '#6408AA', 2.]
    13391345
    13401346    lighthouse = ma.masked_equal(lighthouse, gen.fillValueF)
Note: See TracChangeset for help on using the changeset viewer.