Revision 106538f5c3e5805d574d526226ce853b217e8702 authored by Bill Sacks on 24 May 2021, 19:56:23 UTC, committed by Bill Sacks on 24 May 2021, 20:23:59 UTC
This is intended to support the GLC component having multiple grids (e.g., Greenland & Antarctica), but the implementation handles any component having multiple grids. At a high level: If a component's grid is a colon-delimited string, then it is assumed to specify multiple grids, separated by the colons. Then, anywhere where we use the component's grid to create derived variables (domain name, mapping file names, etc.), I have introduced a loop over the list of grids for each component. For a component with multiple grids, the derived variables then also end up as colon-delimited strings, with one colon-delimited element per grid. To avoid adding more complexity and deep nesting to the Grids class, I have refactored it significantly in a few places. Main goals of the refactoring were (1) extracting some logic into a helper class, _ComponentGrids; among other things, this replaces various lookups that were being done using tuples and dicts; and (2) extracting the bodies of nested loops into new methods to avoid super-deep nesting. I have also added unit tests of grids.py. The high-level tests of the Grids class work by constructing little fake xml files on the fly. There are also some tests of the lower-level helper functions. These unit tests don't cover all of the logic in grids.py, but they do cover a lot of the logic, with a particular focus on any parts of the code that I had to change significantly for this work. Resolves ESMCI/cime#3962
1 parent acd4cd8
index.html
<html>
<head>
<title>CIME Documentation</title>
<link type="text/css" rel="stylesheet" href="doc/build/html/_static/alabaster.css">
<link type="text/css" rel="stylesheet" href="doc/build/html/_static/pygments.css">
<meta http-equiv="refresh" content="0; url=doc/build/html/index.html" />
</head>
<body>
If you are not redirected automatically, click <a href="doc/build/html/index.html">doc/build/html/index.html</a>
</body>
![swh spinner](/static/img/swh-spinner.gif)
Computing file changes ...