mpas_analysis.shared.climatology.MpasClimatologyTask

class mpas_analysis.shared.climatology.MpasClimatologyTask(config, componentName, taskName=None)[source]

An analysis tasks for computing climatologies from output from the timeSeriesStatsMonthly analysis member.

Attributes:
variableList : list of str

A list of variable names in timeSeriesStatsMonthly to be included in the climatologies

allVariables : list of str

A list of all available variable names in timeSeriesStatsMonthly used to raise an exception when an unavailable variable is requested

seasons : list of str

A list of seasons (keys in shared.constants.monthDictionary) over which the climatology should be computed or [‘none’] if only monthly climatologies are needed.

inputFiles : list of str

A list of input files used to compute the climatologies.

ncclimoModel : {‘mpaso’, ‘mpascice’}

The name of the component expected by ncclimo

startDate, endDate : str

The start and end dates of the climatology as strings

startYear, endYear : int

The start and end years of the climatology

__init__(config, componentName, taskName=None)[source]

Construct the analysis task and adds it as a subtask of the parentTask.

Parameters:
config : MpasAnalysisConfigParser

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, defaults to mpasClimatology<ComponentName>

Methods

__init__(config, componentName[, taskName]) Construct the analysis task and adds it as a subtask of the parentTask.
add_subtask(subtask) Add a subtask to this tasks.
add_variables(variableList[, seasons]) Add one or more variables and optionally one or more seasons for which to compute climatologies.
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 and taskName, componentName and tags.
get_file_name(season) Returns the full path for MPAS climatology file produced by ncclimo.
get_start_and_end() Get the start and end years and dates for the climatology.
is_alive() Return whether process is alive
join([timeout]) Wait until child process terminates
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 climatologies
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 analysis
setup_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.