Welcome to MetMast!

Courtesy of the Department of Energy (DOE), National Renewable Energy Laboratory (NREL), and the National Wind Technology Center (NWTC)

Codes

1. met_funcs.py

module:met_funcs
platform:Unix, Windows
synopsis:This code is used as a general family of functions and classes that can be used in the MET tower data analysis.
moduleauthor:Nicholas Hamilton <Nicholas.Hamilton@nrel.gov> Rafael Mudafort <Rafael.Mudafort@nrel.gov> Lucas McCullum <Lucas.McCullum@nrel.gov>
met_funcs.categories_to_exclude()

Define categories to exclude for filtering.

This function does not take in any inputs but does output a list containing all of the categories that are chosen to be excluded from the desired input data.

Parameters:
  1. N/A: N/A
Returns:
  1. excats (list): Contains all of the categories that are chosen to be excluded from the desired input data.
met_funcs.categories_to_keep()

Define categories to keep for filtering.

This function does not take in any inputs but does output a list containing all of the categories that are chosen to be included from the desired input data.

Parameters:
  1. N/A: N/A
Returns:
  1. keepcats (list): Contains all of the categories that are chosen to be included from the desired input data.
met_funcs.categorize_fields(metdat, keeplist=None, excludelist=None)

Categorize all of the fields of the data.

This function takes the contents of the pandas DataFrame containing all of the data from a desired input data file and outputs the variable categories, units, labels for plotting, and strings for saving files and figures.

Parameters:
  1. metdat (Pandas DataFrame): Contains all of the requested data extracted from the input files.
  2. keeplist (list): Contains all of the categories that are to be kept after filtering the desired input data.
  3. excludelist (list): Contains all of the categories that are to be excluded after the filtering desired input data.
Returns:
  1. varcats (dictionary): Contains all of the categories in the desired data.
  2. varunits (dictionary): Contains all of the units of the desired data.
  3. varlabels (dictionary): Contains all of the labels that will be used for plotting the desired data.
  4. varsave (dictionary): Contains all of the string values that will be used for saving files and figures of the desired data.
met_funcs.drop_nan_cols(metdat)

Remove empty columns.

This function takes the contents of the pandas DataFrame containing all of the data from the input files and filters it by removing any missing columns (e.g., N/A).

Parameters:
  1. metdat (Pandas DataFrame): Contains all of the requested data extracted from the input files.
Returns:
  1. temp (Pandas DataFrame): Contains all of the requested data extracted from the input files without any missing columns (e.g., N/A).
met_funcs.find_ECD_events(sonicdat, params, T=10)

Find extreme coherent wind gust with wind direction change events.

This function takes inputs from a pandas DataFrame containing all of the desired data and International Electrotechnical Commission (IEC) parameters at the given period for search, determines extreme coherent wind gust with wind direction change events, and returns the findings in an object which can be used to index files later.

Parameters:
  1. sonicdat (Pandas DataFrame): Contains all of the desired data at the given probe height including wind speed, wind direction, and the date and timestamps of the input data.
  2. params (dictionary): Contains all of the parameters established by the IEC for the given input data and probe height.
  3. T (float): Used to define the period for search (Seconds).
Returns:
  1. ECDeventfound (object): Used to store any significant extreme coherent wind gust with wind direction change events.
met_funcs.find_EDC_events(sonicdat, params, T=6)

Find extreme wind direction change events.

This function takes inputs from a pandas DataFrame containing all of the desired data and International Electrotechnical Commission (IEC) parameters at the given period for search, determines extreme wind direction change events, and returns the findings in an object which can be used to index files later.

Parameters:
  1. sonicdat (Pandas DataFrame): Contains all of the desired data at the given probe height including wind speed, wind direction, and the date and timestamps of the input data.
  2. params (dictionary): Contains all of the parameters established by the IEC for the given input data and probe height.
  3. T (float): Used to define the period for search (Seconds).
Returns:
  1. EDCeventfound (object): Used to store any significant extreme wind direction change events.
met_funcs.find_EOG_events(sonicdat, params, T=10.5)

Find extreme operating wind gust events.

This function takes inputs from a pandas DataFrame containing all of the desired data and International Electrotechnical Commission (IEC) parameters at the given period for search, determines extreme operating wind gust events, and returns the findings in an object which can be used to index files later.

Parameters:
  1. sonicdat (Pandas DataFrame): Contains all of the desired data at the given probe height including wind speed, wind direction, and the date and timestamps of the input data.
  2. params (dictionary): Contains all of the parameters established by the IEC for the given input data and probe height.
  3. T (float): Used to define the period for search (Seconds).
Returns:
  1. EOGeventfound (object): Used to store any significant extreme operating wind gust events.
met_funcs.find_ETM_events(sonicdat, params)

Find extreme turbulence model events.

This function takes inputs from a pandas DataFrame containing all of the desired data and International Electrotechnical Commission (IEC) parameters at the given period for search, determines extreme turbulence model events, and returns the findings in an object which can be used to index files later.

Parameters:
  1. sonicdat (Pandas DataFrame): Contains all of the desired data at the given probe height including wind speed, wind direction, and the date and timestamps of the input data.
  2. params (dictionary): Contains all of the parameters established by the IEC for the given input data and probe height.
Returns:
  1. ETMeventfound (object): Used to store any significant extreme turbulence model events.
met_funcs.find_EWM_events(sonicdat, params)

Find extreme wind speed events.

This function takes inputs from a pandas DataFrame containing all of the desired data and International Electrotechnical Commission (IEC) parameters at the given probe height, determines extreme wind speed events, and returns the findings in lists separating one-year and 50-year events. These lists will be concatenated to a larger list which will be used to index files later.

Parameters:
  1. sonicdat (Pandas DataFrame): Contains all of the desired data at the given probe height including wind speed, wind direction, and the date and timestamps of the input data.
  2. params (dictionary): Contains all of the parameters established by the IEC for the given input data and probe height.
Returns:
  1. Ve01eventfound (list): All the extreme wind events higher than within the past year.
  2. Ve50eventfound (list): All the extreme wind events higher than within the past 50 years.
met_funcs.find_EWS_events(sonicdat, params, T=12)

Find extreme coherent wind shear events.

This function takes inputs from a pandas DataFrame containing all of the desired data and International Electrotechnical Commission (IEC) parameters at the given period for search, determines extreme coherent wind shear events, and returns the findings in an object which can be used to index files later.

Parameters:
  1. sonicdat (Pandas DataFrame): Contains all of the desired data at the given probe height including wind speed, wind direction, and the date and timestamps of the input data.
  2. params (dictionary): Contains all of the parameters established by the IEC for the given input data and probe height.
  3. T (float): Used to define the period for search (Seconds).
Returns:
  1. EWSeventfound (object): Used to store any significant extreme wind shear events.
met_funcs.flag_stability(metdat)

Denote stability based on Obukhov Length.

This function takes the contents of the pandas DataFrame containing all of the data from the input files and adds a new set of columns denoting a stability class based on the Obukhov Length at various heights.

Parameter:
  1. metdat (Pandas DataFrame): Contains all of the requested data extracted from the input files.
Returns:
  1. stabcat (dictionary): Contains the stability flag parameter for each desired row of the input data based on the Obukhov Length and can be classified as Very Stable, Stable, Neutral, Unstable, and Very Unstable.
  2. stabconds (list): Contains the values of the Obukhov Length for each desired row of the input data.
met_funcs.get_catinfo(metdat)

Get categorical information of the data.

This function takes the contents of the pandas DataFrame containing all of the data from a desired input data file and returns a set containing all of the categories, units, labels for plotting, and strings for saving files and figures.

Parameters:
  1. metdat (Pandas DataFrame): Contains all of the requested data extracted from the input files.
Returns:
  1. catinfo (set): Contains all of the categories, units, labels for plotting, and strings for saving files and figures for the desired data.
met_funcs.get_units()

Get units for the data.

This function does not take in any inputs but does output a dictionary containing all of the units of the desired input data.

Parameters:
  1. N/A: N/A
Returns:
  1. units (dictionary): Contains all of the units of the desired input data.
met_funcs.groom_data(metdat, varcats)

Trim data based on several parameters.

This function takes the contents of the pandas DataFrame containing all of the data from the input files as well as a list of categories that are desired to be kept and outputs a statement displaying the remaining number of columns left after filtering.

Possible Edit: This function could be divided into separate functions or could be made more general. Additionally the following code could be used.

dropcols = True
filter = ['ti', 'monin-obukhov length','temperature','gradient richarson']):
Parameters:
  1. metdat (Pandas DataFrame): Contains all of the requested data extracted from the input files.
  2. varcats (list): All the categories which are desired to be kept after filtering.
Returns:
  1. N/A (string): A print statement displaying the number of columns after filtering for columns not contained in the list of desired columns, Turbulent Intensity, Obukhov Length, Sonic Temperature, and Gradient Richardson Number.
met_funcs.load_met_data(inputfiles, verbose=False)

Load the data with a lambda function.

This function extracts the data from the input Comma-Separated (.csv) files and outputs them into a pandas DataFrame.

Parameters:
  1. inputfiles (list): All of the input files (.csv) to be loaded for analysis.
  2. verbose (Boolean): Defines whether or not the name of the file should be printed as the function runs.
Returns:
  1. metdat (Pandas DataFrame): Contains all of the requested data extracted from the input files.
met_funcs.load_met_data_alt(inputfiles, verbose=False)

Load the data without a lambda function.

This function extracts the data from the input Comma-Separated (.csv) files and outputs them into a pandas DataFrame. This is an alternate to the previous function to avoid the use of a data parser lambda function.

Parameters:
  1. inputfiles (list): All of the input files (.csv) to be loaded for analysis.
  2. verbose (Boolean): Defines whether or not the name of the file should be printed as the function runs.
Returns:
  1. metdat (Pandas DataFrame): Contains all of the requested data extracted from the input files.
met_funcs.make_dataframe_for_height(inputdata, timerange, probeheight=74, include_UTC=False)

Generate a DataFrame based on the probe height.

This function takes inputs from desired input data and returns a pandas DataFrame containing all of the desired data at the given probe height including wind speed, wind direction, and the date and timestamps of the input data.

Parameters:
  1. inputdata (dictionary): Contains all of the desired input data.
  2. timerange (Pandas DataFrame): Used to define the range of times with which the data covers.
  3. probeheight (integer, float): Used to define the desired height of the probe from which to begin data analysis (m).
  4. include_UTC (Boolean) : Used to determine whether or not an UTC timestamp is desired of the form ‘time_UTC’.
Returns:
  1. sonicdat (Pandas DataFrame): Contains all of the desired data at the given probe height including wind speed, wind direction, and the date and timestamps of the input data.
met_funcs.make_datetime_vector(filename, span=10, freq=20.0)

Generate a time range for the data.

This function takes inputs from filenames of the form %m_%d_%y_%H_%M_%S_%U.mat of the desired span and frequency of data and generates a vector for the date and time for the data.

Parameters:
  1. filename (string): Denotes the desired file name for the input data.
  2. span (integer): Used to define the span of the data included in the filename (Minutes).
Returns:
  1. timerange (Pandas DataFrame): Used to define the range of times with which the data covers.
met_funcs.qc_mask(metdat)

Remove columns for quality control.

This function takes the contents of the pandas DataFrame containing all of the data from the input files and filters data based on a mask of columns containing the term qc (Quality Control parameters).

Parameters:
  1. metdat (Pandas DataFrame): Contains all of the requested data extracted from the input files.
Returns:
  1. dfFilt (Pandas DataFrame): Contains a filtered version of the requested data extracted from the input files by removing columns containing a quality control parameter.
met_funcs.reject_outliers(data, m=5)

Remove any outliers.

This function takes the contents of the pandas DataFrame containing all of the data from a desired data file and outputs a filtered version by removing any outliers.

Parameters:
  1. data (Pandas DataFrame): Contains the desired data that is to be filtered for outliers.
  2. m (integer): Denotes the number of standard deviations that are desired as a cutoff for defining outliers.
Returns:
  1. data (Pandas DataFrame): A filtered version of the input data file by rejecting any outliers above m (5) standard deviations.
met_funcs.setup_IEC_params(sonicdat, probeheight=100)

Establish IEC parameters.

This function takes inputs from a pandas DataFrame containing all of the desired data at the given probe height and establishes all of the International Electrotechnical Commission (IEC) parameters for the given input data and probe height.

Parameters:
  1. sonicdat (Pandas DataFrame): Contains all of the desired data at the given probe height including wind speed, wind direction, and the date and timestamps of the input data.
  2. probeheight (integer, float): Used to define the desired height of the probe from which to begin data analysis (m).
