Skip to content

Commit 1951e1e

Browse files
authored
Merge Pull Request #2796 from E3SM-Project/scream/mahf708/docs/updates
Automatically Merged using E3SM Pull Request AutoTester PR Title: move rad calls docs from tech to user, update nudging and aerocom docs PR Author: mahf708 PR LABELS: AT: AUTOMERGE, documentation, AT: Integrate Without Testing
2 parents 305bde7 + 7a53ecc commit 1951e1e

File tree

14 files changed

+119
-43
lines changed

14 files changed

+119
-43
lines changed

.github/workflows/eamxx-gh-pages.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,14 +53,14 @@ jobs:
5353
run: |
5454
echo "= The job was automatically triggered by a ${{github.event_name}} event."
5555
56-
- name: Set up Python 3.10
56+
- name: Set up Python 3.11
5757
uses: actions/setup-python@v5.1.0
5858
with:
59-
python-version: "3.10"
59+
python-version: "3.11"
6060

6161
- name: Install Python deps
6262
run: |
63-
pip install mkdocs pymdown-extensions mkdocs-material mdutils
63+
pip install mkdocs pymdown-extensions mkdocs-material mdutils mkdocs-bibtex
6464
6565
- name: Generate EAMxx params docs
6666
working-directory: components/eamxx/scripts
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
2+
@techreport{tiedtke_ecmwf_1979,
3+
address = {Shinfield Park, Reading},
4+
type = {Technical {Report}},
5+
title = {{ECMWF} model parameterisation of sub-grid scale processes},
6+
language = {en},
7+
institution = {ECMWF},
8+
author = {Tiedtke, M. and Geleyn, J.-F. and Hollingsworth, A. and Louis, J.-F.},
9+
month = jan,
10+
year = {1979},
11+
note = {10},
12+
pages = {146},
13+
}
14+
15+
@article{raisanen2004stochastic,
16+
title={Stochastic generation of subgrid-scale cloudy columns for large-scale models},
17+
author={R{\"a}is{\"a}nen, Petri and Barker, Howard W and Khairoutdinov, Marat F and Li, Jiangnan and Randall, David A},
18+
journal={Quarterly Journal of the Royal Meteorological Society: A journal of the atmospheric sciences, applied meteorology and physical oceanography},
19+
volume={130},
20+
number={601},
21+
pages={2047--2067},
22+
year={2004},
23+
publisher={Wiley Online Library}
24+
}

components/eamxx/docs/technical/aerocom_cldtop.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
# The AeroCOM algorithm
1+
# The AeroCom algorithm
22

3-
The goal of the AeroCOM algorithm is to calculate properties at cloud top based on the AeroCOM recommendation. There are two main parts of the algorithm: probabilistically determining "cloud top" and then "calculating properties" at said cloud top.
3+
The goal of the AeroCom algorithm is to calculate properties at cloud top based on the AeroCom recommendation. There are two main parts of the algorithm: probabilistically determining "cloud top" and then "calculating properties" at said cloud top.
44

55
We treat model columns independently, so we loop over all columns in parallel. We then loop over all layers in serial (due to needing an accumulative product), starting at 2 (second highest) layer because the highest is assumed to have no clouds. Let's take a photonic approach from above the model top. Let's say that $p_{k}$ is the probability of a photon passing through the layer $k$. We follow the maximum-random overlap assumption. In all cases, we assume the cloudiness (or cloudy fraction) is completely opaque.
66

@@ -24,4 +24,4 @@ $$c\Phi_{i,k} = \frac{cQ_{i,k}}{iQ_{i,k} + cQ_{i,k}}$$
2424

2525
The thermodynamic phase is used only for cloud properties (e.g., cloud-top cloud droplet number concentration) or cloud content (e.g., cloud liquid content). Further, $X_{i,k}$ is the three-dimensional cloud property of interest which is needed if we are converting a property from three-dimensional ($X$) to its two-dimensional counterpart ($x$). "Other" properties here include temperature and pressure which are not dependent on the thermodynamic phase.
2626

27-
A helpful references: Räisänen, P., Barker, H. W., Khairoutdinov, M. F., Li, J., & Randall, D. A. (2004). Stochastic generation of subgrid‐scale cloudy columns for large‐scale models. Quarterly Journal of the Royal Meteorological Society: A journal of the atmospheric sciences, applied meteorology and physical oceanography, 130(601), 2047-2067.
27+
Most studies in this topic refer a technical report by Tiedtke et al. (1979)[@tiedtke_ecmwf_1979]. Another more recent general reference that may be of interest is that of Räisänen et al. (2004)[@raisanen2004stochastic].

components/eamxx/docs/technical/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# EAMxx Technical Guide
22

3-
The goal of this document is to describe the specific equations, parameterizations, and numerical methods used in the current version of EAMxx. Because our master-branch implementation changes every time we make a new commit, this documentation will also evolve continuously. As such, documentation for master should always be considered to be preliminary and under construction. If you want trustworthy documentation, pull it from an official model release.
3+
The goal of this document is to describe the specific equations, parameterizations, and numerical methods used in the current version of EAMxx. Because our master-branch implementation changes every time we make a new commit, this documentation will also evolve continuously. As such, documentation for master should always be considered to be preliminary and under construction. If you want trustworthy documentation, pull it from an official model release.
44

55
## Overview
66

components/eamxx/docs/technical/clean_clear_sky.md renamed to components/eamxx/docs/user/clean_clear_sky.md

Lines changed: 29 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,33 @@ These extra diagnostics are optionally added to the main radiation call. The ext
66
- Clean-clear-sky fluxes: the fluxes that would be present if there were neither aerosols nor clouds, and are calculated by adding an additional radiation call at the very beginning of the logic before the optics class is endowed with aerosol and cloud properties.
77
- Clean-sky fluxes: the fluxes that would be present if there were no aerosols, and are calculated by adding an additional radiation call after substantiating an additional optics class, but not endowing it with aerosol properties.
88

9-
It was necessary to add an additional optics class because the original optics class is endowed with aerosols before clouds (in order to calculate the clear-sky fluxes).
9+
## Example setup (current as of April 2024)
10+
1011
The extra calls are controlled by runtime flags `extra_clnclrsky_diag` and `extra_clnsky_diag` (they take either `true` or `false` as their values).
12+
13+
```shell
14+
./atmchange extra_clnclrsky_diag=true
15+
./atmchange extra_clnsky_diag=true
16+
```
17+
18+
Below is an example output file to output the extra (clean and clean-clear-sky) radiation diagnostics atop the atmosphere.
19+
20+
```yaml
21+
%YAML 1.1
22+
---
23+
filename_prefix: monthly.outputs
24+
Averaging Type: Average
25+
Max Snapshots Per File: 1
26+
Fields:
27+
Physics PG2:
28+
Field Names:
29+
- SW_clnclrsky_flux_up_at_model_top
30+
- LW_clnclrsky_flux_up_at_model_top
31+
- SW_clnsky_flux_up_at_model_top
32+
- LW_clnsky_flux_up_at_model_top
33+
output_control:
34+
Frequency: 1
35+
frequency_units: nmonths
36+
MPI Ranks in Filename: false
37+
38+
```

components/eamxx/docs/user/coarse_nudging.md

Lines changed: 0 additions & 25 deletions
This file was deleted.

components/eamxx/docs/user/nudging.md

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
# Nudging in EAMxx
2+
3+
Nudging is supported in EAMxx.
4+
Currently, it is possible to nudge EAMxx to the output from a different EAMxx run or to reanalysis. Nudging data can be on your model grid or an arbitrary coarser grid. Inline interpolating of finer-grid nudging data to a coarser model resolution isn't implemented yet but may be in the future.
5+
6+
## Data to nudge towards
7+
8+
The user is expected to prepapre (and then use `atmchange` to point to) nudging data files that are compliant with EAMxx specification.
9+
In practice, this means that the data files must contain variable names known to EAMxx (only U, V, T_mid, and qv are supported now).
10+
The files can be specified with an explicit list or via pattern matching.
11+
The files must contain an arbitary global attribute `case_t0`, and it is recommended to be the same as the time dimension unit (the files must be time-dimensioned).
12+
Finally, the dimension order must be such that `lev` is the last dimension, so most likely, the user must transpose the dimensions.
13+
14+
## Pressure in the nudging data
15+
16+
Pressure can be explicitly provided in the nudging data as time-varying `p_mid` corresponding to the option `TIME_DEPENDENT_3D_PROFILE` for `source_pressure_type`.
17+
Alternatively, the data can contain a time-invariant pressure variable `p_lev` corresponding to the option `TIME_DEPENDENT_3D_PROFILE` for `source_pressure_type`.
18+
19+
## Weighted nudging for RRM applications
20+
21+
In regionally refined model applications, it is possible to use weighted nudging, for example, to avoid nudging the refined region.
22+
To achieve that, the user can use `atmchange` to set `use_nudging_weights` (boolean) and provide `nudging_weights_file` that has the weight to apply for nudging (for example, zeros in the refined region).
23+
Currently, weighted nudging is only supported if the user provides the nudging data at the target grid.
24+
25+
## Example setup (current as of April 2024)
26+
27+
To enable nudging as a process, one must declare it in the `atm_procs_list` runtime parameter.
28+
29+
```shell
30+
./atmchange physics::atm_procs_list="mac_aero_mic,rrtmgp,cosp,nudging"
31+
```
32+
33+
The following options are needed to specify the nudging.
34+
35+
```shell
36+
./atmchange nudging::nudging_filenames_patterns="/pathto/nudging_files/*.nc" # can provide file name explicitly here instead (or multiple patterns)
37+
./atmchange nudging::source_pressure_type=TIME_DEPENDENT_3D_PROFILE # see section on pressure
38+
./atmchange nudging::nudging_fields=U,V # can include qv, T_mid as well
39+
./atmchange nudging::nudging_timescale=21600 # in seconds
40+
```
41+
42+
To gain a deeper understanding of these parameters and options, please refer to code implementation of the nudging process.

components/eamxx/mkdocs.yml

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@ nav:
88
- 'Model output': 'user/model_output.md'
99
- 'Model input': 'user/model_input.md'
1010
- 'Runtime parameters': 'common/eamxx_params.md'
11-
- 'Coarse nudging': 'user/coarse_nudging.md'
11+
- 'Nudging': 'user/nudging.md'
12+
- 'Extra radiation calls': 'user/clean_clear_sky.md'
1213
- 'Developer Guide':
1314
- 'Overview': 'developer/index.md'
1415
- 'Installation': 'common/installation.md'
@@ -26,8 +27,8 @@ nav:
2627
- 'Full model': 'developer/cime_testing.md'
2728
- 'CI and Nightly Testing': 'developer/ci_nightly.md'
2829
- 'Technical Guide':
29-
- 'AeroCOM cloud top': 'technical/aerocom_cldtop.md'
30-
- 'Extra radiation calls': 'technical/clean_clear_sky.md'
30+
- 'Overview': 'technical/index.md'
31+
- 'AeroCom cloud top': 'technical/aerocom_cldtop.md'
3132

3233
edit_uri: ""
3334

@@ -58,10 +59,16 @@ markdown_extensions:
5859
alternate_style: true
5960
- pymdownx.arithmatex:
6061
generic: true
62+
- footnotes
6163

6264
extra_javascript:
6365
# - javascript/mathjax.js
6466
- https://polyfill.io/v3/polyfill.min.js?features=es6
6567
- https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js
6668

6769
repo_url: https://github.com/E3SM-Project/scream
70+
71+
plugins:
72+
- search
73+
- bibtex:
74+
bib_dir: docs/refs

components/eamxx/src/physics/rrtmgp/eamxx_rrtmgp_process_interface.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ void RRTMGPRadiation::set_grids(const std::shared_ptr<const GridsManager> grids_
158158
add_field<Computed>("dtau105" , scalar3d_mid, nondim, grid_name);
159159
add_field<Computed>("sunlit" , scalar2d , nondim, grid_name);
160160
add_field<Computed>("cldfrac_rad" , scalar3d_mid, nondim, grid_name);
161-
// Cloud-top diagnostics following AeroCOM recommendation
161+
// Cloud-top diagnostics following AeroCom recommendation
162162
add_field<Computed>("T_mid_at_cldtop", scalar2d, K, grid_name);
163163
add_field<Computed>("p_mid_at_cldtop", scalar2d, Pa, grid_name);
164164
add_field<Computed>("cldfrac_ice_at_cldtop", scalar2d, nondim, grid_name);
@@ -519,7 +519,7 @@ void RRTMGPRadiation::run_impl (const double dt) {
519519

520520
Kokkos::deep_copy(d_dtau067,0.0);
521521
Kokkos::deep_copy(d_dtau105,0.0);
522-
// Outputs for AeroCOM cloud-top diagnostics
522+
// Outputs for AeroCom cloud-top diagnostics
523523
auto d_T_mid_at_cldtop = get_field_out("T_mid_at_cldtop").get_view<Real *>();
524524
auto d_p_mid_at_cldtop = get_field_out("p_mid_at_cldtop").get_view<Real *>();
525525
auto d_cldfrac_ice_at_cldtop =
@@ -996,7 +996,7 @@ void RRTMGPRadiation::run_impl (const double dt) {
996996
// Get IR 10.5 micron band for COSP
997997
auto idx_105 = rrtmgp::get_wavelength_index_lw(10.5e-6);
998998

999-
// Compute cloud-top diagnostics following AeroCOM recommendation
999+
// Compute cloud-top diagnostics following AeroCom recommendation
10001000
real1d T_mid_at_cldtop ("T_mid_at_cldtop", d_T_mid_at_cldtop.data() + m_col_chunk_beg[ic], ncol);
10011001
real1d p_mid_at_cldtop ("p_mid_at_cldtop", d_p_mid_at_cldtop.data() + m_col_chunk_beg[ic], ncol);
10021002
real1d cldfrac_ice_at_cldtop ("cldfrac_ice_at_cldtop", d_cldfrac_ice_at_cldtop.data() + m_col_chunk_beg[ic], ncol);

components/eamxx/src/physics/rrtmgp/scream_rrtmgp_interface.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1047,7 +1047,7 @@ namespace scream {
10471047
real1d &cldfrac_tot_at_cldtop, real1d &cdnc_at_cldtop,
10481048
real1d &eff_radius_qc_at_cldtop, real1d &eff_radius_qi_at_cldtop) {
10491049
/* The goal of this routine is to calculate properties at cloud top
1050-
* based on the AeroCOM recommendation. See reference for routine
1050+
* based on the AeroCom recommendation. See reference for routine
10511051
* get_subcolumn_mask above, where equation 14 is used for the
10521052
* maximum-random overlap assumption for subcolumn generation. We use
10531053
* equation 13, the column counterpart.

components/eamxx/src/physics/rrtmgp/scream_rrtmgp_interface.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ namespace scream {
122122
int ncol, int nlay, int ngpt, Real pmin, Real pmax,
123123
const real2d& pmid, const real3d& cld_tau_gpt, real1d& cld_area);
124124
/*
125-
* Return select cloud-top diagnostics following AeroCOM recommendation
125+
* Return select cloud-top diagnostics following AeroCom recommendation
126126
*/
127127
void compute_aerocom_cloudtop(
128128
int ncol, int nlay, const real2d &tmid, const real2d &pmid,

components/eamxx/tests/multi-process/dynamics_physics/homme_shoc_cld_p3_rrtmgp_pg2/output.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ Fields:
6464
- rad_heating_pdel
6565
- sfc_flux_lw_dn
6666
- sfc_flux_sw_net
67-
# AeroCOM in RRTMGP
67+
# AeroCom in RRTMGP
6868
- cdnc_at_cldtop
6969
- cldfrac_tot_at_cldtop
7070
- cldfrac_liq_at_cldtop

components/eamxx/tests/single-process/rrtmgp/output.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ Field Names:
1717
- sfc_flux_lw_dn
1818
- sfc_flux_sw_net
1919
- rad_heating_pdel
20-
# AeroCOM in RRTMGP
20+
# AeroCom in RRTMGP
2121
- cdnc_at_cldtop
2222
- cldfrac_tot_at_cldtop
2323
- cldfrac_liq_at_cldtop

0 commit comments

Comments
 (0)