Skip to content

Exp efficiency code edit #45

Open
Jennifer Weeks (mo-jenniferweeks) wants to merge 2 commits intoMetOffice:profsea-climatefrom
mo-jenniferweeks:profsea-climate
Open

Exp efficiency code edit #45
Jennifer Weeks (mo-jenniferweeks) wants to merge 2 commits intoMetOffice:profsea-climatefrom
mo-jenniferweeks:profsea-climate

Conversation

@mo-jenniferweeks
Copy link
Copy Markdown
Collaborator

Small code change - I've brought the expansion efficiency into the brackets


therm_med = np.percentile(self.OHC_change, 50, axis=0) * self.exp_efficiency
therm_med = np.percentile(self.OHC_change * self.exp_efficiency, 50, axis=0)
therm_std = np.std(self.OHC_change * self.exp_efficiency, axis=0)
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I wonder if self.exp_efficienty should be outside the percentile bracket in both therm_med and therm_std. This way it would be consistent with the following code (if T_percentile data is supplied as an input)

if self.T_percentile_95 is not None:
T_med = self.T_change
therm_med = self.OHC_change * self.exp_efficiency
T_std = (self.T_percentile_95 - self.T_change) / 1.645
therm_std = (self.OHC_percentile_95 - self.OHC_change) * self.exp_efficiency / 1.645

Greg Munday (@gregrmunday) What do you think?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I think here we should switch to using the sample_members_2D function in order to select 'real' as opposed to statistical members associated with each percentile. Then, it shouldn't matter whether you put it in or outside the bracket :)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

That sounds good.

Jennifer Weeks (@mo-jenniferweeks) Could you make the changes, as suggested by Greg Munday (@gregrmunday) ?

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

Labels

enhancement ✨ New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants