solver_nb.lid_seb_solver

solver_nb.lid_seb_solver(cell, met_data, dt, dz, k_lid, Sfrac_lid=None)

NumbaMinpack version of the lid surface energy balance solver. Solves .sfc_energy_lid or sfc_energy_virtual_lid.

Called in virtual_lid and lid.lid_development.

Parameters:
  • cell (numpy structured array) – Element of the model grid we are operating on.

  • met_data (dict) – Dictionary containing the meteorological data for the current timestep. See firn_column for details.

  • dt (int) – Number of seconds in the current timestep [s]

  • dz (float) – Size of each vertical point in the cell. [m]

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.