nsrdb.utilities.file_utils

NSRDB data mover and manipulation utilities.

@author: gbuster

Functions

clean_meta(meta)

Converts NaN values in string columns to "None", timezone to int8, elevation to int16

convert_directory(path4, path5[, n_workers])

Convert a directory of hdf4 files to hdf5 in a new directory.

convert_h4(path4, f_h4, path5, f_h5)

Use a subprocess to convert a single h4 to h5 file.

convert_list_parallel(conversion_list[, ...])

Convert h4 to h5 files in parallel based on the conversion list.

convert_list_serial(conversion_list)

Convert h4 to h5 files in serial based on the conversion list.

daterange(start_date, end_date)

Create a range of dates.

get_conversion_list(path4, path5)

Get a list of hdf/h4 files to convert with source/target entries.

get_format_keys(format_string)

Extracts the keys used within a format string.

pd_date_range(*args, **kwargs)

A simple wrapper on the pd.date_range() method that handles the closed vs.

repack_h5(fpath[, f_new, inplace])

Repack an h5 file potentially decreasing its memory footprint.

str_replace_dict(string_rep, config)

Replace keys in string representation of a dictionary with user input values.

ts_freq_check(freq)

Checks freq argument for valid string

unzip_gz(target_path)

Unzip all *.gz files in the target path.

url_download(url, target)

Download file from url to target location.