mpas_analysis.ocean.compute_anomaly_subtask.ComputeAnomalySubtask¶
-
class
mpas_analysis.ocean.compute_anomaly_subtask.
ComputeAnomalySubtask
(parentTask, mpasTimeSeriesTask, outFileName, variableList, movingAveragePoints, subtaskName='computeAnomaly', alter_dataset=None)[source]¶ A subtask for computing anomalies of moving averages and writing them out.
- Attributes
- mpasTimeSeriesTask
MpasTimeSeriesTask
The task that extracts the time series from MPAS monthly output
- outFileNamestr
The file name (usually without full path) where the resulting data set should be written
- variableListlist of str
Variables to be included in the data set
- movingAveragePointsint
The number of points (months) used in the moving average used to smooth the data set
- alter_datasetfunction
A function that takes an
xarray.Dataset
and returns anxarray.Dataset
for manipulating the data set (e.g. adding a new variable computed from others). This operation is performed before computing moving averages and anomalies, so that these operations are also performed on any new variables added to the data set.
- mpasTimeSeriesTask
-
__init__
(self, parentTask, mpasTimeSeriesTask, outFileName, variableList, movingAveragePoints, subtaskName='computeAnomaly', alter_dataset=None)[source]¶ Construct the analysis task.
- Parameters
- parentTask
AnalysisTask
The parent task of which this is a subtask
- mpasTimeSeriesTask
MpasTimeSeriesTask
The task that extracts the time series from MPAS monthly output
- outFileNamestr
The file name (usually without full path) where the resulting data set should be written
- variableListlist of str
Variables to be included in the data set
- movingAveragePointsint
The number of points (months) used in the moving average used to smooth the data set
- subtaskNamestr, optional
The name of the subtask
- alter_datasetfunction
A function that takes an
xarray.Dataset
and returns anxarray.Dataset
for manipulating the data set (e.g. adding a new variable computed from others). This operation is performed before computing moving averages and anomalies, so that these operations are also performed on any new variables added to the data set.
- parentTask
Methods
__init__
(self, parentTask, …[, …])Construct the analysis task.
add_subtask
(self, subtask)Add a subtask to this tasks.
check_analysis_enabled
(self, analysisOptionName)Check to make sure a given analysis is turned on, issuing a warning or raising an exception if not.
check_generate
(self)Determines if this analysis should be generated, based on the
generate
config option andtaskName
,componentName
andtags
.close
(self)Close the Process object.
is_alive
(self)Return whether process is alive
join
(self[, timeout])Wait until child process terminates
kill
(self)Terminate process; sends SIGKILL signal or uses TerminateProcess()
run
(self[, writeLogFile])Sets up logging and then runs the analysis task.
run_after
(self, task)Only run this task after the given task has completed.
run_task
(self)Performs analysis of ocean heat content (OHC) from time-series output.
set_start_end_date
(self, 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
(self)Perform steps to set up the analysis and check for errors in the setup.
start
(self)Start child process
terminate
(self)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.