Skip to content

Commit

Permalink
Typo in topsoil calc
Browse files Browse the repository at this point in the history
  • Loading branch information
greensh16 committed Jul 11, 2024
1 parent 2e66b79 commit 835a1c5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/mopper/calculations.py
Original file line number Diff line number Diff line change
Expand Up @@ -1175,7 +1175,7 @@ def calc_topsoil(soilvar):
# calculate the fraction of maxlev which falls in first 10cm
fraction = (0.1 - depth[maxlev -1])/(depth[maxlev] - depth[maxlev-1])
topsoil = soilvar.isel(depth=slice(0,maxlev)).sum(dim='depth')
topsoil = topsoil + fraction * topsoil.isel(depth=maxlev)
topsoil = topsoil + fraction * soilvar.isel(depth=maxlev)

return topsoil
#----------------------------------------------------------------------
Expand Down

0 comments on commit 835a1c5

Please sign in to comment.