Пример #1
0
def test_cappi():
	scanme=read_rays.construct_lassen_scan(path='/bm/gdata/scollis/gunn_pt/20060122_0357/')
	read_rays.plot_ppi(scanme[5])
	xar=linspace(-150.,150., 200)*1000.0
	yar=linspace(-150.,150., 200)*1000.0
	mycap=radar_to_cart.make_cappi(scanme, xar, yar, 2500.0, 'CZ')
	read_rays.plot_cappi(xar, yar, mycap)
Пример #2
0
def save_cube_test(date,gpnum, bernum):
	gp_0740=read_rays.construct_lassen_scan(path='/bm/gdata/scollis/gunn_pt/'+date+gpnum+'/')
	ber_0740=read_rays.construct_uf_scan(path='/bm/gdata/scollis/berrimah/'+date+'_'+bernum+'/')	
	ber_loc=[-12.457, 130.925]
	gp_loc=	 [-12.2492,  131.0444]
	displace=mathematics.corner_to_point(gp_loc, ber_loc)
	ldict={'lat_0':gp_loc[0], 'lon_0':gp_loc[1],'llcrnrlat':-13.0, 'llcrnrlon':130.2, 'urcrnrlat':-12.0 , 'urcrnrlon':131.2, 'lat_ts':gp_loc[0]}
	levs=linspace(500,15000, 21)
	xar=linspace(-50.,50., 100)*1000.0
	yar=linspace(-50.,50., 100)*1000.0
	gp_cube=radar_to_cart.make_cube(gp_0740, xar, yar, levs)
	ber_cube=radar_to_cart.make_cube(ber_0740, xar-displace[0], yar-displace[1], levs)
	netcdf_utis.save_data_cube(ber_cube, gp_cube, '/bm/gdata/scollis/cube_data/'+date+'_'+bernum[0:4]+'_ver1.nc', gp_loc)
Пример #3
0
def test_cappi_ber():
	ber_loc=[-12.457, 130.925]
	gp_loc=	 [-12.2492,  131.0444]
	disp=mathematics.corner_to_point(gp_loc, ber_loc)
	#scanme=read_rays.construct_uf_scan(path='/bm/gdata/scollis/berrimah/20060122_035004/')
	gp_0740=read_rays.construct_lassen_scan(path='/bm/gdata/scollis/gunn_pt/20060122_074001/')
	ber_0740=read_rays.construct_uf_scan(path='/bm/gdata/scollis/berrimah/20060122_074003/')
	read_rays.plot_ppi_vel(ber_0740[1], radar_loc=ber_loc, fig_name='ber_vppi.png')
	read_rays.plot_ppi_vel(gp_0740[1], radar_loc=gp_loc, fig_name='gp_vppi.png')
	xar=linspace(-50.,50., 200)*1000.0
	yar=linspace(-50.,50., 200)*1000.0
	cap_gp=radar_to_cart.make_cappi(gp_0740, xar, yar, 2500.0, 'VR')
	cap_ber=radar_to_cart.make_cappi(ber_0740, xar-disp[0], yar-disp[1], 2500.0, 'VR')
	read_rays.plot_cappi_vel(xar, yar, cap_ber, fig_name='ber_vcappi_2_5km.png')
	read_rays.plot_cappi_vel(xar, yar, cap_gp, fig_name='gp_vcappi_2_5km.png')
