Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

cesm_hawc.convergence

cesm_hawc.convergence

source

Convergence diagnostics for the L2 retrieval.

The retrieval’s output dataset carries no reliable convergence flag. The dependable source is the verbose=2 output that scipy.optimize.least_squares prints during the retrieval: capture stdout around the call (e.g. with contextlib.redirect_stdout) and pass it to parse_scipy_convergence().

parse_scipy_convergence

def parse_scipy_convergence(captured_stdout: str) -> dict

source

Read the convergence status from least_squares verbose output.

Parameters

Returns

extract_l2_native_diagnostics

def extract_l2_native_diagnostics(l2_obj) -> dict

source

Read the iteration count and final cost from an L2 dataset.

Use these as a cross-check on parse_scipy_convergence().

Parameters

Returns