Returns:
  1. params (dictionary): Contains all of the parameters established by the IEC for the given input data and probe height.

2. utils.py

module:utils
platform:Unix, Windows
synopsis:This code is used as a general family of utilities that can be used for plotting.
moduleauthor:Nicholas Hamilton <Nicholas.Hamilton@nrel.gov> Rafael Mudafort <Rafael.Mudafort@nrel.gov> Lucas McCullum <Lucas.McCullum@nrel.gov>
utils.RGB_to_hex(RGB)

Convert RGB Values to Hex.

This function takes in the desired RGB values for conversion and returns the resulting hex value of the color.

Parameters:
  1. RGB (list): The RGB values of the desired input hex value.
Returns:
  1. N/A (string): The hex value of the desired input RGB values.
utils.Round_To_n(x, n)

Round input values.

This function takes in a desired value and rounds it to the specified number of decimel places.

Parameters:
  1. x (integer, float): The input number that will be rounded.
  2. n (integer): The number of digits that the result will be rounded to.
Returns:
  1. N/A (float): The rounded version of the input number to the specified number of decimel places.
utils.color_dict(gradient)

Create Color Dictionary.

This function takes in a list of RGB sub-lists and returns a dictionary of colors in RGB and hex form for the use in plotting.

Parameters:
  1. gradient (list): The desired RGB sub-lists.
Returns:
  1. N/A (dictionary): The resulting colors in RGB and hex form.
utils.get_colors(ncolors, basecolor='cycle', reverse=False)

Get Plot Colors.

This function takes in the desired number of colors and the base color and determines the resulting gradient of colors that should be used for the plot.

Parameters:
  1. ncolors (int): The desired number of colors for the plot.
  2. basecolor (string): The desired base color for the plot.
  3. reverse (Boolean): Determines whether or not the colors should be reversed.
Returns:
  1. colors (list): The values of the resulting gradient of colors that should be used for the plot.
utils.get_nearest_direction(metdat, directions, category)

Get Nearest Direction.

This function takes in the desired input data variables in the form of a category and returns the nearest direction and its associated variable name.

Parameters:
  1. metdat (Pandas DataFrame): The input data that is desired to be analyzed.
  2. directions (list): The desired directions for analysis.
  3. category (list): The list of the resulting variable names.
Returns:
  1. dirind (list): The values of the index nearest to the direction.
  2. catind (list): The values of the index for the associated vertical location.
  3. vertlocs (list): The list of the associated resulting vertical locations for each variable.
utils.get_nearest_stability(metdat, stability, category)

Get Nearest Stability.

This function takes in the desired input data variables in the form of a category and returns the nearest stability and its associated variable name.

Parameters:
  1. metdat (Pandas DataFrame): The input data that is desired to be analyzed.
  2. stability (list): The desired stabilities for analysis.
  3. category (list): The list of the resulting variable names.
Returns:
  1. stabind (list): The values of the index nearest to the stability.
  2. catind (list): The values of the index for the associated vertical location.
  3. vertlocs (list): The list of the associated resulting vertical locations for each variable.
utils.get_nrelcolors()

Get NREL Colors.

This function takes in no parameters, but returns the values of the standard colors used by the National Renewable Energy Laboratory (NREL).

Parameters:
  1. N/A: N/A
Returns:
  1. N/A (dictionary): The values of the standard colors used by NREL.
utils.get_stabconds()

Get Stability Conditions.

This function takes in no parameters, but returns the values of the stability conditions.

Parameters:
  1. N/A: N/A
Returns:
  1. N/A (list): The values of the stability conditions.
utils.get_vertical_locations(category, location=None, reverse=False)

Get vertical locations.

This function takes in variables in the form of a category and returns a list of the resulting variable names, their associated vertical locations, and the index nearest to the location.

Parameters:
  1. category (list): The desired vertical locations in the form of variables for analysis.
  2. location (integer, float): The desired vertical location for analysis.
Returns:
  1. category (list): The list of the resulting variable names.
  2. vertlocs (list): The list of the associated resulting vertical locations for each variable.
  3. ind (integer): The values of the index nearest to the location.
utils.hex_to_RGB(hex)

Convert Hex Values to RGB.

This function takes in the desired hex value for conversion and returns the resulting RGB value of the color.

Parameters:
  1. hex (string): The desired hex value to be converted.
