diff --git a/configs/anvil/config.20170926.FCT2.A_WCYCL1850S.ne30_oECv3.anvil b/configs/anvil/config.20170926.FCT2.A_WCYCL1850S.ne30_oECv3.anvil index e133a67cd..f3f32244b 100644 --- a/configs/anvil/config.20170926.FCT2.A_WCYCL1850S.ne30_oECv3.anvil +++ b/configs/anvil/config.20170926.FCT2.A_WCYCL1850S.ne30_oECv3.anvil @@ -45,6 +45,10 @@ htmlSubdirectory = html # 'all_' -- all analysis with a particular tag will be run # 'all_' -- all analyses from a given component (either 'ocean' # or 'seaIce') will be run +# 'only_', 'only_' -- 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_' -- skip the given task # 'no_', 'no_' -- in analogy to 'all_*', skip all analysis # tasks from the given compoonent or with diff --git a/configs/edison/config.20170807.beta1.G_oQU240.edison b/configs/edison/config.20170807.beta1.G_oQU240.edison index 19b4a0de2..a03932a01 100644 --- a/configs/edison/config.20170807.beta1.G_oQU240.edison +++ b/configs/edison/config.20170807.beta1.G_oQU240.edison @@ -46,6 +46,10 @@ htmlSubdirectory = html # 'all_' -- all analysis with a particular tag will be run # 'all_' -- all analyses from a given component (either 'ocean' # or 'seaIce') will be run +# 'only_', 'only_' -- 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_' -- skip the given task # 'no_', 'no_' -- in analogy to 'all_*', skip all analysis # tasks from the given compoonent or with diff --git a/configs/edison/config.20170915.beta2.A_WCYCL1850S.ne30_oECv3_ICG.edison b/configs/edison/config.20170915.beta2.A_WCYCL1850S.ne30_oECv3_ICG.edison index 4624d6dc7..a4d2d124d 100644 --- a/configs/edison/config.20170915.beta2.A_WCYCL1850S.ne30_oECv3_ICG.edison +++ b/configs/edison/config.20170915.beta2.A_WCYCL1850S.ne30_oECv3_ICG.edison @@ -61,6 +61,10 @@ htmlSubdirectory = html # 'all_' -- all analysis with a particular tag will be run # 'all_' -- all analyses from a given component (either 'ocean' # or 'seaIce') will be run +# 'only_', 'only_' -- 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_' -- skip the given task # 'no_', 'no_' -- in analogy to 'all_*', skip all analysis # tasks from the given compoonent or with diff --git a/configs/edison/config.20171102.beta3rc02_1850.ne30_oECv3_ICG.edison b/configs/edison/config.20171102.beta3rc02_1850.ne30_oECv3_ICG.edison index b12885881..910214884 100644 --- a/configs/edison/config.20171102.beta3rc02_1850.ne30_oECv3_ICG.edison +++ b/configs/edison/config.20171102.beta3rc02_1850.ne30_oECv3_ICG.edison @@ -47,6 +47,10 @@ htmlSubdirectory = html # 'all_' -- all analysis with a particular tag will be run # 'all_' -- all analyses from a given component (either 'ocean' # or 'seaIce') will be run +# 'only_', 'only_' -- 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_' -- skip the given task # 'no_', 'no_' -- in analogy to 'all_*', skip all analysis # tasks from the given compoonent or with diff --git a/configs/edison/config.B_low_res_ice_shelves_1696_JWolfe_layout_Edison b/configs/edison/config.B_low_res_ice_shelves_1696_JWolfe_layout_Edison index ef08bcb73..e134103f3 100644 --- a/configs/edison/config.B_low_res_ice_shelves_1696_JWolfe_layout_Edison +++ b/configs/edison/config.B_low_res_ice_shelves_1696_JWolfe_layout_Edison @@ -57,6 +57,10 @@ htmlSubdirectory = html # 'all_' -- all analysis with a particular tag will be run # 'all_' -- all analyses from a given component (either 'ocean' # or 'seaIce') will be run +# 'only_', 'only_' -- 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_' -- skip the given task # 'no_', 'no_' -- in analogy to 'all_*', skip all analysis # tasks from the given compoonent or with diff --git a/configs/lanl/config.20170207.MPAS-SeaIce.QU60km_polar.wolf b/configs/lanl/config.20170207.MPAS-SeaIce.QU60km_polar.wolf index 1a41e9487..3e5d25354 100644 --- a/configs/lanl/config.20170207.MPAS-SeaIce.QU60km_polar.wolf +++ b/configs/lanl/config.20170207.MPAS-SeaIce.QU60km_polar.wolf @@ -41,6 +41,10 @@ baseDirectory = /dir/to/analysis/output # 'all_' -- all analysis with a particular tag will be run # 'all_' -- all analyses from a given component (either 'ocean' # or 'seaIce') will be run +# 'only_', 'only_' -- 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_' -- skip the given task # 'no_', 'no_' -- in analogy to 'all_*', skip all analysis # tasks from the given compoonent or with diff --git a/configs/lanl/config.MatchBoth_orig b/configs/lanl/config.MatchBoth_orig index 48b7ac78c..92ec3e87a 100644 --- a/configs/lanl/config.MatchBoth_orig +++ b/configs/lanl/config.MatchBoth_orig @@ -41,6 +41,10 @@ baseDirectory = /dir/to/analysis/output # 'all_' -- all analysis with a particular tag will be run # 'all_' -- all analyses from a given component (either 'ocean' # or 'seaIce') will be run +# 'only_', 'only_' -- 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_' -- skip the given task # 'no_', 'no_' -- in analogy to 'all_*', skip all analysis # tasks from the given compoonent or with diff --git a/configs/olcf/config.20170313.beta1.A_WCYCL1850S.ne30_oECv3_ICG.edison b/configs/olcf/config.20170313.beta1.A_WCYCL1850S.ne30_oECv3_ICG.edison index 018ad6634..76a6fc05a 100644 --- a/configs/olcf/config.20170313.beta1.A_WCYCL1850S.ne30_oECv3_ICG.edison +++ b/configs/olcf/config.20170313.beta1.A_WCYCL1850S.ne30_oECv3_ICG.edison @@ -46,6 +46,10 @@ htmlSubdirectory = html # 'all_' -- all analysis with a particular tag will be run # 'all_' -- all analyses from a given component (either 'ocean' # or 'seaIce') will be run +# 'only_', 'only_' -- 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_' -- skip the given task # 'no_', 'no_' -- in analogy to 'all_*', skip all analysis # tasks from the given compoonent or with diff --git a/configs/olcf/config.20170915.beta2.A_WCYCL1850S.ne30_oECv3_ICG.edison b/configs/olcf/config.20170915.beta2.A_WCYCL1850S.ne30_oECv3_ICG.edison index 271e51549..8ede7c504 100644 --- a/configs/olcf/config.20170915.beta2.A_WCYCL1850S.ne30_oECv3_ICG.edison +++ b/configs/olcf/config.20170915.beta2.A_WCYCL1850S.ne30_oECv3_ICG.edison @@ -65,6 +65,10 @@ htmlSubdirectory = html # 'all_' -- all analysis with a particular tag will be run # 'all_' -- all analyses from a given component (either 'ocean' # or 'seaIce') will be run +# 'only_', 'only_' -- 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_' -- skip the given task # 'no_', 'no_' -- in analogy to 'all_*', skip all analysis # tasks from the given compoonent or with diff --git a/configs/olcf/config.GMPAS-IAF_oRRS18to6v3.titan b/configs/olcf/config.GMPAS-IAF_oRRS18to6v3.titan index a597b01f1..b903d1294 100644 --- a/configs/olcf/config.GMPAS-IAF_oRRS18to6v3.titan +++ b/configs/olcf/config.GMPAS-IAF_oRRS18to6v3.titan @@ -50,6 +50,10 @@ htmlSubdirectory = html # 'all_' -- all analysis with a particular tag will be run # 'all_' -- all analyses from a given component (either 'ocean' # or 'seaIce') will be run +# 'only_', 'only_' -- 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_' -- skip the given task # 'no_', 'no_' -- in analogy to 'all_*', skip all analysis # tasks from the given compoonent or with diff --git a/configs/theta/config.20171031.tenYearTest.GMPAS-IAF.T62_oEC60to30v3wLI.60layer.theta b/configs/theta/config.20171031.tenYearTest.GMPAS-IAF.T62_oEC60to30v3wLI.60layer.theta index ac0331bae..8524edd69 100644 --- a/configs/theta/config.20171031.tenYearTest.GMPAS-IAF.T62_oEC60to30v3wLI.60layer.theta +++ b/configs/theta/config.20171031.tenYearTest.GMPAS-IAF.T62_oEC60to30v3wLI.60layer.theta @@ -54,6 +54,10 @@ baseDirectory = /dir/to/analysis/output # 'all_' -- all analysis with a particular tag will be run # 'all_' -- all analyses from a given component (either 'ocean' # or 'seaIce') will be run +# 'only_', 'only_' -- 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_' -- skip the given task # 'no_', 'no_' -- in analogy to 'all_*', skip all analysis # tasks from the given compoonent or with diff --git a/mpas_analysis/config.default b/mpas_analysis/config.default index da73156f9..96434ccbe 100644 --- a/mpas_analysis/config.default +++ b/mpas_analysis/config.default @@ -126,6 +126,10 @@ htmlSubdirectory = html # 'all_' -- all analysis with a particular tag will be run # 'all_' -- all analyses from a given component (either 'ocean' # or 'seaIce') will be run +# 'only_', 'only_' -- 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_' -- skip the given task # 'no_', 'no_' -- in analogy to 'all_*', skip all analysis # tasks from the given compoonent or with @@ -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] diff --git a/mpas_analysis/shared/analysis_task.py b/mpas_analysis/shared/analysis_task.py index 53bb262cd..c60f93a3e 100644 --- a/mpas_analysis/shared/analysis_task.py +++ b/mpas_analysis/shared/analysis_task.py @@ -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: @@ -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 diff --git a/run_mpas_analysis b/run_mpas_analysis index 973e0b5c7..125f79f66 100755 --- a/run_mpas_analysis +++ b/run_mpas_analysis @@ -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: