Changeset 1578 in lmdz_wrf for trunk


Ignore:
Timestamp:
May 18, 2017, 7:55:20 PM (8 years ago)
Author:
lfita
Message:

Adding error when no 1D slice in `draw_cycle'

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tools/drawing.py

    r1576 r1578  
    82828282        oyvar = onc.variables[yvarn]
    82838283        yvs, ydims = ncvar.slice_variable(oyvar, dimrange.replace(',',':'))
     8284        if len(yvs.shape) != 1:
     8285            print errormsg
     8286            print '  ' + fname + ': Wrong slice. There must be a 1D variable!!'
     8287            print '    current shape:', yvs.shape
     8288            quit(-1)
    82848289
    82858290        # Referring all times to the same reference time!
Note: See TracChangeset for help on using the changeset viewer.