solver_nb.firn_heateqn_solver

solver_nb.firn_heateqn_solver(x, args, fixed_sfc=False, solver_method='hybr')

Numba-compatible solver function to be used within the model. Solves physics.Numba.heateqn. This loads in the relevant arguments from the cell, packages them into an array form via args_array, and passes them into the hybrd solver.

Called in <firn_column>.

Parameters:
  • x (array_like, float, dimension(core.iceshelf_class.IceShelf.vert_grid)) – numpy array containing the initial estimate of the firn column temperature

  • args (array_like) – Numpy array containing arguments to the heat equation. See <firn_column> for info on the contents of this array.

  • fixed_sfc (bool, optional) – Boolean flag to determine whether to use the fixed surface form of the heat equation.

Returns:

  • root (array_like, float, dimension(core.iceshelf_class.IceShelf.vert_grid)) – Vector containing the calculated firn column temperature, either after successful completion or at the end of the final iteration for an unsuccessful solution. [K]

  • fvec (array_like, float, dimension(core.iceshelf_class.IceShelf.vert_grid)) – Vector containing the function evaluated at root, i.e. the raw output.

  • success (bool) – Boolean flag determining whether the solution converged, or whether there was an error.

  • info (int) – Integer flag containing information on the status of the solution. From the Minpack hybrd documentation: !! * *info = 0* improper input parameters. !! * *info = 1* relative error between two consecutive iterates !! is at most xtol. !! * *info = 2* number of calls to fcn has reached or exceeded !! maxfev. !! * *info = 3* xtol is too small. no further improvement in !! the approximate solution x is possible. !! * *info = 4* iteration is not making good progress, as !! measured by the improvement from the last !! five jacobian evaluations. !! * *info = 5* iteration is not making good progress, as !! measured by the improvement from the last !! ten iterations.