utopya module¶
The utopya module is the top level access to the various
UTOPyA classes and routines.
Purpose¶
UTOPyA is a set of Python scripts and classes to faciliate configuration, building, and running model simulations.
Here we provide a short overview of the available Python classes; details can be found in the class documentations. See the section on modules and classes for the hierarchy of the classes and the modules in which they are implemented.
The
utopya_runscriptis provided to quickly setup a run script that accepts some common arguments.The
utopya_jobscriptmodule defines a number of classes that can be used to create and run job scripts. Classes are present to run job scripts in foreground, background, or submit them to a batch job system.The
utopya_jobtreemodule defines classes that could be used to create a sequence of jobs. Each job in the sequence automically starts the next one, and eventually terminates the sequence on certain conditions.The
utopya_buildmodule defines classes to copy and configure source files and build executables.The
utopya_installmodule defines a class that could be used to copy files or series of files to the local file system. This is typcially used to install input data. The reverse operation is to archive output; for this, the moduleutopya_archiveis available.
All the above classes are build on one of the following base classes:
The
UtopyaBaseclass is the ancestor of all UTOPyA classes.The
UtopyaRcclass is an extension of the base class holding configurations settings read from a ‘rcfile’.
In addition, the utopya_tools module provides a number of general purpose tools
used by the other modules.
Utopya modules¶
Actual implementations can be found in submodules:
utopya_basemoduleUtopyaBaseutopya_rcmoduleUtopyaRcutopya_jobscriptmoduleUtopyaJobScriptUtopyaJobScriptForegroundUtopyaJobScriptRedirectUtopyaJobScriptBackgroundUtopyaJobScriptBatchUtopyaJobScriptBatchTestUtopyaJobScriptBatchLSFUtopyaJobScriptBatchPBSUtopyaJobScriptBatchSGEUtopyaJobScriptBatchSlurmUtopyaJobScriptBatchLoadLevelerutopya_jobtreemoduleUtopyaJobStepUtopyaJobTreeUtopyaJobParallelUtopyaJobParallelWaitUtopyaJobIterationUtopyaJobIteration_CheckFileUtopyaJobTaskUtopyaJobTaskSubmitUtopyaJobTaskRunUtopyaJobTaskWaitUtopyaRcCommandUtopyaJobTreeTimingutopya_runscriptmoduleUtopyaRunScriptUtopyaRunScriptRcutopya_toolsmoduleImportClass()CreateFilePath()CreateDirs()WriteTextFile()UpdateTextFile()ReadNcVariable()GetValuesFunction()CallCallingErrorStatusErrorutopya_buildmoduleUtopyaBuildUtopyaCopyUtopyaConfigureUtopyaCompilerSettingsUtopyaCompilerSettingsFortranUtopyaCompilerSettingsF2PyUtopyaLibSettingsUtopyaDependenciesUtopyaMakeutopya_postmoduleUtopyaHtmlFileUtopyaPlotUtopyaBarPlotutopya_indexmoduleIndexerGetIndexPart()IndexPartIndexSectionsIndexListIndexTableRowIndexTableColIndexColumnIndexTextIndexImgIndexTxtFile
Utopya classes¶
The UTOPyA python classes could be imported from the utopya module, and are defined according to the following hierchy: