diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md index dfe0f41..e6f2e65 100644 --- a/CONTRIBUTORS.md +++ b/CONTRIBUTORS.md @@ -1,6 +1,7 @@ # Contributors -| GitHub user | Real Name | Affiliation | Date | -| ----------- | --------- | ----------- | ---- | -| james-bruten-mo | James Bruten | Met Office | 2025-12-09 | -| jennyhickson | Jenny Hickson | Met Office | 2026-03-02 | +| GitHub user | Real Name | Affiliation | Date | +| --------------- | ------------- | ----------- | ---------- | +| james-bruten-mo | James Bruten | Met Office | 2025-12-09 | +| jennyhickson | Jenny Hickson | Met Office | 2026-03-02 | +| r-sharp | R Sharp | Met Office | 2026-04-09 | diff --git a/mule/lib/mule/pp.py b/mule/lib/mule/pp.py index 2e514c1..8214ed2 100644 --- a/mule/lib/mule/pp.py +++ b/mule/lib/mule/pp.py @@ -305,11 +305,17 @@ def fields_to_pp_file(pp_file_obj_or_path, field_or_fields, # If the field appears to be variable resolution, attach the # relevant extra data (requires that a UM file object was given) + not_timeseries = field.lbcode not in [31320, ] + if not_timeseries: + print(f" : NOT a timeseries.") + else: + print(f" : TimeSeries data assumed - skipping adding variable resolution data.") vector = {} - if (field.bzx == field.bmdi + if ( not_timeseries and + ( field.bzx == field.bmdi or field.bzy == field.bmdi or field.bdx == field.bmdi - or field.bdy == field.bmdi): + or field.bdy == field.bmdi) ): # The variable resolution data can either be already attached # to the field (most likely if it has already come from an existing