Пример #4
0
def test_newpres():
	gp_0740=read_rays.construct_lassen_scan(path='/bm/gdata/scollis/gunn_pt/20060122_074001/')
	ber_0740=read_rays.construct_uf_scan(path='/bm/gdata/scollis/berrimah/20060122_074003/')	
	ber_loc=[-12.457, 130.925]
	gp_loc=	 [-12.2492,  131.0444]
	ldict={'lat_0':gp_loc[0], 'lon_0':gp_loc[1],'llcrnrlat':-13.0, 'llcrnrlon':130.2, 'urcrnrlat':-12.0 , 'urcrnrlon':131.2, 'lat_ts':gp_loc[0]}
	az_scan=0
	pres.plot_ppi(ber_0740[az_scan], 'CZ', radar_loc=ber_loc, loc_dict=ldict, fig_name='ber_cz_ppi.png')
	pres.plot_ppi(gp_0740[az_scan], 'CZ', radar_loc=gp_loc, loc_dict=ldict, fig_name='gp_cz_ppi.png')
	pres.plot_ppi(ber_0740[az_scan], 'VR', radar_loc=ber_loc, loc_dict=ldict, fig_name='ber_vr_ppi.png')
	pres.plot_ppi(gp_0740[az_scan], 'VR', radar_loc=gp_loc, loc_dict=ldict, fig_name='gp_vr_ppi.png')
	disp=mathematics.corner_to_point(gp_loc, ber_loc)
	xar=linspace(-50.,50., 100)*1000.0
	yar=linspace(-50.,50., 100)*1000.0
	lev=1000.0
	lstr="%(lev)05d" %{'lev':lev}
	pref_dir='20062201_0740_caps/'
	cap_gp_vr=radar_to_cart.make_cappi(gp_0740, xar, yar, lev, 'VR')
	cap_ber_vr=radar_to_cart.make_cappi(ber_0740, xar-disp[0], yar-disp[1], lev, 'VR')
	pres.plot_cappi(xar,yar,cap_gp_vr,gp_0740[0], parm='VR', fig_name=pref_dir+'gp_cappi_vr_'+lstr+'.png', loc_dict=ldict, radar_loc=gp_loc)
	pres.plot_cappi(xar,yar,cap_ber_vr,ber_0740[0], parm='VR', fig_name=pref_dir+'ber_cappi_vr_'+lstr+'.png', loc_dict=ldict, radar_loc=gp_loc)
	#cap_gp_test=radar_to_cart.make_cappi_testmode(gp_0740, xar, yar, lev, 'VR')
	#plot_cappi(xar,yar,cap_gp_test,ber_0740[0], parm='TEST', fig_name='test.png', loc_dict=ldict, radar_loc=gp_loc) 
	
	gp_cube_vr=zeros([100,100,31], dtype=float)
	ber_cube_vr=zeros([100,100,31], dtype=float)
	levs=linspace(500, 10500, 31)
	xar=linspace(-50.,50., 100)*1000.0
	yar=linspace(-50.,50., 100)*1000.0
	
	for i in range(31):
		gp_cap_vr=radar_to_cart.make_cappi(gp_0740, xar, yar, levs[i], 'CZ')
		gp_cube_vr[:,:,i]=gp_cap_vr
		ber_cap_vr=radar_to_cart.make_cappi(ber_0740, xar-disp[0], yar-disp[1], levs[i], 'CZ')
		ber_cube_vr[:,:,i]=ber_cap_vr
	
	for i in range(31):
		lstr="%(lev)05d" %{'lev':levs[i]}
		pres.plot_cappi(xar,yar,gp_cube_vr[:,:,i],gp_0740[0], parm='CZ', fig_name=pref_dir+'gp_cappi_cz_'+lstr+'.png', loc_dict=ldict, radar_loc=gp_loc)
		pres.plot_cappi(xar,yar,ber_cube_vr[:,:,i],ber_0740[0], parm='CZ', fig_name=pref_dir+'ber_cappi_cz_'+lstr+'.png', loc_dict=ldict, radar_loc=gp_loc)
		print 'Done', i, ' of 31'
Пример #5
0
def lass_ascii_to_pgz(dirname, **kwargs):
	base_path=kwargs.get('base_path','/bm/gscratch/scollis/gunn_pt/') 
	debug=kwargs.get('debug', False)
	if debug: print "Loading "+base_path+dirname
	lass_scan=read_rays.construct_lassen_scan(path=base_path+dirname)
	save_scan.pzip_radar(lass_scan, debug=debug)