act.utils#

Description

This module contains the common procedures used by all modules of the ARM Community Toolkit.

Classes

ChangeUnits(ds)

Class for updating units in the dataset.

DatastreamParserARM([ds])

Class to parse ARM datastream names or filenames into its components.

Functions

accumulate_precip(ds, variable[, time_delta])

Program to accumulate rain rates from an act xarray dataset and insert variable back into an act xarray dataset with "_accumulated" appended to the variable name.

add_in_nan(time, data)

This procedure adds in NaNs when there is a larger than expected time step.

add_solar_variable(ds[, latitude, ...])

Add variable to the dataset to denote night (0) or sun (1).

adjust_timestamp(ds[, time_bounds, align, ...])

Will adjust the timestamp based on the time_bounds or other information so that the timestamp aligns with user preference.

arm_site_location_search([site_code, ...])

Parameters:
  • site_code (str) -- ARM site code to retrieve facilities and coordinate information. Example and default

arm_standards_validator([file, dataset, verbose])

ARM Data Validator (ADV) - Checks to ensure that ARM standards are being followed in the files or dataset passed to it.

assign_coordinates(ds, coord_list)

This procedure will create a new ACT dataset whose coordinates are designated to be the variables in a given list.

calc_cog_sog(ds)

This function calculates the course and speed over ground of a moving platform using the lat/lon.

calculate_dqr_times(ds[, variable, ...])

Function to retrieve start and end times of missing or bad data.

calculate_percentages(ds, fields[, time, ...])

This function calculates percentages of different fields of a dataset.

cleanup_files([dirname, files])

Cleans up files and directory possibly created from unpacking TAR files with unpack_tar()

convert_2d_to_1d(ds[, parse, variables, ...])

Function to convert a single 2D variable into multiple 1D variables using the second dimension in the new variable name.

convert_to_potential_temp([ds, ...])

Converts temperature to potential temperature.

convert_units(data, in_units, out_units)

Wrapper function around library to convert data using unit strings.

create_pyart_obj(ds[, variables, sweep, ...])

Produces a Py-ART radar object based on data in the ACT Xarray dataset.

date_parser(date_string[, output_format, ...])

Converts one datetime string to another or to a datetime object.

dates_between(sdate, edate)

Ths procedure returns all of the dates between sdate and edate.

datetime64_to_datetime(time)

Given a numpy datetime64 array time series, return datetime (y, m, d, h, m, s)

decode_present_weather(ds[, variable, ...])

This function is to decode codes reported from automatic weather stations such as the PWD22.

destination_azimuth_distance(lat, lon, az, dist)

This procedure will calculate a destination lat/lon from an initial lat/lon and azimuth and distance.

determine_time_delta(time[, default])

Returns the most likely time step in seconds by analyzing the difference in time steps.

generate_movie(images[, write_filename, fps])

Creates a movie from a list of images or convert movie to different type

get_missing_value(ds, variable[, default, ...])

Function to get missing value from missing_value or _FillValue attribute.

get_solar_azimuth_elevation([latitude, ...])

Calculate solar azimuth, elevation and solar distance.

get_sunrise_sunset_noon([latitude, ...])

Calculate sunrise, sunset and local solar noon times.

height_adjusted_pressure([ds, ...])

Converts pressure for change in height.

height_adjusted_temperature([ds, ...])

Converts temperature for change in height.

is_gunzip_file(filepath)

Function to test if file is a gunzip file.

is_sun_visible([latitude, longitude, ...])

Determine if sun is above horizon at for a list of times.

numpy_to_arm_date(_date[, returnTime])

Given a numpy datetime64, return an ARM standard date (yyyymmdd).

pack_gzip(filename[, write_directory, remove])

Creates a gunzip file from a filename path

pack_tar(filenames[, write_filename, ...])

Creates TAR file from list of filenames provided.

planck_converter([wnum, radiance, ...])

Planck function to convert radiance to temperature or temperature to radiance given a corresponding wavenumber value.

proc_scog(_GEOD, lon2, lat2, lon1, lat1, ...)

This procedure is to only be used by the calc_cog_sog function for dask delayed processing.

reduce_time_ranges(time[, time_delta, ...])

Given a time series, this function will return a list of tuples of time ranges representing the contineous times where no data is detected missing.

ts_weighted_average(ts_dict)

Program to take in multiple difference time-series and average them using the weights provided.

unpack_gzip(filename[, write_directory, remove])

Extracts file from a gunzip file.

unpack_tar(tar_files[, write_directory, ...])

Unpacks TAR file contents into provided base directory