compass.landice.tests.ismip7_calibration.ais.melt_model.interpolate_to_draft
- compass.landice.tests.ismip7_calibration.ais.melt_model.interpolate_to_draft(field_3d, z_ocean, draft, bed, freezing_correction=False)[source]
Interpolate a 3-D ocean field to the ice draft.
Written from the protocol rather than transliterated from MALI’s Fortran, so that comparing the two is a real check of the implementation. The four cases match MALI’s: above the shallowest layer centre, below the deepest, where the layer below the draft is beneath the bed, and linear interpolation between layer centres.
- Parameters:
field_3d (numpy.ndarray) – The field, shaped
(nCells, nLayers)z_ocean (numpy.ndarray) – Layer centre depths, negative downward and decreasing
draft (numpy.ndarray) – Ice draft per cell, negative below sea level
bed (numpy.ndarray) – Bed topography per cell
freezing_correction (bool, optional) – Whether to apply the depth dependence of the freezing temperature when the draft is below the layer centre being used. MALI applies it to the thermal forcing in the two branches that extrapolate downward – below the deepest layer centre, and where the layer below the draft is beneath the bed – so pass True when comparing against
ismip6shelfMelt_TFdraft.
- Returns:
at_draft (numpy.ndarray) – The field interpolated to the draft, per cell