easyclimate.plot.icon.common¶
Shared ICON plotting helpers.
Functions¶
|
Convert radians to degrees. |
|
Wrap longitude to [center_lon - 180, center_lon + 180). |
|
Normalize a longitude window into a continuous increasing interval. |
|
Infer longitude wrapping center. |
|
Infer extent from valid lon/lat points. |
|
Weak check for Cartopy GeoAxes. |
|
Set Cartopy extent for continuous longitude windows. |
|
Infer a default colormap similar to xarray.plot. |
|
Read one-dimensional ICON cell data and metadata. |
|
Prepare wrapped ICON cell centers and extent metadata. |
|
Resolve contour levels, color limits, and extension mode. |
|
Mask triangles with too-long edges. |
|
Build or reuse a triangulation for ICON cell-center contouring. |
|
Read one-dimensional ICON cell vector components. |
|
Read, wrap, and subset ICON cell vectors for an explicit plot window. |
|
Thin vectors by lon-lat bins. |
|
Interpolate irregular ICON cell vectors onto a regular lon-lat grid. |
Module Contents¶
- easyclimate.plot.icon.common._rad2deg(x)¶
Convert radians to degrees.
- easyclimate.plot.icon.common._lon_wrap_to_center(lon, center_lon)¶
Wrap longitude to [center_lon - 180, center_lon + 180).
- easyclimate.plot.icon.common._normalize_lon_window(lon_min, lon_max)¶
Normalize a longitude window into a continuous increasing interval.
- easyclimate.plot.icon.common._infer_center_lon(lon_min=None, lon_max=None, lon_cell=None, valid=None)¶
Infer longitude wrapping center.
- easyclimate.plot.icon.common._infer_extent_from_points(lon, lat, margin=0.05)¶
Infer extent from valid lon/lat points.
- easyclimate.plot.icon.common._is_cartopy_axis(ax)¶
Weak check for Cartopy GeoAxes.
- easyclimate.plot.icon.common._set_cartopy_extent(ax, lon_min, lon_max, lat_min, lat_max)¶
Set Cartopy extent for continuous longitude windows.
GeoAxes.set_extentcan expand windows such as 110E to 220E to a global extent on shifted PlateCarree axes. For PlateCarree projections, convert the geographic longitudes into the target projection’s native x coordinate and set the extent in that coordinate system.
- easyclimate.plot.icon.common._infer_default_cmap(values, cmap=None, sequential='viridis', diverging='RdBu_r')¶
Infer a default colormap similar to xarray.plot.
- easyclimate.plot.icon.common._read_cell_data(da)¶
Read one-dimensional ICON cell data and metadata.
- easyclimate.plot.icon.common._prepare_cell_geometry(ds, da, *, lon_min=None, lon_max=None, lat_min=None, lat_max=None, auto_extent=True, extent_margin=0.05, global_plot=False, center_lon=None, input_radians=True, lon_name_cell='clon', lat_name_cell='clat')¶
Prepare wrapped ICON cell centers and extent metadata.
- easyclimate.plot.icon.common._resolve_contour_levels(values, levels, *, vmin=None, vmax=None, symmetric=False, percentile=98, extend=None)¶
Resolve contour levels, color limits, and extension mode.
- easyclimate.plot.icon.common._mask_bad_triangles(triang, x, y, max_edge=None)¶
Mask triangles with too-long edges.
- easyclimate.plot.icon.common._get_cached_triangulation(x, y, *, max_edge=None, cache_key=None, use_cache=True, precompute_trifinder=False)¶
Build or reuse a triangulation for ICON cell-center contouring.
- easyclimate.plot.icon.common._read_cell_vectors(u_da, v_da)¶
Read one-dimensional ICON cell vector components.
- easyclimate.plot.icon.common._prepare_vector_points(ds, u_da, v_da, *, lon_min, lon_max, lat_min, lat_max, center_lon=None, input_radians=True, lon_name_cell='clon', lat_name_cell='clat', padding_lon=0.0, padding_lat=0.0)¶
Read, wrap, and subset ICON cell vectors for an explicit plot window.
- easyclimate.plot.icon.common.thin_vectors_by_bins(x, y, u, v, *, lon_min, lon_max, lat_min, lat_max, nx_bins=35, ny_bins=20, method='nearest_center', cache_key=None, use_cache=True)¶
Thin vectors by lon-lat bins.
- easyclimate.plot.icon.common._interpolate_vectors_to_grid(x, y, u, v, *, lon_min, lon_max, lat_min, lat_max, nx=160, ny=100, max_triangle_edge=None, cache_key=None, use_triangulation_cache=True, min_valid_fraction=0.02)¶
Interpolate irregular ICON cell vectors onto a regular lon-lat grid.