diff --git a/l2awinddirection/mainl2awinddirection.py b/l2awinddirection/mainl2awinddirection.py index 551b953..bf39cc9 100644 --- a/l2awinddirection/mainl2awinddirection.py +++ b/l2awinddirection/mainl2awinddirection.py @@ -247,7 +247,11 @@ def main(): res = generate_wind_product(tiles, model_m64rn4) res.attrs["winddirection_L2A_processor"] = "l2awinddirection" res.attrs["winddirection_L2A_processor_version"] = l2awinddirection.__version__ - res.attrs["used_channel"] = res.coords["pol"].values + if 'pol' in res.coords: + res.attrs["used_channel"] = res.coords["pol"].values + else: + res.attrs['used_channel'] = res['selected_pol'].values + # res.attrs["used_channel"] = res.attrs["winddirection_L2A_processor_mode"] = args.mode if 'pol' in res.coords: res = res.drop('pol')