Skip to content

Commit 4fec822

Browse files
committed
EAMxx: update docs
1 parent db3a157 commit 4fec822

File tree

2 files changed

+17
-45
lines changed

2 files changed

+17
-45
lines changed

components/eamxx/docs/field_aliasing.md renamed to components/eamxx/docs/user/io_aliases.md

Lines changed: 16 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,18 @@ This document demonstrates the field aliasing feature for EAMxx I/O operations.
44

55
## Overview
66

7-
The field aliasing feature allows users to specify custom names for variables in netcdf output files while maintaining the original internal field names in the model. This is useful for:
7+
The field aliasing feature allows users to specify custom names for
8+
variables in netcdf output files while maintaining the original
9+
internal field names in the model. This is useful for:
810

911
- Creating shorter, more convenient variable names for output
1012
- Maintaining compatibility with external tools that expect specific variable names
1113
- Providing user-friendly names for complex internal field names
1214

1315
## Syntax
1416

15-
The alias syntax uses the delimiter `:=:` to separate the alias name from the internal field name:
17+
The alias syntax uses the delimiter `:=:` to separate the alias name
18+
from the internal field name:
1619

1720
```yaml
1821
alias_name:=:internal_field_name
@@ -23,12 +26,6 @@ alias_name:=:internal_field_name
2326
### Basic Usage
2427

2528
```yaml
26-
output_streams:
27-
stream1:
28-
filename_prefix: output
29-
averaging_type: INSTANT
30-
fields:
31-
physics_gll:
3229
field_names:
3330
- "LWP:=:LiqWaterPath" # Alias LWP for LiqWaterPath
3431
- "SWP:=:SolidWaterPath" # Alias SWP for SolidWaterPath
@@ -52,17 +49,22 @@ field_names:
5249
5350
When using aliases:
5451
55-
1. **NetCDF Variables**: The netcdf file will contain variables named according to the aliases
52+
1. **NetCDF Variables**: The netcdf file will contain variables
53+
named according to the aliases
54+
5655
- `LWP` instead of `LiqWaterPath`
5756
- `T` instead of `T_mid`
5857
- `RH` instead of `RelativeHumidity`
5958

60-
2. **Internal Processing**: All internal model operations use the original field names
59+
2. **Internal Processing**: All internal model operations use the
60+
original field names
61+
6162
- Field validation uses `LiqWaterPath`, `T_mid`, etc.
6263
- Diagnostic calculations use original names
6364
- Memory management uses original field structures
6465

65-
3. **Metadata**: Variable attributes (units, long_name, etc.) are preserved from the original fields
66+
3. **Metadata**: Variable attributes (units, long_name, etc.)
67+
are preserved from the original fields
6668

6769
## Input Reading
6870

@@ -89,41 +91,10 @@ Example error cases:
8991

9092
```yaml
9193
field_names:
92-
- "LWP:=:" # Error: empty field name
94+
- "LWP:=:" # Error: empty field name
9395
- ":=:LiqWaterPath" # Error: empty alias name
9496
- "LWP:=:Field1" # OK
9597
- "LWP:=:Field2" # Error: duplicate alias LWP
96-
```
97-
98-
## Implementation Notes
99-
100-
- **Backward Compatible**: Existing configurations without aliases continue to work unchanged
101-
- **Minimal Performance Impact**: Alias processing occurs only during initialization
102-
- **Thread Safe**: All alias operations are performed during setup phase
103-
- **Memory Efficient**: No data copying, only name mapping during I/O operations
104-
105-
## Example Use Cases
106-
107-
### 1. Climate Model Output
108-
```yaml
109-
field_names:
110-
- "T:=:T_mid"
111-
- "RH:=:RelativeHumidity"
112-
- "P:=:ps"
113-
```
114-
115-
### 2. Atmospheric Chemistry
116-
```yaml
117-
field_names:
118-
- "QC:=:qc"
119-
- "QI:=:qi"
120-
- "QV:=:qv"
121-
```
122-
123-
### 3. Diagnostic Output
124-
```yaml
125-
field_names:
126-
- "CLDTOT:=:cldfrac_tot_for_analysis"
127-
- "CLDLIQ:=:cldfrac_liq"
128-
- "CLDICE:=:cldfrac_ice_for_analysis"
98+
- "LWP1:=:LiqWaterPath" # OK
99+
- "LWP2:=:LiqWaterPath" # Error: duplicate field LiqWaterPath
129100
```

components/eamxx/mkdocs.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ nav:
1919
- 'Overview': 'user/diags/index.md'
2020
- 'Field contraction diagnostics': 'user/diags/field_contraction.md'
2121
- 'Presentations': 'user/presentations.md'
22+
- 'IO Aliases': 'user/io_aliases.md'
2223
- 'Developer Guide':
2324
- 'Quick-start Guide': 'developer/dev_quickstart.md'
2425
- 'Code Structure and Organization': 'developer/code_structure.md'

0 commit comments

Comments
 (0)