diff --git a/cinrad/calc.py b/cinrad/calc.py index 4d19eb6..688a485 100644 --- a/cinrad/calc.py +++ b/cinrad/calc.py @@ -99,11 +99,21 @@ def quick_cr(r_list: Volume_T, resolution: tuple = (1000, 1000)) -> Dataset: xarray.Dataset: composite reflectivity """ r_data = list() - for i in r_list: + # Get grid from the first tilt + r, x, y = grid_2d( + r_list[0]["REF"].values, + r_list[0]["longitude"].values, + r_list[0]["latitude"].values, + resolution=resolution, + ) + r_data.append(r) + for i in r_list[1:]: r, x, y = grid_2d( i["REF"].values, i["longitude"].values, i["latitude"].values, + x_out=x, + y_out=y, resolution=resolution, ) r_data.append(r) diff --git a/cinrad/visualize/__init__.py b/cinrad/visualize/__init__.py index e89830f..009f9f3 100644 --- a/cinrad/visualize/__init__.py +++ b/cinrad/visualize/__init__.py @@ -3,7 +3,7 @@ import matplotlib -if 'Arial' in matplotlib.rc_params()['font.sans-serif']: +if "Arial" in matplotlib.rc_params()["font.sans-serif"]: matplotlib.rc("font", family="Arial") from cinrad.visualize.ppi import * from cinrad.visualize.rhi import * diff --git a/cinrad/visualize/utils.py b/cinrad/visualize/utils.py index 54031c6..1d430fd 100644 --- a/cinrad/visualize/utils.py +++ b/cinrad/visualize/utils.py @@ -144,9 +144,7 @@ def _get_uniform_cmap(cmap: Any) -> Any: _d = dic[0] _d["VELSZ"] = _d["VEL"] -font = FontProperties( - fname=get_font_path() -) +font = FontProperties(fname=get_font_path()) plot_kw = {"fontproperties": font, "fontsize": 12} @@ -315,7 +313,7 @@ def highlight_area( area: Union[Array_T, str], linecolor: str = "red", **kwargs ) -> List[Line2D]: r"""Return list of Line2D object for given area name""" - fpath = get_shp_file('City') + fpath = get_shp_file("City") shp = shapefile.Reader(fpath, encoding="gbk") rec = shp.shapeRecords() lines = list()