import vcs, MV2, cdms2, cdutil # Open sample file f = cdms2.open('clt.nc') d = f('clt',time=slice(0,1)) # Get anomaly field to have negative values d_anom = MV2.subtract(d, cdutil.averager(d,axis='xy')) d_anom.setAxis(0,d.getAxis(0)) d_anom.setAxis(1,d.getAxis(1)) d_anom.setAxis(2,d.getAxis(2)) # Plot x = vcs.init() iso = vcs.createisofill() #iso.levels = [-40, -30, -20, -10, 0, 10, 20, 30, 40] iso.levels = [-40, -30, -20, -10, 10, 20, 30, 40] #### This does not work iso.levels.insert(0,-1.e20) iso.levels.append(1.e20) iso.colormap = 'bl_to_darkred' colors = vcs.getcolors(iso.levels,colors=range(16,240)) #colors = vcs.getcolors(iso.levels,colors=range(16,240),split=0) iso.fillareacolors = colors x.plot(d_anom, iso) x.png('test.png')