Skip to content

Commit

Permalink
r.sim.water: fix logfile writing (OSGeo#4522)
Browse files Browse the repository at this point in the history
  • Loading branch information
petrasovaa committed Oct 15, 2024
1 parent 4d2a3f9 commit 14d4745
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
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 @@ -416,6 +416,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 @@ -219,7 +219,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 @@ -524,6 +524,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

0 comments on commit 14d4745

Please sign in to comment.