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
timeSeriesStatsMonthlyanalysis member.- Variables:
variableList (list of str) – A list of variable names in
timeSeriesStatsMonthlyto be included in the time seriesallVariables (list of str) – A list of all available variable names in
timeSeriesStatsMonthlyused 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 (tranche.Tranche) – 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
generateconfig option andtaskName,componentNameandtags.close()Close the Process object.
get_mesh_filename()Get the name of the MPAS mesh file for this component.
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
configcorrespond 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
BLOCKEDFAILREADYRUNNINGSUCCESSUNSETauthkeydaemonReturn whether process is a daemon
exitcodeReturn exit code of process or None if it has yet to stop
identReturn identifier (PID) of process or None if it has yet to start
namepidReturn identifier (PID) of process or None if it has yet to start
sentinelReturn a file descriptor (Unix) or handle (Windows) suitable for waiting for process termination.