Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

r.sim.water: fix logfile writing #4522

Merged
merged 1 commit into from
Oct 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions raster/r.sim/r.sim.sediment/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -417,6 +417,8 @@ int main(int argc, char *argv[])
G_message(_("Using metric conversion factor %f, step=%f"), wp.conv,
wp.step);

wp.observation = parm.observation->answer;
wp.logfile = parm.logfile->answer;
init_library_globals(&wp);

if ((wp.tc == NULL) && (wp.et == NULL) && (wp.conc == NULL) &&
Expand Down
4 changes: 3 additions & 1 deletion raster/r.sim/r.sim.water/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ int main(int argc, char *argv[])
parm.logfile->required = NO;
parm.logfile->description =
_("Name for sampling points output text file. For each observation "
"vector point the time series of sediment transport is stored.");
"vector point the time series of water discharge is stored.");
parm.logfile->guisection = _("Output");

parm.nwalk = G_define_option();
Expand Down Expand Up @@ -525,6 +525,8 @@ int main(int argc, char *argv[])
G_message(_("Using metric conversion factor %f, step=%f"), wp.conv,
wp.step);

wp.observation = parm.observation->answer;
wp.logfile = parm.logfile->answer;
init_library_globals(&wp);

if ((wp.depth == NULL) && (wp.disch == NULL) && (wp.err == NULL))
Expand Down
3 changes: 0 additions & 3 deletions raster/r.sim/simlib/hydro.c
Original file line number Diff line number Diff line change
Expand Up @@ -151,9 +151,6 @@ void main_loop(void)
maxwa = maxwa / nblock;
}

/* Create the observation points */
create_observation_points();

G_debug(2, " maxwa, nblock %d %d", maxwa, nblock);

for (iblock = 1; iblock <= nblock; iblock++) {
Expand Down
Loading