mpas_analysis.shared.time_series.MpasTimeSeriesTask
- class mpas_analysis.shared.time_series.MpasTimeSeriesTask(config, componentName, taskName=None, subtaskName=None, section='timeSeries')[source]
An analysis tasks for computing time series from output from the
timeSeriesStatsMonthly
analysis member.- Variables:
variableList (list of str) – A list of variable names in
timeSeriesStatsMonthly
to be included in the time seriesallVariables (list of str) – A list of all available variable names in
timeSeriesStatsMonthly
used to raise an exception when an unavailable variable is requestedinputFiles (list of str) – A list of input files from which to extract the time series.
endDate (startDate,) – The start and end dates of the time series as strings
endYear (startYear,) – The start and end years of the time series
- __init__(config, componentName, taskName=None, subtaskName=None, section='timeSeries')[source]
Construct the analysis task for extracting time series.
- Parameters:
config (mpas_tools.config.MpasConfigParser) – Contains configuration options
componentName ({'ocean', 'seaIce'}) – The name of the component (same as the folder where the task resides)
taskName (str, optional) – The name of the task, ‘mpasTimeSeriesOcean’ or ‘mpasTimeSeriesSeaIce’ by default (depending on
componentName
)subtaskName (str, optional) – The name of the subtask (if any)
section (str, optional) – The section of the config file from which to read the start and end times for the time series, also added as a tag
Methods
__init__
(config, componentName[, taskName, ...])Construct the analysis task for extracting time series.
add_subtask
(subtask)Add a subtask to this tasks.
add_variables
(variableList)Add one or more variables to extract as a time series.
check_analysis_enabled
(analysisOptionName[, ...])Check to make sure a given analysis is turned on, issuing a warning or raising an exception if not.
check_generate
()Determines if this analysis should be generated, based on the
generate
config option andtaskName
,componentName
andtags
.close
()Close the Process object.
is_alive
()Return whether process is alive
join
([timeout])Wait until child process terminates
kill
()Terminate process; sends SIGKILL signal or uses TerminateProcess()
run
([writeLogFile])Sets up logging and then runs the analysis task.
run_after
(task)Only run this task after the given task has completed.
run_task
()Compute the requested time series
set_start_end_date
(section)Set the start and end dates in the
config
correspond to the start and end years in a given category of analysissetup_and_check
()Perform steps to set up the analysis and check for errors in the setup.
start
()Start child process
terminate
()Terminate process; sends SIGTERM signal or uses TerminateProcess()
Attributes
BLOCKED
FAIL
READY
RUNNING
SUCCESS
UNSET
authkey
daemon
Return whether process is a daemon
exitcode
Return exit code of process or None if it has yet to stop
ident
Return identifier (PID) of process or None if it has yet to start
name
pid
Return identifier (PID) of process or None if it has yet to start
sentinel
Return a file descriptor (Unix) or handle (Windows) suitable for waiting for process termination.