Land-ice framework

The shared framework for MALI tasks is in polaris.landice.

MALI model step

polaris.landice.model.MaliModelStep is a polaris.ModelStep for running MALI with namelist and streams files. Its velocity_solver argument sets config_velocity_solver, after any namelist files the step adds. A step with a velocity solver from Albany ('FO') must also give albany_input_package, the package with its albany_input.yaml, which is copied into the step’s work directory. polaris.landice.model.MaliModelStep.needs_albany tells the component whether the MALI build needs Albany (see Albany). On a machine with GPUs, Albany runs on them, so a step that needs Albany asks for one GPU per MPI task (polaris.landice.model.MaliModelStep.uses_gpus). The rest of MALI runs on CPUs, so other steps ask for no GPUs.

The step partitions graph.info in its work directory, so a task links that file from the step that made the mesh.

MALI meshes

polaris.landice.mesh.make_mali_mesh() turns a culled planar MPAS mesh into a MALI mesh with a given number of vertical levels, with mpas_tools’ create_landice_grid_from_generic_mpas_grid, and optionally writes a graph file for partitioning it. It needs no MALI build, so steps in other components can call it.