Skip to content

Commit

Permalink
Add doppler-lidar-wind product
Browse files Browse the repository at this point in the history
  • Loading branch information
nikoleskinen committed Feb 14, 2024
1 parent 0568d10 commit 203eca6
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 3 deletions.
4 changes: 3 additions & 1 deletion cloudnetpy_qc/quality.py
Original file line number Diff line number Diff line change
Expand Up @@ -251,6 +251,7 @@ class TestDataCoverage(Test):
Product.MWR_MULTI: datetime.timedelta(minutes=20),
Product.MWR_SINGLE: datetime.timedelta(minutes=2),
Product.WEATHER_STATION: datetime.timedelta(minutes=10),
Product.DOPPLER_LIDAR_WIND: datetime.timedelta(hours=1.5),
}
DEFAULT_RESOLUTION = datetime.timedelta(seconds=30)

Expand Down Expand Up @@ -400,7 +401,7 @@ class TestGlobalAttributes(Test):
def _instrument_product(self, product: Product):
return (
LEVELS[product] == "1b" and product != Product.MODEL
) or product == Product.MWR_L1C
) or product in (Product.MWR_L1C, Product.DOPPLER_LIDAR_WIND)

def _required_attrs(self, product: Product):
attrs = set(self.REQUIRED_ATTRS)
Expand Down Expand Up @@ -691,6 +692,7 @@ class TestInstrumentPid(Test):
Product.RADAR,
Product.DISDROMETER,
Product.DOPPLER_LIDAR,
Product.DOPPLER_LIDAR_WIND,
Product.WEATHER_STATION,
]

Expand Down
16 changes: 14 additions & 2 deletions cloudnetpy_qc/variables.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ class Product(Enum):
MODEL = "model"
WEATHER_STATION = "weather-station"
DOPPLER_LIDAR = "doppler-lidar"
DOPPLER_LIDAR_WIND = "doppler-lidar-wind"
RAIN_RADAR = "rain-radar"
# Level 1c
CATEGORIZE = "categorize"
Expand Down Expand Up @@ -51,6 +52,7 @@ def all(cls) -> set[Product]:
Product.MODEL: "1b",
Product.WEATHER_STATION: "1b",
Product.DOPPLER_LIDAR: "1b",
Product.DOPPLER_LIDAR_WIND: "1c",
Product.RAIN_RADAR: "1b",
Product.CATEGORIZE: "1c",
Product.MWR_L1C: "1c",
Expand Down Expand Up @@ -189,12 +191,22 @@ def time_units(nc: netCDF4.Dataset) -> str:
"uwind": Variable(
long_name="Zonal wind",
units="m s-1",
required=[Product.CATEGORIZE],
required=[Product.CATEGORIZE, Product.DOPPLER_LIDAR_WIND],
),
"uwind_raw": Variable(
long_name="Non-screened zonal wind",
units="m s-1",
required=[Product.DOPPLER_LIDAR_WIND],
),
"vwind": Variable(
long_name="Meridional wind",
units="m s-1",
required=[Product.CATEGORIZE],
required=[Product.CATEGORIZE, Product.DOPPLER_LIDAR_WIND],
),
"vwind_raw": Variable(
long_name="Non-screened meridional wind",
units="m s-1",
required=[Product.DOPPLER_LIDAR_WIND],
),
"q": Variable(
long_name="Specific humidity",
Expand Down

0 comments on commit 203eca6

Please sign in to comment.