-
Notifications
You must be signed in to change notification settings - Fork 22
Expand file tree
/
Copy pathHELP
More file actions
226 lines (215 loc) · 10.8 KB
/
HELP
File metadata and controls
226 lines (215 loc) · 10.8 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
Help on package pyampr:
NAME
pyampr - pyampr v1.4.0 by Timothy J. Lang
FILE
/Users/tjlang/anaconda/lib/python2.7/site-packages/pyampr/__init__.py
DESCRIPTION
PyAMPR is a package to read, analyze, and display AMPR data
Please e-mail bug reports to: timothy.j.lang@nasa.gov
PACKAGE CONTENTS
google_earth_tools
pyampr
udf_cmap
DATA
__author__ = 'Timothy J. Lang'
__email__ = 'timothy.j.lang@nasa.gov'
__version__ = '1.4.0'
VERSION
1.4.0
AUTHOR
Timothy J. Lang
Help on class AmprTb in module pyampr.pyampr:
class AmprTb(__builtin__.object)
| Methods defined here:
|
| __init__(self, full_path_and_filename=None, project='IPHEX')
| If passed a filename, call the read_ampr_tb_level2b() method,
| otherwise just instance the class with nothing
|
| calc_polarization(self, simple=False, force_match=True, chan_list=['10', '19', '37', '85'])
| *** THIS METHOD IS EXPERIMENTAL ***
|
| This method calculates H & V given the mixed-pol A & B channels.
| Solves Equation 1 in Vivekanandan et al. (1993) for Tb in H and V.
| Where A or B are not good will be populated with AmprTb.bad_data.
| If successful, TB10H, TB10V, TB19H, TB19V, TB37H, TB37V, TB85H, TB85V
| will now be attributes of the AmprTb instance. Missing channels will
| not be processed. Calculation performed via methodology of Brent Roberts.
|
| Creates attributes called TB##_offset, where ## is channel
| frequency (in GHz). This is Channel A TB - Channel B TB (in K)
| at nadir scan angle.
|
| Author: Brent Roberts w/ adjustments by Timothy Lang
|
| simple = Boolean flag to swap between simple linear substitution or
| constrained linear inversion.
| (Default = constrained linear inversion)
| force_match = Boolean flag to force A & B channels to match at nadir
| (Default = match forced)
| chan_list = List of strings to enable individual freqs to be deconvolved
| using different methodologies (Default = All 4 freqs).
|
| help(self)
|
| plot_ampr_channels(self, scanrange=None, cmap=None, clevs=[75, 325], save=None, show_pol=False, timerange=None)
| This method plots a strip chart akin to those seen here:
| ftp://gpm.nsstc.nasa.gov/gpm_validation/mc3e/ampr/browse/
| matplotlib.pyplot.pcolormesh() is the workhorse plotting routine
|
| clevs = List with contour levels. Only max and min values are used.
| cmap = Colormap desired.
| See http://wiki.scipy.org/Cookbook/Matplotlib/Show_colormaps
| and dir(cm) for more
| save = Filename+path as string to save plot to. Type determined from suffix.
| Careful - .ps/.eps/.pdf files can get huge!
| scanrange = List of scan numbers (from AmprTb.Scan) to plot.
| Only max/min are used.
| show_pol = Set to True to show deconvolved H & V polarizations. Will call
| calc_polarization() beforehand if these channels are missing.
| timerange = Time range to plot. Overrides scanrange if both are set.
| Format: timerange = ['hh:mm:ss', 'HH:MM:SS']
|
| plot_ampr_track(self, var='10A', latrange=None, lonrange=None, parallels=2.0, meridians=2.0, title=None, clevs=[75, 325], cmap=None, save=None, show_track=False, maneuver=True, scanrange=None, show_grid=True, equator=False, timerange=None, return_flag=False)
| This method plots geolocated AMPR data, along with the Aircraft track if
| requested. matplotlib.pyplot.pcolormesh() on a Basemap is the workhorse
| plotting routine.
|
| var = String with channel number and letter (e.g., 10A for 10 GHz (A) channel
| latrange = List with lat range defined. Order and size (>= 2) is irrelevant
| as max and min are retrieved
| lonrange = List with lon range defined. Order and size (>= 2) is irrelevant
| as max and min are retrieved
| parallels = Scalar spacing (deg) for parallels (i.e., constant latitude)
| meridians = Scalar spacing (deg) for meridians (i.e., constant longitude)
| ptitle = Plot title as string
| clevs = List with contour levels. Only max and min values are used.
| cmap = Colormap desired. See http://wiki.scipy.org/Cookbook/Matplotlib/Show_colormaps
| and dir(cm) for more
| save = Filename+path as string to save plot to. Type determined from suffix.
| Careful - .ps/.eps/.pdf files can get huge!
| show_track = Boolean to plot Aircraft track along with AMPR data.
| Plotted in black with white highlights for significant maneuvers
| (abs(Aircraft_Nav['Roll']) > 5).
| scanrange = List of scan numbers (from AmprTb.Scan) to plot.
| Only max/min are used.
| show_grid = Set to False to turn off gridlines
| equator = Boolean to consider 0s/-1s in Latitude/Longitude as good geolocations
| (e.g., flight crosses Equator or Prime Meridian).
| Default is bad geolocations.
| maneuver = Set to False to suppress the plotting of swaths during significant
| aircraft maneuvers.
| timerange = Time range to plot. Overrides scanrange if both are set.
| Format: timerange = ['hh:mm:ss', 'HH:MM:SS']
| return_flag = Set to True to return Basemap, plot axes, etc. Order of items
| returned is fig (figure instance), ax (main axis instance),
| m (Basemap instance), cax (colorbar axis instance),
| cbar (colorbar instance).
|
| read_ampr_tb_level2b(self, full_path_and_filename, project='IPHEX')
| Reads Level 2B AMPR data in text or netCDF files provided from
| http://ghrc.msfc.nasa.gov. Tested and working with all AMPR
| data from this site, as well as IPHEX. Depending on project,
| some variables are unused or are duplicates. Most notably,
| pre-MC3E there are no B channels.
|
| Currently available field projects: IPHEX, MC3E, TC4, TCSP, JAX90, COARE,
| CAMEX1, CAMEX2, CAMEX3, CAMEX4, TRMMLBA, KWAJEX, TEFLUNA, FIRE3ACE, CAPE
| If you read one project's data while mistakenly telling PyAMPR the data
| are from a different project, then errors are likely.
|
| Notable attributes in output data class
| (Note - Order in documentation does not necessarily match order in data files)
| ---------------------------------------
| nscans = Number of scans (depends on file)
| swath_size = 50 (hard coded)
| nav_size = 18 (hard coded)
|
| shape = (nscans)
| *****
| Scan - Individual scan record number
| (usually thousands of scans per flight)
| Year, Month, Day, Hour, Minute, Second, Day_of_Year, Second _of_Day -
| Scan timing info (UTC)
| Icon - QC flag (not currently used by PyAMPR)
|
| shape = (nscans, swath_size)
| *****
| TB10A, TB10B - 10 GHz brightness temperatures
| (A: Left V -> Right H, B: Left H -> Right V, units: K)
| TB19A, TB19B - 19 GHz brightness temperatures (V->H, H->V, K)
| TB37A, TB37B - 37 GHz brightness temperatures (V->H, H->V, K)
| TB85A, TB85B - 85 GHz brightness temperatures (V->H, H->V, K)
| Latitude, Longitude - Geolocation for the AMPR beam (degrees)
| Land_Fraction10 - Estimated fraction of land in 10/19 GHz pixel
| Land_Fraction37 - Estimated fraction of land in 37 GHz pixel
| Land_Fraction85 - Estimated fraction of land in 85 GHz pixel
| (0 = All Ocean, 1 = All Land)
| Elevation - Topographic elevation (m MSL)
|
| shape = (nscans, nav_size)
| *****
| Aircraft_Nav - Python dict of Aircraft navigation info: key (units)
| GPS Latitude (deg)
| GPS Longitude (deg)
| GPS Altitude (m MSL)
| Pitch (deg, + is nose up)
| Roll (deg, + is right wing down)
| Yaw (deg from N)
| Heading (deg from N)
| Ground Speed (m/s)
| Air Speed (m/s)
| Static Pressure (hPa)
| Total Pressure (hPa)
| Total Temperature (C)
| Static Temperature (C)
| Wind Speed (m/s)
| Wind Direction (deg from N)
| INS Latitude (deg)
| INS Longitude (deg)
| INS Altitude (m MSL)
|
| Version 1.4.0: Added support for Level 2B netCDF files. Starting with IPHEX,
| processed AMPR instrument files will be provided in a netCDF-4 format.
|
| write_ampr_kmz(self, var='10A', latrange=None, lonrange=None, clevs=[75, 325], cmap=None, timerange=None, file_path=None, file_name=None, scanrange=None, show_legend=True, equator=False, maneuver=True)
| This method plots geolocated AMPR data as a filled color Google Earth
| kmz. Qualitatively similar plot to plot_ampr_track() but for Google
| Earth.
| Will produce overlay.png and, if a legend is created,
| legend.png as temporary image files in the current working
| directory.
|
| var = AMPR channel to plot (Default = DEFAULT_VAR)
| scanrange = List of scan numbers (from AmprTb.Scan) to plot.
| Only max/min are used.
| file_path = Desired path to kmz file (Default = '')
| file_name = Desired name for kmz file (Default = YYYYMMDD_TB###.kmz,
| ### = channel)
| latrange = List with lat range defined. Order and size (>= 2)
| is irrelevant as max and min are retrieved
| lonrange = List with lon range defined. Order and size (>= 2)
| is irrelevant as max and min are retrieved
| clevs = List with contour levels. Only max and min values are used.
| (Default = DEFAULT_CLEVS)
| cmap = Colormap desired.
| See http://wiki.scipy.org/Cookbook/Matplotlib/Show_colormaps
| and dir(cm) for more
| equator = Boolean to consider 0s/-1s in Latitude/Longitude as
| good geolocations
| (e.g., flight crosses Equator or Prime Meridian).
| Default is bad geolocations.
| show_legend = Set to False to suppress the color bar
| maneuver = Set to False to suppress plotting of swaths during
| significant aircraft maneuvers.
| timerange = Time range to plot. Overrides scanrange if both are set.
| Format: timerange = ['hh:mm:ss', 'HH:MM:SS']
|
| ----------------------------------------------------------------------
| Data descriptors defined here:
|
| __dict__
| dictionary for instance variables (if defined)
|
| __weakref__
| list of weak references to the object (if defined)