Skip to content

Commit

Permalink
Merge pull request #76 from lreis2415/fix/terrain-depression
Browse files Browse the repository at this point in the history
fix: sp_terrain depression args and DEP_LINSLEY `ei` check
  • Loading branch information
crazyzlj committed Aug 10, 2023
2 parents caaa96e + 2af702f commit 52eb352
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion seims/preprocess/sp_terrain.py
Expand Up @@ -490,8 +490,8 @@ def parameters_extraction(cfg):

status_output('Generating depression storage capacity...', 20, f)
TerrainUtilClass.depression_capacity(cfg.maindb, cfg.spatials.landuse,
cfg.spatials.soil_texture,
cfg.spatials.slope,
cfg.spatials.soil_texture,
cfg.spatials.depression,
cfg.imper_perc_in_urban)

Expand Down
Expand Up @@ -80,6 +80,10 @@ int DepressionFSDaily::Execute() {
m_ed[i] = m_pet[i] - m_ei[i];
} else {
m_ed[i] = m_sd[i];
}
if (m_ed[i] < 0) {
printf("[DepressionLinsley] Warning! m_ed[%d](%f) < 0! m_pet[%d](%f) m_ei[%d](%f)\n", i, m_ed[i], i, m_pet[i], i, m_ei[i]);
m_ed[i] = 0;
}
// �ݵ���ˮ��� - �ݵ��������
m_sd[i] -= m_ed[i];
Expand Down

0 comments on commit 52eb352

Please sign in to comment.