Skip to content

Commit 2e3ab8a

Browse files
authored
Merge pull request #95 from tldr-group/feature---change-err-for-negative-flux
Feature change err for negative flux resolves #94
2 parents 74263a2 + 83e7d20 commit 2e3ab8a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

taufactor/taufactor.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ def check_vertical_flux(self, conv_crit):
197197
vert_flux[self.conc[:, :-2, 1:-1, 1:-1] == 0] = 0
198198
vert_flux[self.conc[:, 1:-1, 1:-1, 1:-1] == 0] = 0
199199
fl = torch.sum(vert_flux, (0, 2, 3))[1:-1]
200-
err = (fl.max() - fl.min())*2/(fl.max() + fl.min())
200+
err = (fl.max() - fl.min())/(fl.max())
201201
if fl.min() == 0:
202202
return 'zero_flux', torch.mean(fl), err
203203
if err < conv_crit or torch.isnan(err).item():

0 commit comments

Comments
 (0)