Skip to content

cam6_3_140: Separate history tapes into hXi and hXa#903

Merged
peverwhee merged 31 commits intoESCOMP:cam_developmentfrom
peverwhee:history-split
Dec 7, 2023
Merged

cam6_3_140: Separate history tapes into hXi and hXa#903
peverwhee merged 31 commits intoESCOMP:cam_developmentfrom
peverwhee:history-split

Conversation

@peverwhee
Copy link
Copy Markdown
Collaborator

@peverwhee peverwhee commented Oct 13, 2023

Overview

Per #159 - this PR changes the "time" variable in a history file with averaged (and/or min/max/stdev quantities) to be the midpoint of the averaging period (basically, the average of the time_bounds variable).

Side affects of the above/related changes in this PR (all implemented):

  • Each history tape can now result in TWO files - hXa and hXi. The 'i' file is ALWAYS created and will, at minimum, contain time-dependent variables (like solar forcing data, etc). If only the instantaneous file is created, it will still carry the 'i' flag in the filename
  • Changed 'time_bnds' variable name to 'time_bounds'
  • Ensured the 'cell_methods' metadata field always includes "time: XXXXX" (where XXXXX refers to the avgflag) for history fields so that it's always clear what operation is being done on/for that field
  • Any user-specified history file name or template will also have "a" or "i" appended to it and may result in two files
  • time, date, datesec are all calculated based on the midpoint time for the accumulated file

Implementation

  • amending the active_entry DDT "File" property to be an array of files called "Files" and adding a num_files attribute to determine if we have one or two files
  • iterating over Files array and adding all necessary metadata and variables to both "i" and "a" files when necessary

Testing

  • All regression tests run successfully (except for known failures)
  • Wrote a script to compare the results vs baselines; confirmed no fields were lost in the transition and no answers changed (except the expected midpoint time variables on the accumulated file)

Related to: ESCOMP/CTSM#2019

closes #159
closes #554
Supersedes #869

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: Tag

Development

Successfully merging this pull request may close these issues.

7 participants