Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "pytrajplot"
version = "2.1.1"
version = "2.1.2"
license = "BSD-3-Clause"
authors = ["Michel Zeller", "Marco Ketzel", "Pirmin Kaufmann <pirmin.kaufmann@meteoswiss.ch>", "Peider Könz", "Victoria Cherkas", "Paulina Grochal"]
description = "Plot LAGRANTO trajectories starting/ending at the same location on a map together with vertical cross sections"
Expand Down
5 changes: 5 additions & 0 deletions pytrajplot/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

# Standard library
import logging
import os

_PRODUCT_TYPE_MAP: dict[str, str] = {
"ICON-CH1-EPS": "forecast-iconch1eps-trajectories",
Expand All @@ -13,10 +14,14 @@ def get_product_type(model_name: str) -> str:
"""Derive the product_type identifier from a model name.

Falls back to a generated name if the model is not in the map.
Appends a suffix when PRODUCT_TYPE_SUFFIX is set (e.g. '-test').
"""
product_type = _PRODUCT_TYPE_MAP.get(model_name.upper())
if product_type is None:
product_type = f"forecast-{model_name.lower().replace('-', '')}-trajectories"
suffix = os.environ.get("PRODUCT_TYPE_SUFFIX", "")
if suffix:
product_type += suffix
return product_type


Expand Down