Changeset 827 in lmdz_wrf


Ignore:
Timestamp:
Jun 16, 2016, 12:10:20 AM (9 years ago)
Author:
lfita
Message:

Working version of `draw_subbasin'

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tools/drawing_tools.py

    r826 r827  
    69796979    ddx = np.abs(lons[dy/2+1,dx/2] - lons[dy/2,dx/2])
    69806980    ddy = np.abs(lats[dy/2,dx/2+1] - lats[dy/2,dx/2])
    6981     fontcharac = {'family': 'serif', 'weight': 'normal', 'size': 3}
    6982 
    6983     print '  ' + fname + ' Lluis; rsf:', rsf, type(rsf)
     6981    fontcharac = {'family': 'serif', 'weight': 'normal', 'size': 10}
     6982
    69846983    subhr = gen.chainSnumHierarchy(rsf)
    69856984
     
    70037002            collev[gen.num_chainSnum(isub+1)] = rcolors[isub]
    70047003
    7005     print ' Lluis collev:', collev
    7006 
    70077004# All the colors should finish white...
    70087005    endcol = [1., 1., 1.]
     
    70187015        levs = gen.num_split(isub)
    70197016        Nlevs = len(levs)
    7020         begcol = collev[levs[0]]
     7017        if Nlevs == 1:
     7018            begcol = [0., 0., 0.]
     7019        else:
     7020            begcol = collev[levs[1]]
    70217021        for ilev in range(2,Nlevs):
    70227022# We do not want a last white value...
     
    70287028            begcol = colors[1:4,gen.chainSnum_num(levs[ilev])-1]
    70297029
    7030 #        colorsub[isub] = gen.coldec_hex(begcolors)
    70317030        colorsub[isub] = tuple(begcol)
    70327031        Llfs = rLlf[isub]
    70337032        outfs = rof[isub]
    7034         print '  Lluis; ' + fname + ': isub:', isub,' outfs:', outfs
    70357033        for igrid in range(len(outfs)):
    70367034            Llf = Llfs[igrid]
     
    70637061    plt.rc('text', usetex=True)
    70647062
    7065     latlonss = rLlf.values()
    7066     nlon = np.min(latlonss[1])
    7067     xlon = np.max(latlonss[1])
    7068     nlat = np.min(latlonss[0])
    7069     xlat = np.max(latlonss[0])
     7063    nlon = np.min(xlabpos)
     7064    xlon = np.max(xlabpos)
     7065    nlat = np.min(ylabpos)
     7066    xlat = np.max(ylabpos)
    70707067
    70717068    dlon = xlon - nlon
     
    70737070
    70747071# Making bigger the area to map
    7075     nlon = nlon-dlon*0.1
    7076     xlon = xlon+dlon*0.1
    7077     nlat = nlat-dlat*0.1
    7078     xlat = xlat+dlat*0.1
     7072    nlon = nlon-dlon-lengthtrac2
     7073    xlon = xlon+dlon+lengthtrac2
     7074    nlat = nlat-dlat-lengthtrac2
     7075    xlat = xlat+dlat+lengthtrac2
    70797076
    70807077    plt.xlim(nlon,xlon)
     
    71187115
    71197116    j = 0
    7120     for i in range(len(rsf)):
     7117    for i in range(len(xtrack)/3):
    71217118        plt.plot(xtrack[j:j+2], ytrack[j:j+2], color=colortrack[i])
    71227119        j = j + 3
    7123 
    7124     print 'Lluis : xtrack shape', len(xtrack)/3, 'xlabpos:', len(xlabpos)
    71257120
    71267121# Sea-flow
Note: See TracChangeset for help on using the changeset viewer.