mpas_analysis.ocean.ConservationTask
- class mpas_analysis.ocean.ConservationTask(config, controlConfig)[source]
- This task generates time series plots from output from the conservation analysis member. A number of different plot types are supported, as indicated in the plotTypes config option in the conservation section. - Variables:
- config (tranche.Tranche) – Contains configuration options 
- controlConfig (tranche.Tranche) – Contains configuration options for a control run, if provided 
- outputFile (str) – The path to the output file produced by this analysis 
- runDirectory (str) – The path to the restart files from the main simulation being analyzed 
- historyDirectory (str) – The path to the history files from the main simulation being analyzed 
- startYear (int) – The year to start the analysis 
- endYear (int) – The year to end the analysis 
- inputFiles (list of str) – The paths to all conservation AM files 
- mainRunName (str) – The name of the main run from the config file 
- plotTypes (list of str) – The plot types requested in the config file 
- masterVariableList (dict of key-[list of str] pairs) – Keys are the supported plot types. Entries are lists of the variables that are needed to produce that plot type. 
- derivedVariableList (dict of key-[list of str] pairs) – Keys are the derived variables. Entries are lists of variables in the AM output that are needed to derive that variable. 
- xmlFileNames (list of str) – File names for xml output with full path 
- variableList (dict of key-[list of str] pairs) – Keys are the requested plot types. Entries are lists of the variables in the AM output that are needed to produce that plot type. 
 
 - __init__(config, controlConfig)[source]
- Construct the analysis task. - Parameters:
- config (tranche.Tranche) – Contains configuration options 
 
 - Methods - __init__(config, controlConfig)- Construct the analysis task. - add_subtask(subtask)- Add a subtask to this tasks. - 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 and- taskName,- componentNameand- tags.- 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()- Create an output netCDF file that has all of the requested conservation AM variables in the requested time window. - 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 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.