mpas_analysis.shared.regions.compute_region_masks_subtask.ComputeRegionMasksSubtask¶
- 
class 
mpas_analysis.shared.regions.compute_region_masks_subtask.ComputeRegionMasksSubtask(parentTask, geojsonFileName, outFileSuffix, featureList=None, subtaskName='computeRegionMasks', subprocessCount=1, obsFileName=None, lonVar='lon', latVar='lat', meshName=None)[source]¶ An analysis tasks for computing climatologies from output from the
timeSeriesStatsMonthlyanalysis member.- Attributes
 - geojsonFileNamestr
 A geojson file, typically from the MPAS
geometric_featuresrepository, defining the shapes to be masked- outFileSuffixstr
 The suffix for the resulting mask file
- featureListlist of str
 A list of features to include or
Nonefor all features- maskFileNamestr
 The name of the output mask file
- maskExistsbool
 Whether the mask file already exists
- obsFileNamestr
 The name of an observations file to create masks for. But default, lon/lat are taken from an MPAS restart file
- lonVar, latVarstr
 The name of the longitude and latitude variables in
obsFileName- meshNamestr
 The name of the mesh or grid, used as part of the mask file name. Default is the MPAS mesh name
- 
__init__(self, parentTask, geojsonFileName, outFileSuffix, featureList=None, subtaskName='computeRegionMasks', subprocessCount=1, obsFileName=None, lonVar='lon', latVar='lat', meshName=None)[source]¶ Construct the analysis task and adds it as a subtask of the
parentTask.- Parameters
 - parentTask
AnalysisTask The parent task, used to get the
taskName,configandcomponentName- geojsonFileNamestr
 A geojson file, typically from the MPAS
geometric_featuresrepository, defining the shapes to be masked- outFileSuffixstr
 The suffix for the resulting mask file
- featureListlist of str, optional
 A list of features to include. Default is all features in all files
- subtaskNamestr, optional
 The name of the subtask
- subprocessCountint, optional
 The nunumber of processes that can be used to make the mask
- obsFileNamestr, optional
 The name of an observations file to create masks for. But default, lon/lat are taken from an MPAS restart file
- lonVar, latVarstr, optional
 The name of the longitude and latitude variables in
obsFileName- meshNamestr, optional
 The name of the mesh or grid, used as part of the mask file name. Default is the MPAS mesh name
- parentTask
 
Methods
__init__(self, parentTask, geojsonFileName, …)Construct the analysis task and adds it as a subtask of the
parentTask.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
generateconfig option andtaskName,componentNameandtags.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)Compute the requested climatologies
set_start_end_date(self, section)Set the start and end dates in the
configcorrespond 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
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.