Get in Touch

Ask questions, suggest features or view source code on GitHub.

If an issue arrises please post on the GitHub issues.

API

Top-level functions

monet.dataset_to_monet(dset[, lat_name, ...])

Rename xarray DataArray or Dataset coordinate variables for use with monet functions, returning a new xarray object.

monet.rename_to_monet_latlon(ds)

Rename latitude/longitude variants to lat/lon, returning a new xarray object.

monet.rename_latlon(ds)

Rename latitude/longitude variants to lat/lon, returning a new xarray object.

Modules

monet.met_funcs

This package contains the main routines for estimating variables related to the Monin-Obukhov (MO) Similarity Theory, such as MO length, adiabatic correctors for heat and momentum transport.

monet.plots

monet.util

DataArray Accessor

DataArray.monet.wrap_longitudes([lon_name])

Ensures longitudes are from -180 -> 180

DataArray.monet.tidy([lon_name])

Tidy's DataArray–wraps longitudes and sorts lats and lons.

DataArray.monet.is_land([return_xarray])

Check the mask of land and ocean, returning corresponding boolean mask.

DataArray.monet.is_ocean([return_xarray])

Check the mask of land and ocean, returning corresponding boolean mask.

DataArray.monet.cftime_to_datetime64([name])

Convert to datetime64.

DataArray.monet.structure_for_monet([...])

This will attempt to restucture a given DataArray for use within MONET.

DataArray.monet.stratify(levels, vertical[, ...])

Resample in the vertical with stratify.

DataArray.monet.window([lat_min, lon_min, ...])

Function to window, ie select a specific region, given the lower left latitude and longitude and the upper right latitude and longitude

DataArray.monet.interp_constant_lat([lat, ...])

Interpolates the data array to constant longitude.

DataArray.monet.interp_constant_lon([lon])

Interpolates the data array to constant longitude.

DataArray.monet.nearest_ij([lat, lon])

Uses pyresample to interpolate to find the i, j index of grid with respect to the given lat lon.

DataArray.monet.nearest_latlon([lat, lon, ...])

Uses xesmf to interpolate to a given latitude and longitude.

DataArray.monet.quick_imshow([map_kws, ...])

This function takes an xarray DataArray and quickly cerates a figure using cartopy and the matplotlib imshow.

DataArray.monet.quick_map([map_kws, ...])

This function takes an xarray DataArray and quickly cerates a figure using cartopy and the matplotlib pcolormesh

DataArray.monet.quick_contourf([map_kws, ...])

This function takes an xarray DataArray and quickly cerates a figure using cartopy and the matplotlib contourf

DataArray.monet.remap_nearest(data, **kwargs)

Remap data from another grid to the current self grid using pyresample nearest-neighbor interpolation.

DataArray.monet.remap_xesmf(data, **kwargs)

Remap data from another grid to the current grid of self using xESMF.

DataArray.monet.combine_point(data[, ...])

Combine self data with point data in dataframe data.

Dataset Accessor

Dataset.monet.wrap_longitudes([lon_name])

Ensures longitudes are from -180 -> 180 Modifies self in place.

Dataset.monet.tidy([lon_name])

Tidy's Dataset–wraps longitudes and sorts lats and lons.

Dataset.monet.is_land([return_xarray])

checks the mask of land and ocean if the global_land_mask libra.

Dataset.monet.is_ocean([return_xarray])

checks the mask of land and ocean.

Dataset.monet.cftime_to_datetime64([name])

Convert to datetime64.

Dataset.monet.stratify(levels, vertical[, axis])

Resample in the vertical with stratify.

Dataset.monet.window(lat_min, lon_min, ...)

Function to window, ie select a specific region, given the lower left latitude and longitude and the upper right latitude and longitude

Dataset.monet.interp_constant_lat([lat, ...])

Interpolates the data array to constant longitude.

Dataset.monet.interp_constant_lon([lon])

Interpolates the data array to constant longitude.

Dataset.monet.nearest_ij([lat, lon])

Uses pyresample to interpolate to find the i, j index of grid with respect to the given lat lon.

Dataset.monet.nearest_latlon([lat, lon, ...])

Uses xesmf to interpolate to a given latitude and longitude.

Dataset.monet.remap_nearest(data[, ...])

Remap data from another grid to the current self grid using pyresample nearest-neighbor interpolation.

Dataset.monet.remap_nearest_unstructured(data)

Find the closest model data (data) to the observation (self) for unstructured grid model data.

Dataset.monet.remap_xesmf(data, **kwargs)

Remap data from another grid to the current grid of self using xESMF.

Dataset.monet.combine_point(data[, suffix, ...])

Combine self data with point data in dataframe data.

DataFrame Accessor

DataFrame.monet.to_ascii2nc_df([grib_code, ...])

DataFrame.monet.to_ascii2nc_list(**kwargs)

DataFrame.monet.rename_for_monet([df])

Rename latitude and longitude columns in the DataFrame.

DataFrame.monet.get_sparse_SwathDefinition()

Creates a pyreample.geometry.SwathDefinition for a single point.

DataFrame.monet.remap_nearest(df[, ...])

Remap data in df to nearest points in self.

DataFrame.monet.cftime_to_datetime64([col])

Convert to datetime64.

DataFrame.monet.center

The geographic center point of this DataFrame.