Skip to content

Hypnotoad: add checkbox to output metrics for orthogonal coordinates#1562

Merged
bendudson merged 1 commit intonextfrom
hypnotoad-shiftedmetric-output
Feb 13, 2019
Merged

Hypnotoad: add checkbox to output metrics for orthogonal coordinates#1562
bendudson merged 1 commit intonextfrom
hypnotoad-shiftedmetric-output

Conversation

@johnomotani
Copy link
Contributor

Add a checkbox to the 'Output' tab, which if selected outputs metrics for orthogonal coordinates (i.e. using ShiftedMetric), by setting the integrated shear to zero, I=0, when calculating the metric components.

Add a checkbox to the 'Output' tab, which if selected outputs metrics
for orthogonal coordinates (i.e. using ShiftedMetric), by setting the
integrated shear to zero, I=0, when calculating the metric components.
@bendudson
Copy link
Contributor

This raises a point: Should grid files have some flag which specifies what kind of coordinate system they contain? Particularly if the g** fields are given, then these should be for shifted metric or field-aligned etc. Some kind of mesh type identifier, probably with a version number for forward compatibility. This should either specify what paralleltransform is, or at least there could be a check for consistency.

@johnomotani
Copy link
Contributor Author

johnomotani commented Feb 10, 2019

I think grid files should say what type of coordinates they use for g**. I've had a stab at adding a flag to the grid file to specify the type of coordinates: hypnotoad-shiftedmetric-output...hypnotoad-shiftedmetric-output-coord-system-labelling.

That branch uses 'generic' labels. It adds a coordinates_type to the gridfile (as an attribute, because that's how netCDF prefers to deal with strings), which is allowed to take values of "field_aligned" (for ParallelTransformIdentity, "orthogonal" (for ShiftedMetric) or "fci" (for FCITransform). Would it be better to be BOUT-specific and use instead something like paralleltransform={"identity","shiftedmetric","fci"}?

Agree some kind of version numbering would be good. We could:

  1. Write the commit hash to the grid file
  2. Write a version number for Hypnotoad, like '1.0.1' as an array of ints, and update the version number manually when we update Hypnotoad.

2's easier to check if the version is newer/older than something, but I don't see a way of making it automatic. Any preferences or other options?

@bendudson bendudson merged commit 4b4e8e4 into next Feb 13, 2019
@johnomotani johnomotani deleted the hypnotoad-shiftedmetric-output branch February 13, 2019 10:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants