Read trajectory data as 2D array

Post Reply
yaqiang
Posts: 59
Joined: October 5th, 2015, 10:20 pm
Registered HYSPLIT User: Yes

Read trajectory data as 2D array

Post by yaqiang »

The trajectory endpoint data file can be read as 2D arrays following netCDF data model from MeteoInfo version 1.6. The dimensions are 'trajectory' (trajectory number) and 'obs' (endpoint number of one trajectory). Detail and example can be found here: http://www.meteothink.org/examples/mete ... _plot.html .

Code: Select all

>>> fn = 'C:/Temp/toWangTao/run_5_bck_4d.txt'
>>> f = addfile_hytraj(fn)
>>> f
File Name: C:/Temp/toWangTao/run_5_bck_4d.txt
Trajectory number = 5
Trajectory direction = BACKWARD
Vertical motion =OMEGA
Number of diagnostic output variables = 1
Variables: PRESSURE

Trajectories:
  2009-10-06 07:00  -78.646  146.763  60.0
  2009-10-06 07:00  -78.065  143.867  120.0
  2009-10-06 07:00  -77.394  140.977  150.0
  2009-10-06 07:00  -76.487  137.66  210.0
  2009-10-06 07:00  -75.278  134.009  60.0

File Name: C:/Temp/toWangTao/run_5_bck_4d.txt
Dimensions: 2
	trajectory = 5;
	obs = 97;
Global Attributes: 
Variations: 6
	float time(trajectory,obs);
		time: long_name = "time"
	float run_hour(trajectory,obs);
		run_hour: long_name = "run_hour"
	float lat(trajectory,obs);
		lat: long_name = "lat"
	float lon(trajectory,obs);
		lon: long_name = "lon"
	float height(trajectory,obs);
		height: long_name = "height"
	float PRESSURE(trajectory,obs);
		PRESSURE: long_name = "PRESSURE"
Post Reply

Return to “MeteoInfo Software”