PISM, A Parallel Ice Sheet Model  stable v2.0.6 committed by Constantine Khrulev on 2023-01-23 15:14:38 -0900

## ◆ compute_vertical_levels()

 std::vector< double > pism::IceGrid::compute_vertical_levels ( double new_Lz, unsigned int new_Mz, SpacingType spacing, double lambda = 0.0 )
static

Set the vertical levels in the ice according to values in Mz (number of levels), Lz (domain height), spacing (quadratic or equal) and lambda (quadratic spacing parameter).

• When vertical_spacing == EQUAL, the vertical grid in the ice is equally spaced: zlevels[k] = k dz where dz = Lz / (Mz - 1).
• When vertical_spacing == QUADRATIC, the spacing is a quadratic function. The intent is that the spacing is smaller near the base than near the top.

In particular, if $$\zeta_k = k / (\mathtt{Mz} - 1)$$ then zlevels[k] = Lz * (( $$\zeta_k$$ / $$\lambda$$) * (1.0 + ( $$\lambda$$ - 1.0) $$\zeta_k$$)) where $$\lambda$$ = 4. The value $$\lambda$$ indicates the slope of the quadratic function as it leaves the base. Thus a value of $$\lambda$$ = 4 makes the spacing about four times finer at the base than equal spacing would be.

Definition at line 389 of file IceGrid.cc.

References pism::EQUAL, pism::k, PISM_ERROR_LOCATION, and pism::QUADRATIC.