API reference¶
This page provides an auto-generated summary of the compass API. For more
details and examples, refer to the relevant sections in the main part of the
documentation.
MPAS Cores¶
compass framework¶
Command-line interface¶
Entry point for the main script   | 
list¶
  | 
List the available test cases  | 
  | 
setup¶
  | 
Set up one or more test cases  | 
  | 
Set up one or more test cases  | 
clean¶
  | 
Set up one or more test cases  | 
suite¶
  | 
Set up a test suite  | 
  | 
Clean up a test suite by removing its test cases and run script  | 
run¶
  | 
Run the given test suite  | 
  | 
Used by the framework to run a test case when   | 
  | 
Used by the framework to run a step when   | 
cache¶
  | 
Cache one or more compass output files for use in a cached variant of the test case or step  | 
Base Classes¶
mpas_core¶
  | 
The base class for housing all the tests for a given MPAS core, such as ocean, landice or sw (shallow water)  | 
  | 
Add a test group to the MPAS core  | 
testgroup¶
  | 
The base class for test groups, which are collections of test cases with a common purpose (e.g.  | 
  | 
Add a test case to the test group  | 
testcase¶
  | 
The base class for test cases---such as a decomposition, threading or restart test---that are made up of one or more steps  | 
Modify the configuration options for this test case.  | 
|
Run each step of the test case.  | 
|
Test cases can override this method to perform validation of variables and timers  | 
|
  | 
Add a step to the test case  | 
step¶
  | 
The base class for a step of a test cases, such as setting up a mesh, creating an initial condition, or running the MPAS core forward in time.  | 
Set up the test case in the work directory, including downloading any dependencies.  | 
|
  | 
Run the step.  | 
  | 
Add an input file to the step (but not necessarily to the MPAS model).  | 
  | 
Add the output file that must be produced by this step and may be made available as an input to steps, perhaps in other test cases.  | 
make a link to the model executable and add it to the inputs  | 
|
  | 
Add a file with updates to namelist options to the step to be parsed when generating a complete namelist file if and when the step gets set up.  | 
  | 
Add the namelist replacements to be parsed when generating a namelist file if and when the step gets set up.  | 
  | 
Update an existing namelist file with additional options.  | 
  | 
Modify the namelist so the number of PIO tasks and the stride between them consistent with the number of nodes and cores (one PIO task per node).  | 
  | 
Add a streams file to the step to be parsed when generating a complete streams file if and when the step gets set up.  | 
  | 
Update the streams files during the run phase of this step using the given template and replacements.  | 
config¶
  | 
Make a deep copy of config to changes can be made without affecting the original  | 
  | 
Add the contents of a config file within a package to the current config parser  | 
  | 
make sure all paths in the paths, namelists and streams sections are absolute paths  | 
  | 
Get an absolute path given a tag name for that path  | 
io¶
  | 
Download a file from a URL to the given path or path name  | 
  | 
From https://stackoverflow.com/a/55742015/7728169 Create a symbolic link named link_name pointing to target.  | 
logging¶
  | 
Log the module path and file path of a call to a method, e.g..  | 
model¶
  | 
Run the model after determining the number of cores  | 
  | 
Partition the domain for the requested number of cores  | 
  | 
Make a graph file from the MPAS mesh for use in the Metis graph partitioning software  | 
mpas_cores¶
Get a list of all collections of tests for MPAS cores  | 
parallel¶
  | 
Get the number of total cores and nodes available for running steps  | 
provenance¶
  | 
Write a file with provenance, such as the git version, conda packages, command, and test cases, to the work directory  | 
validate¶
  | 
Compare variables between files in the current test case and/or with the baseline results.  | 
  | 
Compare variables between files in the current test case and/or with the baseline results.  |