Changeset 2115 in lmdz_wrf


Ignore:
Timestamp:
Aug 30, 2018, 3:45:44 PM (6 years ago)
Author:
lfita
Message:

Adding into 'draw_2D_shad_contdisc':

  • 'lonlatbox'
  • error messages
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tools/drawing.py

    r2111 r2115  
    92299229            minimum and maximum lon,lats from the locations of the discrtete points
    92309230          'fullcontinuous': map covers all the shadding area
     9231          'lonlatbox,[lonSW],[latSW],[lonNE],[latNE]': plotted map only covers a lon,lat box
    92319232        [close]: Whether figure should be finished or not
    92329233    """
     
    93639364        print '    dimx min:', dxn, 'max:', dxx
    93649365        print '    dimy min:', dyn, 'max:', dyx
     9366        if dxn == 0. and dxx == 0. and dyn == 0. and dyx == 0.:
     9367            print errormsg
     9368            print '  ' + fname + ': wrong boundaries from continuos field !!'
     9369            print '    all are zero !!'
     9370            quit(-1)
    93659371
    93669372        if hfn == 'cont':
     
    94819487        onc.close()
    94829488
     9489    availplotrng = ['strict', 'sponge', 'fullcontinuous']
    94839490    if plotrange[0:6] == 'strict':
    94849491        graphnx = [absxn, absxx, absyn, absyx]
     
    94889495        graphnx = [absxn-dlon, absxx+dlon, absyn-dlat, absyx+dlat]
    94899496    elif plotrange[0:14] == 'fullcontinuous':
    9490         graphnx = contxynx
     9497        graphnx = contxynx
     9498    elif plotrange[0:9] == 'lonlatbox':
     9499        lonSW = np.float(plotrange.split(',')[1])
     9500        latSW = np.float(plotrange.split(',')[2])
     9501        lonNE = np.float(plotrange.split(',')[3])
     9502        latNE = np.float(plotrange.split(',')[4])
     9503        graphnx = [lonSW, lonNE, latSW, latNE]
     9504    else:
     9505        print errormsg
     9506        print '  ' + fname + ": plot range '" + plotrange + "' not ready !!"
     9507        print '    available ones:', availplotrng
     9508        quit(-1)
    94919509
    94929510    print "  '" + plotrange + "' limits of the graphic:", graphnx
Note: See TracChangeset for help on using the changeset viewer.