Returns:
  1. N/A (list): The RGB values of the desired input hex value.
utils.linear_gradient(start_hex, finish_hex='#FFFFFF', n=10)

Convert Hex Values to RGB.

This function takes in the desired hex values for the start and end of a gradient as well as the desired number of levels and returns a list containing the resulting color gradient.

Parameters:
  1. start_hex (string): The desired starting hex value for the color gradient.
  2. finish_hex (string): The desired ending hex value for the color gradient.
  3. n (integer): The desired number of total colors to form a gradient.
Returns:
  1. N/A (list): The RGB values of the desired color gradient.
utils.matlab_datenum_to_python_datetime(datenum)

Create Color Dictionary.

This function takes in a numerical value of the date as stored in Matlab and returns the resulting date and time value.

Parameters:
  1. datenum (integer): The numerical value of the date as stored in Matlab.
Returns:
  1. dateout(list): The resulting date and time value of the desired input date number.
utils.monthnames()

Get Month Names.

This function takes in no parameters, but returns the values of each month of the year.

Parameters:
  1. N/A: N/A
Returns:
  1. N/A (list): The values of each month of the year.
utils.polylinear_gradient(colors, n)

Create Polylinear Color Gradient.

This function takes in a list of RGB sub-lists and returns a dictionary of colors in RGB and hex form for the use in plotting.

Parameters:
  1. colors (list): The desired pairs of input colors.
  2. n (integer): The desired number of output colors.
Returns:
  1. N/A (list): The resulting colors forming linear gradients between all sequential pairs of colors.

3. vis.py

module:vis
platform:Unix, Windows
synopsis:This code is used as a visualization library for the Met Mast data so it is specifically designed to handle MetDat object from the “met_funcs.py” library.
moduleauthor:Nicholas Hamilton <Nicholas.Hamilton@nrel.gov> Rafael Mudafort <Rafael.Mudafort@nrel.gov> Lucas McCullum <Lucas.McCullum@nrel.gov>
vis.cumulative_profile(metdat, catinfo, category=None)

Get Variable Profile.

Plot the vertical profile of a given variable (or category of variables) grouped by a given condition (or set of conditions).

Parameters:
  1. metdat (Pandas DataFrame): The desired input data (Met Mast).
  2. catinfo (dictionary): Categorization information for the desired input data. Holds column names, labels, units, and save names.
  3. category (string): Specifies the category of information that is desired for plotting.
Returns:
  1. fig (Matplotlib Figure): The figure object for the desired input data and categories.
  2. ax (Matplotlib Axes): The axes object for the desired input data and categories.
vis.groupby_scatter(metdat, catinfo, category, abscissa='direction', groupby='ti', nbins=5, vertloc=80, basecolor='span')

Get Wind Direction Grouped Scatter Figure.

Plot the wind direction grouped scatter of a given variable (or category of variables) grouped by a given condition (or set of conditions).

Parameters:
  1. metdat (Pandas DataFrame): The desired input data (Met Mast).
  2. catinfo (dictionary): Categorization information for the desired input data. Holds column names, labels, units, and save names.
  3. category (string): Specifies the category of information that is desired for plotting.
  4. abscissa (string): independent variable to plot again
  5. groupby (string): Describes which categories to group by.
  6. nbins (integer): Divides the groupby variable into bins.
  7. vertloc (integer, float): Describes the desired vertical location alond the tower for analysis.
  8. basecolor (string): Provides the color code information to get from “utils.py”.
Returns:
  1. fig (Matplotlib Figure): The figure object for the desired input data and categories.
  2. ax (Matplotlib Axes): The axes object for the desired input data and categories.
vis.hist(metdat, catinfo, category, vertloc=80, basecolor='blue')

Get Histogram Figure.

Plot the histogram of a given variable (or category of variables) grouped by a given condition (or set of conditions).

Parameters:
  1. metdat (Pandas DataFrame): The desired input data (Met Mast).
  2. catinfo (dictionary): Categorization information for the desired input data. Holds column names, labels, units, and save names.
  3. category (string): Specifies the category of information that is desired for plotting.
  4. vertloc (integer, float): Describes the desired vertical location alond the tower for analysis.
  5. basecolor (string): Provides the color code information to get from “utils.py”.
