Better torus support for mean cell area etc.#848
Conversation
Add a few torus tests, as well as tests that are expected to fail.
Avoid conflict with gt4py GridType.
Make accessing geometry_type easier from GlobalGridParams, when grid_params is None (user does not have to check if the nested grid_params is None to access grid_params.geometry_type).
938f62d to
febb2b3
Compare
Will be refactored later.
It provides little value over the regular constructor. The regular constructor now takes keywords, so passing just the mean_cell_area by keyword is simpler and clearer.
|
cscs-ci run default |
|
cscs-ci run default |
|
cscs-ci run default |
Does this work now, or you still need other Grids? |
|
cscs-ci run default |
Grids work, thank you! |
|
cscs-ci run default |
Adds the ability to produce scalar values from the factories. We need this in the metrics factory for the computation of `nflat_gradp` for the dynamical core and will need it as well for the computation of some mean properties for the grid (`mean_cell_area`...) as discussed in [PR-848](#848) (Additional fixes): fixes a lot of typing issues in all three factory implementations. --------- Co-authored-by: yiluchen1066 <67939569+yiluchen1066@users.noreply.github.com>
|
Mandatory Tests Please make sure you run these tests via comment before you merge!
Optional Tests To run benchmarks you can use:
To run tests and benchmarks with the DaCe backend you can use:
To run test levels ignored by the default test suite (mostly simple datatest for static fields computations) you can use:
For more detailed information please look at CI in the EXCLAIM universe. |
|
cscs-ci run default |
Part 3 of N for better torus support.
Adds:
mean_cell_areamean_dual_cell_areamean_edge_lengthmean_dual_edge_lengthand their computation to
GlobalGridParams. These are read from the grid file, if available. If they're not available, they're computed from the corresponding fields. As a fallback of the fallback, themean_cell_areais computed from the global number of cells and the area of the sphere. However, I'm considering removing this fallback as it should always be possible to compute it from the fields.As far as I can tell,
mean_dual_cell_areaandmean_edge_lengthare currently not used for anything but I'm adding them for completeness because:mean_cell_areais required to computecharacteristic_lengthwhich is used for RBF interpolation on spheres, andmean_dual_edge_lengthis used for RBF interpolation on toruses (this will be used in Initialize geometry fields for torus grids #853).