-
Notifications
You must be signed in to change notification settings - Fork 19
Post-process dims in XIOS output files #1015
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: issue977_xios-diagnostic-averaging
Are you sure you want to change the base?
Post-process dims in XIOS output files #1015
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
With XIOS, if dimensions are unused then they aren't written out into the file. As such, if only HFields get written out (as in XiosWriteDiagnostic_test) then only x_dim and y_dim will be in the file, even if x_vertex etc. have been defined. As such, I converted an error to a warning here to allow for only a subset of the dimensions being defined in an input file. If no dimensions at all are found then an error gets thrown.
Merges into #1010.
Currently in #1010 we have the following issue with writing fields with XIOS:
dim,vertex, andcg, this gives rise to dimensionsx_dim,y_dim,x_vertex,y_vertex,x_cg, andy_cg.xandy.The workaround in that PR handles dimensions
xoryin a file being read by assuming they correspond tox_dimandy_dim. Ideally, we would avoid havingxoryalone in any files and instead make a post-processing of the output file after it is written with XIOS.That's achieved in this PR via a post-processing step. Upon finalising the XIOS context, we:
To achieve this, I had to implement subtraction of a
Durationfrom aTimePointbecause of how XIOS presents the time window suffices.