For the calibration pipeline in ClimaCoupler, this function is used at the end of iteration in analyze_iteration. This would be an useful function to have in general.
function scalar_spread(ekp)
g_mean_final = EKP.get_g_mean_final(ekp)
g_final = EKP.get_g_final(ekp)
sq_dists = [sum((col .- g_mean_final) .^ 2) for col in eachcol(g_final)]
return Statistics.mean(sq_dists)
end
For the calibration pipeline in ClimaCoupler, this function is used at the end of iteration in
analyze_iteration. This would be an useful function to have in general.