TurbulenceConvection.jl
TurbulenceConvection.jl copied to clipboard
Use correct field types for variables
Currently, our field variables are all scalar types (e.g., Float64), but we need to change this, to be compatible with ClimaCore's API, to use
Contravariant12Vectorfor horizontal velocity components (u_h)Contravariant3Vectorfor the vertical velocity component.Covariant123Vectorfor , e.g.,uvwvectors
This will also require changing the use of Divergence / Gradient operators throughout the code, and perhaps removing some use of unnecessary ClimaCore.Geometry.WVectors.
probably with some helper functions to pull out the components you can change the underlying internal representation and not have to change too much in the source
the way we have to pull out components needs to be cleaned up in climacore so maybe we can add that functionality as part of this effort
probably with some helper functions to pull out the components you can change the underlying internal representation and not have to change too much in the source
I was thinking a bit more about this. Won't we still need the full vector components for stencils? I'm not sure how the stencil's behavior change by changing these types. Will everything work the same if we just use scalars? If that is the case, then I agree that just writing some sort of wrapper to pull components out is easier. We can just change some of the wrapper calls.
I think we would just Geometry.project() on the (Z) axis and then treat it as a scalar value vector component internal to TC? that way you could also normalize all the vectors into a WVector contribution, not sure how it's currently handled but I'm guessing this is the assumption.