Changeset 2485 in lmdz_wrf for trunk/tools/geometry_tools.py


Ignore:
Timestamp:
Apr 30, 2019, 1:55:28 AM (6 years ago)
Author:
lfita
Message:

Working sails in `zsailboat'

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tools/geometry_tools.py

    r2456 r2485  
    712712    # head sails
    713713    lsail = lheads*length
    714     sailsa = np.pi/2. + sd*(1.+0.05)*180./np.pi
     714    sailsa = np.pi/2. - np.pi*5./180. - np.pi*sd/180.
    715715    endsail = np.array([lsail*np.sin(sailsa), lsail*np.cos(sailsa)])
    716716    endsail[0] = length - endsail[0]
    717     hsail = circ_sec(bow, endsail, lsail*1.15)
     717    hsail = circ_sec(endsail, bow, lsail*2.15)
     718
    718719    # main sails
    719720    lsail = lmains*length
    720721    endsail = np.array([lsail*np.sin(sailsa), lsail*np.cos(sailsa)])
    721722    endsail[0] = length*lmast - endsail[0]
    722     msail = circ_sec(np.array([length*lmast,0.]), endsail, lsail*1.15)
    723 
    724     sailingboat = np.zeros((dpts*8+3,2), dtype=np.float)
     723    msail = circ_sec(endsail, np.array([length*lmast, 0.]), lsail*2.15)
     724
     725    sailingboat = np.zeros((dpts*8+4,2), dtype=np.float)
    725726
    726727    sailingboat[0:dpts,:] = fportsaid
     
    734735    sailingboat[6*dpts+2:7*dpts+2,:] = hsail
    735736    sailingboat[7*dpts+2,:] = [gen.fillValueF, gen.fillValueF]
    736     sailingboat[7*dpts+2:8*dpts+2,:] = msail
     737    sailingboat[7*dpts+3:8*dpts+3,:] = msail
     738    sailingboat[8*dpts+3,:] = [gen.fillValueF, gen.fillValueF]
    737739
    738740    sailingboat = ma.masked_equal(sailingboat, gen.fillValueF)
Note: See TracChangeset for help on using the changeset viewer.