Skip to content

Correction term for Hessian uncertainty - #25

Open
NPounder wants to merge 4 commits into
jgomezdans:masterfrom
Assimila:unc_cor
Open

Correction term for Hessian uncertainty#25
NPounder wants to merge 4 commits into
jgomezdans:masterfrom
Assimila:unc_cor

Conversation

@NPounder

@NPounder NPounder commented Dec 21, 2017

Copy link
Copy Markdown
Contributor

Deals with the Hessian correction described in #24 although not the combination of two bands that @jgomezdans is handling.
Also some minor modifications with import statements to match previous commit changes.

Comment thread kafka/kf_tools.py Outdated


def hessian_correction(gp, x0,P_inv, innovation, mask, state_mask, band, nparams):
C_obs_inv = P_inv.diagonal()[state_mask.flatten()]

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmmm... I think this isn't correct, as P_inv does have the prior term and the observational term (which is the one you're after). I think what is needed might be in the observations object, in field uncertainty, but I need to check this

@NPounder NPounder Jan 9, 2018

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, yes, I think you are right. I'll look into it. The functions will be fine (bar - renaming the variable for clarity)- just need to pass the correct uncertainty. (Or pass observations - in which case the function does need editing.)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually - I do pass in R_mat - the observation uncertainty. So the code is correct just with poorly named variables. I will fix that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants