Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,10 @@ htmlSubdirectory = html
# 'all_<tag>' -- all analysis with a particular tag will be run
# 'all_<component>' -- all analyses from a given component (either 'ocean'
# or 'seaIce') will be run
# 'only_<component>', 'only_<tag>' -- all analysis from this component or
# with this tag will be run, and all
# analysis for other components or
# without the tag will be skipped
# 'no_<task_name>' -- skip the given task
# 'no_<component>', 'no_<tag>' -- in analogy to 'all_*', skip all analysis
# tasks from the given compoonent or with
Expand Down
4 changes: 4 additions & 0 deletions configs/edison/config.20170807.beta1.G_oQU240.edison
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,10 @@ htmlSubdirectory = html
# 'all_<tag>' -- all analysis with a particular tag will be run
# 'all_<component>' -- all analyses from a given component (either 'ocean'
# or 'seaIce') will be run
# 'only_<component>', 'only_<tag>' -- all analysis from this component or
# with this tag will be run, and all
# analysis for other components or
# without the tag will be skipped
# 'no_<task_name>' -- skip the given task
# 'no_<component>', 'no_<tag>' -- in analogy to 'all_*', skip all analysis
# tasks from the given compoonent or with
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,10 @@ htmlSubdirectory = html
# 'all_<tag>' -- all analysis with a particular tag will be run
# 'all_<component>' -- all analyses from a given component (either 'ocean'
# or 'seaIce') will be run
# 'only_<component>', 'only_<tag>' -- all analysis from this component or
# with this tag will be run, and all
# analysis for other components or
# without the tag will be skipped
# 'no_<task_name>' -- skip the given task
# 'no_<component>', 'no_<tag>' -- in analogy to 'all_*', skip all analysis
# tasks from the given compoonent or with
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,10 @@ htmlSubdirectory = html
# 'all_<tag>' -- all analysis with a particular tag will be run
# 'all_<component>' -- all analyses from a given component (either 'ocean'
# or 'seaIce') will be run
# 'only_<component>', 'only_<tag>' -- all analysis from this component or
# with this tag will be run, and all
# analysis for other components or
# without the tag will be skipped
# 'no_<task_name>' -- skip the given task
# 'no_<component>', 'no_<tag>' -- in analogy to 'all_*', skip all analysis
# tasks from the given compoonent or with
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,10 @@ htmlSubdirectory = html
# 'all_<tag>' -- all analysis with a particular tag will be run
# 'all_<component>' -- all analyses from a given component (either 'ocean'
# or 'seaIce') will be run
# 'only_<component>', 'only_<tag>' -- all analysis from this component or
# with this tag will be run, and all
# analysis for other components or
# without the tag will be skipped
# 'no_<task_name>' -- skip the given task
# 'no_<component>', 'no_<tag>' -- in analogy to 'all_*', skip all analysis
# tasks from the given compoonent or with
Expand Down
4 changes: 4 additions & 0 deletions configs/lanl/config.20170207.MPAS-SeaIce.QU60km_polar.wolf
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,10 @@ baseDirectory = /dir/to/analysis/output
# 'all_<tag>' -- all analysis with a particular tag will be run
# 'all_<component>' -- all analyses from a given component (either 'ocean'
# or 'seaIce') will be run
# 'only_<component>', 'only_<tag>' -- all analysis from this component or
# with this tag will be run, and all
# analysis for other components or
# without the tag will be skipped
# 'no_<task_name>' -- skip the given task
# 'no_<component>', 'no_<tag>' -- in analogy to 'all_*', skip all analysis
# tasks from the given compoonent or with
Expand Down
4 changes: 4 additions & 0 deletions configs/lanl/config.MatchBoth_orig
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,10 @@ baseDirectory = /dir/to/analysis/output
# 'all_<tag>' -- all analysis with a particular tag will be run
# 'all_<component>' -- all analyses from a given component (either 'ocean'
# or 'seaIce') will be run
# 'only_<component>', 'only_<tag>' -- all analysis from this component or
# with this tag will be run, and all
# analysis for other components or
# without the tag will be skipped
# 'no_<task_name>' -- skip the given task
# 'no_<component>', 'no_<tag>' -- in analogy to 'all_*', skip all analysis
# tasks from the given compoonent or with
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,10 @@ htmlSubdirectory = html
# 'all_<tag>' -- all analysis with a particular tag will be run
# 'all_<component>' -- all analyses from a given component (either 'ocean'
# or 'seaIce') will be run
# 'only_<component>', 'only_<tag>' -- all analysis from this component or
# with this tag will be run, and all
# analysis for other components or
# without the tag will be skipped
# 'no_<task_name>' -- skip the given task
# 'no_<component>', 'no_<tag>' -- in analogy to 'all_*', skip all analysis
# tasks from the given compoonent or with
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,10 @@ htmlSubdirectory = html
# 'all_<tag>' -- all analysis with a particular tag will be run
# 'all_<component>' -- all analyses from a given component (either 'ocean'
# or 'seaIce') will be run
# 'only_<component>', 'only_<tag>' -- all analysis from this component or
# with this tag will be run, and all
# analysis for other components or
# without the tag will be skipped
# 'no_<task_name>' -- skip the given task
# 'no_<component>', 'no_<tag>' -- in analogy to 'all_*', skip all analysis
# tasks from the given compoonent or with
Expand Down
4 changes: 4 additions & 0 deletions configs/olcf/config.GMPAS-IAF_oRRS18to6v3.titan
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,10 @@ htmlSubdirectory = html
# 'all_<tag>' -- all analysis with a particular tag will be run
# 'all_<component>' -- all analyses from a given component (either 'ocean'
# or 'seaIce') will be run
# 'only_<component>', 'only_<tag>' -- all analysis from this component or
# with this tag will be run, and all
# analysis for other components or
# without the tag will be skipped
# 'no_<task_name>' -- skip the given task
# 'no_<component>', 'no_<tag>' -- in analogy to 'all_*', skip all analysis
# tasks from the given compoonent or with
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,10 @@ baseDirectory = /dir/to/analysis/output
# 'all_<tag>' -- all analysis with a particular tag will be run
# 'all_<component>' -- all analyses from a given component (either 'ocean'
# or 'seaIce') will be run
# 'only_<component>', 'only_<tag>' -- all analysis from this component or
# with this tag will be run, and all
# analysis for other components or
# without the tag will be skipped
# 'no_<task_name>' -- skip the given task
# 'no_<component>', 'no_<tag>' -- in analogy to 'all_*', skip all analysis
# tasks from the given compoonent or with
Expand Down
6 changes: 5 additions & 1 deletion mpas_analysis/config.default
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,10 @@ htmlSubdirectory = html
# 'all_<tag>' -- all analysis with a particular tag will be run
# 'all_<component>' -- all analyses from a given component (either 'ocean'
# or 'seaIce') will be run
# 'only_<component>', 'only_<tag>' -- all analysis from this component or
# with this tag will be run, and all
# analysis for other components or
# without the tag will be skipped
# 'no_<task_name>' -- skip the given task
# 'no_<component>', 'no_<tag>' -- in analogy to 'all_*', skip all analysis
# tasks from the given compoonent or with
Expand All @@ -135,7 +139,7 @@ htmlSubdirectory = html
# an equivalent syntax can be used on the command line to override this
# option:
# ./run_mpas_analysis config.analysis --generate \
# all,no_ocean,all_timeSeries
# only_ocean,no_timeSeries,timeSeriesSST
generate = ['all']

[climatology]
Expand Down
9 changes: 8 additions & 1 deletion mpas_analysis/shared/analysis_task.py
Original file line number Diff line number Diff line change
Expand Up @@ -381,10 +381,14 @@ def check_generate(self):
if (not isinstance(self.tags, list) and
self.tags is not None):
raise ValueError('Analysis tasks\'s member self.tags '
'must be NOne or a list of strings.')
'must be None or a list of strings.')

config = self.config
generateList = config.getExpression('output', 'generate')
if len(generateList) > 0 and generateList[0][0:5] == 'only_':
# add 'all' if the first item in the list has the 'only' prefix.
# Otherwise, we would not run any tasks
generateList = ['all'] + generateList
generate = False
for element in generateList:
if '_' in element:
Expand All @@ -403,6 +407,9 @@ def check_generate(self):
elif prefix == 'no':
if suffix in noSuffixes:
generate = False
if prefix == 'only':
if suffix not in allSuffixes:
generate = False
elif element == self.taskName:
generate = True

Expand Down
5 changes: 3 additions & 2 deletions run_mpas_analysis
Original file line number Diff line number Diff line change
Expand Up @@ -440,8 +440,9 @@ if __name__ == "__main__":
if args.list:
analyses = build_analysis_list(config)
for analysisTask in analyses:
print('{}\n tags: {}'.format(analysisTask.taskName,
', '.join(analysisTask.tags)))
print('task: {}'.format(analysisTask.taskName))
print(' component: {}'.format(analysisTask.componentName)),
print(' tags: {}'.format(', '.join(analysisTask.tags)))
sys.exit(0)

if args.purge:
Expand Down