-
Notifications
You must be signed in to change notification settings - Fork 132
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
doc, ice_history: correct units for 'sigP' and improve doc for stress variables #817
Conversation
I guess I had always assumed that sigP was unitless like sig1 and sig2. Good catch. |
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.
The confusion might have originated with this statement in the sg_dynamics.rst doc (or maybe this statement is also a symptom):
CICE can output the internal ice pressure which is an important field to support navigation in ice-infested water. The internal ice pressure (sigP) is the average of the normal stresses multiplied by -1 and is therefore simply equal to -\sigma_1/2.
"normal" does not mean "normalized" here, I think, but that's how I initially read it.
Could this bit of documentation be rephrased to be more clear?
Indeed, normal does not mean normalized there, that's my understanding. Maybe just referencing the variables diff --git a/./doc/source/science_guide/sg_dynamics.rst b/./doc/source/science_guide/sg_dynamics.rst
index 6b269d4..2135048 100644
--- a/./doc/source/science_guide/sg_dynamics.rst
+++ b/./doc/source/science_guide/sg_dynamics.rst
@@ -450,45 +450,45 @@ Rheology
For convenience we formulate the stress tensor :math:`\bf \sigma` in
terms of :math:`\sigma_1=\sigma_{11}+\sigma_{22}`,
:math:`\sigma_2=\sigma_{11}-\sigma_{22}`, and introduce the
divergence, :math:`D_D`, and the horizontal tension and shearing
strain rates, :math:`D_T` and :math:`D_S` respectively:
.. math::
D_D = \dot{\epsilon}_{11} + \dot{\epsilon}_{22},
.. math::
D_T = \dot{\epsilon}_{11} - \dot{\epsilon}_{22},
.. math::
D_S = 2\dot{\epsilon}_{12},
where
.. math::
\dot{\epsilon}_{ij} = {1\over 2}\left({{\partial u_i}\over{\partial x_j}} + {{\partial u_j}\over{\partial x_i}}\right)
CICE can output the internal ice pressure which is an important field to support navigation in ice-infested water.
-The internal ice pressure (``sigP``) is the average of the normal stresses multiplied by :math:`-1` and
+The internal ice pressure (``sigP``) is the average of the normal stresses (:math:`\sigma_{11}, \sigma_{22}`) multiplied by :math:`-1` and
is therefore simply equal to :math:`-\sigma_1/2`. @JFLemieux73 what do you think? |
The sphinxcontrib.bibtex Sphinx extension used for the bibliography now wants the bibliography file to be configured in the Sphinx configuration file (conf.py) instead of in the source file where the bibliography is included. This is new in sphinxcontrib.bibtex 2.0 [1], so let's do that. Keeping the filename also in zreferences.rst does not hurt and lets us stay compatible with earlier versions of sphinxcontrib.bibtex, so let's keep it there also. [1] https://sphinxcontrib-bibtex.readthedocs.io/en/latest/changes.html#id5
3259e46
to
db504a8
Compare
The intenal ice pressure 'sigP' is is units of N/m, as can be seen in ice_dyn_shared::principal_stress. However, the corresponding history variable is wrongly defined in ice_history::init_hist with unit '1' (dimensionless). This means the wrong unit is written to the NetCDF history output. This dates back to the introduction of that variable in 6ed2359 (Added pressure, modified norm of principal stresses and made small modifs to basal stress following Till's comments, 2018-03-02). Fix the unit. While at it, add an entry for 'sigP' in the index, from which this variable is missing. Reported-by: Frederic Dupont <[email protected]> Reported-by: Jean-Francois Lemieux <[email protected]>
db504a8
to
ad91070
Compare
Try to make the doc a little less confusing by cross-referencing the code variables used for stress computations with the corresponding variables in the science guide a little bit more, and vice-versa: - mention the doc variables sigma_1, sigma_2 in the index entries for stressp, stressm - mention the code variables stressp, stressm when the doc variables sigma_1, sigma_2 are introduced - introduce new doc variables sigma_n,1 and sigma_n,2 to denote the normalized principal stresses, and add the equation for those. This allows mentioning that they are normalized by the ice strength, which was not mentioned elsewhere. - mention these new doc variables in the index entry for sig1, sig2 - refer to the normal stress sigma_11, sigma_22 by their variable names when mentioning them in the sentence that introduces the ice pressure - mention the code variables sig1, sig2 in the "Implementation" part of the user guide when mentioning the 'principal_stresses' subroutine. Helped-by: Jean-Francois Lemieux <[email protected]>
ad91070
to
7b3ef24
Compare
I just pushed a new version, here is the range-diff:
The first commit was needed to build the documentation locally. The 3rd commit tries to make the documentation clearer. Hopefully this addresses your comment, @eclare108213 :) |
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.
Awesome, thanks!
… variables (CICE-Consortium#817) * doc/source/conf.py: adjust for sphinxcontrib.bibtex 2.0 The sphinxcontrib.bibtex Sphinx extension used for the bibliography now wants the bibliography file to be configured in the Sphinx configuration file (conf.py) instead of in the source file where the bibliography is included. This is new in sphinxcontrib.bibtex 2.0 [1], so let's do that. Keeping the filename also in zreferences.rst does not hurt and lets us stay compatible with earlier versions of sphinxcontrib.bibtex, so let's keep it there also. [1] https://sphinxcontrib-bibtex.readthedocs.io/en/latest/changes.html#id5 * ice_history: correct units for 'sigP' The intenal ice pressure 'sigP' is is units of N/m, as can be seen in ice_dyn_shared::principal_stress. However, the corresponding history variable is wrongly defined in ice_history::init_hist with unit '1' (dimensionless). This means the wrong unit is written to the NetCDF history output. This dates back to the introduction of that variable in 6ed2359 (Added pressure, modified norm of principal stresses and made small modifs to basal stress following Till's comments, 2018-03-02). Fix the unit. While at it, add an entry for 'sigP' in the index, from which this variable is missing. Reported-by: Frederic Dupont <[email protected]> Reported-by: Jean-Francois Lemieux <[email protected]> * doc: clarify stress variables Try to make the doc a little less confusing by cross-referencing the code variables used for stress computations with the corresponding variables in the science guide a little bit more, and vice-versa: - mention the doc variables sigma_1, sigma_2 in the index entries for stressp, stressm - mention the code variables stressp, stressm when the doc variables sigma_1, sigma_2 are introduced - introduce new doc variables sigma_n,1 and sigma_n,2 to denote the normalized principal stresses, and add the equation for those. This allows mentioning that they are normalized by the ice strength, which was not mentioned elsewhere. - mention these new doc variables in the index entry for sig1, sig2 - refer to the normal stress sigma_11, sigma_22 by their variable names when mentioning them in the sentence that introduces the ice pressure - mention the code variables sig1, sig2 in the "Implementation" part of the user guide when mentioning the 'principal_stresses' subroutine. Helped-by: Jean-Francois Lemieux <[email protected]> (cherry picked from commit 0fcc140) Cherry-pick related notes: - We get a conflict in cice_index.rst due to the additional 'U' at the end of strintx(y)U and strocnx(y)U. Let's keep those lines as they are upstream in order to minimize potential conflicts in the future. I'm not sure this is actually the best way to go, but we'll see how this goes.
… variables (CICE-Consortium#817) * doc/source/conf.py: adjust for sphinxcontrib.bibtex 2.0 The sphinxcontrib.bibtex Sphinx extension used for the bibliography now wants the bibliography file to be configured in the Sphinx configuration file (conf.py) instead of in the source file where the bibliography is included. This is new in sphinxcontrib.bibtex 2.0 [1], so let's do that. Keeping the filename also in zreferences.rst does not hurt and lets us stay compatible with earlier versions of sphinxcontrib.bibtex, so let's keep it there also. [1] https://sphinxcontrib-bibtex.readthedocs.io/en/latest/changes.html#id5 * ice_history: correct units for 'sigP' The intenal ice pressure 'sigP' is is units of N/m, as can be seen in ice_dyn_shared::principal_stress. However, the corresponding history variable is wrongly defined in ice_history::init_hist with unit '1' (dimensionless). This means the wrong unit is written to the NetCDF history output. This dates back to the introduction of that variable in 6ed2359 (Added pressure, modified norm of principal stresses and made small modifs to basal stress following Till's comments, 2018-03-02). Fix the unit. While at it, add an entry for 'sigP' in the index, from which this variable is missing. Reported-by: Frederic Dupont <[email protected]> Reported-by: Jean-Francois Lemieux <[email protected]> * doc: clarify stress variables Try to make the doc a little less confusing by cross-referencing the code variables used for stress computations with the corresponding variables in the science guide a little bit more, and vice-versa: - mention the doc variables sigma_1, sigma_2 in the index entries for stressp, stressm - mention the code variables stressp, stressm when the doc variables sigma_1, sigma_2 are introduced - introduce new doc variables sigma_n,1 and sigma_n,2 to denote the normalized principal stresses, and add the equation for those. This allows mentioning that they are normalized by the ice strength, which was not mentioned elsewhere. - mention these new doc variables in the index entry for sig1, sig2 - refer to the normal stress sigma_11, sigma_22 by their variable names when mentioning them in the sentence that introduces the ice pressure - mention the code variables sig1, sig2 in the "Implementation" part of the user guide when mentioning the 'principal_stresses' subroutine. Helped-by: Jean-Francois Lemieux <[email protected]> (cherry picked from commit 0fcc140) Cherry-pick related notes: - We get a conflict in cice_index.rst due to the additional 'U' at the end of strintx(y)U and strocnx(y)U. Let's keep those lines as they are upstream in order to minimize potential conflicts in the future. I'm not sure this is actually the best way to go, but we'll see how this goes.
doc, ice_history: correct units for 'sigP' and improve doc for stress variables (CICE-Consortium#817) Closes #20
… variables (CICE-Consortium#817) * doc/source/conf.py: adjust for sphinxcontrib.bibtex 2.0 The sphinxcontrib.bibtex Sphinx extension used for the bibliography now wants the bibliography file to be configured in the Sphinx configuration file (conf.py) instead of in the source file where the bibliography is included. This is new in sphinxcontrib.bibtex 2.0 [1], so let's do that. Keeping the filename also in zreferences.rst does not hurt and lets us stay compatible with earlier versions of sphinxcontrib.bibtex, so let's keep it there also. [1] https://sphinxcontrib-bibtex.readthedocs.io/en/latest/changes.html#id5 * ice_history: correct units for 'sigP' The intenal ice pressure 'sigP' is is units of N/m, as can be seen in ice_dyn_shared::principal_stress. However, the corresponding history variable is wrongly defined in ice_history::init_hist with unit '1' (dimensionless). This means the wrong unit is written to the NetCDF history output. This dates back to the introduction of that variable in 6ed2359 (Added pressure, modified norm of principal stresses and made small modifs to basal stress following Till's comments, 2018-03-02). Fix the unit. While at it, add an entry for 'sigP' in the index, from which this variable is missing. Reported-by: Frederic Dupont <[email protected]> Reported-by: Jean-Francois Lemieux <[email protected]> * doc: clarify stress variables Try to make the doc a little less confusing by cross-referencing the code variables used for stress computations with the corresponding variables in the science guide a little bit more, and vice-versa: - mention the doc variables sigma_1, sigma_2 in the index entries for stressp, stressm - mention the code variables stressp, stressm when the doc variables sigma_1, sigma_2 are introduced - introduce new doc variables sigma_n,1 and sigma_n,2 to denote the normalized principal stresses, and add the equation for those. This allows mentioning that they are normalized by the ice strength, which was not mentioned elsewhere. - mention these new doc variables in the index entry for sig1, sig2 - refer to the normal stress sigma_11, sigma_22 by their variable names when mentioning them in the sentence that introduces the ice pressure - mention the code variables sig1, sig2 in the "Implementation" part of the user guide when mentioning the 'principal_stresses' subroutine. Helped-by: Jean-Francois Lemieux <[email protected]> (cherry picked from commit 0fcc140) Cherry-pick related notes: - We get a conflict in cice_index.rst due to the additional 'U' at the end of strintx(y)U and strocnx(y)U. Let's keep those lines as they are upstream in order to minimize potential conflicts in the future. I'm not sure this is actually the best way to go, but we'll see how this goes.
doc, ice_history: correct units for 'sigP' and improve doc for stress variables (CICE-Consortium#817) Closes #20
… variables (CICE-Consortium#817) * doc/source/conf.py: adjust for sphinxcontrib.bibtex 2.0 The sphinxcontrib.bibtex Sphinx extension used for the bibliography now wants the bibliography file to be configured in the Sphinx configuration file (conf.py) instead of in the source file where the bibliography is included. This is new in sphinxcontrib.bibtex 2.0 [1], so let's do that. Keeping the filename also in zreferences.rst does not hurt and lets us stay compatible with earlier versions of sphinxcontrib.bibtex, so let's keep it there also. [1] https://sphinxcontrib-bibtex.readthedocs.io/en/latest/changes.html#id5 * ice_history: correct units for 'sigP' The intenal ice pressure 'sigP' is is units of N/m, as can be seen in ice_dyn_shared::principal_stress. However, the corresponding history variable is wrongly defined in ice_history::init_hist with unit '1' (dimensionless). This means the wrong unit is written to the NetCDF history output. This dates back to the introduction of that variable in 6ed2359 (Added pressure, modified norm of principal stresses and made small modifs to basal stress following Till's comments, 2018-03-02). Fix the unit. While at it, add an entry for 'sigP' in the index, from which this variable is missing. Reported-by: Frederic Dupont <[email protected]> Reported-by: Jean-Francois Lemieux <[email protected]> * doc: clarify stress variables Try to make the doc a little less confusing by cross-referencing the code variables used for stress computations with the corresponding variables in the science guide a little bit more, and vice-versa: - mention the doc variables sigma_1, sigma_2 in the index entries for stressp, stressm - mention the code variables stressp, stressm when the doc variables sigma_1, sigma_2 are introduced - introduce new doc variables sigma_n,1 and sigma_n,2 to denote the normalized principal stresses, and add the equation for those. This allows mentioning that they are normalized by the ice strength, which was not mentioned elsewhere. - mention these new doc variables in the index entry for sig1, sig2 - refer to the normal stress sigma_11, sigma_22 by their variable names when mentioning them in the sentence that introduces the ice pressure - mention the code variables sig1, sig2 in the "Implementation" part of the user guide when mentioning the 'principal_stresses' subroutine. Helped-by: Jean-Francois Lemieux <[email protected]> (cherry picked from commit 0fcc140) Cherry-pick related notes: - We get a conflict in cice_index.rst due to the additional 'U' at the end of strintx(y)U and strocnx(y)U. Let's keep those lines as they are upstream in order to minimize potential conflicts in the future. I'm not sure this is actually the best way to go, but we'll see how this goes. - After rebasing, it turns out this was a good decision!
doc, ice_history: correct units for 'sigP' and improve doc for stress variables (CICE-Consortium#817) Closes #20
PR checklist
Did not run a whole test suite as it does not change the results. I tested that
sigP
has the correct units in the history files.The intenal ice pressure 'sigP' is is units of N/m, as can be seen in
ice_dyn_shared::principal_stress. However, the corresponding history
variable is wrongly defined in ice_history::init_hist with unit '1'
(dimensionless). This means the wrong unit is written to the NetCDF
history output. This dates back to the introduction of that variable in
6ed2359 (Added pressure, modified norm of principal stresses and made
small modifs to basal stress following Till's comments, 2018-03-02).
Fix the unit. While at it, add an entry for 'sigP' in the index, from
which this variable is missing.
Reported-by: Frederic Dupont [email protected]
Reported-by: Jean-Francois Lemieux [email protected]