name=options.name, cfgfile=options.cfgfile, varname=options.varname, lonname=options.lonname, latname=options.latname, reverse=options.reverse, **kw) kw = {} if options.land: kw['fillcontinents'] = False kw['drawcoastlines_color'] = 'r' kw['drawcoastlines_linewidth'] = 1 if options.figsize is not None: options.figsize = eval(options.figsize) if options.clsize is not None: if options.clsize: kw['clabel_size'] = options.clsize else: kw['clabel'] = options.clsize b.plot(proj=options.proj, title=options.title, figsize=options.figsize, shadow=not options.noshadow, zmin=options.zmin, zmax=options.zmax, clabel_glow=options.clglow, savefig=options.figname, show=options.figname is None, res=options.res, **kw)
options.cfgfile = None options.name = ncfile # Import try: from vacumm.bathy.bathy import NcGriddedBathy except: sys.exit("Can't import vacumm bathymetry module") # Get and plot bathy kw = {'maxvalue':None} if options.land else {} b = NcGriddedBathy(lon=lon, lat=lat, name=options.name, cfgfile=options.cfgfile, varname=options.varname, lonname=options.lonname, latname=options.latname, reverse=options.reverse, **kw) kw = {} if options.land: kw['fillcontinents'] = False kw['drawcoastlines_color'] = 'r' kw['drawcoastlines_linewidth'] = 1 if options.figsize is not None: options.figsize = eval(options.figsize) if options.clsize is not None: if options.clsize: kw['clabel_size'] = options.clsize else: kw['clabel'] = options.clsize b.plot(proj=options.proj, title=options.title, figsize=options.figsize, shadow=not options.noshadow, zmin=options.zmin, zmax=options.zmax, clabel_glow=options.clglow, savefig=options.figname, show=options.figname is None, res=options.res, **kw)
bathy = GriddedBathy(var) # Versions masquees bathy_masked1 = bathy.masked_bathy() # -> nb de points masques ? bathy.set_shoreline('f') # -> essayer 'i' bathy_masked2 = bathy.masked_bathy() # -> nb de points masques ? # Plot bathy.plot(title='Direct') # Bathy standard from vacumm.bathy.bathy import NcGriddedBathy, bathy_list print bathy_list().keys() sbathy = NcGriddedBathy(lon=(-5.2, -3), lat=(48., 48.9), name='etopo2') sbathy.plot(title='Bathy par defaut') # Fusion de bathy mgrid = create_grid((-6.1, -3, 0.01), (47.8, 48.9, .006)) # -> changer la grille from vacumm.bathy.bathy import GriddedBathyMerger merger = GriddedBathyMerger(mgrid) merger += sbathy merger += bathy merger.plot(title='Fusion / plot direct') # Plot via plot_bathy mbathy = merger.merge() plot_bathy(mbathy, title='Fusion / plot via plot_bathy')