solver_nb

This module contains functions used to solve the various heat/surface energy balance equations, using the NumbaMinpack implementation. This is rather unwieldy, but allows us to select a solver conditionally, and do so both in the main model codeusing the relevant flag in model_setup.py, but also in our test suite. This is in part a tradeoff between usability of the model, and code clarity. This approach was chosen to maximise usability, so that the different solvers can be generated according to the value of a single Boolean.

Attributes

dev_eqn_cfunc

dev_eqnaddress

form_eqn_cfunc

form_eqnaddress

heq

heqlid

sfc_energy_lid

sfc_energy_lid_address

sfc_energy_virtual_lid

sfc_energy_vlid_address

Functions

lake_seb_solver(cell, met_data, dt, dz[, formation])

NumbaMinpack version of the lake solver.

lid_heateqn_solver(cell, met_data, dt, dz)

NumbaMinpack version of the lid heat equation solver.

lid_seb_solver(cell, met_data, dt, dz, k_lid[, Sfrac_lid])

NumbaMinpack version of the lid surface energy balance solver.

solve_firn_heateqn(cell, met_data, dt, dz[, ...])

Numba-compatible solver function to be used within the model.

Module Contents

solver_nb.dev_eqn_cfunc
solver_nb.dev_eqnaddress
solver_nb.form_eqn_cfunc
solver_nb.form_eqnaddress
solver_nb.heq
solver_nb.heqlid
solver_nb.sfc_energy_lid
solver_nb.sfc_energy_lid_address
solver_nb.sfc_energy_virtual_lid
solver_nb.sfc_energy_vlid_address