Read trajectory data as 2D array
Posted: October 19th, 2018, 12:52 pm
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"