HYSPLIT¶
-
class
PseudoNetCDF.noaafiles.
arlpackedbit
(*args, **kwds)[source]¶ arlpackedbit reads files formatted according to NOAA’s arl packed bit format
Format as follows:
- for t in times:
- thdtype = dtype([(‘YYMMDDHHFF’, ‘>10S’), (‘LEVEL’, ‘>2S’),
(‘GRID’, ‘>2S’) , (‘INDX’, ‘>4S’), (‘Z1’, ‘>4S’), (‘MB’, ‘2>14S’), (‘SRCE’, ‘>S4’), (‘MGRID’, ‘>S3’), (‘VSYS’, ‘>S2’), (‘POLLAT’, ‘>S7’), (‘POLLON’, ‘>S7’), (‘REFLAT’,’>S7’), (‘REFLON’,’>S7’), (‘GRIDX’,’>S7’), (‘ORIENT’,’>S7’), (‘TANLAT’,’>S7’), (‘SYNCHX’,’>S7’), (‘SYNCHY’,’>S7’), (‘SYNCHLAT’,’>S7’), (‘SYNCHLON’,’>S7’), (‘RESERVED’, ‘>S7’), (‘NX’, ‘>S3’), (‘NY’, ‘>S3’), (‘NZ’, ‘>S3’), (‘VSYS2’, ‘>S2’), (‘LENH’, ‘>S4’)]) + ny * nx - 158 - 50
ny+nx- for surfacekey in surfacekeys:
YYMMDDHHFFLLGGVVVVEEEEPPPPPPPPPPPPPPVVVVVVVVVVVVVV+ P(ny,nx)
- for layerkey in layerkeys:
- for layer in layers:
YYMMDDHHFFLLGGVVVVEEEEPPPPPPPPPPPPPPVVVVVVVVVVVVVV+ P(ny,nx)
YY = %y in strftime for GMT date MM = %m in strftime DD = %d in strftime HH = %H of model hour FF = %H of forecast hour LL = 2-digit layer GG = 2-digit grid IIII = ‘INDX’ ZZZZ = 4-digit integer 0 XXXXXXXXXXXXX = %14.7e 0 YYYYYYYYYYYYY = %14.7e 0 EEEE = 4-digit integer exponent PPPPPPPPPPPPP = %14.7e precision VVVVVVVVVVVVV = %14.7e value R(1,1) P(ny,nx) = ny by nx 1-byte values dervied from real values (R) according
to the formula below.
P(i,j) = (Ri,j - Ri-1,j)* (2**(7-(ln dRmax / ln 2)))
- Parameters
path (string) – path to arl packed bit formatted file
shape (tuple or None) – shape of file to over ride derived shape
earth_radius (scalar) – radius of the earth used in converting projected to lat/lon
synchlon (scalar) – The SYNCHLON variable has 6 digits of precision in the file this keyword allows you to provide more.
synchlat (scalar) – The SYNCHLAT variable has 6 digits of precision in the file this keyword allows you to provide more.
- Returns
arlf – PseudoNetCDF file with packed bit contents unpacked
- Return type
-
getMap
(maptype='basemap_auto', **kwds)[source]¶ Description
- Parameters
maptype (string) –
choices ‘basemap’, ‘basemap_auto’, ‘cartopy’ (not yet) basemap : attempts to open a basemap with only supplied kwds basemap_auto : automatically adds llcrnrlon,llcrnrlat,u
rcrnrlon,urcrnrlat based on longitude_bounds
**kwds (keywords) – for basemap or cartopy
- Returns
map
- Return type
basemap or cartopy axis
-
getproj
(withgrid=False, projformat='pyproj')[source]¶ Description
- Parameters
withgrid (boolean) – use grid units instead of meters
projformat (string) – ‘pyproj’ (default), ‘proj4’ or ‘wkt’ allows function to return a pyproj projection object or a string in the format of proj4 or WKT
- Returns
proj – (wkt, proj4) or pyprojProj (pyproj)
- Return type
string pyproj.Proj
-
classmethod
isMine
(path)[source]¶ True if this file or object can be identified for use by this class. Useful to override for classes that can be initialized from disk.
-
plot
(*args, **kwds)[source]¶ - Parameters
varkey (string) – the variable to plot
plottype (string) – longitude-latitude, latitude-pressure, longitude-pressure, vertical-profile, time-longitude, time-latitude, time-pressure default, longitude-latitude
ax_kw (dictionary) – keywords for the axes to be created
plot_kw (dictionary) – keywords for the plot (plot, scatter, or pcolormesh) to be created
cbar_kw (dictionary) – keywords for the colorbar
map_kw (dictionary) – keywords for the getMap routine, which is only used with plottype=’longitude-latitude’
dimreduction (string or function) – dimensions not being used in the plot are removed using applyAlongDimensions(dimkey=dimreduction) where each dimenions
-
class
PseudoNetCDF.noaafiles.
arltrajdump
(*args, **kwds)[source]¶