Skip to content

Change CDF output variables to UTC string, matching algorithm document#2827

Merged
maxinelasp merged 2 commits into
IMAP-Science-Operations-Center:devfrom
maxinelasp:glows_update_start_time_utc
Mar 10, 2026
Merged

Change CDF output variables to UTC string, matching algorithm document#2827
maxinelasp merged 2 commits into
IMAP-Science-Operations-Center:devfrom
maxinelasp:glows_update_start_time_utc

Conversation

@maxinelasp
Copy link
Copy Markdown
Contributor

Change Summary

Overview

Converts start_time and end_time in the GLOWS L2 CDF output from raw J2000
nanoseconds to UTC strings, matching the format specified in the algorithm
document. Fixes a CDF writing error caused by mismatched attribute types.

File changes

  • imap_processing/glows/l2/glows_l2.py: Added utc_time_variables list
    (start_time, end_time) and a conversion step in create_l2_dataset that
    calls met_to_utc(ttj2000ns_to_met(value)) before writing these fields to
    the output dataset.

  • imap_processing/cdf/config/imap_glows_l2_variable_attrs.yaml: Updated
    time_data_defaults to use string-compatible CDF attributes (FILLVAL: ' ',
    FORMAT: A30, VALIDMIN/VALIDMAX: ' '). The previous FILLVAL: 0 and
    FORMAT: I1000 caused a cdflib ValueError when writing string data because
    cdflib infers CDF_CHAR type from the string data but then fails to convert an
    integer FILLVAL to that type.

@maxinelasp maxinelasp added this to the March 2026 milestone Mar 9, 2026
@maxinelasp maxinelasp requested a review from sdhoyt March 9, 2026 21:33
@maxinelasp maxinelasp self-assigned this Mar 9, 2026
@maxinelasp
Copy link
Copy Markdown
Contributor Author

.pre-commit autofix

@maxinelasp maxinelasp merged commit c48556e into IMAP-Science-Operations-Center:dev Mar 10, 2026
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants