solver_nb.lid_seb_solver

solver_nb.lid_seb_solver(x, args, v_lid=False)

NumbaMinpack version of the lid surface energy balance solver. Solves core.choose_solver.sfc_energy_lid or core.choose_solver.sfc_energy_vlid, which are defined in the body of get_lid_surface_energy_equations.

Called in lid_functions.virtual_lid and lid_functions.lid_development.

Parameters:
  • x (array_like, float, dimension(core.iceshelf_class.IceShelf.vert_grid_lid)) – Initial estimate of the lid temperature. We only use the first value (i.e. the surface value). [K]

  • args (array_like) – Array of arguments to pass into the function.

  • v_lid (bool, optional) – Flag that asks whether we want to solve the surface energy balance for a virtual lid (if True), or a true lid (if False). Default False.

Returns:

  • root (float) – the calculated lid surface temperature, either after successful completion or at the end of the final iteration for an unsuccessful solution. [K]

  • fvec (float) – 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.