compass.landice.tests.ismip7_calibration.ais.verify_melt.VerifyMelt
- class compass.landice.tests.ismip7_calibration.ais.verify_melt.VerifyMelt(test_case, melt_form, state_name, linearity_scales=())[source]
A step that checks MALI’s melt field against an independent Python implementation of the same equations.
Three things are checked, and they are deliberately independent:
the melt expression, by evaluating the Python reference on MALI’s own
TFdraft. That isolates the formula from the vertical interpolation that producedTFdraft.the vertical interpolation, by interpolating the 3-D forcing to the ice draft with a plain
numpyimplementation written from the protocol rather than transliterated from the Fortran, and comparing against MALI’sTFdraft.the linearity in the melt parameter, which is what licenses one MALI run per ocean state instead of one per (state, parameter) pair.
The draft used for the interpolation check is reconstructed from the mesh file, never taken from the run output: melt thins the ice over the single timestep, so the output geometry is post-step while
TFdraftwas computed pre-step.- Variables:
- __init__(test_case, melt_form, state_name, linearity_scales=())[source]
Create the step
- Parameters:
test_case (compass.landice.tests.ismip7_calibration.ais.Ais) – The test case this step belongs to
melt_form ({'ismip7', 'ismip6'}) – The melt form to verify
state_name (str) – The ocean state to verify against
linearity_scales (sequence of float, optional) – Multiples of the reference melt parameter that extra MALI runs were done at, for the linearity check
Methods
__init__(test_case, melt_form, state_name[, ...])Create the step
add_input_file([filename, target, database, ...])Add an input file to the step (but not necessarily to the MPAS model).
add_model_as_input()make a link to the model executable and add it to the inputs
add_namelist_file(package, namelist[, ...])Add a file with updates to namelist options to the step to be parsed when generating a complete namelist file if and when the step gets set up.
add_namelist_options(options[, out_name, mode])Add the namelist replacements to be parsed when generating a namelist file if and when the step gets set up.
add_output_file(filename)Add the output file that must be produced by this step and may be made available as an input to steps, perhaps in other test cases.
add_streams_file(package, streams[, ...])Add a streams file to the step to be parsed when generating a complete streams file if and when the step gets set up.
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
compass.Step.add_input_file()andcompass.Step.add_output_file().run()Run this step of the test case
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.
setup()Set up this step of the test case
update_namelist_at_runtime(options[, out_name])Update an existing namelist file with additional options.
update_namelist_pio([out_name])Modify the namelist so the number of PIO tasks and the stride between them consistent with the number of nodes and cores (one PIO task per node).
update_streams_at_runtime(package, streams, ...)Update the streams files during the run phase of this step using the given template and replacements.