act.utils

Description

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

Classes

ChangeUnits(xarray_obj)

Class for updating units in the object.

Functions

accumulate_precip(act_obj, variable[, ...])

Program to accumulate rain rates from an act object and insert variable back into act object 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(obj[, latitude, ...])

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

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(obj)

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

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

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

cleanup_files([dirname, files])

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

convert_to_potential_temp([obj, ...])

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(obj[, variables, sweep, ...])

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

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(obj[, variable, ...])

This function is to decode codes reported from automatic weather stations suchas 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.

get_missing_value(data_object, variable[, ...])

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([obj, ...])

Converts pressure for change in height.

height_adjusted_temperature([obj, ...])

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