#Metview Macro

#Read trajectory file
flx = read("res_multi.txt")

#Get the number of groups in the file. Originally each group
#was in a separate file generated by FLEXTRA. Metview 
#concatenated these files into a singe output file.
num=count(flx)

#Print out the name and type of trajectories in each group
for i=1 to num do
	vals=flextra_group_get(flx[i],["name","type"])
    print("group: ",i," name: ",vals[1]," type: ",vals[2])	
end for


#Get the latittude and longitude data for the first 
#trajectory in the second group (Stromboli).
vals=flextra_tr_get(flx[2],1,["lat","lon"])

print(" ")
print("lat= ",vals[1])
print("lon= ",vals[2])

