Skip to content

Commit 4427e17

Browse files
committed
Handle plotting of model data with any resolution
1 parent d805d8a commit 4427e17

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

cloudnetpy/plotting/plotting.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1184,10 +1184,11 @@ def _reformat_units(unit: str) -> str:
11841184

11851185

11861186
def _get_max_gap_in_minutes(figure_data: FigureData) -> float:
1187-
source = getattr(figure_data.file, "source", "").lower()
11881187
file_type = getattr(figure_data.file, "cloudnet_file_type", "")
1188+
if file_type == "model":
1189+
res_h = np.min(np.diff(figure_data.time))
1190+
return round(60 * res_h)
11891191
max_allowed_gap = {
1190-
"model": 181 if "gdas1" in source or "ecmwf open" in source else 61,
11911192
"mwr-multi": 35,
11921193
"weather-station": 12,
11931194
"doppler-lidar-wind": 75,

0 commit comments

Comments
 (0)