Skip to content

Cleanups and mapping correction fixed#624

Open
nmizukami wants to merge 4 commits intoESCOMP:mainfrom
nmizukami:cleanups
Open

Cleanups and mapping correction fixed#624
nmizukami wants to merge 4 commits intoESCOMP:mainfrom
nmizukami:cleanups

Conversation

@nmizukami
Copy link
Copy Markdown
Collaborator

@nmizukami nmizukami commented Apr 19, 2026

Clean ups and bugfix on mapping correction

Regarding reading a standalone mapping netCDF:
Background If the dimension size of data (dimension of 1D ragged array such as weight, source hru) is different than sum of num_qhru (a array holding number of overlapping source hru for each river network hru), there are river network hru(s) that does not have any overlapping source hrus. This is indicated by 0 of num_qhru. See user-guide for more information.

Problem&fix However, corresponding element in 1D ragged arrays to the river network hru without any source hru is also 0, though the ragged arrays should not include this (that is why sum of num_qhru is not equal to data dimension size). There was a logical error to detect such indices in the ragged array. This PR fixes this. If a use uses such a mapping file, remapped runoff should be incorrect and get wrong answers for the rest of simulation without this fix.. Fix are in read_remap.f90

This includes the other cleanups

@nmizukami nmizukami added bugfix standalone For stand-alone run labels Apr 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bugfix standalone For stand-alone run

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant