From 011d31fb3e008130f3f9b57abd00c4c77b6e9b5a Mon Sep 17 00:00:00 2001 From: Simo Tukiainen Date: Tue, 14 Jan 2025 16:32:29 +0200 Subject: [PATCH] Add rain-gauges --- cloudnetpy_qc/quality.py | 1 + cloudnetpy_qc/variables.py | 14 +++++++++++++- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/cloudnetpy_qc/quality.py b/cloudnetpy_qc/quality.py index e8ad059..48ef566 100644 --- a/cloudnetpy_qc/quality.py +++ b/cloudnetpy_qc/quality.py @@ -275,6 +275,7 @@ class TestDataCoverage(Test): Product.MWR_MULTI: datetime.timedelta(minutes=30), Product.MWR_SINGLE: datetime.timedelta(minutes=5), Product.WEATHER_STATION: datetime.timedelta(minutes=10), + Product.RAIN_GAUGE: datetime.timedelta(minutes=1), Product.DOPPLER_LIDAR_WIND: datetime.timedelta(hours=1.5), } DEFAULT_RESOLUTION = datetime.timedelta(seconds=30) diff --git a/cloudnetpy_qc/variables.py b/cloudnetpy_qc/variables.py index be4dc0a..6fc69c9 100644 --- a/cloudnetpy_qc/variables.py +++ b/cloudnetpy_qc/variables.py @@ -21,6 +21,7 @@ class Product(Enum): DOPPLER_LIDAR = "doppler-lidar" DOPPLER_LIDAR_WIND = "doppler-lidar-wind" RAIN_RADAR = "rain-radar" + RAIN_GAUGE = "rain-gauge" # Level 1c CATEGORIZE = "categorize" MWR_L1C = "mwr-l1c" @@ -55,6 +56,7 @@ def all(cls) -> set[Product]: Product.MODEL: "1b", Product.WEATHER_STATION: "1b", Product.DOPPLER_LIDAR: "1b", + Product.RAIN_GAUGE: "1b", Product.DOPPLER_LIDAR_WIND: "1c", Product.RAIN_RADAR: "1b", Product.CATEGORIZE: "1c", @@ -170,7 +172,7 @@ def time_units(nc: netCDF4.Dataset) -> str: long_name="Rainfall amount", units="m", standard_name="thickness_of_rainfall_amount", - required=[Product.WEATHER_STATION], + required=[Product.WEATHER_STATION, Product.RAIN_GAUGE], ), # ------------------------------------ # Required in RAIN RADAR Level 1b file @@ -784,6 +786,7 @@ def time_units(nc: netCDF4.Dataset) -> str: units="m s-1", standard_name="rainfall_rate", required=[ + Product.RAIN_GAUGE, Product.DISDROMETER, Product.WEATHER_STATION, Product.RAIN_RADAR, @@ -851,6 +854,7 @@ def time_units(nc: netCDF4.Dataset) -> str: Product.MWR, Product.DISDROMETER, Product.WEATHER_STATION, + Product.RAIN_GAUGE, Product.MWR_L1C, Product.L3_CF, Product.L3_IWC, @@ -893,6 +897,14 @@ def time_units(nc: netCDF4.Dataset) -> str: long_name="Radar range offset", units="m", ), + "r_accum_RT": Variable( + long_name="Real time accumulated rainfall", + units="m", + ), + "r_accum_NRT": Variable( + long_name="Near real time accumulated rainfall", + units="m", + ), "rainfall_rate_1min_total": Variable( long_name="Total precipitation rate", units="m s-1",