You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In addition to generating input data to support a new grid, several code modifications are required before E3SM can run with the grid. However, the specific changes will depend on how the grid will be used. The intendend model configuration for the new grid will change which files need to be modified. For instance, a grid intended for aquaplanet experiments does not require as many changes as a historical AMIP-style run.
3
+
In addition to generating input data to support a new grid, several modifications to XML files are required before E3SM can run with the grid.
4
+
However, the specific changes will depend on how the grid will be used. The intended model configuration for the new grid will change which files need to be modified. For instance, a grid intended for aquaplanet experiments does not require as many changes as a historical AMIP-style run.
4
5
5
-
The guidelines here are meant to outline various possible changes the user should consider when adding support for a new grid. This document cannot be exhaustive, and it is important that the user understands the changes they are making. It is often useful to use a pre-existing grid configuration as a template. Note that the guidelines here are only relevant for "horizontal" grids. Additional considerations are needed to support a new vertical grid, which is a topic not currently covered here.
6
+
The guidelines here are meant to outline various possible changes the user should consider when adding support for a new grid for the land and/or atmosphere.
7
+
This document cannot be exhaustive, and it is important that the user understands the changes they are making. It is often useful to use a pre-existing grid configuration as a template.
8
+
Note that the guidelines here are only relevant for "horizontal" grids in the atmosphere and/or land.
9
+
Additional considerations are needed to support a new vertical grid in the atmosphere, which is a topic not currently covered here.
6
10
7
-
When setting up a new grid you will need to edit some or all of these files:
11
+
When setting up a new grid for the atmosphere and/or land model, you will need to edit some or all of these files:
8
12
9
13
-`cime_config/config_grids.xml`
10
14
-`components/eam/bld/config_files/horiz_grid.xml`
@@ -21,17 +25,24 @@ In practice, "bi" and "tri" grids are most commonly used and the main difference
21
25
22
26
## Grid Naming Conventions
23
27
28
+
### Atmosphere
29
+
24
30
The atmosphere grid name should always indicate the base "ne" value and whether the physgrid is being used, usually by adding ".pg2" at the end. For a regionally refined mesh (RRM) the grid name should always start with `ne0` followed a descriptive string that includes the region being refined and the degree of refinement.
25
31
26
32
**Example**: `ne0np4_northamerica_30x4v1.pg2`
27
33
28
34
Note that this example differs from how the North American grid is currently named as `ne0np4_northamericax4v1.pg2`, which indicates a `4x` refinement, but does not indicate the base resolution, which is useful to know. The more informative grid name `ne0np4_northamerica_30x4v1.pg2` makes it clear that unrefined regions are consistent with `ne30pg2`.
29
35
36
+
### River (or Land in tri-grid)
37
+
30
38
For a rectilinear lat-lon grid used by the land and/or river models the grid name should start with "r" and typically use spacing less than one degree, so they indicate the nominal grid spacing, starting with "0" and omitting the decimal.
31
39
32
40
**Examples**: `r05` is 0.5 degree spacing and `r0125` is 1/8 or 0.125 degree spacing.
33
41
34
-
For a mono-grid the convention is that the grid is written twice to indicate that both atmosphere/land and ocean/sea-ice models are on the same grid. A mono-grid is typically only used for idealized simulations such as aqua planet and RCE, but can also be used for F-compsets if the CICE sea-ice model is used in place of the MPAS sea-ice model (MPASSI).
42
+
### Grid Aliases
43
+
44
+
Grid aliases are short strings used to represent the complete set of grids used in the model configuration.
45
+
For a mono-grid the convention is that the grid alias is the base mesh written twice to indicate that both atmosphere/land and ocean/sea-ice models are on the same grid. A mono-grid is typically only used for idealized simulations such as aqua planet and RCE, but can also be used for F-compsets if the CICE sea-ice model is used in place of the MPAS sea-ice model (MPASSI).
35
46
36
47
**Example**: `ne30pg2_ne30pg2`
37
48
@@ -43,7 +54,9 @@ Tri-grid options should indicate three different grids used for atmosphere, land
43
54
44
55
**Example**: `ne30pg2_r05_IcoswISC30E3r5`
45
56
46
-
Note that the conventions discussed above refer to the "grid alias", but for any combination of grids the full grid definition has a long form representation that spells out the grid in more detail.
57
+
### Grid longnames
58
+
59
+
For any combination of grids, the full grid definition has a long form representation that spells out the grid in more detail.
47
60
48
61
**Example**:
49
62
@@ -55,11 +68,72 @@ Note that the conventions discussed above refer to the "grid alias", but for any
55
68
mask is: oQU240
56
69
```
57
70
58
-
## Grid Definition
71
+
## Defining a New Atmosphere Grid for EAM
72
+
73
+
When defining a new atmosphere grid, information needs to be provided on how the grid is constructed.
74
+
75
+
To define a new atmosphere grid a line must be added to `components/eam/bld/config_files/horiz_grid.xml` that indicates the number of elements and physics columns. In the lines below for `ne30np4` (without the physgrid) and `ne30pg2` (with the physgrid) you can see the value of `ne` is the same (number of elements along a cube edge), but the number of physics columns is different.
An explanation of how to calculate the number of physics columns can be found here: [Atmosphere Grid Overview](../../../EAM/tech-guide/atmosphere-grid-overview.md).
83
+
84
+
For a grid with regional refinement, follow the conventions of other grids in this file. There is no formula to calculate the number of columns for RRM grids, but the value can be obtained from the grid files used for mapping.
If you are creating a new grid that will be used by the land model the grid name needs to be added to the list `valid_values` associated with the `res` entry in the file `components/elm/bld/namelist_files/namelist_definition.xml` that holds the definition of namelist variables used by the land model.
Note: 0.1x0.1, 0.5x0.5, 5x5min, 10x10min, 3x3min and 0.33x0.33 are only used for ELM tools
101
+
</entry>
102
+
```
103
+
104
+
Simply add the name of your new grid to the list of `valid_values`.
105
+
106
+
## Using New Grids in Default Namelists
107
+
108
+
Each new grid will likely need various new default parameter values to be specified. These parameters can be set for individual simulations by editing the `user_nl_*` files in the case directory, but for these to become defaults any time the grid is used then new defaults need to be specified.
109
+
110
+
The lists below show namelist parameters that may need to be specified for a new grid. The creator of a new grid is responsible for understanding these parameters and deciding when new defaults are appropriate.
111
+
112
+
### Atmosphere Namelist Parameters
113
+
114
+
-`drydep_srf_file` - Data file for surface aerosol deposition
115
+
-`bnd_topo` - Surface topography (smoothed for target grid)
116
+
-`mesh_file` - HOMME np4 mesh file (exodus format)
117
+
-`se_tstep` - HOMME time step [seconds]
118
+
-`dt_remap_factor` - HOMME vertical remap factor
119
+
-`dt_tracer_factor` - HOMME tracer advection factor
120
+
-`hypervis_subcycle_q` - HOMME tracer hyperviscosity factor
121
+
122
+
### Land Namelist Parameters
123
+
124
+
-`fsurdat` - Surface data file
125
+
-`finidat` - Land model initial condition file
126
+
-`flanduse_timeseries` - Time-evolving land-use data file
127
+
128
+
## Defining a new grid for CIME
129
+
130
+
The CIME Case Control system will configure a case according to the component set and grid alias you specify with the `--res` argument.
131
+
As part of that configuration, CIME needs to know
132
+
how to translate the grid alias and set the paths for domain and mapping files used by the grid so the model can find them at runtime.
59
133
60
134
### Adding a New Grid Alias
61
135
62
-
Grid aliases are defined in `cime_config/config_grids.xml` and are used to specify the grid for a case when calling `create_newcase` via the `--res` argument. Below is an example grid alias for the `ne30pg2_r05_IcoswISC30E3r5` grid used in E3SMv3 production simulations.
136
+
Grid aliases are defined in `cime_config/config_grids.xml`. Below is an example grid alias for the `ne30pg2_r05_IcoswISC30E3r5` grid used in E3SMv3 production simulations.
63
137
64
138
```xml
65
139
<model_gridalias="ne30pg2_r05_IcoswISC30E3r5">
@@ -73,6 +147,8 @@ Grid aliases are defined in `cime_config/config_grids.xml` and are used to speci
73
147
</model_grid>
74
148
```
75
149
150
+
Add a similar block for your new grid. Aliases must be unique within `config_grids.xml`
151
+
76
152
### Domain Files
77
153
78
154
Domain files are needed for each grid and are specified in the `<domains>` section of `cime_config/config_grids.xml`. The default domain files are grouped by the atmosphere grid. The section for the typical `ne30pg2` grid looks as follows:
@@ -89,7 +165,7 @@ Domain files are needed for each grid and are specified in the `<domains>` secti
89
165
</domain>
90
166
```
91
167
92
-
Notice the ellipses `...` are used here to omit all entries that are not relevant to the `ne30pg2_r05_IcoswISC30E3r5` grid. Also, note that all of these paths are relative to the input data path set as `DIN_LOC_ROOT` which has a default for each machine. See [Generating Domain Files](/generate_domain_files/) for information about creating domain files.
168
+
Notice the ellipses `...` are used here to omit all entries that are not relevant to the `ne30pg2_r05_IcoswISC30E3r5` grid. Also, note that all of these paths are relative to the input data path set as `DIN_LOC_ROOT` which has a default for each machine. See [Generating Domain Files](../../../generate_domain_files/index.md) for information about creating domain files.
93
169
94
170
### Coupler Mapping Files
95
171
@@ -125,63 +201,7 @@ The mapping files used by the component coupler to communicate fluxes between th
125
201
</gridmap>
126
202
```
127
203
128
-
Note that all of these paths are relative to the input data path set as `DIN_LOC_ROOT` which has a default for each machine.
129
-
130
-
### Defining a New Atmosphere Grid
131
-
132
-
When defining a new atmosphere grid, information needs to be provided on how the grid is constructed.
133
-
134
-
To define a new atmosphere grid a line must be added to `components/eam/bld/config_files/horiz_grid.xml` that indicates the number of elements and physics columns. In the lines below for `ne30np4` (without the physgrid) and `ne30pg2` (with the physgrid) you can see the value of `ne` is the same (number of elements along a cube edge), but the number of physics columns is different.
An explanation of how to calculate the number of physics columns can be found here: [Atmosphere Grid Overview](../../../EAM/tech-guide/atmosphere-grid-overview.md).
142
-
143
-
For a grid with regional refinement, follow the conventions of other grids in this file. There is no formula to calculate the number of columns for RRM grids, but the value can be obtained from the grid files used for mapping.
If you are creating a new grid that will be used by the land model the grid name needs to be added to the list `valid_values` associated with the `res` entry in the file `components/elm/bld/namelist_files/namelist_definition.xml` that holds the definition of namelist variables used by the land model.
Note: 0.1x0.1, 0.5x0.5, 5x5min, 10x10min, 3x3min and 0.33x0.33 are only used for ELM tools
160
-
</entry>
161
-
```
162
-
163
-
Simply add the name of your new grid to the list of `valid_values`.
164
-
165
-
## Namelist Variable Defaults
166
-
167
-
Each new grid will likely need various new default parameter values to be specified. These parameters can be set for individual simulations by editing the `user_nl_*` files in the case directory, but for these to become defaults any time the grid is used then new defaults need to be specified.
168
-
169
-
The lists below show namelist parameters that may need to be specified for a new grid. The creator of a new grid is responsible for understanding these parameters and deciding when new defaults are appropriate.
170
-
171
-
### Atmosphere Namelist Parameters
172
-
173
-
-`drydep_srf_file` - Data file for surface aerosol deposition
174
-
-`bnd_topo` - Surface topography (smoothed for target grid)
175
-
-`mesh_file` - HOMME np4 mesh file (exodus format)
176
-
-`se_tstep` - HOMME time step [seconds]
177
-
-`dt_remap_factor` - HOMME vertical remap factor
178
-
-`dt_tracer_factor` - HOMME tracer advection factor
179
-
-`hypervis_subcycle_q` - HOMME tracer hyperviscosity factor
180
-
181
-
### Land Namelist Parameters
182
-
183
-
-`fsurdat` - Surface data file
184
-
-`finidat` - Land model initial condition file
185
-
-`flanduse_timeseries` - Time-evolving land-use data file
204
+
Note that all of these paths are relative to the input data path set as `DIN_LOC_ROOT` which has a default for each machine. Mapping files can be created with
205
+
the [ncremap](https://acme-climate.atlassian.net/wiki/spaces/DOC/pages/754286611/Regridding+E3SM+Data+with+ncremap) utility in NCO
186
206
187
207
Back to step-by-step guide for [Adding Support for New Grids](../adding-grid-support-step-by-step-guide.md)
0 commit comments