From 41efc78f371b1b65d9bb4d4f6e44b38ea97cc2e8 Mon Sep 17 00:00:00 2001 From: Max Grover Date: Wed, 13 Mar 2024 17:12:33 -0500 Subject: [PATCH] FIX: Use existing time extraction in Py-ART in columnsect (#1529) --- pyart/util/columnsect.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pyart/util/columnsect.py b/pyart/util/columnsect.py index 405235644c..74f50ede17 100755 --- a/pyart/util/columnsect.py +++ b/pyart/util/columnsect.py @@ -9,6 +9,7 @@ import xarray as xr from ..core.transforms import antenna_vectors_to_cartesian +from .datetime_utils import datetime_from_radar def column_vertical_profile( @@ -350,8 +351,7 @@ def get_field_location(radar, latitude, longitude): # Determine the time at the center of each ray within the column # Define the start of the radar volume as a numpy datetime object for xr - # We take advantage of the "seconds since " portion of the units string - base_time = pd.to_datetime(radar.time["units"][14:]).to_numpy() + base_time = np.datetime64(datetime_from_radar(radar).isoformat()) # Convert Py-ART radar object time (time since volume start) to time delta # Add to base time to have sequential time within the xr Dataset # for easier future merging/work