Public Member Functions | |
def | __init__ (self) |
def | set_fig_params (self) |
def | draw_map (self) |
def | save_figure (self, outdir) |
def | fill_field (self) |
def | scale_field |
def | contour_field (self, var, field) |
def | wind_field (self) |
def | coord_str |
def | plot_title (self) |
def | display_map (self) |
def | run (self) |
Public Attributes | |
params | |
area_flag | |
barbs | |
myvar | |
Class that generates all of the generic parts of a map figure.
def maps.general_map.__init__ | ( | self | ) |
def maps.general_map.contour_field | ( | self, | |
var, | |||
field | |||
) |
Draw field contours. Does not have to be the main field being processed. Mostly plotting height.
Definition at line 277 of file maps.py.
References maps.make_basemap.level, maps.make_basemap.lon, maps.make_basemap.m, maps.general_map.myvar, maps.general_map.params, and maps.general_map.scale_field().
Referenced by maps.general_map.run().
def maps.general_map.coord_str | ( | self, | |
coord, | |||
title = True |
|||
) |
Determine how to label the vertical coordinate based on the contents of the grib file, or other information.
Definition at line 342 of file maps.py.
References maps.make_basemap.field.
Referenced by maps.general_map.plot_title(), and maps.general_map.save_figure().
def maps.general_map.draw_map | ( | self | ) |
Make figure
Definition at line 146 of file maps.py.
References maps.make_basemap.lon, maps.make_basemap.m, and maps.general_map.params.
Referenced by maps.general_map.run().
def maps.general_map.fill_field | ( | self | ) |
Color-fill the field of the figure being plotted
Definition at line 202 of file maps.py.
References maps.make_basemap.field, maps.make_basemap.level, maps.make_basemap.line, maps.make_basemap.lon, maps.make_basemap.m, maps.general_map.myvar, maps.general_map.params, and maps.general_map.scale_field().
Referenced by maps.general_map.run().
def maps.general_map.plot_title | ( | self | ) |
configure plot title
Definition at line 362 of file maps.py.
References maps.general_map.coord_str(), maps.make_basemap.fhr, maps.make_basemap.field, maps.make_basemap.level, maps.general_map.myvar, and maps.general_map.params.
Referenced by maps.general_map.run().
def maps.general_map.run | ( | self | ) |
Definition at line 407 of file maps.py.
References maps.general_map.contour_field(), maps.general_map.draw_map(), maps.general_map.fill_field(), maps.make_basemap.height, maps.general_map.plot_title(), maps.general_map.wind_field(), and maps.make_basemap.winds.
def maps.general_map.save_figure | ( | self, | |
outdir | |||
) |
save figures
Definition at line 171 of file maps.py.
References maps.general_map.area_flag, maps.general_map.coord_str(), maps.make_basemap.fhr, maps.make_basemap.field, maps.general_map.myvar, and maps.general_map.params.
def maps.general_map.scale_field | ( | self, | |
scale = None |
|||
) |
scale field values
Definition at line 263 of file maps.py.
References maps.make_basemap.field.
Referenced by maps.general_map.contour_field(), and maps.general_map.fill_field().
def maps.general_map.set_fig_params | ( | self | ) |
Definition of parameters for plotting standard maps. The top level variable name must match the "shortName" used in the grib file. Each variable has a subdictionary for various height levels to define either int/min/max values, or contour values directly. Other options that the scripts use: cbar: user-specified color tables scale: a scale factor (should start with an operator (*,/,+,-) unit: a string for unit if the one in the grib file is inappropriate varname: option for using a variable name different than that in the grib file
def maps.general_map.wind_field | ( | self | ) |
Plot the wind field in barbs. Masks are applied here to thin the quantity of barbs plotted for clarity
Definition at line 317 of file maps.py.
References maps.make_basemap.m, maps.general_map.params, and maps.make_basemap.winds.
Referenced by maps.general_map.run().
maps.general_map.area_flag |
Definition at line 328 of file maps.py.
Referenced by maps.general_map.save_figure(), and maps.make_basemap.set_bm().
maps.general_map.myvar |
Definition at line 390 of file maps.py.
Referenced by maps.general_map.contour_field(), maps.general_map.fill_field(), maps.general_map.plot_title(), and maps.general_map.save_figure().
maps.general_map.params |
Definition at line 44 of file maps.py.
Referenced by maps.general_map.contour_field(), maps.general_map.draw_map(), maps.general_map.fill_field(), maps.general_map.plot_title(), maps.general_map.save_figure(), and maps.general_map.wind_field().