pyrams.data_tools

Contains a collections of functions for working with RAMS data in Python

Functions

build_mfdataset(path, **kwargs)

Build and xarray dataset with a time dimension

calc_height(topt, ztn)

Calculates the height of each grid box

create_xr_metadata(ds[, flist, dims, dx, ...])

domain_mean_netcdf(ds_with_metadata, outfile)

Writes x/y domain-average from from an xarray dataset to outfile as NetCDF.

fix_duplicate_dims(ds, duped_dims, phony_dim)

Fixes duplicate dimensions (often with the same amount of x and y gridpoints), for use with xarray.open_mfdataset and xarray.combine_nested.

flist_to_times(flist)

Creates a list of datetimes from a list of RAMS output variables.

habit_count(habits, tmax)

Takes 3D habit data and tmax (number of time steps) and returns the number of each habit at each time step.

press_level(pressure, heights, plevels[, ...])

Calculates geopotential heights at a given pressure level

rewrite_to_netcdf(flist, output_path, ...[, ...])

Rewrites RAMS standard output files as netCDF4 with fixed dimension data, using data_tools.fix_duplicate_dims()

z_levels_2d(ztn, topt)

Calculates the gridbox heights for a 2-D grid

z_levels_3d(ztn, topt)

Calculates the gridbox heights for a 3-D grid

Classes

DataInfo(variable, longname, unit)

Deprecated.

DataVar(varname[, longname, unit])

A new class created to manage variables, their names, and units (replaces DataInfo)