Skip to content

Conversation

@xylar
Copy link
Collaborator

@xylar xylar commented Jan 4, 2018

This merge adds support for an only_ prefix in the generate flag, for example:

./run_mpas_analysis --generate=only_ocean,only_horizontalMap config.my_run

will run only ocean tasks and only those that have the horizontalMap tag (climatology maps). The only_ prefix works by excluding all tasks that do not have that tag. (If the first item in the generate list has the only_ prefix, we implicitly add 'all' to the beginning of the generate list, because otherwise no tasks would run.)

The output from the --list command line argument has been clarified:

  • task: has been added in front of each task name to make clear which are tasks and which are tags
  • the component for each task is also displayed.

xylar added 2 commits January 4, 2018 10:47
Make clear which items are tasks, rather than tags.

Add printing of the component to hopefully indicate that this can
also be used as a flag.
This option is convenient for things like
--generate=only_climatology,only_ocean, which generates only tasks
with the climatology tag and from the ocean component
@xylar xylar added the clean up label Jan 4, 2018
@xylar xylar self-assigned this Jan 4, 2018
@xylar xylar requested a review from milenaveneziani January 4, 2018 10:46
@xylar
Copy link
Collaborator Author

xylar commented Jan 4, 2018

@milenaveneziani, based on the confusion with the --list argument in #288, I decided to try to clear some things up. First, I hope the only_ prefix is intuitive. Second, I hope the new output from --list is clearer and would have avoided your confusion between tags and task names.

@xylar
Copy link
Collaborator Author

xylar commented Jan 4, 2018

Testing

I ran the --list option and get the following output:

$ ./run_mpas_analysis --list
task: mpasClimatologyOcean
    component: ocean
    tags: climatology
task: climatologyMapMLD
    component: ocean
    tags: climatology, horizontalMap, mld
task: climatologyMapSST
    component: ocean
    tags: climatology, horizontalMap, sst
task: climatologyMapSSS
    component: ocean
    tags: climatology, horizontalMap, sss
task: climatologyMapAntarcticMelt
    component: ocean
    tags: climatology, horizontalMap, meltRate, landIceCavities
task: mpasTimeSeriesOcean
    component: ocean
    tags: timeSeries
task: timeSeriesOHC
    component: ocean
    tags: timeSeries, ohc
task: timeSeriesSST
    component: ocean
    tags: timeSeries, sst
task: meridionalHeatTransport
    component: ocean
    tags: climatology
task: streamfunctionMOC
    component: ocean
    tags: streamfunction, moc, climatology, timeSeries
task: indexNino34
    component: ocean
    tags: timeSeries, index, nino
task: mpasClimatologySeaIce
    component: seaIce
    tags: climatology
task: climatologyMapSeaIceConcNH
    component: seaIce
    tags: climatology, horizontalMap, seaIceConc
task: climatologyMapSeaIceThickNH
    component: seaIce
    tags: climatology, horizontalMap, seaIceThick
task: climatologyMapSeaIceConcSH
    component: seaIce
    tags: climatology, horizontalMap, seaIceConc
task: climatologyMapSeaIceThickSH
    component: seaIce
    tags: climatology, horizontalMap, seaIceThick
task: mpasTimeSeriesSeaIce
    component: seaIce
    tags: timeSeries
task: timeSeriesSeaIceAreaVol
    component: seaIce
    tags: timeSeries

I ran with the --generate option as follows and got only the expected output (only climatology maps from the ocean component):

./run_mpas_analysis --purge config.QU240 --generate=only_ocean,no_landIceCavities,only_horizontalMap

Copy link
Collaborator

@milenaveneziani milenaveneziani left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very nice, thanks @xylar!

@xylar xylar merged commit 8781f17 into MPAS-Dev:develop Jan 4, 2018
@xylar xylar deleted the clarify_list branch January 4, 2018 16:13
@xylar
Copy link
Collaborator Author

xylar commented Jan 4, 2018

Thanks, @milenaveneziani!

@xylar xylar mentioned this pull request Jan 26, 2018
xylar added a commit that referenced this pull request Jan 26, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants