wprof_time.append('2200 UTC\n23Jan01') wprof_time.append('0001 UTC\n24Jan01') wprof_time.append('0145 UTC\n24Jan01') wprof_time.append('1806 UTC\n17Feb01') p3ulist = list() p3vlist = list() bSulist = list() bSvlist = list() for n,par in enumerate(params): " synth data " out = vitas.main(par[0]) p3u = out[0] p3v = out[1] p3wU = out[2] # from 230deg p3z = out[3] p3ulist.extend(p3u[:16]) p3vlist.extend(p3v[:16]) " balloon data " infiles3,_ = so.get_sounding_files(par[1], homedir='/localdata') infiles3.sort() df = mf.parse_sounding2(infiles3[par[2]]) bSu = df.u.values bSv = df.v.values bSz = df.index.values
# targets.append(['c07/leg01.cdf','0','010217I.nc']) targets.append(['c07/leg03.cdf','6','010217I.nc']) targets.append(['c07/leg04.cdf','0','010217I.nc']) targets.append(['c07/leg05.cdf','4','010217I.nc']) targets.append(['c07/leg06.cdf','0','010217I.nc']) fl_u = np.array([]) fl_v = np.array([]) sy_u = np.array([]) sy_v = np.array([]) template = '-c {0} -s {2} --valid {1} --no_plot' for t in targets: out = vitas.main(template.format(t[0],t[1],t[2])) fl_u = np.append(fl_u, out['fl']['u']) fl_v = np.append(fl_v, out['fl']['v']) sy_u = np.append(sy_u, out['sy']['u']) sy_v = np.append(sy_v, out['sy']['v']) good_u=[np.where(~np.isnan(sy_u))] good_v=[np.where(~np.isnan(sy_v))] Xu,Yu = np.squeeze(fl_u[good_u]),np.squeeze(sy_u[good_u]) Xv,Yv = np.squeeze(fl_v[good_v]),np.squeeze(sy_v[good_v]) x0u,y0u = np.arange(-20,21), np.arange(-20,21) x0v,y0v = np.arange(0,31), np.arange(0,31) add_const=True