cloudnetpy 1.74.3__tar.gz → 1.75.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {cloudnetpy-1.74.3/cloudnetpy.egg-info → cloudnetpy-1.75.0}/PKG-INFO +2 -2
- {cloudnetpy-1.74.3 → cloudnetpy-1.75.0}/cloudnetpy/instruments/hatpro.py +18 -5
- {cloudnetpy-1.74.3 → cloudnetpy-1.75.0}/cloudnetpy/instruments/instruments.py +14 -0
- {cloudnetpy-1.74.3 → cloudnetpy-1.75.0}/cloudnetpy/instruments/rpg.py +3 -6
- {cloudnetpy-1.74.3 → cloudnetpy-1.75.0}/cloudnetpy/plotting/plotting.py +2 -2
- {cloudnetpy-1.74.3 → cloudnetpy-1.75.0}/cloudnetpy/products/__init__.py +1 -1
- {cloudnetpy-1.74.3 → cloudnetpy-1.75.0}/cloudnetpy/products/mwr_tools.py +37 -3
- {cloudnetpy-1.74.3 → cloudnetpy-1.75.0}/cloudnetpy/version.py +2 -2
- {cloudnetpy-1.74.3 → cloudnetpy-1.75.0/cloudnetpy.egg-info}/PKG-INFO +2 -2
- {cloudnetpy-1.74.3 → cloudnetpy-1.75.0}/cloudnetpy.egg-info/requires.txt +1 -1
- {cloudnetpy-1.74.3 → cloudnetpy-1.75.0}/pyproject.toml +1 -1
- {cloudnetpy-1.74.3 → cloudnetpy-1.75.0}/LICENSE +0 -0
- {cloudnetpy-1.74.3 → cloudnetpy-1.75.0}/MANIFEST.in +0 -0
- {cloudnetpy-1.74.3 → cloudnetpy-1.75.0}/README.md +0 -0
- {cloudnetpy-1.74.3 → cloudnetpy-1.75.0}/cloudnetpy/__init__.py +0 -0
- {cloudnetpy-1.74.3 → cloudnetpy-1.75.0}/cloudnetpy/categorize/__init__.py +0 -0
- {cloudnetpy-1.74.3 → cloudnetpy-1.75.0}/cloudnetpy/categorize/atmos_utils.py +0 -0
- {cloudnetpy-1.74.3 → cloudnetpy-1.75.0}/cloudnetpy/categorize/attenuation.py +0 -0
- {cloudnetpy-1.74.3 → cloudnetpy-1.75.0}/cloudnetpy/categorize/attenuations/__init__.py +0 -0
- {cloudnetpy-1.74.3 → cloudnetpy-1.75.0}/cloudnetpy/categorize/attenuations/gas_attenuation.py +0 -0
- {cloudnetpy-1.74.3 → cloudnetpy-1.75.0}/cloudnetpy/categorize/attenuations/liquid_attenuation.py +0 -0
- {cloudnetpy-1.74.3 → cloudnetpy-1.75.0}/cloudnetpy/categorize/attenuations/melting_attenuation.py +0 -0
- {cloudnetpy-1.74.3 → cloudnetpy-1.75.0}/cloudnetpy/categorize/attenuations/rain_attenuation.py +0 -0
- {cloudnetpy-1.74.3 → cloudnetpy-1.75.0}/cloudnetpy/categorize/categorize.py +0 -0
- {cloudnetpy-1.74.3 → cloudnetpy-1.75.0}/cloudnetpy/categorize/classify.py +0 -0
- {cloudnetpy-1.74.3 → cloudnetpy-1.75.0}/cloudnetpy/categorize/containers.py +0 -0
- {cloudnetpy-1.74.3 → cloudnetpy-1.75.0}/cloudnetpy/categorize/disdrometer.py +0 -0
- {cloudnetpy-1.74.3 → cloudnetpy-1.75.0}/cloudnetpy/categorize/droplet.py +0 -0
- {cloudnetpy-1.74.3 → cloudnetpy-1.75.0}/cloudnetpy/categorize/falling.py +0 -0
- {cloudnetpy-1.74.3 → cloudnetpy-1.75.0}/cloudnetpy/categorize/freezing.py +0 -0
- {cloudnetpy-1.74.3 → cloudnetpy-1.75.0}/cloudnetpy/categorize/insects.py +0 -0
- {cloudnetpy-1.74.3 → cloudnetpy-1.75.0}/cloudnetpy/categorize/itu.py +0 -0
- {cloudnetpy-1.74.3 → cloudnetpy-1.75.0}/cloudnetpy/categorize/lidar.py +0 -0
- {cloudnetpy-1.74.3 → cloudnetpy-1.75.0}/cloudnetpy/categorize/melting.py +0 -0
- {cloudnetpy-1.74.3 → cloudnetpy-1.75.0}/cloudnetpy/categorize/model.py +0 -0
- {cloudnetpy-1.74.3 → cloudnetpy-1.75.0}/cloudnetpy/categorize/mwr.py +0 -0
- {cloudnetpy-1.74.3 → cloudnetpy-1.75.0}/cloudnetpy/categorize/radar.py +0 -0
- {cloudnetpy-1.74.3 → cloudnetpy-1.75.0}/cloudnetpy/cli.py +0 -0
- {cloudnetpy-1.74.3 → cloudnetpy-1.75.0}/cloudnetpy/cloudnetarray.py +0 -0
- {cloudnetpy-1.74.3 → cloudnetpy-1.75.0}/cloudnetpy/concat_lib.py +0 -0
- {cloudnetpy-1.74.3 → cloudnetpy-1.75.0}/cloudnetpy/constants.py +0 -0
- {cloudnetpy-1.74.3 → cloudnetpy-1.75.0}/cloudnetpy/datasource.py +0 -0
- {cloudnetpy-1.74.3 → cloudnetpy-1.75.0}/cloudnetpy/exceptions.py +0 -0
- {cloudnetpy-1.74.3 → cloudnetpy-1.75.0}/cloudnetpy/instruments/__init__.py +0 -0
- {cloudnetpy-1.74.3 → cloudnetpy-1.75.0}/cloudnetpy/instruments/basta.py +0 -0
- {cloudnetpy-1.74.3 → cloudnetpy-1.75.0}/cloudnetpy/instruments/bowtie.py +0 -0
- {cloudnetpy-1.74.3 → cloudnetpy-1.75.0}/cloudnetpy/instruments/ceilo.py +0 -0
- {cloudnetpy-1.74.3 → cloudnetpy-1.75.0}/cloudnetpy/instruments/ceilometer.py +0 -0
- {cloudnetpy-1.74.3 → cloudnetpy-1.75.0}/cloudnetpy/instruments/cl61d.py +0 -0
- {cloudnetpy-1.74.3 → cloudnetpy-1.75.0}/cloudnetpy/instruments/cloudnet_instrument.py +0 -0
- {cloudnetpy-1.74.3 → cloudnetpy-1.75.0}/cloudnetpy/instruments/copernicus.py +0 -0
- {cloudnetpy-1.74.3 → cloudnetpy-1.75.0}/cloudnetpy/instruments/disdrometer/__init__.py +0 -0
- {cloudnetpy-1.74.3 → cloudnetpy-1.75.0}/cloudnetpy/instruments/disdrometer/common.py +0 -0
- {cloudnetpy-1.74.3 → cloudnetpy-1.75.0}/cloudnetpy/instruments/disdrometer/parsivel.py +0 -0
- {cloudnetpy-1.74.3 → cloudnetpy-1.75.0}/cloudnetpy/instruments/disdrometer/thies.py +0 -0
- {cloudnetpy-1.74.3 → cloudnetpy-1.75.0}/cloudnetpy/instruments/galileo.py +0 -0
- {cloudnetpy-1.74.3 → cloudnetpy-1.75.0}/cloudnetpy/instruments/lufft.py +0 -0
- {cloudnetpy-1.74.3 → cloudnetpy-1.75.0}/cloudnetpy/instruments/mira.py +0 -0
- {cloudnetpy-1.74.3 → cloudnetpy-1.75.0}/cloudnetpy/instruments/mrr.py +0 -0
- {cloudnetpy-1.74.3 → cloudnetpy-1.75.0}/cloudnetpy/instruments/nc_lidar.py +0 -0
- {cloudnetpy-1.74.3 → cloudnetpy-1.75.0}/cloudnetpy/instruments/nc_radar.py +0 -0
- {cloudnetpy-1.74.3 → cloudnetpy-1.75.0}/cloudnetpy/instruments/pollyxt.py +0 -0
- {cloudnetpy-1.74.3 → cloudnetpy-1.75.0}/cloudnetpy/instruments/radiometrics.py +0 -0
- {cloudnetpy-1.74.3 → cloudnetpy-1.75.0}/cloudnetpy/instruments/rain_e_h3.py +0 -0
- {cloudnetpy-1.74.3 → cloudnetpy-1.75.0}/cloudnetpy/instruments/rpg_reader.py +0 -0
- {cloudnetpy-1.74.3 → cloudnetpy-1.75.0}/cloudnetpy/instruments/toa5.py +0 -0
- {cloudnetpy-1.74.3 → cloudnetpy-1.75.0}/cloudnetpy/instruments/vaisala.py +0 -0
- {cloudnetpy-1.74.3 → cloudnetpy-1.75.0}/cloudnetpy/instruments/weather_station.py +0 -0
- {cloudnetpy-1.74.3 → cloudnetpy-1.75.0}/cloudnetpy/metadata.py +0 -0
- {cloudnetpy-1.74.3 → cloudnetpy-1.75.0}/cloudnetpy/model_evaluation/__init__.py +0 -0
- {cloudnetpy-1.74.3 → cloudnetpy-1.75.0}/cloudnetpy/model_evaluation/file_handler.py +0 -0
- {cloudnetpy-1.74.3 → cloudnetpy-1.75.0}/cloudnetpy/model_evaluation/metadata.py +0 -0
- {cloudnetpy-1.74.3 → cloudnetpy-1.75.0}/cloudnetpy/model_evaluation/model_metadata.py +0 -0
- {cloudnetpy-1.74.3 → cloudnetpy-1.75.0}/cloudnetpy/model_evaluation/plotting/__init__.py +0 -0
- {cloudnetpy-1.74.3 → cloudnetpy-1.75.0}/cloudnetpy/model_evaluation/plotting/plot_meta.py +0 -0
- {cloudnetpy-1.74.3 → cloudnetpy-1.75.0}/cloudnetpy/model_evaluation/plotting/plot_tools.py +0 -0
- {cloudnetpy-1.74.3 → cloudnetpy-1.75.0}/cloudnetpy/model_evaluation/plotting/plotting.py +0 -0
- {cloudnetpy-1.74.3 → cloudnetpy-1.75.0}/cloudnetpy/model_evaluation/products/__init__.py +0 -0
- {cloudnetpy-1.74.3 → cloudnetpy-1.75.0}/cloudnetpy/model_evaluation/products/advance_methods.py +0 -0
- {cloudnetpy-1.74.3 → cloudnetpy-1.75.0}/cloudnetpy/model_evaluation/products/grid_methods.py +0 -0
- {cloudnetpy-1.74.3 → cloudnetpy-1.75.0}/cloudnetpy/model_evaluation/products/model_products.py +0 -0
- {cloudnetpy-1.74.3 → cloudnetpy-1.75.0}/cloudnetpy/model_evaluation/products/observation_products.py +0 -0
- {cloudnetpy-1.74.3 → cloudnetpy-1.75.0}/cloudnetpy/model_evaluation/products/product_resampling.py +0 -0
- {cloudnetpy-1.74.3 → cloudnetpy-1.75.0}/cloudnetpy/model_evaluation/products/tools.py +0 -0
- {cloudnetpy-1.74.3 → cloudnetpy-1.75.0}/cloudnetpy/model_evaluation/statistics/__init__.py +0 -0
- {cloudnetpy-1.74.3 → cloudnetpy-1.75.0}/cloudnetpy/model_evaluation/statistics/statistical_methods.py +0 -0
- {cloudnetpy-1.74.3 → cloudnetpy-1.75.0}/cloudnetpy/model_evaluation/tests/__init__.py +0 -0
- {cloudnetpy-1.74.3 → cloudnetpy-1.75.0}/cloudnetpy/model_evaluation/tests/e2e/__init__.py +0 -0
- {cloudnetpy-1.74.3 → cloudnetpy-1.75.0}/cloudnetpy/model_evaluation/tests/e2e/conftest.py +0 -0
- {cloudnetpy-1.74.3 → cloudnetpy-1.75.0}/cloudnetpy/model_evaluation/tests/e2e/process_cf/__init__.py +0 -0
- {cloudnetpy-1.74.3 → cloudnetpy-1.75.0}/cloudnetpy/model_evaluation/tests/e2e/process_cf/main.py +0 -0
- {cloudnetpy-1.74.3 → cloudnetpy-1.75.0}/cloudnetpy/model_evaluation/tests/e2e/process_cf/tests.py +0 -0
- {cloudnetpy-1.74.3 → cloudnetpy-1.75.0}/cloudnetpy/model_evaluation/tests/e2e/process_iwc/__init__.py +0 -0
- {cloudnetpy-1.74.3 → cloudnetpy-1.75.0}/cloudnetpy/model_evaluation/tests/e2e/process_iwc/main.py +0 -0
- {cloudnetpy-1.74.3 → cloudnetpy-1.75.0}/cloudnetpy/model_evaluation/tests/e2e/process_iwc/tests.py +0 -0
- {cloudnetpy-1.74.3 → cloudnetpy-1.75.0}/cloudnetpy/model_evaluation/tests/e2e/process_lwc/__init__.py +0 -0
- {cloudnetpy-1.74.3 → cloudnetpy-1.75.0}/cloudnetpy/model_evaluation/tests/e2e/process_lwc/main.py +0 -0
- {cloudnetpy-1.74.3 → cloudnetpy-1.75.0}/cloudnetpy/model_evaluation/tests/e2e/process_lwc/tests.py +0 -0
- {cloudnetpy-1.74.3 → cloudnetpy-1.75.0}/cloudnetpy/model_evaluation/tests/unit/__init__.py +0 -0
- {cloudnetpy-1.74.3 → cloudnetpy-1.75.0}/cloudnetpy/model_evaluation/tests/unit/conftest.py +0 -0
- {cloudnetpy-1.74.3 → cloudnetpy-1.75.0}/cloudnetpy/model_evaluation/tests/unit/test_advance_methods.py +0 -0
- {cloudnetpy-1.74.3 → cloudnetpy-1.75.0}/cloudnetpy/model_evaluation/tests/unit/test_grid_methods.py +0 -0
- {cloudnetpy-1.74.3 → cloudnetpy-1.75.0}/cloudnetpy/model_evaluation/tests/unit/test_model_products.py +0 -0
- {cloudnetpy-1.74.3 → cloudnetpy-1.75.0}/cloudnetpy/model_evaluation/tests/unit/test_observation_products.py +0 -0
- {cloudnetpy-1.74.3 → cloudnetpy-1.75.0}/cloudnetpy/model_evaluation/tests/unit/test_plot_tools.py +0 -0
- {cloudnetpy-1.74.3 → cloudnetpy-1.75.0}/cloudnetpy/model_evaluation/tests/unit/test_plotting.py +0 -0
- {cloudnetpy-1.74.3 → cloudnetpy-1.75.0}/cloudnetpy/model_evaluation/tests/unit/test_statistical_methods.py +0 -0
- {cloudnetpy-1.74.3 → cloudnetpy-1.75.0}/cloudnetpy/model_evaluation/tests/unit/test_tools.py +0 -0
- {cloudnetpy-1.74.3 → cloudnetpy-1.75.0}/cloudnetpy/model_evaluation/utils.py +0 -0
- {cloudnetpy-1.74.3 → cloudnetpy-1.75.0}/cloudnetpy/output.py +0 -0
- {cloudnetpy-1.74.3 → cloudnetpy-1.75.0}/cloudnetpy/plotting/__init__.py +0 -0
- {cloudnetpy-1.74.3 → cloudnetpy-1.75.0}/cloudnetpy/plotting/plot_meta.py +0 -0
- {cloudnetpy-1.74.3 → cloudnetpy-1.75.0}/cloudnetpy/products/classification.py +0 -0
- {cloudnetpy-1.74.3 → cloudnetpy-1.75.0}/cloudnetpy/products/der.py +0 -0
- {cloudnetpy-1.74.3 → cloudnetpy-1.75.0}/cloudnetpy/products/drizzle.py +0 -0
- {cloudnetpy-1.74.3 → cloudnetpy-1.75.0}/cloudnetpy/products/drizzle_error.py +0 -0
- {cloudnetpy-1.74.3 → cloudnetpy-1.75.0}/cloudnetpy/products/drizzle_tools.py +0 -0
- {cloudnetpy-1.74.3 → cloudnetpy-1.75.0}/cloudnetpy/products/epsilon.py +0 -0
- {cloudnetpy-1.74.3 → cloudnetpy-1.75.0}/cloudnetpy/products/ier.py +0 -0
- {cloudnetpy-1.74.3 → cloudnetpy-1.75.0}/cloudnetpy/products/iwc.py +0 -0
- {cloudnetpy-1.74.3 → cloudnetpy-1.75.0}/cloudnetpy/products/lwc.py +0 -0
- {cloudnetpy-1.74.3 → cloudnetpy-1.75.0}/cloudnetpy/products/mie_lu_tables.nc +0 -0
- {cloudnetpy-1.74.3 → cloudnetpy-1.75.0}/cloudnetpy/products/product_tools.py +0 -0
- {cloudnetpy-1.74.3 → cloudnetpy-1.75.0}/cloudnetpy/py.typed +0 -0
- {cloudnetpy-1.74.3 → cloudnetpy-1.75.0}/cloudnetpy/utils.py +0 -0
- {cloudnetpy-1.74.3 → cloudnetpy-1.75.0}/cloudnetpy.egg-info/SOURCES.txt +0 -0
- {cloudnetpy-1.74.3 → cloudnetpy-1.75.0}/cloudnetpy.egg-info/dependency_links.txt +0 -0
- {cloudnetpy-1.74.3 → cloudnetpy-1.75.0}/cloudnetpy.egg-info/entry_points.txt +0 -0
- {cloudnetpy-1.74.3 → cloudnetpy-1.75.0}/cloudnetpy.egg-info/top_level.txt +0 -0
- {cloudnetpy-1.74.3 → cloudnetpy-1.75.0}/docs/source/conf.py +0 -0
- {cloudnetpy-1.74.3 → cloudnetpy-1.75.0}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: cloudnetpy
|
3
|
-
Version: 1.
|
3
|
+
Version: 1.75.0
|
4
4
|
Summary: Python package for Cloudnet processing
|
5
5
|
Author: Simo Tukiainen
|
6
6
|
License: MIT License
|
@@ -41,7 +41,7 @@ License-File: LICENSE
|
|
41
41
|
Requires-Dist: ceilopyter
|
42
42
|
Requires-Dist: doppy>=0.5.0
|
43
43
|
Requires-Dist: matplotlib
|
44
|
-
Requires-Dist: mwrpy>=1.
|
44
|
+
Requires-Dist: mwrpy>=1.3.0
|
45
45
|
Requires-Dist: netCDF4
|
46
46
|
Requires-Dist: requests
|
47
47
|
Requires-Dist: rpgpy>=0.14.5
|
@@ -4,6 +4,7 @@ import datetime
|
|
4
4
|
import logging
|
5
5
|
from collections import defaultdict
|
6
6
|
from pathlib import Path
|
7
|
+
from typing import Literal
|
7
8
|
|
8
9
|
import netCDF4
|
9
10
|
import numpy as np
|
@@ -17,7 +18,7 @@ from cloudnetpy import output, utils
|
|
17
18
|
from cloudnetpy.cloudnetarray import CloudnetArray
|
18
19
|
from cloudnetpy.exceptions import HatproDataError, ValidTimeStampError
|
19
20
|
from cloudnetpy.instruments import rpg
|
20
|
-
from cloudnetpy.instruments.instruments import HATPRO
|
21
|
+
from cloudnetpy.instruments.instruments import HATPRO, LHATPRO, LHUMPRO_U90, Instrument
|
21
22
|
from cloudnetpy.instruments.rpg_reader import (
|
22
23
|
HatproBin,
|
23
24
|
HatproBinCombined,
|
@@ -25,11 +26,19 @@ from cloudnetpy.instruments.rpg_reader import (
|
|
25
26
|
HatproBinLwp,
|
26
27
|
)
|
27
28
|
|
29
|
+
IType = Literal["hatpro", "lhatpro", "lhumpro_u90"]
|
30
|
+
ITYPE_MAP: dict[IType, Instrument] = {
|
31
|
+
"hatpro": HATPRO,
|
32
|
+
"lhatpro": LHATPRO,
|
33
|
+
"lhumpro_u90": LHUMPRO_U90,
|
34
|
+
}
|
35
|
+
|
28
36
|
|
29
37
|
def hatpro2l1c(
|
30
38
|
mwr_dir: str,
|
31
39
|
output_file: str,
|
32
40
|
site_meta: dict,
|
41
|
+
instrument_type: IType = "hatpro",
|
33
42
|
uuid: str | None = None,
|
34
43
|
date: datetime.date | str | None = None,
|
35
44
|
) -> str:
|
@@ -39,6 +48,7 @@ def hatpro2l1c(
|
|
39
48
|
mwr_dir: Folder containing one day of HATPRO files.
|
40
49
|
output_file: Output file name.
|
41
50
|
site_meta: Dictionary containing information about the site and instrument
|
51
|
+
instrument_type: Specific type of the RPG microwave radiometer.
|
42
52
|
uuid: Set specific UUID for the file.
|
43
53
|
date: Expected date in the input files.
|
44
54
|
|
@@ -55,6 +65,7 @@ def hatpro2l1c(
|
|
55
65
|
hatpro_raw = lev1_to_nc(
|
56
66
|
"1C01",
|
57
67
|
mwr_dir,
|
68
|
+
instrument_type=instrument_type,
|
58
69
|
output_file=output_file,
|
59
70
|
coeff_files=coeff_files,
|
60
71
|
instrument_config=site_meta,
|
@@ -64,7 +75,7 @@ def hatpro2l1c(
|
|
64
75
|
except MissingInputData as err:
|
65
76
|
raise HatproDataError(str(err)) from err
|
66
77
|
|
67
|
-
hatpro = HatproL1c(hatpro_raw, site_meta)
|
78
|
+
hatpro = HatproL1c(hatpro_raw, site_meta, ITYPE_MAP[instrument_type])
|
68
79
|
|
69
80
|
flags = hatpro.data["quality_flag"][:]
|
70
81
|
bad_percentage = ma.sum(flags != 0) / flags.size * 100
|
@@ -123,18 +134,19 @@ def hatpro2l1c(
|
|
123
134
|
|
124
135
|
|
125
136
|
class HatproL1c:
|
126
|
-
def __init__(self, hatpro, site_meta: dict):
|
137
|
+
def __init__(self, hatpro, site_meta: dict, instrument: Instrument):
|
127
138
|
self.raw_data = hatpro.raw_data
|
128
139
|
self.data = hatpro.data
|
129
140
|
self.date = hatpro.date.isoformat().split("-")
|
130
141
|
self.site_meta = site_meta
|
131
|
-
self.instrument =
|
142
|
+
self.instrument = instrument
|
132
143
|
|
133
144
|
|
134
145
|
def hatpro2nc(
|
135
146
|
path_to_files: str,
|
136
147
|
output_file: str,
|
137
148
|
site_meta: dict,
|
149
|
+
instrument_type: IType = "hatpro",
|
138
150
|
uuid: str | None = None,
|
139
151
|
date: str | None = None,
|
140
152
|
) -> tuple[str, list]:
|
@@ -154,6 +166,7 @@ def hatpro2nc(
|
|
154
166
|
- `latitude` (optional).
|
155
167
|
- `longitude` (optional).
|
156
168
|
|
169
|
+
instrument_type: Specific type of the RPG microwave radiometer.
|
157
170
|
uuid: Set specific UUID for the file.
|
158
171
|
date: Expected date in the input files. If not set,
|
159
172
|
all files will be used. This might cause unexpected behavior if
|
@@ -183,7 +196,7 @@ def hatpro2nc(
|
|
183
196
|
if is_iwv_files:
|
184
197
|
_add_missing_variables(hatpro_objects, ("lwp", "iwv"))
|
185
198
|
one_day_of_data = rpg.create_one_day_data_record(hatpro_objects)
|
186
|
-
hatpro = rpg.Hatpro(one_day_of_data, site_meta)
|
199
|
+
hatpro = rpg.Hatpro(one_day_of_data, site_meta, ITYPE_MAP[instrument_type])
|
187
200
|
hatpro.add_site_geolocation()
|
188
201
|
hatpro.convert_time_to_fraction_hour("float64")
|
189
202
|
hatpro.sort_timestamps()
|
@@ -137,6 +137,20 @@ HATPRO = Instrument(
|
|
137
137
|
model="HATPRO",
|
138
138
|
)
|
139
139
|
|
140
|
+
LHATPRO = Instrument(
|
141
|
+
manufacturer="RPG-Radiometer Physics",
|
142
|
+
domain="mwr",
|
143
|
+
category="microwave radiometer",
|
144
|
+
model="LHATPRO",
|
145
|
+
)
|
146
|
+
|
147
|
+
LHUMPRO_U90 = Instrument(
|
148
|
+
manufacturer="RPG-Radiometer Physics",
|
149
|
+
domain="mwr",
|
150
|
+
category="microwave radiometer",
|
151
|
+
model="LHUMPRO-U90",
|
152
|
+
)
|
153
|
+
|
140
154
|
RADIOMETRICS = Instrument(
|
141
155
|
manufacturer="Radiometrics",
|
142
156
|
domain="mwr",
|
@@ -3,7 +3,6 @@
|
|
3
3
|
import logging
|
4
4
|
import math
|
5
5
|
from collections.abc import Sequence
|
6
|
-
from typing import TYPE_CHECKING
|
7
6
|
|
8
7
|
import numpy as np
|
9
8
|
from numpy import ma
|
@@ -15,12 +14,10 @@ from cloudnetpy.constants import G_TO_KG, HPA_TO_PA, KM_H_TO_M_S, MM_H_TO_M_S
|
|
15
14
|
from cloudnetpy.exceptions import InconsistentDataError, ValidTimeStampError
|
16
15
|
from cloudnetpy.instruments import instruments
|
17
16
|
from cloudnetpy.instruments.cloudnet_instrument import CloudnetInstrument
|
17
|
+
from cloudnetpy.instruments.instruments import Instrument
|
18
18
|
from cloudnetpy.instruments.rpg_reader import Fmcw94Bin, HatproBinCombined
|
19
19
|
from cloudnetpy.metadata import MetaData
|
20
20
|
|
21
|
-
if TYPE_CHECKING:
|
22
|
-
from cloudnetpy.instruments.instruments import Instrument
|
23
|
-
|
24
21
|
|
25
22
|
def rpg2nc(
|
26
23
|
path_to_l1_files: str,
|
@@ -331,9 +328,9 @@ class Fmcw(Rpg):
|
|
331
328
|
class Hatpro(Rpg):
|
332
329
|
"""Class for RPG HATPRO mwr."""
|
333
330
|
|
334
|
-
def __init__(self, raw_data: dict, site_properties: dict):
|
331
|
+
def __init__(self, raw_data: dict, site_properties: dict, instrument: Instrument):
|
335
332
|
super().__init__(raw_data, site_properties)
|
336
|
-
self.instrument =
|
333
|
+
self.instrument = instrument
|
337
334
|
|
338
335
|
|
339
336
|
def _filter_zenith_angle(zenith: ma.MaskedArray) -> np.ndarray:
|
@@ -199,7 +199,7 @@ class FigureData:
|
|
199
199
|
if "altitude" not in self.file.variables:
|
200
200
|
msg = "No altitude information in the file."
|
201
201
|
raise ValueError(msg)
|
202
|
-
height -=
|
202
|
+
height -= ma.median(self.file.variables["altitude"][:])
|
203
203
|
return height * con.M_TO_KM
|
204
204
|
if "range" in self.file.variables:
|
205
205
|
return self.file.variables["range"][:] * con.M_TO_KM
|
@@ -848,7 +848,7 @@ class Plot1D(Plot):
|
|
848
848
|
return np.array([])
|
849
849
|
if len(data) == 1:
|
850
850
|
return data
|
851
|
-
time_delta_hours =
|
851
|
+
time_delta_hours = ma.median(np.diff(time))
|
852
852
|
window_size = int(window / 60 / time_delta_hours)
|
853
853
|
if window_size < 1:
|
854
854
|
window_size = 1
|
@@ -4,4 +4,4 @@ from .drizzle import generate_drizzle
|
|
4
4
|
from .ier import generate_ier
|
5
5
|
from .iwc import generate_iwc
|
6
6
|
from .lwc import generate_lwc
|
7
|
-
from .mwr_tools import generate_mwr_multi, generate_mwr_single
|
7
|
+
from .mwr_tools import generate_mwr_lhumpro, generate_mwr_multi, generate_mwr_single
|
@@ -1,10 +1,11 @@
|
|
1
1
|
import os
|
2
2
|
import tempfile
|
3
|
-
from typing import Literal
|
3
|
+
from typing import TYPE_CHECKING, Literal
|
4
4
|
|
5
5
|
import netCDF4
|
6
6
|
import numpy as np
|
7
7
|
import requests
|
8
|
+
from mwrpy.level2.lev2_collocated import generate_lev2_lhumpro as gen_lhumpro
|
8
9
|
from mwrpy.level2.lev2_collocated import generate_lev2_multi as gen_multi
|
9
10
|
from mwrpy.level2.lev2_collocated import generate_lev2_single as gen_single
|
10
11
|
from mwrpy.level2.write_lev2_nc import MissingInputData
|
@@ -13,6 +14,9 @@ from mwrpy.version import __version__ as mwrpy_version
|
|
13
14
|
from cloudnetpy import output, utils
|
14
15
|
from cloudnetpy.exceptions import ValidTimeStampError
|
15
16
|
|
17
|
+
if TYPE_CHECKING:
|
18
|
+
from collections.abc import Callable
|
19
|
+
|
16
20
|
|
17
21
|
def generate_mwr_single(
|
18
22
|
mwr_l1c_file: str, output_file: str, uuid: str | None = None
|
@@ -34,6 +38,26 @@ def generate_mwr_single(
|
|
34
38
|
return _generate_product(mwr_l1c_file, output_file, uuid, "single")
|
35
39
|
|
36
40
|
|
41
|
+
def generate_mwr_lhumpro(
|
42
|
+
mwr_l1c_file: str, output_file: str, uuid: str | None = None
|
43
|
+
) -> str:
|
44
|
+
"""Generates LHUMPRO single-pointing product including liquid water path, integrated
|
45
|
+
water vapor, etc. from zenith measurements.
|
46
|
+
|
47
|
+
Args:
|
48
|
+
mwr_l1c_file: The Level 1C MWR file to be processed.
|
49
|
+
output_file: The file path where the output file should be saved.
|
50
|
+
uuid: The UUID, if any, associated with the output file. Defaults to None.
|
51
|
+
|
52
|
+
Returns:
|
53
|
+
UUID of generated file.
|
54
|
+
|
55
|
+
Example:
|
56
|
+
>>> generate_mwr_lhumpro('input_mwr_l1c_file', 'output_file', 'abcdefg1234567')
|
57
|
+
"""
|
58
|
+
return _generate_product(mwr_l1c_file, output_file, uuid, "lhumpro")
|
59
|
+
|
60
|
+
|
37
61
|
def generate_mwr_multi(
|
38
62
|
mwr_l1c_file: str, output_file: str, uuid: str | None = None
|
39
63
|
) -> str:
|
@@ -56,9 +80,19 @@ def _generate_product(
|
|
56
80
|
mwr_l1c_file: str,
|
57
81
|
output_file: str,
|
58
82
|
uuid: str | None,
|
59
|
-
product: Literal["multi", "single"],
|
83
|
+
product: Literal["multi", "single", "lhumpro"],
|
60
84
|
) -> str:
|
61
|
-
fun
|
85
|
+
fun: Callable
|
86
|
+
if product == "multi":
|
87
|
+
fun = gen_multi
|
88
|
+
elif product == "single":
|
89
|
+
fun = gen_single
|
90
|
+
elif product == "lhumpro":
|
91
|
+
fun = gen_lhumpro
|
92
|
+
product = "single"
|
93
|
+
else:
|
94
|
+
msg = f"Invalid product: {product}"
|
95
|
+
raise ValueError(msg)
|
62
96
|
with tempfile.TemporaryDirectory() as temp_dir:
|
63
97
|
coeffs = _read_mwrpy_coeffs(mwr_l1c_file, temp_dir)
|
64
98
|
try:
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: cloudnetpy
|
3
|
-
Version: 1.
|
3
|
+
Version: 1.75.0
|
4
4
|
Summary: Python package for Cloudnet processing
|
5
5
|
Author: Simo Tukiainen
|
6
6
|
License: MIT License
|
@@ -41,7 +41,7 @@ License-File: LICENSE
|
|
41
41
|
Requires-Dist: ceilopyter
|
42
42
|
Requires-Dist: doppy>=0.5.0
|
43
43
|
Requires-Dist: matplotlib
|
44
|
-
Requires-Dist: mwrpy>=1.
|
44
|
+
Requires-Dist: mwrpy>=1.3.0
|
45
45
|
Requires-Dist: netCDF4
|
46
46
|
Requires-Dist: requests
|
47
47
|
Requires-Dist: rpgpy>=0.14.5
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{cloudnetpy-1.74.3 → cloudnetpy-1.75.0}/cloudnetpy/categorize/attenuations/gas_attenuation.py
RENAMED
File without changes
|
{cloudnetpy-1.74.3 → cloudnetpy-1.75.0}/cloudnetpy/categorize/attenuations/liquid_attenuation.py
RENAMED
File without changes
|
{cloudnetpy-1.74.3 → cloudnetpy-1.75.0}/cloudnetpy/categorize/attenuations/melting_attenuation.py
RENAMED
File without changes
|
{cloudnetpy-1.74.3 → cloudnetpy-1.75.0}/cloudnetpy/categorize/attenuations/rain_attenuation.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{cloudnetpy-1.74.3 → cloudnetpy-1.75.0}/cloudnetpy/model_evaluation/products/advance_methods.py
RENAMED
File without changes
|
{cloudnetpy-1.74.3 → cloudnetpy-1.75.0}/cloudnetpy/model_evaluation/products/grid_methods.py
RENAMED
File without changes
|
{cloudnetpy-1.74.3 → cloudnetpy-1.75.0}/cloudnetpy/model_evaluation/products/model_products.py
RENAMED
File without changes
|
{cloudnetpy-1.74.3 → cloudnetpy-1.75.0}/cloudnetpy/model_evaluation/products/observation_products.py
RENAMED
File without changes
|
{cloudnetpy-1.74.3 → cloudnetpy-1.75.0}/cloudnetpy/model_evaluation/products/product_resampling.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{cloudnetpy-1.74.3 → cloudnetpy-1.75.0}/cloudnetpy/model_evaluation/tests/e2e/process_cf/__init__.py
RENAMED
File without changes
|
{cloudnetpy-1.74.3 → cloudnetpy-1.75.0}/cloudnetpy/model_evaluation/tests/e2e/process_cf/main.py
RENAMED
File without changes
|
{cloudnetpy-1.74.3 → cloudnetpy-1.75.0}/cloudnetpy/model_evaluation/tests/e2e/process_cf/tests.py
RENAMED
File without changes
|
File without changes
|
{cloudnetpy-1.74.3 → cloudnetpy-1.75.0}/cloudnetpy/model_evaluation/tests/e2e/process_iwc/main.py
RENAMED
File without changes
|
{cloudnetpy-1.74.3 → cloudnetpy-1.75.0}/cloudnetpy/model_evaluation/tests/e2e/process_iwc/tests.py
RENAMED
File without changes
|
File without changes
|
{cloudnetpy-1.74.3 → cloudnetpy-1.75.0}/cloudnetpy/model_evaluation/tests/e2e/process_lwc/main.py
RENAMED
File without changes
|
{cloudnetpy-1.74.3 → cloudnetpy-1.75.0}/cloudnetpy/model_evaluation/tests/e2e/process_lwc/tests.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{cloudnetpy-1.74.3 → cloudnetpy-1.75.0}/cloudnetpy/model_evaluation/tests/unit/test_grid_methods.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
{cloudnetpy-1.74.3 → cloudnetpy-1.75.0}/cloudnetpy/model_evaluation/tests/unit/test_plot_tools.py
RENAMED
File without changes
|
{cloudnetpy-1.74.3 → cloudnetpy-1.75.0}/cloudnetpy/model_evaluation/tests/unit/test_plotting.py
RENAMED
File without changes
|
File without changes
|
{cloudnetpy-1.74.3 → cloudnetpy-1.75.0}/cloudnetpy/model_evaluation/tests/unit/test_tools.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|