From 8eca46f1036fa640a3f63111c23ca443fddb2218 Mon Sep 17 00:00:00 2001 From: Dan Nowacki Date: Mon, 26 Feb 2024 12:33:38 -0800 Subject: [PATCH] Add standard name and make it not be in an if-block. --- stglib/aqd/aqdutils.py | 51 ++++++++++++++++++++++-------------------- 1 file changed, 27 insertions(+), 24 deletions(-) diff --git a/stglib/aqd/aqdutils.py b/stglib/aqd/aqdutils.py index 4bceb700..4bd43883 100644 --- a/stglib/aqd/aqdutils.py +++ b/stglib/aqd/aqdutils.py @@ -1090,30 +1090,33 @@ def add_attributes(var, dsattrs): if "w_1204" in ds: ds["w_1204"].attrs["units"] = "m s-1" - if "vel1_1277" in ds: - ds["vel1_1277"].attrs.update( - { - "units": "m s-1", - "long_name": "Beam 1 Velocity", - "epic_code": 1277, - } - ) - if "vel2_1278" in ds: - ds["vel2_1278"].attrs.update( - { - "units": "m s-1", - "long_name": "Beam 2 Velocity", - "epic_code": 1278, - } - ) - if "vel3_1279" in ds: - ds["vel3_1279"].attrs.update( - { - "units": "m s-1", - "long_name": "Beam 3 Velocity", - "epic_code": 1279, - } - ) + if "vel1_1277" in ds: + ds["vel1_1277"].attrs.update( + { + "units": "m s-1", + "long_name": "Beam 1 Velocity", + "epic_code": 1277, + "standard_name": "radial_sea_water_velocity_away_from_instrument", + } + ) + if "vel2_1278" in ds: + ds["vel2_1278"].attrs.update( + { + "units": "m s-1", + "long_name": "Beam 2 Velocity", + "epic_code": 1278, + "standard_name": "radial_sea_water_velocity_away_from_instrument", + } + ) + if "vel3_1279" in ds: + ds["vel3_1279"].attrs.update( + { + "units": "m s-1", + "long_name": "Beam 3 Velocity", + "epic_code": 1279, + "standard_name": "radial_sea_water_velocity_away_from_instrument", + } + ) if "AGC1_1221" in ds: ds["AGC1_1221"].attrs.update(