Returns:
  1. fig (Matplotlib Figure): The figure object for the desired input data and categories.
  2. ax (Matplotlib Axes): The axes object for the desired input data and categories.
vis.hist_by_stability(metdat, catinfo, category, vertloc=80, basecolor='span')

Get Stability Grouped Histogram Figure.

Plot the stability grouped histogram of a given variable (or category of variables) grouped by a given condition (or set of conditions).

Parameters:
  1. metdat (Pandas DataFrame): The desired input data (Met Mast).
  2. catinfo (dictionary): Categorization information for the desired input data. Holds column names, labels, units, and save names.
  3. category (string): Specifies the category of information that is desired for plotting.
  4. vertloc (integer, float): Describes the desired vertical location alond the tower for analysis.
  5. basecolor (string): Provides the color code information to get from “utils.py”.
Returns:
  1. fig (Matplotlib Figure): The figure object for the desired input data and categories.
  2. ax (Matplotlib Axes): The axes object for the desired input data and categories.
vis.hourlyplot(metdat, catinfo, category=None, basecolor='span')

Get Hourly Averaged Profile.

Plot the hourly averaged profile of a given variable (or category of variables) grouped by a given condition (or set of conditions).

Parameters:
  1. metdat (Pandas DataFrame): The desired input data (Met Mast).
  2. catinfo (dictionary): Categorization information for the desired input data. Holds column names, labels, units, and save names.
  3. category (string): Specifies the category of information that is desired for plotting.
  4. basecolor (string): Provides the color code information to get from “utils.py”.
Returns:
  1. fig (Matplotlib Figure): The figure object for the desired input data and categories.
  2. ax (Matplotlib Axes): The axes object for the desired input data and categories.
vis.monthly_hist(metdat, catinfo, category, vertloc=80, basecolor='blue')

Get Monthly Histogram Figure.

Plot the monthly histogram of a given variable (or category of variables) grouped by a given condition (or set of conditions).

Parameters:
  1. metdat (Pandas DataFrame): The desired input data (Met Mast).
  2. catinfo (dictionary): Categorization information for the desired input data. Holds column names, labels, units, and save names.
  3. category (string): Specifies the category of information that is desired for plotting.
  4. vertloc (integer, float): Describes the desired vertical location alond the tower for analysis.
  5. basecolor (string): Provides the color code information to get from “utils.py”.
Returns:
  1. fig (Matplotlib Figure): The figure object for the desired input data and categories.
  2. ax (Matplotlib Axes): The axes object for the desired input data and categories.
vis.monthly_profile(metdat, catinfo, category=None, basecolor='cycle')

Get Monthly Profile.

Plot the monthly profile of a given variable (or category of variables) grouped by a given condition (or set of conditions).

Parameters:
  1. metdat (Pandas DataFrame): The desired input data (Met Mast).
  2. catinfo (dictionary): Categorization information for the desired input data. Holds column names, labels, units, and save names.
  3. category (string): Specifies the category of information that is desired for plotting.
  4. basecolor (string): Provides the color code information to get from “utils.py”.
Returns:
  1. fig (Matplotlib Figure): The figure object for the desired input data and categories.
  2. ax (Matplotlib Axes): The axes object for the desired input data and categories.
vis.monthly_rose_fig(metdat, catinfo, category=None, vertloc=80, bins=6, nsector=36, ylim=None, noleg=False)

Get Monthly Wind Rose Figure.

Plot the monthly wind rose of a given variable (or category of variables) grouped by a given condition (or set of conditions).

Parameters:
  1. metdat (Pandas DataFrame): The desired input data (Met Mast).
  2. catinfo (dictionary): Categorization information for the desired input data. Holds column names, labels, units, and save names.
  3. category (string): Specifies the category of information that is desired for plotting.
  4. vertloc (integer, float): Describes the desired vertical location alond the tower for analysis.
  5. bins (integer, list): Indicates the number of equally spaced bins to divide the variable.
  6. nsector (integer): Indicated the number of sector directions to divide the rose figure.
  7. ylim (float): Provides the maximum value for the frequency of observations and is used to plot different roses with uniform limits.
  8. noleg (Boolean): Determines whether or not there will be a legend to the figure.
Returns:
  1. fig (Matplotlib Figure): The figure object for the desired input data and categories.
  2. ax (Matplotlib Axes): The axes object for the desired input data and categories.
  3. leg (Matplotlib Legend): The legend object for the desired input data and categories.
