-
Notifications
You must be signed in to change notification settings - Fork 16
Adding Covariant/Contravariant Vector Documentation and Visualization #2295
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: main
Are you sure you want to change the base?
Conversation
Hi @Sbozzolo @dennisYatunin ! As discussed in the issue #2234, @charleskawczynski expressed an idea about visualizing the AxisTensor using Makie.jl, as well as how they transform. I am super interested in contributing to this issue! I just manually ran all the tests here, where I can see how controvariant and covariant vectors are defined. But would you be able to explain a little bit more about the transform itself? Is it like from the cartisian axis to a spherical axis? Thanks! |
Hello, @yiyuef. Thank you for offering to contribute to our documentation! The full description of CliMA's dynamical core is available as a preprint here. For background on our generalized coordinates and covariant/contravariant vectors, see Section 4.1. For an overview of how we implement our discretization, see Section 5.1, and for a full detailed explanation see Appendix C. The specific transformation between Cartesian and spherical coordinates that you are referring to is given in Equations C1, C2, and C3. Please ensure that any documentation you write uses exactly the same notation and jargon as the dycore paper. The current ClimaCore documentation is out-of-date and rather confusing (e.g., what we call Feel free to tag me once you have documentation that is ready for review! |
Hi @yiyuef , thank you for your contribution! Until you delete the unnecessary file |
Hi @yiyuef , it appears like the extra files are still there. To test the documentation build locally and make sure that it looks how you intended it to look, please refer to the Contributing guide and post screenshots of your local build results here in the PR convo so we can have a quick preview of the docs. Thank you |
Sorry, I deleted this extra file locally and did git push, I just realized that git push only update commits. Now I just did git rm -r and git pushed this commit. So now it should be good. |
Hi @dennisYatunin ! Thank you for you explanation and information. Right now I added more illustration and examples about the I am also thinking of re-drawing the figure I captured from the paper. I think I can try to make those bases more "perpendicular" and "tangent"? Would this be a good idea? (Can be a new PR or I can further modify this one). Now I am just using the one from paper in the .md file. Thanks! |
docs/refs.bib
Outdated
author = {Dennis Yatunin, Simon Byrne, Charles Kawczynski, Sriharsha Kandala, Gabriele Bozzola, Akshay Sridhar, Zhaoyi Shen, Anna Jaruga, Julia Sloan, Jia He, Daniel Zhengyu Huang, Valeria Barra, Oswald Knoth, Paul Ullrich, Tapio Schneider}, | ||
doi = {10.22541/essoar.173940262.23304403/v1}, | ||
year = {2025}, | ||
publisher = {ESS Open Archive} |
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.
We need to also add a journal
entry, otherwise when building the docs, we get the following error:
┌ Error: Entry Yatunin2025 is missing the journal field(s).
└ @ BibInternal ~/.julia/packages/BibInternal/2EG8G/src/bibtex.jl:89
Add:
publisher = {ESS Open Archive} | |
publisher = {ESS Open Archive}, | |
journal = {Journal of Advances in Modeling Earth Systems} |
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.
done!
 | ||
|
||
From the above two figures, we can see that parallel projections would lead to contravariant components $a^{1}$ and $a^{2}$, | ||
while perpendicular projections would lead to covariant components $b_{1} = \mathbf{b}\cdot \mathbf{e}_1$ and $b_{2} = \mathbf{b}\cdot \mathbf{e}_2$. |
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.
Hi @yiyuef, I still have a question about the notation you used in your figure. To be consistent with the figure above from the paper, shouldn't your covariant components be defined in terms of contravariant bases, i.e., use the superscript for the unitary vectors "e", as in:
while perpendicular projections would lead to covariant components $b_{1} = \mathbf{b}\cdot \mathbf{e}_1$ and $b_{2} = \mathbf{b}\cdot \mathbf{e}_2$. | |
while perpendicular projections would lead to covariant components $b_{1} = \mathbf{b}\cdot \mathbf{e}^1$ and $b_{2} = \mathbf{b}\cdot \mathbf{e}^2$. |
?
Therefore, also the unitary "e" vectors in the figure should have superscripts rather than subscripts?
Thank you.
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.
Prof. Barra, Sorry for the delay.
So
Then, what I want to convey next is that
I am not sure if this would be a clear explanation.
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.
Hi @dennisYatunin , please take a look at this quick documentation PR. If it does look to you and think that might be a useful contribution to the docs, it is fine to merge by me. As far as I am concerned, I am still a bit unsure about the notation used in this figure to match the one in the paper. Thank you!
Hi,
I would like to add some more explanation about covariant components and controvariant components in the docmument.
Meanwhile, following the comments under this issue, I am adding documentations here, visualizing the
AxisTensor
s.The documentation is with the aim of providing the user with clear and easing understanding of the definition of
AxisTensor
, and how they are transformed between one another.Thank you!