mpas_analysis.shared.plot.PlotClimatologyMapSubtask

class mpas_analysis.shared.plot.PlotClimatologyMapSubtask(parentTask, season, comparisonGridName, remapMpasClimatologySubtask, remapObsClimatologySubtask=None, secondRemapMpasClimatologySubtask=None, controlConfig=None, depth=None, removeMean=False, subtaskName=None)[source]

An analysis task for plotting 2D model fields against observations.

Variables:
  • season (str) – A season (key in shared.constants.monthDictionary) to be plotted.

  • comparisonGridName (str) – The name of the comparison grid to plot.

  • remapMpasClimatologySubtask (mpas_analysis.shared.climatology.RemapMpasClimatologySubtask) – The subtask for remapping the MPAS climatology that this subtask will plot

  • remapObsClimatologySubtask (mpas_analysis.shared.climatology.RemapObservedClimatologySubtask) – The subtask for remapping the observational climatology that this subtask will plot

  • secondRemapMpasClimatologySubtask (mpas_analysis.shared.climatology.RemapMpasClimatologySubtask) – A second subtask for remapping another MPAS climatology to plot in the second panel and compare with in the third panel

  • removeMean (bool, optional) – If True, a common mask for the model and reference data sets is computed (where both are valid) and the mean over that mask is subtracted from both the model and reference results. This is useful for data sets where the desire is to compare the spatial pattern but the mean offset is not meaningful (e.g. SSH)

  • outFileLabel (str) – The prefix on each plot and associated XML file

  • fieldNameInTitle (str) – The name of the field being plotted, as used in the plot title

  • mpasFieldName (str) – The name of the variable in the MPAS timeSeriesStatsMonthly output

  • diffTitleLabel (str, optional) – the title of the difference subplot

  • unitsLabel (str) – the units of the plotted field, to be displayed on color bars

  • imageCaption (str) – the caption when mousing over the plot or displaying it full screen

  • galleryGroup (str) – the name of the group of galleries in which this plot belongs

  • groupSubtitle (str or None) – the subtitle of the group in which this plot belongs (or blank if none)

  • groupLink (str) – a short name (with no spaces) for the link to the gallery group

  • galleryName (str or None) – the name of the gallery in which this plot belongs

  • depth ({None, float, 'top', 'bot'}) – Depth at which to perform the comparison, ‘top’ for the surface ‘bot’ for the base

  • configSectionName (str) – the name of the section where the color map and range is defined

  • maskMinThreshold (float or None) – a value below which the field is mask out in plots

  • maskMaxThreshold (float or None) – a value above which the field is mask out in plots

  • extend ({'neither', 'both', 'min', 'max'}) – Determines the contourf-coloring of values that are outside the range of the levels provided if using an indexed colormap.

__init__(parentTask, season, comparisonGridName, remapMpasClimatologySubtask, remapObsClimatologySubtask=None, secondRemapMpasClimatologySubtask=None, controlConfig=None, depth=None, removeMean=False, subtaskName=None)[source]

Construct one analysis subtask for each plot (i.e. each season and comparison grid) and a subtask for computing climatologies.

Parameters:
  • parentTask (mpas_analysis.shared.AnalysisTask) – The parent (main) task for this subtask

  • season (str) – A season (key in shared.constants.monthDictionary) to be plotted.

  • comparisonGridName (str) – The name of the comparison grid to plot.

  • remapMpasClimatologySubtask (mpas_analysis.shared.climatology.RemapMpasClimatologySubtask) – The subtask for remapping the MPAS climatology that this subtask will plot

  • remapObsClimatologySubtask (mpas_analysis.shared.climatology.RemapObservedClimatologySubtask, optional) – The subtask for remapping the observational climatology that this subtask will plot

  • secondRemapMpasClimatologySubtask (mpas_analysis.shared.climatology.RemapMpasClimatologySubtask, optional) – A second subtask for remapping another MPAS climatology to plot in the second panel and compare with in the third panel

  • controlConfig (mpas_tools.config.MpasConfigParser, optional) – Configuration options for a control run (if any)

  • depth ({float, 'top', 'bot'}, optional) – Depth the data is being plotted, ‘top’ for the sea surface ‘bot’ for the sea floor

  • removeMean (bool, optional) – If True, a common mask for the model and reference data sets is computed (where both are valid) and the mean over that mask is subtracted from both the model and reference results. This is useful for data sets where the desire is to compare the spatial pattern but the mean offset is not meaningful (e.g. SSH)

  • subtaskName (str, optional) – The name of the subtask. If not specified, it is plot<season>_<comparisonGridName> with a suffix indicating the depth being sliced (if any)

Methods

__init__(parentTask, season, ...[, ...])

Construct one analysis subtask for each plot (i.e. each season and comparison grid) and a subtask for computing climatologies.

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 generate config option and taskName, componentName and tags.

close()

Close the Process object.

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()

Plots a comparison of E3SM/MPAS output to SST/TEMP, SSS/SALT or MLD observations or a control run

set_plot_info(outFileLabel, ...[, ...])

Store attributes related to plots, plot file names and HTML output.

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.