vis.monthly_stability_profiles(metdat, catinfo, category=None, vertloc=80, basecolor='span')

Get Monthly Stability Profile.

Plot the monthly stability profile of a given variable (or category of variables) grouped by a given condition (or set of conditions).

Parameters:
  1. metdat (Pandas DataFrame): The desired input data (Met Mast).
  2. catinfo (dictionary): Categorization information for the desired input data. Holds column names, labels, units, and save names.
  3. category (string): Specifies the category of information that is desired for plotting.
  4. vertloc (integer, float): Describes the desired vertical location alond the tower for analysis.
  5. basecolor (string): Provides the color code information to get from “utils.py”.
Returns:
  1. fig (Matplotlib Figure): The figure object for the desired input data and categories.
  2. ax (Matplotlib Axes): The axes object for the desired input data and categories.
vis.monthly_stacked_hist_by_stability(metdat, catinfo, category, vertloc=80)

Get Monthly Stacked Stability Grouped Histogram Figure.

Plot the monthly stacked stability grouped histogram of a given variable (or category of variables) grouped by a given condition (or set of conditions).

Parameters:
  1. metdat (Pandas DataFrame): The desired input data (Met Mast).
  2. catinfo (dictionary): Categorization information for the desired input data. Holds column names, labels, units, and save names.
  3. category (string): Specifies the category of information that is desired for plotting.
  4. vertloc (integer, float): Describes the desired vertical location alond the tower for analysis.
Returns:
  1. fig (Matplotlib Figure): The figure object for the desired input data and categories.
  2. ax (Matplotlib Axes): The axes object for the desired input data and categories.
vis.monthlyhourlyplot(metdat, catinfo, category=None, basecolor='span')

Get Monthly Hourly Averaged Profile.

Plot the monthly hourly averaged profile of a given variable (or category of variables) grouped by a given condition (or set of conditions).

Parameters:
  1. metdat (Pandas DataFrame): The desired input data (Met Mast).
  2. catinfo (dictionary): Categorization information for the desired input data. Holds column names, labels, units, and save names.
  3. category (string): Specifies the category of information that is desired for plotting.
  4. basecolor (string): Provides the color code information to get from “utils.py”.
Returns:
  1. fig (Matplotlib Figure): The figure object for the desired input data and categories.
  2. ax (Matplotlib Axes): The axes object for the desired input data and categories.
vis.normalized_hist_by_stability(metdat, catinfo, vertloc=80)

Get Normalized Stability Grouped Histogram Figure.

Plot the normalized stability grouped histogram of a given variable (or category of variables) grouped by a given condition (or set of conditions).

Parameters:
  1. metdat (Pandas DataFrame): The desired input data (Met Mast).
  2. catinfo (dictionary): Categorization information for the desired input data. Holds column names, labels, units, and save names.
  3. vertloc (integer, float): Describes the desired vertical location alond the tower for analysis.
Returns:
  1. fig (Matplotlib Figure): The figure object for the desired input data and categories.
  2. ax (Matplotlib Axes): The axes object for the desired input data and categories.
vis.normalized_monthly_hist_by_stability(metdat, catinfo, vertloc=80)

Get Normalized Monthly Stability Grouped Histogram Figure.

Plot the normalized monthly stability grouped histogram of a given variable (or category of variables) grouped by a given condition (or set of conditions).

Parameters:
  1. metdat (Pandas DataFrame): The desired input data (Met Mast).
  2. catinfo (dictionary): Categorization information for the desired input data. Holds column names, labels, units, and save names.
  3. vertloc (integer, float): Describes the desired vertical location alond the tower for analysis.
Returns:
  1. fig (Matplotlib Figure): The figure object for the desired input data and categories.
  2. ax (Matplotlib Axes): The axes object for the desired input data and categories.
vis.rose_fig(metdat, catinfo, category=None, vertloc=80, bins=6, nsector=36, ylim=None, noleg=False)

Get Wind Rose Figure.

Plot the wind rose of a given variable (or category of variables) grouped by a given condition (or set of conditions).

