|
| 1 | +# Field contraction diagnostics |
| 2 | + |
| 3 | +In EAMxx, we can automatically calculate field reductions |
| 4 | +across the horizontal columns and across the model vertical levels. |
| 5 | +We call these horizontal and vertical reductions. |
| 6 | + |
| 7 | +## Horizontal reduction |
| 8 | + |
| 9 | +We currently offer only one horizontal reduction $C$, and it is defined as |
| 10 | + |
| 11 | +$$ |
| 12 | +C_{\dots k} = \sum_{i} w_{i} \cdot F_{i \dots k} |
| 13 | +$$ |
| 14 | + |
| 15 | +where $F_\text{i...k}$ is the field at column $i$ and level $k$, |
| 16 | +and $w_{i}$ is the weight at column $i$. |
| 17 | +We note that the field $F$ can have other dimensions ($\dots$). |
| 18 | +The weight $w$ is defined as the area fraction in column $i$, |
| 19 | +that is, the area in column $i$ divided by the total area in all columns. |
| 20 | + |
| 21 | +To select the horizontal reduction, you only need to suffix |
| 22 | +a field name `X` with `_horiz_avg` in the output requests. |
| 23 | + |
| 24 | +| Reduction | Weight | Description | |
| 25 | +| --------- | ------ | ----------- | |
| 26 | +| `X_horiz_avg` | Area fraction | Average across all columns | |
| 27 | + |
| 28 | +## Vertical reduction |
| 29 | + |
| 30 | +We currently offer three vertical reductions $C$, defined as |
| 31 | + |
| 32 | +$$ |
| 33 | +C_{\dots} = \sum_{k} w_{k} \cdot F_{\dots k} |
| 34 | +$$ |
| 35 | + |
| 36 | +where $F_{\dots k}$ is the field at level $k$, |
| 37 | +and $w_{k}$ is the weight at level $k$. |
| 38 | + |
| 39 | +To select the vertical reduction, you only need to suffix |
| 40 | +a field name `X` with `_vert_(avg|sum)_(dp|dz)_weighted` or |
| 41 | +`_vert_(avg|sum)` in the output yaml files. |
| 42 | + |
| 43 | +| Reduction | Weight | Description | |
| 44 | +| --------- | ------ | ----------- | |
| 45 | +| `X_vert_avg_dp_weighted` | $\Delta p_{k}$ | Average across all levels, weighted by $\Delta p_{k}$ | |
| 46 | +| `X_vert_sum_dp_weighted` | $\Delta p_{k}$ | Sum across all levels, weighted by $\Delta p_{k}$ | |
| 47 | +| `X_vert_avg_dz_weighted` | $\Delta z_{k}$ | Average across all levels, weighted by $\Delta z_{k}$ | |
| 48 | +| `X_vert_sum_dz_weighted` | $\Delta z_{k}$ | Sum across all levels, weighted by $\Delta z_{k}$ | |
| 49 | +| `X_vert_avg` | 1 | Average across all levels | |
| 50 | +| `X_vert_sum` | 1 | Sum across all levels | |
| 51 | + |
| 52 | +The supported weighting options for now are |
| 53 | + |
| 54 | +- `pseudo_density` field in EAMxx, $\Delta p_{k}$, in units of Pa; |
| 55 | +- `dz` field in EAMxx, $\Delta z_{k}$, in units of m; |
| 56 | +- and no weighting, which is equivalent to using a weight of 1. |
| 57 | + |
| 58 | +In the case of `pseudo_density`, the weighting is scaled by 1/g, |
| 59 | +where g is the gravitational acceleration, in units of m/s$^2$. |
| 60 | + |
| 61 | +## Example |
| 62 | + |
| 63 | +```yaml |
| 64 | +%YAML 1.1 |
| 65 | +--- |
| 66 | +filename_prefix: monthly.outputs |
| 67 | +averaging_type: average |
| 68 | +max_snapshots_per_file: 1 |
| 69 | +fields: |
| 70 | + physics_pg2: |
| 71 | + field_names: |
| 72 | + # in this example, we use T_mid in units of K |
| 73 | + - T_mid_horiz_avg # K |
| 74 | + - T_mid_vert_avg_dp_weighted # K |
| 75 | + - T_mid_vert_sum_dp_weighted # K * Pa * s / (m * m) |
| 76 | + - T_mid_vert_avg_dz_weighted # K |
| 77 | + - T_mid_vert_sum_dz_weighted # K * m |
| 78 | + - T_mid_vert_avg # K |
| 79 | + - T_mid_vert_sum # K |
| 80 | +output_control: |
| 81 | + frequency: 1 |
| 82 | + frequency_units: nmonths |
| 83 | +``` |
0 commit comments