Skip to content

Commit 1775182

Browse files
committed
Deprecate q and pressure plots in model product
1 parent 4c9c684 commit 1775182

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

src/processing/processor.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -393,8 +393,12 @@ def _get_fields_for_plot(self, product_id: str, site_id: str) -> tuple[list, int
393393
variable_ids = [var["id"] for var in variables]
394394
# Deprecated variables can not be easily removed from the database
395395
# so we filter them out here manually:
396-
if product_id == "classification":
397-
variable_ids = [v for v in variable_ids if v != "detection_status"]
396+
product_deprecated_variables: dict[str, list[str]] = {
397+
"classification": ["detection_status"],
398+
"model": ["q", "pressure"],
399+
}
400+
deprecated_variables = product_deprecated_variables.get(product_id, ())
401+
variable_ids = [v for v in variable_ids if v not in deprecated_variables]
398402
is_tropical = site_id in ("campina", "mindelo")
399403
match product_id:
400404
case "lwc" | "der" | "mwr" | "mwr-single" | "mwr-multi":

0 commit comments

Comments
 (0)