From 3a0b9ba90612dfdd312c688ce98aaedfef10b775 Mon Sep 17 00:00:00 2001 From: eclare108213 Date: Mon, 29 Sep 2025 16:07:58 -0600 Subject: [PATCH 01/25] area and volume averages --- doc/source/developer_guide/dg_other.rst | 60 +++++++++++++++++++++++++ 1 file changed, 60 insertions(+) diff --git a/doc/source/developer_guide/dg_other.rst b/doc/source/developer_guide/dg_other.rst index a8f6e8b15..90bd0f3c4 100644 --- a/doc/source/developer_guide/dg_other.rst +++ b/doc/source/developer_guide/dg_other.rst @@ -81,6 +81,66 @@ This is very likely to be bfb, but is not as fast or accurate as the reprosum implementation. See :cite:`He01` +.. _averages: + +Averages +----------------- + +Coupling and history output quantities may be averaged in different forms, depending on +whether it represents a value averaged over the entire grid cell, the sea ice fraction, +or a subset of the sea ice fraction such as a thickness category or the ponded area. These +distinctions must also be considered for time averaging. + +If :math:`\mathbf{X}=(x,y)`, :math:`A` is the cell area (:math:`m^2`), then the ice area +(:math:`m^2`) is the sum of the thickness category areas :math:`a_n A`: + +.. math:: + A_{i}(t) = \int_{ice} g(\mathbf{X},t) \, d\mathbf{X} = \sum_{n=1}^{ncat} a_n(t) \, A + +and the ice area fraction is + +.. math:: + a_{ice}(t) = {1 \over A} \int_{ice} g(\mathbf{X},t) \, d\mathbf{X} = \sum_{n=1}^{ncat} a_n(t). + +The time-averaged ice area over an interval of length :math:`N\Delta t` is + +.. math:: + \bar{A_{i}} = {\int_t A_{i}(t) \, dt \over \int_t \, dt} + = {\sum_{\Delta t} \sum_{n=1}^{ncat} a_n \, A \, \Delta t \over N \, \Delta t} + = {A \over N} \sum_{\Delta t} \sum_{n=1}^{ncat} a_n + +and the time-averaged ice area fraction is + +.. math:: + \bar{a_{ice}} = {\int_t \int_{ice} g(\mathbf{X},t) \, d\mathbf{X} \, dt \over \int_t \int_{ice} d\mathbf{X} \, dt} + = {\sum_{\Delta t} \sum_{n=1}^{ncat} a_n \, A \Delta t \over A \, N \, \Delta t} + = {1 \over N} \sum_{\Delta t} \sum_{n=1}^{ncat} a_n. + +Likewise for time averages of ice volume (:math:`m^3`), + +.. math:: + \bar{V_{i}} = {\int_t \int_{cell} \int_{0}^{h} g(\mathbf{X},t) \, dz \, d\mathbf{X} \, dt \over \int{t} dt} + = {\sum_{\Delta t} \sum_{n=1}^{ncat} h_n \, a_n \, A \, \Delta t \over N \, \Delta t} + = {A \over N} \sum_{\Delta t} \sum_{n=1}^{ncat} h_n \, a_n + +for thickness :math:`h` assumed to be 0 in open water. Then the ice volume per square meter of grid cell (:math:`m`) is + +.. math:: + \bar{v_{ice}} = {\int_t \int_{cell} \int_{0}^{h} g(\mathbf{X},t) \, dz \, d\mathbf{X} \, dt \over \int{t} \int_{cell} d\mathbf{X} \, dt} + = {\sum_{\Delta t} \sum_{n=1}^{ncat} h_n \, a_n \, A \, \Delta t \over A \, N \, \Delta t} + = {1 \over N} \sum_{\Delta t} \sum_{n=1}^{ncat} h_n \, a_n = {1 \over N} \sum_{\Delta t} \sum_{n=1}^{ncat} v_n. + +:math:`v_{ice}` is the quantity labeled `hi` in history, which can be thought of as the mean ice thickness over the +grid cell. The ice volume per square meter of ice (mean 'actual' ice thickness, :math:`m`) is + +.. math:: + \bar{h_{i}} = {\int_t \int_{ice} \int_{0}^{h} g(\mathbf{X},t) \, dz \, d\mathbf{X} \, dt \over \int{t} \int_{ice} d\mathbf{X} \, dt} + = {\sum_{\Delta t} \sum_{n=1}^{ncat} h_n \, a_n \, A \, \Delta t \over N \, \Delta t \sum_{n=1}^{ncat} a_n \, A} + = {\sum_{\Delta t} \sum_{n=1}^{ncat} v_n \over N \sum_{n=1}^{ncat} a_n}. + + + + .. _addtimer: Adding Timers From 6609d970d2767ef3736266f5a851f1cbc36ba3d9 Mon Sep 17 00:00:00 2001 From: eclare108213 Date: Mon, 29 Sep 2025 17:49:44 -0600 Subject: [PATCH 02/25] averaging content, surface quantities --- doc/source/developer_guide/dg_other.rst | 99 +++++++++++++++++++++---- 1 file changed, 83 insertions(+), 16 deletions(-) diff --git a/doc/source/developer_guide/dg_other.rst b/doc/source/developer_guide/dg_other.rst index 90bd0f3c4..34ad94196 100644 --- a/doc/source/developer_guide/dg_other.rst +++ b/doc/source/developer_guide/dg_other.rst @@ -91,54 +91,121 @@ whether it represents a value averaged over the entire grid cell, the sea ice fr or a subset of the sea ice fraction such as a thickness category or the ponded area. These distinctions must also be considered for time averaging. -If :math:`\mathbf{X}=(x,y)`, :math:`A` is the cell area (:math:`m^2`), then the ice area -(:math:`m^2`) is the sum of the thickness category areas :math:`a_n A`: +Ice area +~~~~~~~~~~~~~~~~~ + +If :math:`\mathbf{X}=(x,y)`, :math:`A` is the cell area (:math:`m^2`) and :math:`g` represents +the ice thickness distribution discretized as :math:`a_n` for :math:`n=1,\, ncat`, then the +ice area is the sum of the thickness category areas :math:`a_n A`: .. math:: - A_{i}(t) = \int_{ice} g(\mathbf{X},t) \, d\mathbf{X} = \sum_{n=1}^{ncat} a_n(t) \, A + A_{i}(t) = \int_{ice} g(\mathbf{X},t) \, d\mathbf{X} \sim \sum_{n=1}^{ncat} a_n(t) \, A and the ice area fraction is .. math:: - a_{ice}(t) = {1 \over A} \int_{ice} g(\mathbf{X},t) \, d\mathbf{X} = \sum_{n=1}^{ncat} a_n(t). + a_{ice}(t) = {1 \over A} \int_{ice} g(\mathbf{X},t) \, d\mathbf{X} \sim \sum_{n=1}^{ncat} a_n(t). The time-averaged ice area over an interval of length :math:`N\Delta t` is .. math:: - \bar{A_{i}} = {\int_t A_{i}(t) \, dt \over \int_t \, dt} - = {\sum_{\Delta t} \sum_{n=1}^{ncat} a_n \, A \, \Delta t \over N \, \Delta t} + \bar{A}_{i} = {\int_t A_{i}(t) \, dt \over \int_t \, dt} + \sim {\sum_{\Delta t} \sum_{n=1}^{ncat} a_n \, A \, \Delta t \over N \, \Delta t} = {A \over N} \sum_{\Delta t} \sum_{n=1}^{ncat} a_n and the time-averaged ice area fraction is .. math:: - \bar{a_{ice}} = {\int_t \int_{ice} g(\mathbf{X},t) \, d\mathbf{X} \, dt \over \int_t \int_{ice} d\mathbf{X} \, dt} - = {\sum_{\Delta t} \sum_{n=1}^{ncat} a_n \, A \Delta t \over A \, N \, \Delta t} + \bar{a}_{ice} = {\int_t \int_{ice} g(\mathbf{X},t) \, d\mathbf{X} \, dt \over \int_t \int_{cell} d\mathbf{X} \, dt} + \sim {\sum_{\Delta t} \sum_{n=1}^{ncat} a_n \, A \Delta t \over A \, N \, \Delta t} = {1 \over N} \sum_{\Delta t} \sum_{n=1}^{ncat} a_n. +Ice volume +~~~~~~~~~~~~~~~~~ + Likewise for time averages of ice volume (:math:`m^3`), .. math:: - \bar{V_{i}} = {\int_t \int_{cell} \int_{0}^{h} g(\mathbf{X},t) \, dz \, d\mathbf{X} \, dt \over \int{t} dt} - = {\sum_{\Delta t} \sum_{n=1}^{ncat} h_n \, a_n \, A \, \Delta t \over N \, \Delta t} + \bar{V}_{i} = {\int_t \int_{cell} \int_{0}^{h} g(\mathbf{X},t) \, dz \, d\mathbf{X} \, dt \over \int{t} dt} + \sim {\sum_{\Delta t} \sum_{n=1}^{ncat} h_n \, a_n \, A \, \Delta t \over N \, \Delta t} = {A \over N} \sum_{\Delta t} \sum_{n=1}^{ncat} h_n \, a_n for thickness :math:`h` assumed to be 0 in open water. Then the ice volume per square meter of grid cell (:math:`m`) is .. math:: - \bar{v_{ice}} = {\int_t \int_{cell} \int_{0}^{h} g(\mathbf{X},t) \, dz \, d\mathbf{X} \, dt \over \int{t} \int_{cell} d\mathbf{X} \, dt} - = {\sum_{\Delta t} \sum_{n=1}^{ncat} h_n \, a_n \, A \, \Delta t \over A \, N \, \Delta t} + \bar{v}_{ice} = {\int_t \int_{cell} \int_{0}^{h} g(\mathbf{X},t) \, dz \, d\mathbf{X} \, dt \over \int_{t} \int_{cell} d\mathbf{X} \, dt} + \sim {\sum_{\Delta t} \sum_{n=1}^{ncat} h_n \, a_n \, A \, \Delta t \over A \, N \, \Delta t} = {1 \over N} \sum_{\Delta t} \sum_{n=1}^{ncat} h_n \, a_n = {1 \over N} \sum_{\Delta t} \sum_{n=1}^{ncat} v_n. :math:`v_{ice}` is the quantity labeled `hi` in history, which can be thought of as the mean ice thickness over the -grid cell. The ice volume per square meter of ice (mean 'actual' ice thickness, :math:`m`) is +grid cell. The ice volume per square meter of ice (mean 'actual' ice thickness, :math:`m`) is + +.. math:: + \bar{h}_{i} = {\int_t \int_{ice} \int_{0}^{h} g(\mathbf{X},t) \, dz \, d\mathbf{X} \, dt \over \int_{t} \int_{ice} d\mathbf{X} \, dt} + \sim {\sum_{\Delta t} \sum_{n=1}^{ncat} h_n \, a_n \, A \, \Delta t \over N \, \Delta t \sum_{n=1}^{ncat} a_n \, A} + = {\sum_{\Delta t} \sum_{n=1}^{ncat} v_n \over N \sum_{n=1}^{ncat} a_n}. + +Snow volume is treated similarly. + +Volume content +~~~~~~~~~~~~~~~~~ + +Total content of tracers such as salt and enthalpy are necessary for conservative coupling. The time-average content +of a volume tracer :math:`b` (with units per :math:`m^2`) is + +.. math:: + \bar{b} = {\int_t \int_{cell} \int_{0}^{h} b(\mathbf{X},z,t) g(\mathbf{X},t) \, dz \, d\mathbf{X} \, dt \over \int_{t} dt} + \sim {\sum_{\Delta t} \sum_{n=1}^{ncat} b_n \, h_n \, a_n \, A \, \Delta t \over N \, \Delta t} + = {A \over N} \sum_{\Delta t} \sum_{n=1}^{ncat} b_n \, v_n + +and the content per square meter of grid cell is + +.. math:: + \bar{b} \sim {1 \over N} \sum_{\Delta t} \sum_{n=1}^{ncat} b_n \, v_n. + +The mean tracer value in sea ice is .. math:: - \bar{h_{i}} = {\int_t \int_{ice} \int_{0}^{h} g(\mathbf{X},t) \, dz \, d\mathbf{X} \, dt \over \int{t} \int_{ice} d\mathbf{X} \, dt} - = {\sum_{\Delta t} \sum_{n=1}^{ncat} h_n \, a_n \, A \, \Delta t \over N \, \Delta t \sum_{n=1}^{ncat} a_n \, A} - = {\sum_{\Delta t} \sum_{n=1}^{ncat} v_n \over N \sum_{n=1}^{ncat} a_n}. + \bar{b}_{ice} = {\int_t \int_{cell} \int_{0}^{h} b(\mathbf{X},z,t) g(\mathbf{X},t) \, dz \, d\mathbf{X} \, dt \over \int_{t} \int_{cell} \int_{0}^{h} dz \, d\mathbf{X} \, dt} + \sim {\sum_{\Delta t} \sum_{n=1}^{ncat} b_n \, h_n \, a_n \, A \, \Delta t \over \sum_{n=1}^{ncat} h_n \, a_n \, A, \, N \, \Delta t} + = {\sum_{\Delta t} \sum_{n=1}^{ncat} b_n \, v_n \over N \sum_{n=1}^{ncat} v_n} +Surface quantities +~~~~~~~~~~~~~~~~~ + +Surface quantities such as temperature are treated similarly as volume tracers, with integrals taken over +the desired surface area rather than the volume. For example + +.. math:: + \bar{T}_{ice} = {\int_t \int_{ice} T(\mathbf{X},t) g(\mathbf{X},t) \, d\mathbf{X} \, dt \over \int_{t} \int_{ice} g(\mathbf{X},t) \, d\mathbf{X} \, dt} + \sim {\sum_{\Delta t} \sum_{n=1}^{ncat} T_n \, a_n \, A \, \Delta t \over \sum_{n=1}^{ncat} a_n \, A \, N \, \Delta t} + = {\sum_{\Delta t} \sum_{n=1}^{ncat} T_n \, a_n \over N \sum_{n=1}^{ncat} a_n}. + +Care is required for tracers averaged over the cell: + +.. math:: + \bar{T}_{cell} = {\int_t \int_{cell} T(\mathbf{X},t) g(\mathbf{X},t) \, d\mathbf{X} \, dt \over \int_{t} \int_{ice} g(\mathbf{X},t) \, d\mathbf{X} \, dt} + \sim {\sum_{\Delta t} \left( T_o \, a_o + \sum_{n=1}^{ncat} T_n \, a_n \right) A \, \Delta t \over \left( a_o + \sum_{n=1}^{ncat} a_n \right) A \, N \, \Delta t} + = {\sum_{\Delta t} \sum_{n=0}^{ncat} T_n \, a_n \over N + +if there is not open water, :math:`a_o=0`. + +If :math:`T_o=0`, then :math:`\bar{T}_{cell} = \sum_{n=1}^{ncat} T_n \, a_n / N`, the category merged (cell-averaged but not ice-averaged) value. +This assumption is often used for time-averaging CICE's history fields (note the similarity with the area tracer :math:`h_n` above): the +category merged value is saved then later divided by the ice area. If a quantity has already been spatially averaged over the ice, e.g. + +.. math:: + T_{i}(t) = {\int_{ice} T(\mathbf{X},t) g(\mathbf{X},t) \, d\mathbf{X} \over \int_{ice} g(\mathbf{X},t) \, d\mathbf{X} + +then + +.. math:: + \bar{T}_{ice} = {\int_t \int_{ice} T(\mathbf{X},t) g(\mathbf{X},t) \, d\mathbf{X} \, dt \over \int_{t} \int_{ice} g(\mathbf{X},t) \, d\mathbf{X} \, dt} + = {\int_t \left( \int_{ice} T(\mathbf{X},t) g(\mathbf{X},t) \, d\mathbf{X} \over \int_{ice} g(\mathbf{X},t) \, d\mathbf{X} \right) \int_{ice} g(\mathbf{X},t) \, d\mathbf{X} \, dt \over \int_{t} \int_{ice} g(\mathbf{X},t) \, d\mathbf{X} \, dt} + = {\int_t \int_{ice} T_{i}(\mathbf{X},t) g(\mathbf{X},t) \, d\mathbf{X} \int_{ice} g(\mathbf{X},t) \, d\mathbf{X} \, dt \over \int_{t} \int_{ice} g(\mathbf{X},t) \, d\mathbf{X} \, dt} + \sim {\sum_{\Delta t} T_{i} \sum_{n=1}^{ncat} a_n \over N \sum_{n=1}^{ncat} a_n}. +In some cases, a portion of the calculation may be done in Icepack and then completed in CICE. .. _addtimer: From 8285fb5bad2e480c9eb743dfdfc90e594e58247f Mon Sep 17 00:00:00 2001 From: eclare108213 Date: Mon, 29 Sep 2025 18:06:46 -0600 Subject: [PATCH 03/25] cleanup --- doc/source/developer_guide/dg_other.rst | 46 ++++++++++++------------- 1 file changed, 23 insertions(+), 23 deletions(-) diff --git a/doc/source/developer_guide/dg_other.rst b/doc/source/developer_guide/dg_other.rst index 34ad94196..b589c9ecf 100644 --- a/doc/source/developer_guide/dg_other.rst +++ b/doc/source/developer_guide/dg_other.rst @@ -104,40 +104,40 @@ ice area is the sum of the thickness category areas :math:`a_n A`: and the ice area fraction is .. math:: - a_{ice}(t) = {1 \over A} \int_{ice} g(\mathbf{X},t) \, d\mathbf{X} \sim \sum_{n=1}^{ncat} a_n(t). + a_{ice}(t) = {\int_{ice} g(\mathbf{X},t) \, d\mathbf{X} \sim \sum_{n=1}^{ncat} a_n(t) \over \int_t \int_{cell} d\mathbf{X} \, dt}. -The time-averaged ice area over an interval of length :math:`N\Delta t` is + The time-averaged ice area over an interval of length :math:`N\Delta t` is -.. math:: - \bar{A}_{i} = {\int_t A_{i}(t) \, dt \over \int_t \, dt} - \sim {\sum_{\Delta t} \sum_{n=1}^{ncat} a_n \, A \, \Delta t \over N \, \Delta t} - = {A \over N} \sum_{\Delta t} \sum_{n=1}^{ncat} a_n + .. math:: + \bar{A}_{i} = {\int_t A_{i}(t) \, dt \over \int_t \, dt} + \sim {\sum_{\Delta t} \sum_{n=1}^{ncat} a_n \, A \, \Delta t \over N \, \Delta t} + = {A \over N} \sum_{\Delta t} \sum_{n=1}^{ncat} a_n -and the time-averaged ice area fraction is + and the time-averaged ice area fraction is -.. math:: - \bar{a}_{ice} = {\int_t \int_{ice} g(\mathbf{X},t) \, d\mathbf{X} \, dt \over \int_t \int_{cell} d\mathbf{X} \, dt} - \sim {\sum_{\Delta t} \sum_{n=1}^{ncat} a_n \, A \Delta t \over A \, N \, \Delta t} - = {1 \over N} \sum_{\Delta t} \sum_{n=1}^{ncat} a_n. + .. math:: + \bar{a}_{ice} = {\int_t \int_{ice} g(\mathbf{X},t) \, d\mathbf{X} \, dt \over \int_t \int_{cell} d\mathbf{X} \, dt} + \sim {\sum_{\Delta t} \sum_{n=1}^{ncat} a_n \, A \Delta t \over A \, N \, \Delta t} + = {1 \over N} \sum_{\Delta t} \sum_{n=1}^{ncat} a_n. -Ice volume -~~~~~~~~~~~~~~~~~ + Ice volume + ~~~~~~~~~~~~~~~~~ -Likewise for time averages of ice volume (:math:`m^3`), + Likewise for time averages of ice volume (:math:`m^3`), -.. math:: - \bar{V}_{i} = {\int_t \int_{cell} \int_{0}^{h} g(\mathbf{X},t) \, dz \, d\mathbf{X} \, dt \over \int{t} dt} + .. math:: + \bar{V}_{i} = {\int_t \int_{cell} \int_{0}^{h} g(\mathbf{X},t) \, dz \, d\mathbf{X} \, dt \over \int_{t} dt} \sim {\sum_{\Delta t} \sum_{n=1}^{ncat} h_n \, a_n \, A \, \Delta t \over N \, \Delta t} = {A \over N} \sum_{\Delta t} \sum_{n=1}^{ncat} h_n \, a_n -for thickness :math:`h` assumed to be 0 in open water. Then the ice volume per square meter of grid cell (:math:`m`) is +for ice thickness :math:`h` assumed to be 0 in open water. Then the ice volume per square meter of grid cell (:math:`m`) is .. math:: \bar{v}_{ice} = {\int_t \int_{cell} \int_{0}^{h} g(\mathbf{X},t) \, dz \, d\mathbf{X} \, dt \over \int_{t} \int_{cell} d\mathbf{X} \, dt} \sim {\sum_{\Delta t} \sum_{n=1}^{ncat} h_n \, a_n \, A \, \Delta t \over A \, N \, \Delta t} = {1 \over N} \sum_{\Delta t} \sum_{n=1}^{ncat} h_n \, a_n = {1 \over N} \sum_{\Delta t} \sum_{n=1}^{ncat} v_n. -:math:`v_{ice}` is the quantity labeled `hi` in history, which can be thought of as the mean ice thickness over the +:math:`v_{ice}` is the quantity labeled `hi` in history, which can be thought of as the mean ice thickness averaged over the entire grid cell. The ice volume per square meter of ice (mean 'actual' ice thickness, :math:`m`) is .. math:: @@ -154,26 +154,26 @@ Total content of tracers such as salt and enthalpy are necessary for conservativ of a volume tracer :math:`b` (with units per :math:`m^2`) is .. math:: - \bar{b} = {\int_t \int_{cell} \int_{0}^{h} b(\mathbf{X},z,t) g(\mathbf{X},t) \, dz \, d\mathbf{X} \, dt \over \int_{t} dt} + \bar{B}_{i} = {\int_t \int_{cell} \int_{0}^{h} b(\mathbf{X},z,t) g(\mathbf{X},t) \, dz \, d\mathbf{X} \, dt \over \int_{t} dt} \sim {\sum_{\Delta t} \sum_{n=1}^{ncat} b_n \, h_n \, a_n \, A \, \Delta t \over N \, \Delta t} = {A \over N} \sum_{\Delta t} \sum_{n=1}^{ncat} b_n \, v_n and the content per square meter of grid cell is .. math:: - \bar{b} \sim {1 \over N} \sum_{\Delta t} \sum_{n=1}^{ncat} b_n \, v_n. + \bar{b}_{ice} \sim {1 \over N} \sum_{\Delta t} \sum_{n=1}^{ncat} b_n \, v_n. The mean tracer value in sea ice is .. math:: - \bar{b}_{ice} = {\int_t \int_{cell} \int_{0}^{h} b(\mathbf{X},z,t) g(\mathbf{X},t) \, dz \, d\mathbf{X} \, dt \over \int_{t} \int_{cell} \int_{0}^{h} dz \, d\mathbf{X} \, dt} + \bar{b}_{i} = {\int_t \int_{cell} \int_{0}^{h} b(\mathbf{X},z,t) g(\mathbf{X},t) \, dz \, d\mathbf{X} \, dt \over \int_{t} \int_{cell} \int_{0}^{h} dz \, d\mathbf{X} \, dt} \sim {\sum_{\Delta t} \sum_{n=1}^{ncat} b_n \, h_n \, a_n \, A \, \Delta t \over \sum_{n=1}^{ncat} h_n \, a_n \, A, \, N \, \Delta t} = {\sum_{\Delta t} \sum_{n=1}^{ncat} b_n \, v_n \over N \sum_{n=1}^{ncat} v_n} Surface quantities ~~~~~~~~~~~~~~~~~ -Surface quantities such as temperature are treated similarly as volume tracers, with integrals taken over +Surface quantities such as temperature are treated similarly to volume tracers, with integrals taken over the desired surface area rather than the volume. For example .. math:: @@ -186,7 +186,7 @@ Care is required for tracers averaged over the cell: .. math:: \bar{T}_{cell} = {\int_t \int_{cell} T(\mathbf{X},t) g(\mathbf{X},t) \, d\mathbf{X} \, dt \over \int_{t} \int_{ice} g(\mathbf{X},t) \, d\mathbf{X} \, dt} \sim {\sum_{\Delta t} \left( T_o \, a_o + \sum_{n=1}^{ncat} T_n \, a_n \right) A \, \Delta t \over \left( a_o + \sum_{n=1}^{ncat} a_n \right) A \, N \, \Delta t} - = {\sum_{\Delta t} \sum_{n=0}^{ncat} T_n \, a_n \over N + = {\sum_{\Delta t} \sum_{n=0}^{ncat} T_n \, a_n} \over N} if there is not open water, :math:`a_o=0`. From 11e1da1287114523630540d70f8e1438b43bdfb1 Mon Sep 17 00:00:00 2001 From: eclare108213 Date: Mon, 29 Sep 2025 18:13:05 -0600 Subject: [PATCH 04/25] cleanup --- doc/source/developer_guide/dg_other.rst | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/doc/source/developer_guide/dg_other.rst b/doc/source/developer_guide/dg_other.rst index b589c9ecf..eb5683a6f 100644 --- a/doc/source/developer_guide/dg_other.rst +++ b/doc/source/developer_guide/dg_other.rst @@ -186,7 +186,7 @@ Care is required for tracers averaged over the cell: .. math:: \bar{T}_{cell} = {\int_t \int_{cell} T(\mathbf{X},t) g(\mathbf{X},t) \, d\mathbf{X} \, dt \over \int_{t} \int_{ice} g(\mathbf{X},t) \, d\mathbf{X} \, dt} \sim {\sum_{\Delta t} \left( T_o \, a_o + \sum_{n=1}^{ncat} T_n \, a_n \right) A \, \Delta t \over \left( a_o + \sum_{n=1}^{ncat} a_n \right) A \, N \, \Delta t} - = {\sum_{\Delta t} \sum_{n=0}^{ncat} T_n \, a_n} \over N} + = {\sum_{\Delta t} \sum_{n=0}^{ncat} T_n \, a_n \over N} if there is not open water, :math:`a_o=0`. @@ -201,8 +201,7 @@ then .. math:: \bar{T}_{ice} = {\int_t \int_{ice} T(\mathbf{X},t) g(\mathbf{X},t) \, d\mathbf{X} \, dt \over \int_{t} \int_{ice} g(\mathbf{X},t) \, d\mathbf{X} \, dt} - = {\int_t \left( \int_{ice} T(\mathbf{X},t) g(\mathbf{X},t) \, d\mathbf{X} \over \int_{ice} g(\mathbf{X},t) \, d\mathbf{X} \right) \int_{ice} g(\mathbf{X},t) \, d\mathbf{X} \, dt \over \int_{t} \int_{ice} g(\mathbf{X},t) \, d\mathbf{X} \, dt} - = {\int_t \int_{ice} T_{i}(\mathbf{X},t) g(\mathbf{X},t) \, d\mathbf{X} \int_{ice} g(\mathbf{X},t) \, d\mathbf{X} \, dt \over \int_{t} \int_{ice} g(\mathbf{X},t) \, d\mathbf{X} \, dt} + = {\int_t \left( T_{i}(t) \right)\left( \int_{ice} g(\mathbf{X},t) \, d\mathbf{X} \right) dt \over \int_{t} \int_{ice} g(\mathbf{X},t) \, d\mathbf{X} \, dt} \sim {\sum_{\Delta t} T_{i} \sum_{n=1}^{ncat} a_n \over N \sum_{n=1}^{ncat} a_n}. In some cases, a portion of the calculation may be done in Icepack and then completed in CICE. From 4a76d14dfe99770078c742d526cc832fdd258c6c Mon Sep 17 00:00:00 2001 From: eclare108213 Date: Mon, 29 Sep 2025 18:22:52 -0600 Subject: [PATCH 05/25] cleanup --- doc/source/developer_guide/dg_other.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/source/developer_guide/dg_other.rst b/doc/source/developer_guide/dg_other.rst index eb5683a6f..ed7bb357e 100644 --- a/doc/source/developer_guide/dg_other.rst +++ b/doc/source/developer_guide/dg_other.rst @@ -186,7 +186,7 @@ Care is required for tracers averaged over the cell: .. math:: \bar{T}_{cell} = {\int_t \int_{cell} T(\mathbf{X},t) g(\mathbf{X},t) \, d\mathbf{X} \, dt \over \int_{t} \int_{ice} g(\mathbf{X},t) \, d\mathbf{X} \, dt} \sim {\sum_{\Delta t} \left( T_o \, a_o + \sum_{n=1}^{ncat} T_n \, a_n \right) A \, \Delta t \over \left( a_o + \sum_{n=1}^{ncat} a_n \right) A \, N \, \Delta t} - = {\sum_{\Delta t} \sum_{n=0}^{ncat} T_n \, a_n \over N} + = {1 \over N} \sum_{\Delta t} \sum_{n=1}^{ncat} T_n \, a_n if there is not open water, :math:`a_o=0`. From 80a239f7cd9462edd873aea8502419f45a7df2ab Mon Sep 17 00:00:00 2001 From: eclare108213 Date: Mon, 29 Sep 2025 18:27:17 -0600 Subject: [PATCH 06/25] cleanup --- doc/source/developer_guide/dg_other.rst | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/doc/source/developer_guide/dg_other.rst b/doc/source/developer_guide/dg_other.rst index ed7bb357e..a3212b522 100644 --- a/doc/source/developer_guide/dg_other.rst +++ b/doc/source/developer_guide/dg_other.rst @@ -178,16 +178,13 @@ the desired surface area rather than the volume. For example .. math:: \bar{T}_{ice} = {\int_t \int_{ice} T(\mathbf{X},t) g(\mathbf{X},t) \, d\mathbf{X} \, dt \over \int_{t} \int_{ice} g(\mathbf{X},t) \, d\mathbf{X} \, dt} - \sim {\sum_{\Delta t} \sum_{n=1}^{ncat} T_n \, a_n \, A \, \Delta t \over \sum_{n=1}^{ncat} a_n \, A \, N \, \Delta t} - = {\sum_{\Delta t} \sum_{n=1}^{ncat} T_n \, a_n \over N \sum_{n=1}^{ncat} a_n}. Care is required for tracers averaged over the cell: .. math:: \bar{T}_{cell} = {\int_t \int_{cell} T(\mathbf{X},t) g(\mathbf{X},t) \, d\mathbf{X} \, dt \over \int_{t} \int_{ice} g(\mathbf{X},t) \, d\mathbf{X} \, dt} - \sim {\sum_{\Delta t} \left( T_o \, a_o + \sum_{n=1}^{ncat} T_n \, a_n \right) A \, \Delta t \over \left( a_o + \sum_{n=1}^{ncat} a_n \right) A \, N \, \Delta t} - = {1 \over N} \sum_{\Delta t} \sum_{n=1}^{ncat} T_n \, a_n + if there is not open water, :math:`a_o=0`. If :math:`T_o=0`, then :math:`\bar{T}_{cell} = \sum_{n=1}^{ncat} T_n \, a_n / N`, the category merged (cell-averaged but not ice-averaged) value. From cab4583091e4e1312bb631992e797b893cc861de Mon Sep 17 00:00:00 2001 From: eclare108213 Date: Mon, 29 Sep 2025 18:32:15 -0600 Subject: [PATCH 07/25] cleanup --- doc/source/developer_guide/dg_other.rst | 27 +++++++++++++------------ 1 file changed, 14 insertions(+), 13 deletions(-) diff --git a/doc/source/developer_guide/dg_other.rst b/doc/source/developer_guide/dg_other.rst index a3212b522..47e96947d 100644 --- a/doc/source/developer_guide/dg_other.rst +++ b/doc/source/developer_guide/dg_other.rst @@ -104,29 +104,30 @@ ice area is the sum of the thickness category areas :math:`a_n A`: and the ice area fraction is .. math:: - a_{ice}(t) = {\int_{ice} g(\mathbf{X},t) \, d\mathbf{X} \sim \sum_{n=1}^{ncat} a_n(t) \over \int_t \int_{cell} d\mathbf{X} \, dt}. + a_{ice}(t) = {\int_{ice} g(\mathbf{X},t) \, d\mathbf{X} \sim \sum_{n=1}^{ncat} a_n(t) \over \int_t \int_{cell} d\mathbf{X} \, dt}. - The time-averaged ice area over an interval of length :math:`N\Delta t` is - .. math:: - \bar{A}_{i} = {\int_t A_{i}(t) \, dt \over \int_t \, dt} - \sim {\sum_{\Delta t} \sum_{n=1}^{ncat} a_n \, A \, \Delta t \over N \, \Delta t} - = {A \over N} \sum_{\Delta t} \sum_{n=1}^{ncat} a_n +The time-averaged ice area over an interval of length :math:`N\Delta t` is - and the time-averaged ice area fraction is +.. math:: + \bar{A}_{i} = {\int_t A_{i}(t) \, dt \over \int_t \, dt} + \sim {\sum_{\Delta t} \sum_{n=1}^{ncat} a_n \, A \, \Delta t \over N \, \Delta t} + = {A \over N} \sum_{\Delta t} \sum_{n=1}^{ncat} a_n + +and the time-averaged ice area fraction is - .. math:: - \bar{a}_{ice} = {\int_t \int_{ice} g(\mathbf{X},t) \, d\mathbf{X} \, dt \over \int_t \int_{cell} d\mathbf{X} \, dt} - \sim {\sum_{\Delta t} \sum_{n=1}^{ncat} a_n \, A \Delta t \over A \, N \, \Delta t} - = {1 \over N} \sum_{\Delta t} \sum_{n=1}^{ncat} a_n. +.. math:: + \bar{a}_{ice} = {\int_t \int_{ice} g(\mathbf{X},t) \, d\mathbf{X} \, dt \over \int_t \int_{cell} d\mathbf{X} \, dt} + \sim {\sum_{\Delta t} \sum_{n=1}^{ncat} a_n \, A \Delta t \over A \, N \, \Delta t} + = {1 \over N} \sum_{\Delta t} \sum_{n=1}^{ncat} a_n. Ice volume ~~~~~~~~~~~~~~~~~ Likewise for time averages of ice volume (:math:`m^3`), - .. math:: - \bar{V}_{i} = {\int_t \int_{cell} \int_{0}^{h} g(\mathbf{X},t) \, dz \, d\mathbf{X} \, dt \over \int_{t} dt} +.. math:: + \bar{V}_{i} = {\int_t \int_{cell} \int_{0}^{h} g(\mathbf{X},t) \, dz \, d\mathbf{X} \, dt \over \int_{t} dt} \sim {\sum_{\Delta t} \sum_{n=1}^{ncat} h_n \, a_n \, A \, \Delta t \over N \, \Delta t} = {A \over N} \sum_{\Delta t} \sum_{n=1}^{ncat} h_n \, a_n From e763b0547c74ca1e66804e747d10f2dfa53d1873 Mon Sep 17 00:00:00 2001 From: eclare108213 Date: Mon, 29 Sep 2025 19:02:56 -0600 Subject: [PATCH 08/25] cleanup --- doc/source/developer_guide/dg_other.rst | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/doc/source/developer_guide/dg_other.rst b/doc/source/developer_guide/dg_other.rst index 47e96947d..b68dc85bb 100644 --- a/doc/source/developer_guide/dg_other.rst +++ b/doc/source/developer_guide/dg_other.rst @@ -104,7 +104,7 @@ ice area is the sum of the thickness category areas :math:`a_n A`: and the ice area fraction is .. math:: - a_{ice}(t) = {\int_{ice} g(\mathbf{X},t) \, d\mathbf{X} \sim \sum_{n=1}^{ncat} a_n(t) \over \int_t \int_{cell} d\mathbf{X} \, dt}. + a_{ice}(t) = {\int_{ice} g(\mathbf{X},t) \, d\mathbf{X} \over \int_t \int_{cell} d\mathbf{X} \, dt} \sim \sum_{n=1}^{ncat} a_n(t). The time-averaged ice area over an interval of length :math:`N\Delta t` is @@ -121,10 +121,10 @@ and the time-averaged ice area fraction is \sim {\sum_{\Delta t} \sum_{n=1}^{ncat} a_n \, A \Delta t \over A \, N \, \Delta t} = {1 \over N} \sum_{\Delta t} \sum_{n=1}^{ncat} a_n. - Ice volume - ~~~~~~~~~~~~~~~~~ +Ice volume +~~~~~~~~~~~~~~~~~ - Likewise for time averages of ice volume (:math:`m^3`), +Likewise for time averages of ice volume (:math:`m^3`), .. math:: \bar{V}_{i} = {\int_t \int_{cell} \int_{0}^{h} g(\mathbf{X},t) \, dz \, d\mathbf{X} \, dt \over \int_{t} dt} @@ -184,6 +184,7 @@ Care is required for tracers averaged over the cell: .. math:: \bar{T}_{cell} = {\int_t \int_{cell} T(\mathbf{X},t) g(\mathbf{X},t) \, d\mathbf{X} \, dt \over \int_{t} \int_{ice} g(\mathbf{X},t) \, d\mathbf{X} \, dt} + \sim {\sum_{\Delta t} \left( T_o \, a_o + \sum_{n=1}^{ncat} T_n \, a_n \right) A \, \Delta t \over \left( a_o + \sum_{n=1}^{ncat} a_n \right) A \, N \, \Delta t} if there is not open water, :math:`a_o=0`. From 5746a4ff13d1ff8e859f177a8855a6df44d5feaf Mon Sep 17 00:00:00 2001 From: eclare108213 Date: Mon, 29 Sep 2025 19:13:57 -0600 Subject: [PATCH 09/25] cleanup --- doc/source/developer_guide/dg_other.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/source/developer_guide/dg_other.rst b/doc/source/developer_guide/dg_other.rst index b68dc85bb..c6c08df20 100644 --- a/doc/source/developer_guide/dg_other.rst +++ b/doc/source/developer_guide/dg_other.rst @@ -168,7 +168,7 @@ The mean tracer value in sea ice is .. math:: \bar{b}_{i} = {\int_t \int_{cell} \int_{0}^{h} b(\mathbf{X},z,t) g(\mathbf{X},t) \, dz \, d\mathbf{X} \, dt \over \int_{t} \int_{cell} \int_{0}^{h} dz \, d\mathbf{X} \, dt} - \sim {\sum_{\Delta t} \sum_{n=1}^{ncat} b_n \, h_n \, a_n \, A \, \Delta t \over \sum_{n=1}^{ncat} h_n \, a_n \, A, \, N \, \Delta t} + \sim {\sum_{\Delta t} \sum_{n=1}^{ncat} b_n \, h_n \, a_n \, A \, \Delta t \over \sum_{n=1}^{ncat} h_n \, a_n \, A \, N \, \Delta t} = {\sum_{\Delta t} \sum_{n=1}^{ncat} b_n \, v_n \over N \sum_{n=1}^{ncat} v_n} Surface quantities From e85dea8755461fa95c466b711d64f924029f203c Mon Sep 17 00:00:00 2001 From: eclare108213 Date: Mon, 29 Sep 2025 19:46:12 -0600 Subject: [PATCH 10/25] cleanup --- doc/source/developer_guide/dg_other.rst | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/doc/source/developer_guide/dg_other.rst b/doc/source/developer_guide/dg_other.rst index c6c08df20..69a11082e 100644 --- a/doc/source/developer_guide/dg_other.rst +++ b/doc/source/developer_guide/dg_other.rst @@ -184,14 +184,17 @@ Care is required for tracers averaged over the cell: .. math:: \bar{T}_{cell} = {\int_t \int_{cell} T(\mathbf{X},t) g(\mathbf{X},t) \, d\mathbf{X} \, dt \over \int_{t} \int_{ice} g(\mathbf{X},t) \, d\mathbf{X} \, dt} - \sim {\sum_{\Delta t} \left( T_o \, a_o + \sum_{n=1}^{ncat} T_n \, a_n \right) A \, \Delta t \over \left( a_o + \sum_{n=1}^{ncat} a_n \right) A \, N \, \Delta t} - + \sim {\sum_{\Delta t} \sum_{n=0}^{ncat} T_n \, a_n \, A \, \Delta t \over \sum_{n=0}^{ncat} a_n \, A \, N \, \Delta t} + = {\sum_{\Delta t} \left( T_o \, a_o + \sum_{n=1}^{ncat} T_n \, a_n \right) \over N}. -if there is not open water, :math:`a_o=0`. +If the tracer is (or is assumed to be) zero in open water, :math:`T_o=0` then the time average is easily computed using the +category merged (cell-averaged but not ice-averaged) value. + +.. math:: + \bar{T}_{cell} = {1 \over N} \sum_{\Delta t} \sum_{n=1}^{ncat} T_n \, a_n. -If :math:`T_o=0`, then :math:`\bar{T}_{cell} = \sum_{n=1}^{ncat} T_n \, a_n / N`, the category merged (cell-averaged but not ice-averaged) value. -This assumption is often used for time-averaging CICE's history fields (note the similarity with the area tracer :math:`h_n` above): the -category merged value is saved then later divided by the ice area. If a quantity has already been spatially averaged over the ice, e.g. +This assumption is often used for time-averaging CICE's history fields: thecategory merged value is saved then later divided by the ice area. +If a quantity has already been spatially averaged over the ice, e.g. .. math:: T_{i}(t) = {\int_{ice} T(\mathbf{X},t) g(\mathbf{X},t) \, d\mathbf{X} \over \int_{ice} g(\mathbf{X},t) \, d\mathbf{X} @@ -200,8 +203,8 @@ then .. math:: \bar{T}_{ice} = {\int_t \int_{ice} T(\mathbf{X},t) g(\mathbf{X},t) \, d\mathbf{X} \, dt \over \int_{t} \int_{ice} g(\mathbf{X},t) \, d\mathbf{X} \, dt} - = {\int_t \left( T_{i}(t) \right)\left( \int_{ice} g(\mathbf{X},t) \, d\mathbf{X} \right) dt \over \int_{t} \int_{ice} g(\mathbf{X},t) \, d\mathbf{X} \, dt} - \sim {\sum_{\Delta t} T_{i} \sum_{n=1}^{ncat} a_n \over N \sum_{n=1}^{ncat} a_n}. + = {\int_t T_{i}(t) \left( \int_{ice} g(\mathbf{X},t) \, d\mathbf{X} \right) dt \over \int_{t} \int_{ice} g(\mathbf{X},t) \, d\mathbf{X} \, dt} + \sim {\sum_{\Delta t} \left( T_{i} \sum_{n=1}^{ncat} a_n \right) \over N \sum_{n=1}^{ncat} a_n}. In some cases, a portion of the calculation may be done in Icepack and then completed in CICE. From acd12b45ded4d6f968c9a7c66ebdd62a86ff3b7c Mon Sep 17 00:00:00 2001 From: eclare108213 Date: Mon, 29 Sep 2025 19:57:53 -0600 Subject: [PATCH 11/25] cleanup --- doc/source/developer_guide/dg_other.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/source/developer_guide/dg_other.rst b/doc/source/developer_guide/dg_other.rst index 69a11082e..cdf1eeba8 100644 --- a/doc/source/developer_guide/dg_other.rst +++ b/doc/source/developer_guide/dg_other.rst @@ -187,13 +187,13 @@ Care is required for tracers averaged over the cell: \sim {\sum_{\Delta t} \sum_{n=0}^{ncat} T_n \, a_n \, A \, \Delta t \over \sum_{n=0}^{ncat} a_n \, A \, N \, \Delta t} = {\sum_{\Delta t} \left( T_o \, a_o + \sum_{n=1}^{ncat} T_n \, a_n \right) \over N}. -If the tracer is (or is assumed to be) zero in open water, :math:`T_o=0` then the time average is easily computed using the +If the tracer is (or is assumed to be) zero in open water, :math:`T_o=0`, then the time average is computed using the category merged (cell-averaged but not ice-averaged) value. .. math:: \bar{T}_{cell} = {1 \over N} \sum_{\Delta t} \sum_{n=1}^{ncat} T_n \, a_n. -This assumption is often used for time-averaging CICE's history fields: thecategory merged value is saved then later divided by the ice area. +This assumption is often used for time-averaging CICE's history fields: the category-merged value is saved then later divided by the ice area. If a quantity has already been spatially averaged over the ice, e.g. .. math:: From 267c07eae4f85cba1033b2bae6ee187093ea50c2 Mon Sep 17 00:00:00 2001 From: eclare108213 Date: Mon, 29 Sep 2025 20:05:12 -0600 Subject: [PATCH 12/25] cleanup --- doc/source/developer_guide/dg_other.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/source/developer_guide/dg_other.rst b/doc/source/developer_guide/dg_other.rst index cdf1eeba8..f253f46b6 100644 --- a/doc/source/developer_guide/dg_other.rst +++ b/doc/source/developer_guide/dg_other.rst @@ -197,7 +197,7 @@ This assumption is often used for time-averaging CICE's history fields: the cate If a quantity has already been spatially averaged over the ice, e.g. .. math:: - T_{i}(t) = {\int_{ice} T(\mathbf{X},t) g(\mathbf{X},t) \, d\mathbf{X} \over \int_{ice} g(\mathbf{X},t) \, d\mathbf{X} + T_i(t) = \frac{ \int_{ice} T(\mathbf{X},t) g(\mathbf{X},t) \, d\mathbf{X} }{ \int_{ice} g(\mathbf{X},t) \, d\mathbf{X} } then From cb55471f8107ab1be0d79ab636f058a2d8060892 Mon Sep 17 00:00:00 2001 From: eclare108213 Date: Mon, 29 Sep 2025 20:24:11 -0600 Subject: [PATCH 13/25] cleanup --- doc/source/developer_guide/dg_other.rst | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/doc/source/developer_guide/dg_other.rst b/doc/source/developer_guide/dg_other.rst index f253f46b6..76bb1abb1 100644 --- a/doc/source/developer_guide/dg_other.rst +++ b/doc/source/developer_guide/dg_other.rst @@ -208,6 +208,25 @@ then In some cases, a portion of the calculation may be done in Icepack and then completed in CICE. +Tracer hierarchies +~~~~~~~~~~~~~~~~~ + +For tracers that are carried on other tracers, such as melt ponds, averages over different areas of a given cell differ in the denominator. +For instance, the average melt pond depth over a grid cell, the ice area, and the ponded area are, respectively, + +.. math:: + h_p_{cell}(t) = \frac{ \int_{cell} h_p(\mathbf{X},t) \, a_p(\mathbf{X},t) \, g(\mathbf{X},t) \, d\mathbf{X} } + { \int_{cell} d\mathbf{X} } + +.. math:: + h_p_{ice}(t) = \frac{ \int_{cell} h_p(\mathbf{X},t) \, a_p(\mathbf{X},t) \, g(\mathbf{X},t) \, d\mathbf{X} } + { \int_{cell} g(\mathbf{X},t) \, d\mathbf{X} } + +.. math:: + h_p_{pond}(t) = \frac{ \int_{cell} h_p(\mathbf{X},t) \, a_p(\mathbf{X},t) \, g(\mathbf{X},t) \, d\mathbf{X} } + { \int_{cell} a_p(\mathbf{X},t) \, g(\mathbf{X},t) \, d\mathbf{X} } + +Time averages follow analogously as above. .. _addtimer: From 2a41732cba1613132193807889537a2168bb5ee6 Mon Sep 17 00:00:00 2001 From: eclare108213 Date: Mon, 29 Sep 2025 20:26:22 -0600 Subject: [PATCH 14/25] cleanup --- doc/source/developer_guide/dg_other.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/doc/source/developer_guide/dg_other.rst b/doc/source/developer_guide/dg_other.rst index 76bb1abb1..5e852552e 100644 --- a/doc/source/developer_guide/dg_other.rst +++ b/doc/source/developer_guide/dg_other.rst @@ -215,15 +215,15 @@ For tracers that are carried on other tracers, such as melt ponds, averages over For instance, the average melt pond depth over a grid cell, the ice area, and the ponded area are, respectively, .. math:: - h_p_{cell}(t) = \frac{ \int_{cell} h_p(\mathbf{X},t) \, a_p(\mathbf{X},t) \, g(\mathbf{X},t) \, d\mathbf{X} } + h_{p\,cell}(t) = \frac{ \int_{cell} h_p(\mathbf{X},t) \, a_p(\mathbf{X},t) \, g(\mathbf{X},t) \, d\mathbf{X} } { \int_{cell} d\mathbf{X} } .. math:: - h_p_{ice}(t) = \frac{ \int_{cell} h_p(\mathbf{X},t) \, a_p(\mathbf{X},t) \, g(\mathbf{X},t) \, d\mathbf{X} } + h_{p\,ice}(t) = \frac{ \int_{cell} h_p(\mathbf{X},t) \, a_p(\mathbf{X},t) \, g(\mathbf{X},t) \, d\mathbf{X} } { \int_{cell} g(\mathbf{X},t) \, d\mathbf{X} } .. math:: - h_p_{pond}(t) = \frac{ \int_{cell} h_p(\mathbf{X},t) \, a_p(\mathbf{X},t) \, g(\mathbf{X},t) \, d\mathbf{X} } + h_{p\,pond}(t) = \frac{ \int_{cell} h_p(\mathbf{X},t) \, a_p(\mathbf{X},t) \, g(\mathbf{X},t) \, d\mathbf{X} } { \int_{cell} a_p(\mathbf{X},t) \, g(\mathbf{X},t) \, d\mathbf{X} } Time averages follow analogously as above. From fc51aaa4f0392178b7132f295b445f10972e45d8 Mon Sep 17 00:00:00 2001 From: eclare108213 Date: Mon, 29 Sep 2025 20:30:37 -0600 Subject: [PATCH 15/25] cleanup --- doc/source/developer_guide/dg_other.rst | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/doc/source/developer_guide/dg_other.rst b/doc/source/developer_guide/dg_other.rst index 5e852552e..89d73eb47 100644 --- a/doc/source/developer_guide/dg_other.rst +++ b/doc/source/developer_guide/dg_other.rst @@ -212,19 +212,19 @@ Tracer hierarchies ~~~~~~~~~~~~~~~~~ For tracers that are carried on other tracers, such as melt ponds, averages over different areas of a given cell differ in the denominator. -For instance, the average melt pond depth over a grid cell, the ice area, and the ponded area are, respectively, +For instance, the average melt pond depths over a grid cell, the ice area, and the ponded area are, respectively, .. math:: - h_{p\,cell}(t) = \frac{ \int_{cell} h_p(\mathbf{X},t) \, a_p(\mathbf{X},t) \, g(\mathbf{X},t) \, d\mathbf{X} } - { \int_{cell} d\mathbf{X} } + h_{p\,cell} = \frac{ \int_{cell} h_p \, a_p \, g \, d\mathbf{X} } + { \int_{cell} d\mathbf{X} } .. math:: - h_{p\,ice}(t) = \frac{ \int_{cell} h_p(\mathbf{X},t) \, a_p(\mathbf{X},t) \, g(\mathbf{X},t) \, d\mathbf{X} } - { \int_{cell} g(\mathbf{X},t) \, d\mathbf{X} } + h_{p\,ice} = \frac{ \int_{cell} h_p \, a_p \, g \, d\mathbf{X} } + { \int_{cell} g \, d\mathbf{X} } .. math:: - h_{p\,pond}(t) = \frac{ \int_{cell} h_p(\mathbf{X},t) \, a_p(\mathbf{X},t) \, g(\mathbf{X},t) \, d\mathbf{X} } - { \int_{cell} a_p(\mathbf{X},t) \, g(\mathbf{X},t) \, d\mathbf{X} } + h_{p\,pond} = \frac{ \int_{cell} h_p \, a_p \, g \, d\mathbf{X} } + { \int_{cell} a_p \, g \, d\mathbf{X} } Time averages follow analogously as above. From 38410e94824c08c37dcaa871450f95c5f896e701 Mon Sep 17 00:00:00 2001 From: eclare108213 Date: Mon, 29 Sep 2025 20:35:58 -0600 Subject: [PATCH 16/25] cleanup --- doc/source/developer_guide/dg_other.rst | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/doc/source/developer_guide/dg_other.rst b/doc/source/developer_guide/dg_other.rst index 89d73eb47..5d5f360ee 100644 --- a/doc/source/developer_guide/dg_other.rst +++ b/doc/source/developer_guide/dg_other.rst @@ -212,19 +212,23 @@ Tracer hierarchies ~~~~~~~~~~~~~~~~~ For tracers that are carried on other tracers, such as melt ponds, averages over different areas of a given cell differ in the denominator. -For instance, the average melt pond depths over a grid cell, the ice area, and the ponded area are, respectively, +For instance, the average melt pond depths over the grid cell area, the ice area, and the ponded area are, respectively, .. math:: h_{p\,cell} = \frac{ \int_{cell} h_p \, a_p \, g \, d\mathbf{X} } { \int_{cell} d\mathbf{X} } .. math:: - h_{p\,ice} = \frac{ \int_{cell} h_p \, a_p \, g \, d\mathbf{X} } - { \int_{cell} g \, d\mathbf{X} } + h_{p\,ice} = \frac{ \int_{ice} h_p \, a_p \, g \, d\mathbf{X} } + { \int_{ice} g \, d\mathbf{X} } + = \frac{ \int_{cell} h_p \, a_p \, g \, d\mathbf{X} } + { \int_{ice} g \, d\mathbf{X} } .. math:: - h_{p\,pond} = \frac{ \int_{cell} h_p \, a_p \, g \, d\mathbf{X} } - { \int_{cell} a_p \, g \, d\mathbf{X} } + h_{p\,pond} = \frac{ \int_{pond} h_p \, a_p \, g \, d\mathbf{X} } + { \int_{pond} a_p \, g \, d\mathbf{X} } + = \frac{ \int_{cell} h_p \, a_p \, g \, d\mathbf{X} } + { \int_{pond} a_p \, g \, d\mathbf{X} } Time averages follow analogously as above. From fbb02d140e5fb0c7f723851c7a2a1114143a1286 Mon Sep 17 00:00:00 2001 From: eclare108213 Date: Mon, 29 Sep 2025 20:43:39 -0600 Subject: [PATCH 17/25] cleanup --- doc/source/developer_guide/dg_other.rst | 3 +++ 1 file changed, 3 insertions(+) diff --git a/doc/source/developer_guide/dg_other.rst b/doc/source/developer_guide/dg_other.rst index 5d5f360ee..c9aaa3b3c 100644 --- a/doc/source/developer_guide/dg_other.rst +++ b/doc/source/developer_guide/dg_other.rst @@ -217,18 +217,21 @@ For instance, the average melt pond depths over the grid cell area, the ice area .. math:: h_{p\,cell} = \frac{ \int_{cell} h_p \, a_p \, g \, d\mathbf{X} } { \int_{cell} d\mathbf{X} } + \sim \sum_{n=1}^{ncat} h_{pn} \, a_{pn} \, a_n .. math:: h_{p\,ice} = \frac{ \int_{ice} h_p \, a_p \, g \, d\mathbf{X} } { \int_{ice} g \, d\mathbf{X} } = \frac{ \int_{cell} h_p \, a_p \, g \, d\mathbf{X} } { \int_{ice} g \, d\mathbf{X} } + \sim \frac{ \sum_{n=1}^{ncat} h_{pn} \, a_{pn} \, a_n }{ \sum_{n=1}^{ncat} a_n } .. math:: h_{p\,pond} = \frac{ \int_{pond} h_p \, a_p \, g \, d\mathbf{X} } { \int_{pond} a_p \, g \, d\mathbf{X} } = \frac{ \int_{cell} h_p \, a_p \, g \, d\mathbf{X} } { \int_{pond} a_p \, g \, d\mathbf{X} } + \sim \frac{ \sum_{n=1}^{ncat} h_{pn} \, a_{pn} \, a_n }{ \sum_{n=1}^{ncat} a_{pn} \, a_n } Time averages follow analogously as above. From 0d04d8ed1518ea53b4cb8a37d49469763bc694b9 Mon Sep 17 00:00:00 2001 From: eclare108213 Date: Mon, 29 Sep 2025 20:49:33 -0600 Subject: [PATCH 18/25] cleanup --- doc/source/developer_guide/dg_other.rst | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/doc/source/developer_guide/dg_other.rst b/doc/source/developer_guide/dg_other.rst index c9aaa3b3c..c5cbcdf16 100644 --- a/doc/source/developer_guide/dg_other.rst +++ b/doc/source/developer_guide/dg_other.rst @@ -212,7 +212,7 @@ Tracer hierarchies ~~~~~~~~~~~~~~~~~ For tracers that are carried on other tracers, such as melt ponds, averages over different areas of a given cell differ in the denominator. -For instance, the average melt pond depths over the grid cell area, the ice area, and the ponded area are, respectively, +For melt ponds not carried on the level-ice area, the average pond depths over the grid cell area, the ice area, and the ponded area are, respectively, .. math:: h_{p\,cell} = \frac{ \int_{cell} h_p \, a_p \, g \, d\mathbf{X} } @@ -233,6 +233,15 @@ For instance, the average melt pond depths over the grid cell area, the ice area { \int_{pond} a_p \, g \, d\mathbf{X} } \sim \frac{ \sum_{n=1}^{ncat} h_{pn} \, a_{pn} \, a_n }{ \sum_{n=1}^{ncat} a_{pn} \, a_n } +For level-ice ponds, there is an extra factor of :math:`a_{lvl}`, and the level-ice pond depth averaged over the level ice is + +.. math:: + h_{p\,lvl} = \frac{ \int_{lvl} h_p \, a_p \, a_{lvl} \, g \, d\mathbf{X} } + { \int_{lvl} a_p \, a_{lvl} \, g \, d\mathbf{X} } + = \frac{ \int_{cell} h_p \, a_p \, a_{lvl} \, g \, d\mathbf{X} } + { \int_{pond} a_p \, a_{lvl} \, g \, d\mathbf{X} } + \sim \frac{ \sum_{n=1}^{ncat} h_{pn} \, a_{pn} \, a_{lvln} \, a_n }{ \sum_{n=1}^{ncat} a_{pn} \, a_{lvln} \, a_n } + Time averages follow analogously as above. .. _addtimer: From c33ba5efa78220b9d45ebfe0e5fffbd963bc5c85 Mon Sep 17 00:00:00 2001 From: eclare108213 Date: Mon, 29 Sep 2025 21:00:55 -0600 Subject: [PATCH 19/25] cleanup --- doc/source/developer_guide/dg_other.rst | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/doc/source/developer_guide/dg_other.rst b/doc/source/developer_guide/dg_other.rst index c5cbcdf16..29894ccc7 100644 --- a/doc/source/developer_guide/dg_other.rst +++ b/doc/source/developer_guide/dg_other.rst @@ -230,17 +230,24 @@ For melt ponds not carried on the level-ice area, the average pond depths over t h_{p\,pond} = \frac{ \int_{pond} h_p \, a_p \, g \, d\mathbf{X} } { \int_{pond} a_p \, g \, d\mathbf{X} } = \frac{ \int_{cell} h_p \, a_p \, g \, d\mathbf{X} } - { \int_{pond} a_p \, g \, d\mathbf{X} } - \sim \frac{ \sum_{n=1}^{ncat} h_{pn} \, a_{pn} \, a_n }{ \sum_{n=1}^{ncat} a_{pn} \, a_n } + { \int_{ice} a_p \, g \, d\mathbf{X} } + \sim \frac{ \sum_{n=1}^{ncat} h_{pn} \, a_{pn} \, a_n }{ \sum_{n=1}^{ncat} a_{pn} \, a_n }. -For level-ice ponds, there is an extra factor of :math:`a_{lvl}`, and the level-ice pond depth averaged over the level ice is +For level-ice ponds, there is an extra factor of :math:`a_{lvl}`. The level-ice pond depth averaged over the level ice area and pond area are .. math:: h_{p\,lvl} = \frac{ \int_{lvl} h_p \, a_p \, a_{lvl} \, g \, d\mathbf{X} } - { \int_{lvl} a_p \, a_{lvl} \, g \, d\mathbf{X} } + { \int_{lvl} a_{lvl} \, g \, d\mathbf{X} } = \frac{ \int_{cell} h_p \, a_p \, a_{lvl} \, g \, d\mathbf{X} } + { \int_{ice} a_{lvl} \, g \, d\mathbf{X} } + \sim \frac{ \sum_{n=1}^{ncat} h_{pn} \, a_{lvln} \, a_n }{ \sum_{n=1}^{ncat} a_{lvln} \, a_n } + +.. math:: + h_{p\,pond} = \frac{ \int_{pond} h_p \, a_p \, a_{lvl} \, g \, d\mathbf{X} } { \int_{pond} a_p \, a_{lvl} \, g \, d\mathbf{X} } - \sim \frac{ \sum_{n=1}^{ncat} h_{pn} \, a_{pn} \, a_{lvln} \, a_n }{ \sum_{n=1}^{ncat} a_{pn} \, a_{lvln} \, a_n } + = \frac{ \int_{cell} h_p \, a_p \, a_{lvl} \, g \, d\mathbf{X} } + { \int_{ice} a_p \, a_{lvl} \, g \, d\mathbf{X} } + \sim \frac{ \sum_{n=1}^{ncat} h_{pn} \, a_{pn} \, a_{lvln} \, a_n }{ \sum_{n=1}^{ncat} a_{pn} \, a_{lvln} \, a_n }. Time averages follow analogously as above. From e76fcb11cb7bccd6bf873f4599fe9b1f4af1e318 Mon Sep 17 00:00:00 2001 From: eclare108213 Date: Mon, 29 Sep 2025 21:10:02 -0600 Subject: [PATCH 20/25] cleanup --- doc/source/developer_guide/dg_other.rst | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/doc/source/developer_guide/dg_other.rst b/doc/source/developer_guide/dg_other.rst index 29894ccc7..2e0e40c6c 100644 --- a/doc/source/developer_guide/dg_other.rst +++ b/doc/source/developer_guide/dg_other.rst @@ -233,13 +233,25 @@ For melt ponds not carried on the level-ice area, the average pond depths over t { \int_{ice} a_p \, g \, d\mathbf{X} } \sim \frac{ \sum_{n=1}^{ncat} h_{pn} \, a_{pn} \, a_n }{ \sum_{n=1}^{ncat} a_{pn} \, a_n }. -For level-ice ponds, there is an extra factor of :math:`a_{lvl}`. The level-ice pond depth averaged over the level ice area and pond area are +For level-ice ponds, there is an extra factor of :math:`a_{lvl}`. The level-ice pond depth averaged over the grid cell area, total ice area, level ice area and pond area are + +.. math:: + h_{p\,cell} = \frac{ \int_{cell} h_p \, a_p \, a_{lvl} \, g \, d\mathbf{X} } + { \int_{cell} d\mathbf{X} } + \sim \sum_{n=1}^{ncat} h_{pn} \, a_{lvln} \, a_n } + +.. math:: + h_{p\,ice} = \frac{ \int_{ice} h_p \, a_p \, a_{lvl} \, g \, d\mathbf{X} } + { \int_{ice} g \, d\mathbf{X} } + = \frac{ \int_{cell} h_p \, a_p \, a_{lvl} \, g \, d\mathbf{X} } + { \int_{ice} g \, d\mathbf{X} } + \sim \frac{ \sum_{n=1}^{ncat} h_{pn} \, a_{pn} \, a_{lvln} \, a_n }{ \sum_{n=1}^{ncat} a_n } .. math:: h_{p\,lvl} = \frac{ \int_{lvl} h_p \, a_p \, a_{lvl} \, g \, d\mathbf{X} } { \int_{lvl} a_{lvl} \, g \, d\mathbf{X} } = \frac{ \int_{cell} h_p \, a_p \, a_{lvl} \, g \, d\mathbf{X} } - { \int_{ice} a_{lvl} \, g \, d\mathbf{X} } + { \int_{ice} a_{lvl} \, a_{pn} \, g \, d\mathbf{X} } \sim \frac{ \sum_{n=1}^{ncat} h_{pn} \, a_{lvln} \, a_n }{ \sum_{n=1}^{ncat} a_{lvln} \, a_n } .. math:: From 28a7c8a8ce9ef13d1f3388b7b81ec1f690376bb7 Mon Sep 17 00:00:00 2001 From: eclare108213 Date: Mon, 29 Sep 2025 21:11:50 -0600 Subject: [PATCH 21/25] cleanup --- doc/source/developer_guide/dg_other.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/source/developer_guide/dg_other.rst b/doc/source/developer_guide/dg_other.rst index 2e0e40c6c..ddb400073 100644 --- a/doc/source/developer_guide/dg_other.rst +++ b/doc/source/developer_guide/dg_other.rst @@ -238,7 +238,7 @@ For level-ice ponds, there is an extra factor of :math:`a_{lvl}`. The level-ice .. math:: h_{p\,cell} = \frac{ \int_{cell} h_p \, a_p \, a_{lvl} \, g \, d\mathbf{X} } { \int_{cell} d\mathbf{X} } - \sim \sum_{n=1}^{ncat} h_{pn} \, a_{lvln} \, a_n } + \sim \sum_{n=1}^{ncat} h_{pn} \, a_{lvln} \, a_n .. math:: h_{p\,ice} = \frac{ \int_{ice} h_p \, a_p \, a_{lvl} \, g \, d\mathbf{X} } From e820daf6b432b4eff52b66b72aee901884ff0474 Mon Sep 17 00:00:00 2001 From: eclare108213 Date: Mon, 29 Sep 2025 21:14:46 -0600 Subject: [PATCH 22/25] cleanup --- doc/source/developer_guide/dg_other.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/source/developer_guide/dg_other.rst b/doc/source/developer_guide/dg_other.rst index ddb400073..c10e7b850 100644 --- a/doc/source/developer_guide/dg_other.rst +++ b/doc/source/developer_guide/dg_other.rst @@ -238,7 +238,7 @@ For level-ice ponds, there is an extra factor of :math:`a_{lvl}`. The level-ice .. math:: h_{p\,cell} = \frac{ \int_{cell} h_p \, a_p \, a_{lvl} \, g \, d\mathbf{X} } { \int_{cell} d\mathbf{X} } - \sim \sum_{n=1}^{ncat} h_{pn} \, a_{lvln} \, a_n + \sim \sum_{n=1}^{ncat} h_{pn} \, a_{pn} \, a_{lvln} \, a_n .. math:: h_{p\,ice} = \frac{ \int_{ice} h_p \, a_p \, a_{lvl} \, g \, d\mathbf{X} } @@ -252,7 +252,7 @@ For level-ice ponds, there is an extra factor of :math:`a_{lvl}`. The level-ice { \int_{lvl} a_{lvl} \, g \, d\mathbf{X} } = \frac{ \int_{cell} h_p \, a_p \, a_{lvl} \, g \, d\mathbf{X} } { \int_{ice} a_{lvl} \, a_{pn} \, g \, d\mathbf{X} } - \sim \frac{ \sum_{n=1}^{ncat} h_{pn} \, a_{lvln} \, a_n }{ \sum_{n=1}^{ncat} a_{lvln} \, a_n } + \sim \frac{ \sum_{n=1}^{ncat} h_{pn} \, a_{pn} \, a_{lvln} \, a_n }{ \sum_{n=1}^{ncat} a_{lvln} \, a_n } .. math:: h_{p\,pond} = \frac{ \int_{pond} h_p \, a_p \, a_{lvl} \, g \, d\mathbf{X} } From 4504d2c7272878158c7f7902bc2e9349a61833c1 Mon Sep 17 00:00:00 2001 From: eclare108213 Date: Mon, 29 Sep 2025 21:21:02 -0600 Subject: [PATCH 23/25] cleanup --- doc/source/developer_guide/dg_other.rst | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/doc/source/developer_guide/dg_other.rst b/doc/source/developer_guide/dg_other.rst index c10e7b850..87c0b4a65 100644 --- a/doc/source/developer_guide/dg_other.rst +++ b/doc/source/developer_guide/dg_other.rst @@ -91,6 +91,12 @@ whether it represents a value averaged over the entire grid cell, the sea ice fr or a subset of the sea ice fraction such as a thickness category or the ponded area. These distinctions must also be considered for time averaging. +The following formulas ignore subtleties such as thermodynamic fluxes being computed on the initial ice area, which then +changes due to frazil ice formation, lateral melting and transport. The ice area used for averaging should be carefully +considered in light of the model timestepping. Edge cases such as the complete disappearance or new appearance of ice +cause issues with the averaging. To address these cases, we could consider interpolating all quantities to the middle of the +timestep, but that is not currently done. + Ice area ~~~~~~~~~~~~~~~~~ From fe6b42586d942b28712d6a33ff24defb03375e2d Mon Sep 17 00:00:00 2001 From: eclare108213 Date: Mon, 29 Sep 2025 21:40:06 -0600 Subject: [PATCH 24/25] cleanup --- doc/source/developer_guide/dg_other.rst | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/doc/source/developer_guide/dg_other.rst b/doc/source/developer_guide/dg_other.rst index 87c0b4a65..613aaf66d 100644 --- a/doc/source/developer_guide/dg_other.rst +++ b/doc/source/developer_guide/dg_other.rst @@ -91,10 +91,10 @@ whether it represents a value averaged over the entire grid cell, the sea ice fr or a subset of the sea ice fraction such as a thickness category or the ponded area. These distinctions must also be considered for time averaging. -The following formulas ignore subtleties such as thermodynamic fluxes being computed on the initial ice area, which then -changes due to frazil ice formation, lateral melting and transport. The ice area used for averaging should be carefully +The following formulas ignore subtleties such as some fluxes being computed on the initial ice area, which then +changes due to frazil ice formation, lateral melting and transport. The ice area used for both averaging and coupling should be carefully considered in light of the model timestepping. Edge cases such as the complete disappearance or new appearance of ice -cause issues with the averaging. To address these cases, we could consider interpolating all quantities to the middle of the +cause averaging errors. To address these cases, we could consider interpolating all quantities to the middle of the timestep, but that is not currently done. Ice area @@ -110,7 +110,7 @@ ice area is the sum of the thickness category areas :math:`a_n A`: and the ice area fraction is .. math:: - a_{ice}(t) = {\int_{ice} g(\mathbf{X},t) \, d\mathbf{X} \over \int_t \int_{cell} d\mathbf{X} \, dt} \sim \sum_{n=1}^{ncat} a_n(t). + a_{ice}(t) = {\int_{ice} g(\mathbf{X},t) \, d\mathbf{X} \over \int_{cell} d\mathbf{X} \, dt} \sim \sum_{n=1}^{ncat} a_n(t). The time-averaged ice area over an interval of length :math:`N\Delta t` is @@ -137,7 +137,7 @@ Likewise for time averages of ice volume (:math:`m^3`), \sim {\sum_{\Delta t} \sum_{n=1}^{ncat} h_n \, a_n \, A \, \Delta t \over N \, \Delta t} = {A \over N} \sum_{\Delta t} \sum_{n=1}^{ncat} h_n \, a_n -for ice thickness :math:`h` assumed to be 0 in open water. Then the ice volume per square meter of grid cell (:math:`m`) is +for ice thickness :math:`h` assumed to be 0 in open water. Then the average ice volume per square meter of grid cell (:math:`m`) is .. math:: \bar{v}_{ice} = {\int_t \int_{cell} \int_{0}^{h} g(\mathbf{X},t) \, dz \, d\mathbf{X} \, dt \over \int_{t} \int_{cell} d\mathbf{X} \, dt} @@ -145,7 +145,7 @@ for ice thickness :math:`h` assumed to be 0 in open water. Then the ice volume p = {1 \over N} \sum_{\Delta t} \sum_{n=1}^{ncat} h_n \, a_n = {1 \over N} \sum_{\Delta t} \sum_{n=1}^{ncat} v_n. :math:`v_{ice}` is the quantity labeled `hi` in history, which can be thought of as the mean ice thickness averaged over the entire -grid cell. The ice volume per square meter of ice (mean 'actual' ice thickness, :math:`m`) is +grid cell. The time-averaged ice volume per square meter of ice (mean 'actual' ice thickness, :math:`m`) is .. math:: \bar{h}_{i} = {\int_t \int_{ice} \int_{0}^{h} g(\mathbf{X},t) \, dz \, d\mathbf{X} \, dt \over \int_{t} \int_{ice} d\mathbf{X} \, dt} @@ -158,14 +158,14 @@ Volume content ~~~~~~~~~~~~~~~~~ Total content of tracers such as salt and enthalpy are necessary for conservative coupling. The time-average content -of a volume tracer :math:`b` (with units per :math:`m^2`) is +of a volume tracer :math:`b` (with units per :math:`m^3`) is .. math:: \bar{B}_{i} = {\int_t \int_{cell} \int_{0}^{h} b(\mathbf{X},z,t) g(\mathbf{X},t) \, dz \, d\mathbf{X} \, dt \over \int_{t} dt} \sim {\sum_{\Delta t} \sum_{n=1}^{ncat} b_n \, h_n \, a_n \, A \, \Delta t \over N \, \Delta t} = {A \over N} \sum_{\Delta t} \sum_{n=1}^{ncat} b_n \, v_n -and the content per square meter of grid cell is +and the time-averaged content per square meter of grid cell is .. math:: \bar{b}_{ice} \sim {1 \over N} \sum_{\Delta t} \sum_{n=1}^{ncat} b_n \, v_n. @@ -189,7 +189,7 @@ the desired surface area rather than the volume. For example Care is required for tracers averaged over the cell: .. math:: - \bar{T}_{cell} = {\int_t \int_{cell} T(\mathbf{X},t) g(\mathbf{X},t) \, d\mathbf{X} \, dt \over \int_{t} \int_{ice} g(\mathbf{X},t) \, d\mathbf{X} \, dt} + \bar{T}_{cell} = {\int_t \int_{cell} T(\mathbf{X},t) g(\mathbf{X},t) \, d\mathbf{X} \, dt \over \int_{t} \int_{cell} g(\mathbf{X},t) \, d\mathbf{X} \, dt} \sim {\sum_{\Delta t} \sum_{n=0}^{ncat} T_n \, a_n \, A \, \Delta t \over \sum_{n=0}^{ncat} a_n \, A \, N \, \Delta t} = {\sum_{\Delta t} \left( T_o \, a_o + \sum_{n=1}^{ncat} T_n \, a_n \right) \over N}. @@ -203,14 +203,15 @@ This assumption is often used for time-averaging CICE's history fields: the cate If a quantity has already been spatially averaged over the ice, e.g. .. math:: - T_i(t) = \frac{ \int_{ice} T(\mathbf{X},t) g(\mathbf{X},t) \, d\mathbf{X} }{ \int_{ice} g(\mathbf{X},t) \, d\mathbf{X} } + T_{ice}(t) = \frac{ \int_{ice} T(\mathbf{X},t) g(\mathbf{X},t) \, d\mathbf{X} }{ \int_{ice} g(\mathbf{X},t) \, d\mathbf{X} } + \sim \frac{ \sum_{n=1}^{ncat} T_n \, a_n \, }{ \sum_{n=1}^{ncat} a_n} then .. math:: \bar{T}_{ice} = {\int_t \int_{ice} T(\mathbf{X},t) g(\mathbf{X},t) \, d\mathbf{X} \, dt \over \int_{t} \int_{ice} g(\mathbf{X},t) \, d\mathbf{X} \, dt} - = {\int_t T_{i}(t) \left( \int_{ice} g(\mathbf{X},t) \, d\mathbf{X} \right) dt \over \int_{t} \int_{ice} g(\mathbf{X},t) \, d\mathbf{X} \, dt} - \sim {\sum_{\Delta t} \left( T_{i} \sum_{n=1}^{ncat} a_n \right) \over N \sum_{n=1}^{ncat} a_n}. + = {\int_t T_{ice}(t) \left( \int_{ice} g(\mathbf{X},t) \, d\mathbf{X} \right) dt \over \int_{t} \int_{ice} g(\mathbf{X},t) \, d\mathbf{X} \, dt} + \sim {\sum_{\Delta t} \left( T_{ice} \sum_{n=1}^{ncat} a_n \right) \over N \sum_{n=1}^{ncat} a_n}. In some cases, a portion of the calculation may be done in Icepack and then completed in CICE. From 678fa5588191568a8ccfe4a224ece978cfb16dd2 Mon Sep 17 00:00:00 2001 From: eclare108213 Date: Mon, 29 Sep 2025 21:47:33 -0600 Subject: [PATCH 25/25] cleanup --- doc/source/developer_guide/dg_other.rst | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/doc/source/developer_guide/dg_other.rst b/doc/source/developer_guide/dg_other.rst index 613aaf66d..2c124c002 100644 --- a/doc/source/developer_guide/dg_other.rst +++ b/doc/source/developer_guide/dg_other.rst @@ -200,13 +200,15 @@ category merged (cell-averaged but not ice-averaged) value. \bar{T}_{cell} = {1 \over N} \sum_{\Delta t} \sum_{n=1}^{ncat} T_n \, a_n. This assumption is often used for time-averaging CICE's history fields: the category-merged value is saved then later divided by the ice area. + If a quantity has already been spatially averaged over the ice, e.g. .. math:: T_{ice}(t) = \frac{ \int_{ice} T(\mathbf{X},t) g(\mathbf{X},t) \, d\mathbf{X} }{ \int_{ice} g(\mathbf{X},t) \, d\mathbf{X} } \sim \frac{ \sum_{n=1}^{ncat} T_n \, a_n \, }{ \sum_{n=1}^{ncat} a_n} -then +then the ice-averaged quantity must be multiplied by the ice area to return it to the cell-averaged quantity (assuming +a value of zero in open water) before being accumulated in time and divided once again by the ice area: .. math:: \bar{T}_{ice} = {\int_t \int_{ice} T(\mathbf{X},t) g(\mathbf{X},t) \, d\mathbf{X} \, dt \over \int_{t} \int_{ice} g(\mathbf{X},t) \, d\mathbf{X} \, dt}