Parameters:
  1. metdat (Pandas DataFrame): The desired input data (Met Mast).
  2. catinfo (dictionary): Categorization information for the desired input data. Holds column names, labels, units, and save names.
  3. category (string): Specifies the category of information that is desired for plotting.
  4. vertloc (integer, float): Describes the desired vertical location alond the tower for analysis.
  5. bins (integer, list): Indicates the number of equally spaced bins to divide the variable.
  6. nsector (integer): Indicated the number of sector directions to divide the rose figure.
  7. ylim (float): Provides the maximum value for the frequency of observations and is used to plot different roses with uniform limits.
  8. noleg (Boolean): Determines whether or not there will be a legend to the figure.
Returns:
  1. fig (Matplotlib Figure): The figure object for the desired input data and categories.
  2. ax (Matplotlib Axes): The axes object for the desired input data and categories.
  3. leg (Matplotlib Legend): The legend object for the desired input data and categories.
vis.stability_profile(metdat, catinfo, category=None, vertloc=80, basecolor='cycle')

Get Stability Profile.

Plot the stability profile of a given variable (or category of variables) grouped by a given condition (or set of conditions).

Parameters:
  1. metdat (Pandas DataFrame): The desired input data (Met Mast).
  2. catinfo (dictionary): Categorization information for the desired input data. Holds column names, labels, units, and save names.
  3. category (string): Specifies the category of information that is desired for plotting.
  4. vertloc (integer, float): Describes the desired vertical location alond the tower for analysis.
  5. basecolor (string): Provides the color code information to get from “utils.py”.
Returns:
  1. fig (Matplotlib Figure): The figure object for the desired input data and categories.
  2. ax (Matplotlib Axes): The axes object for the desired input data and categories.
vis.stability_winddir_scatter(metdat, catinfo, category, vertloc=80, basecolor='red', exclude_angles=[(46, 228)])

Get Wind Direction Stability Scatter Figure.

Plot the wind direction stability scatter of a given variable (or category of variables) grouped by a given condition (or set of conditions).

Parameters:
  1. metdat (Pandas DataFrame): The desired input data (Met Mast).
  2. catinfo (dictionary): Categorization information for the desired input data. Holds column names, labels, units, and save names.
  3. category (string): Specifies the category of information that is desired for plotting.
  4. vertloc (integer, float): Describes the desired vertical location alond the tower for analysis.
  5. basecolor (string): Provides the color code information to get from “utils.py”.
  6. exclude_angles (tuple, list): Defines the start and stop angles to shade out regions according to International Electrotechnical Commission (IEC) standards.
Returns:
  1. fig (Matplotlib Figure): The figure object for the desired input data and categories.
  2. ax (Matplotlib Axes): The axes object for the desired input data and categories.
vis.stacked_hist_by_stability(metdat, catinfo, category, vertloc=80)

Get Stacked Stability Grouped Histogram Figure.

Plot the stacked stability grouped histogram of a given variable (or category of variables) grouped by a given condition (or set of conditions).

Parameters:
  1. metdat (Pandas DataFrame): The desired input data (Met Mast).
  2. catinfo (dictionary): Categorization information for the desired input data. Holds column names, labels, units, and save names.
  3. category (string): Specifies the category of information that is desired for plotting.
  4. vertloc (integer, float): Describes the desired vertical location alond the tower for analysis.
Returns:
  1. fig (Matplotlib Figure): The figure object for the desired input data and categories.
  2. ax (Matplotlib Axes): The axes object for the desired input data and categories.
vis.winddir_scatter(metdat, catinfo, category, vertloc=80, basecolor='red', exclude_angles=[(46, 228)])

Get Wind Direction Scatter Figure.

Plot the wind direction scatter of a given variable (or category of variables) grouped by a given condition (or set of conditions).

Parameters:
  1. metdat (Pandas DataFrame): The desired input data (Met Mast).
  2. catinfo (dictionary): Categorization information for the desired input data. Holds column names, labels, units, and save names.
  3. category (string): Specifies the category of information that is desired for plotting.
  4. vertloc (integer, float): Describes the desired vertical location alond the tower for analysis.
  5. basecolor (string): Provides the color code information to get from “utils.py”.
  6. exclude_angles (tuple, list): Defines the start and stop angles to shade out regions according to International Electrotechnical Commission (IEC) standards.
Returns:
  1. fig (Matplotlib Figure): The figure object for the desired input data and categories.
  2. ax (Matplotlib Axes): The axes object for the desired input data and categories.

Indices and tables