polaris.tasks.ocean.realistic_global.dynamic_adjustment.summary.Summary
- class polaris.tasks.ocean.realistic_global.dynamic_adjustment.summary.Summary(component, subdir, stages, min_res=None, mesh_target=None)[source]
A step that summarizes a completed dynamic-adjustment sequence as one row of diagnostics per stage (see
diagnostics), written todynamic_adjustment_stats.csvand logged as a table.It applies no checks of its own. The thresholds live in
StageCheck, which runs as soon as its own stage finishes, so a stage that is already out of bounds stops the sequence rather than costing the whole job. Whether the adjustment has settled is a judgement read from this summary and thevizfigure rather than from a threshold; seechecksfor why the automated version of that judgement was removed.Diagnostics come from each stage’s global-statistics file where the configured model reports them and from
output.ncotherwise. Both files are read with Omega’s variable names mapped to the MPAS-Ocean ones the metrics are written in:output.ncthroughopen_model_datasetand the statistics throughopen_stage_stats(). The baseline comparison of the final stage is handled separately by that forward step, which validates the'state'class of variables.One caveat the thresholds cannot express: Omega’s temperature is conservative temperature where MPAS-Ocean’s is potential temperature, and its salinity is absolute salinity where MPAS-Ocean’s is practical salinity, so the bounds are not literally on the same quantities in the two models. Against these thresholds the difference is immaterial.
- Variables:
stages (list of ForwardStage) – The stages of the adjustment, in schedule order.
stage_names (list of str) – The stage subdirectory names, in schedule order.
- __init__(component, subdir, stages, min_res=None, mesh_target=None)[source]
Create the step.
- Parameters:
component (polaris.tasks.ocean.Ocean) – The ocean component the step belongs to.
subdir (str) – The subdirectory for the step.
stages (list of ForwardStage) – The stages of the adjustment, in schedule order. The stages themselves are needed, rather than just their names, because a stage’s run duration is what turns a change across the stage into a per-day rate.
min_res (float, optional) – The mesh minimum resolution in km, used for a per-kilometer Omega timestep.
mesh_target (str, optional) – The static horizontal mesh file used for the Omega CFL estimate, relative to the base work directory. It is linked into the step as
mesh.nc.
Methods
__init__(component, subdir, stages[, ...])Create the step.
add_cf_check([filename])Check an output file for CF compliance after the step runs.
add_dependency(step[, name])Add step as a dependency of this step (i.e. this step can't run until the dependency has finished).
add_input_file([filename, target, database, ...])Add an input file to the step (but not necessarily to the MPAS model).
add_output_file(filename[, validate_vars, ...])Add the output file to the step
add_property_check(filename, check_properties)Add a single conservation comparison for an output file
check_cf()Check the files added with
add_cf_check()for CF compliance.check_properties()Check conservation properties of the output files of this step.
constrain_resources(available_resources)Constrain
cpus_per_taskandntasksbased on the number of cores available to this stepprocess_inputs_and_outputs()Process the inputs to and outputs from a step added with
polaris.Step.add_input_file()andpolaris.Step.add_output_file().run()Summarize the sequence.
runtime_setup()Update attributes of the step at runtime before calling the
run()method.set_resources([cpus_per_task, ...])Update the resources for the subtask.
set_shared_config(config[, link])Replace the step's config parser with the shared config parser
setup()Set up the task in the work directory, including downloading any dependencies.
validate_baselines()Compare variables between output files in this step and in the same step from a baseline run if one was provided.
work_path(*filenames)Get the absolute path to a file or directory in the step's work directory
Attributes
coresthe number of cores this step needs, in total
gpusthe number of GPUs this step needs, in total
may_span_nodeswhether this step's cores and GPUs may come from several nodes
min_coresthe number of cores this step needs in order to run at all
min_gpusthe number of GPUs this step requires, in total