def surface_map(file,img_file=None,varname='salt',clim=None):
	(data, coords) = rompy.extract(file,varname=varname,extraction_type='surface')
#	plot_utils.plot_surface(coords['xm'],coords['ym'],data)
	
	
	title = '%s %s %s %s' % ( extract_utils.run_title(file), os.path.basename(file), var_title_map[var], extract_utils.file_time(file).strftime(title_time_fmt) )
	plot_utils.plot_map(coords['xm'],coords['ym'],data,filename=img_file, clim=clim, title=title, resolution=whole_domain_coastline_res, caxis_label=clabel_map[varname])
Exemple #2
0
def surface_map(file, img_file=None, varname='salt', clim=None):
    (data, coords) = rompy.extract(file,
                                   varname=varname,
                                   extraction_type='surface')
    #	plot_utils.plot_surface(coords['xm'],coords['ym'],data)

    title = '%s %s %s %s' % (
        extract_utils.run_title(file),
        os.path.basename(file), var_title_map[var],
        extract_utils.file_time(file).strftime(title_time_fmt))
    plot_utils.plot_map(coords['xm'],
                        coords['ym'],
                        data,
                        filename=img_file,
                        clim=clim,
                        title=title,
                        caxis_label=clabel_map[varname])
Exemple #3
0
# map3 = True
# map4 = True
# map5 = True
# map6 = True
# map7 = True
# map8 = True
# map9 = True
# map10 = True
# map11 = True

if map1:
    print('map1')
    (data, coords) = rompy.extract('ocean_his_0001.nc', varname='h')
    plot_utils.plot_surface(coords['xm'], coords['ym'], data)
    plot_utils.plot_map(coords['xm'],
                        coords['ym'],
                        data,
                        filename='/Users/lederer/tmp/rompy.map.png')

    del (data)
    del (coords)

if map2:
    print('map2')
    # full domain
    #x = np.linspace(-127.,-122.,100)
    #y = np.linspace(44.,50.,100)

    #puget sound area
    #x = np.linspace(-123.,-122.,500)
    #y = np.linspace(47.,48.,500)
Exemple #4
0
# map2 = True
# map3 = True
# map4 = True
# map5 = True
# map6 = True
# map7 = True
# map8 = True
# map9 = True
# map10 = True
# map11 = True

if map1:
	print('map1')
	(data, coords) = rompy.extract('ocean_his_0001.nc',varname='h')
	plot_utils.plot_surface(coords['xm'],coords['ym'],data)
	plot_utils.plot_map(coords['xm'],coords['ym'],data,filename='/Users/lederer/tmp/rompy.map.png')
	
	del(data)
	del(coords)

if map2:
	print('map2')
	# full domain
	#x = np.linspace(-127.,-122.,100)
	#y = np.linspace(44.,50.,100)
	
	#puget sound area
	#x = np.linspace(-123.,-122.,500)
	#y = np.linspace(47.,48.,500)
	
	# hood canal