From e77719d1f5ba3c33fe4a5844e0b64fb870283f97 Mon Sep 17 00:00:00 2001 From: Remi Lehe Date: Mon, 23 Apr 2018 08:38:36 -0700 Subject: [PATCH 1/4] Store units/dimension of each axis --- STANDARD.md | 24 +++++++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-) diff --git a/STANDARD.md b/STANDARD.md index 3e24dcd..bed6713 100644 --- a/STANDARD.md +++ b/STANDARD.md @@ -95,7 +95,7 @@ Each file's *root* group (path `/`) must at least contain the attributes: present standard (e.g. fields on an unstructured mesh), this can be done be storing this data within a path that *is not* of the form given by `basePath` (e.g. `/extra_data`). In this - way, the openPMD parsing tools will not parse this additional data. + way, the openPMD parsing tools will not parse this additional data. The following attribute is *optional* in each each file's *root* group (path `/`) and indicates if a file also follows an openPMD extension @@ -424,11 +424,29 @@ meshes): - example: `(0.0, 100.0, 0.0)` or `(0.5, 0.5, 0.5)` - `gridUnitSI` - - type: *(float64 / REAL8)* + - type: 1-dimensional array containing N *(float64 / REAL8)* + elements, where N is the number of dimensions in the simulation - description: unit-conversion factor to multiply each value in `gridSpacing` and `gridGlobalOffset`, in order to convert from simulation units to SI units - - example: `1.0e-9` + - example: `(1.0e-9, 1.0e-9, 1.0e-6)` + + - `gridUnitDimension` + - type: array of 7 N *(float64 / REAL8)* + elements, where N is the number of dimensions in the simulation + - description: powers of the 7 base measures characterizing the + grid axes's dimensions (length L, mass M, time T, + electric current I, thermodynamic temperature theta, + amount of substance N, luminous intensity J) + - note: this is similar to `unitDimension`, but applies to each axis + The 7 numbers characterizing the dimension of an axis are stored + contiguously in this 1D array. + - examples: + - For a 2D spatial grid (`L=1`), store array + `(1., 0., 0., 0., 0., 0., 0., 1., 0., 0., 0., 0., 0., 0.)` + - For a 2D phase space (Unit "m" along the first axis + and "kg.m.s-1" along the second axis), store array + `(1., 0., 0., 0., 0., 0., 0., 1., 1., -1., 0., 0., 0., 0. )` The following attributes must be stored with each `scalar record` and each *component* of a `vector record`: From d7d6f3f2868e4b08fe69db09684f38c54c72bc2d Mon Sep 17 00:00:00 2001 From: Remi Lehe Date: Tue, 15 May 2018 08:04:06 -0700 Subject: [PATCH 2/4] Take into account review comments --- STANDARD.md | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/STANDARD.md b/STANDARD.md index bed6713..9983e14 100644 --- a/STANDARD.md +++ b/STANDARD.md @@ -95,7 +95,7 @@ Each file's *root* group (path `/`) must at least contain the attributes: present standard (e.g. fields on an unstructured mesh), this can be done be storing this data within a path that *is not* of the form given by `basePath` (e.g. `/extra_data`). In this - way, the openPMD parsing tools will not parse this additional data. + way, the openPMD data readers will not parse this additional data. The following attribute is *optional* in each each file's *root* group (path `/`) and indicates if a file also follows an openPMD extension @@ -425,7 +425,7 @@ meshes): - `gridUnitSI` - type: 1-dimensional array containing N *(float64 / REAL8)* - elements, where N is the number of dimensions in the simulation + elements, where N is the number of dimensions in the simulation. Dimensions shall be ordered from fastest to slowest varying index of the described mesh. - description: unit-conversion factor to multiply each value in `gridSpacing` and `gridGlobalOffset`, in order to convert from simulation units to SI units @@ -433,7 +433,7 @@ meshes): - `gridUnitDimension` - type: array of 7 N *(float64 / REAL8)* - elements, where N is the number of dimensions in the simulation + elements, where N is the number of dimensions in the simulation. Dimensions shall be ordered from fastest to slowest varying index of the described mesh. - description: powers of the 7 base measures characterizing the grid axes's dimensions (length L, mass M, time T, electric current I, thermodynamic temperature theta, @@ -441,13 +441,14 @@ meshes): - note: this is similar to `unitDimension`, but applies to each axis The 7 numbers characterizing the dimension of an axis are stored contiguously in this 1D array. - - examples: + - examples (with `L`, `M` and `T` as defined in `unitDimension`) - For a 2D spatial grid (`L=1`), store array `(1., 0., 0., 0., 0., 0., 0., 1., 0., 0., 0., 0., 0., 0.)` - - For a 2D phase space (Unit "m" along the first axis - and "kg.m.s-1" along the second axis), store array + - For a 2D phase space (Dimension "L" along the first axis + and "L*M/T" along the second axis), store array `(1., 0., 0., 0., 0., 0., 0., 1., 1., -1., 0., 0., 0., 0. )` + The following attributes must be stored with each `scalar record` and each *component* of a `vector record`: From 89e5c6b0aeb4aaa905904bc33090a48286283560 Mon Sep 17 00:00:00 2001 From: Remi Lehe Date: Tue, 15 May 2018 21:12:43 -0700 Subject: [PATCH 3/4] Switch convention from F order to C order --- STANDARD.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/STANDARD.md b/STANDARD.md index d523b12..44ff8d5 100644 --- a/STANDARD.md +++ b/STANDARD.md @@ -431,7 +431,7 @@ on Unit Systems and Dimensionality, further below): - `gridUnitSI` - type: 1-dimensional array containing N *(float64 / REAL8)* - elements, where N is the number of dimensions in the simulation. Dimensions shall be ordered from fastest to slowest varying index of the described mesh. + elements, where N is the number of dimensions in the simulation. Dimensions shall be ordered from slowest to fastest varying index of the described mesh. - description: unit-conversion factor to multiply each value in `gridSpacing` and `gridGlobalOffset`, in order to convert from simulation units to SI units @@ -439,7 +439,7 @@ on Unit Systems and Dimensionality, further below): - `gridUnitDimension` - type: array of 7 N *(float64 / REAL8)* - elements, where N is the number of dimensions in the simulation. Dimensions shall be ordered from fastest to slowest varying index of the described mesh. + elements, where N is the number of dimensions in the simulation. Dimensions shall be ordered from slowest to fastest varying index of the described mesh. - description: powers of the 7 base measures characterizing the grid axes's dimensions (length L, mass M, time T, electric current I, thermodynamic temperature theta, From 4041dc0d0479e78394138e2e8a6d521abfb36df4 Mon Sep 17 00:00:00 2001 From: Axel Huebl Date: Tue, 13 Nov 2018 10:08:12 +0100 Subject: [PATCH 4/4] gridSpacing/unitSI: as in axisLabels Apply changes as approved in last VC :) --- STANDARD.md | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/STANDARD.md b/STANDARD.md index 44ff8d5..c70c390 100644 --- a/STANDARD.md +++ b/STANDARD.md @@ -431,15 +431,17 @@ on Unit Systems and Dimensionality, further below): - `gridUnitSI` - type: 1-dimensional array containing N *(float64 / REAL8)* - elements, where N is the number of dimensions in the simulation. Dimensions shall be ordered from slowest to fastest varying index of the described mesh. + elements, where N is the number of dimensions in the simulation. + The order of the N values must be identical to the axes in `axisLabels`. - description: unit-conversion factor to multiply each value in `gridSpacing` and `gridGlobalOffset`, in order to convert from simulation units to SI units - example: `(1.0e-9, 1.0e-9, 1.0e-6)` - `gridUnitDimension` - - type: array of 7 N *(float64 / REAL8)* - elements, where N is the number of dimensions in the simulation. Dimensions shall be ordered from slowest to fastest varying index of the described mesh. + - type: 1-dimensional array of 7 N *(float64 / REAL8)* + elements, where N is the number of dimensions in the simulation. + The order of the N 7-value arrays must be identical to the axes in `axisLabels`. - description: powers of the 7 base measures characterizing the grid axes's dimensions (length L, mass M, time T, electric current I, thermodynamic temperature theta,