diff --git a/gui/wxpython/modules/mcalc_builder.py b/gui/wxpython/modules/mcalc_builder.py index 5567d6bd66d..e350e7dcbf1 100644 --- a/gui/wxpython/modules/mcalc_builder.py +++ b/gui/wxpython/modules/mcalc_builder.py @@ -288,17 +288,13 @@ def __init__( UserSettings.Get(group="cmd", key="overwrite", subkey="enabled") ) - self.randomSeed = wx.CheckBox( - parent=self.panel, label=_("Generate random seed for rand()") + self.randomSeedStaticText = StaticText( + parent=self.panel, label=_("Random seed:") ) - self.randomSeedStaticText = StaticText(parent=self.panel, label=_("Seed:")) self.randomSeedText = TextCtrl( parent=self.panel, size=(100, -1), validator=IntegerValidator() ) self.randomSeedText.SetToolTip(_("Integer seed for rand() function")) - self.randomSeed.SetValue(True) - self.randomSeedStaticText.Disable() - self.randomSeedText.Disable() self.addbox = wx.CheckBox( parent=self.panel, @@ -331,8 +327,6 @@ def __init__( self.newmaptxt.Bind(wx.EVT_TEXT, self.OnUpdateStatusBar) self.text_mcalc.Bind(wx.EVT_TEXT, self.OnUpdateStatusBar) self.overwrite.Bind(wx.EVT_CHECKBOX, self.OnUpdateStatusBar) - self.randomSeed.Bind(wx.EVT_CHECKBOX, self.OnUpdateStatusBar) - self.randomSeed.Bind(wx.EVT_CHECKBOX, self.OnSeedFlag) self.randomSeedText.Bind(wx.EVT_TEXT, self.OnUpdateStatusBar) # bind closing to ESC @@ -449,12 +443,6 @@ def _layout(self): sizer.Add(buttonSizer4, proportion=0, flag=wx.ALIGN_RIGHT | wx.ALL, border=3) randomSizer = wx.BoxSizer(wx.HORIZONTAL) - randomSizer.Add( - self.randomSeed, - proportion=0, - flag=wx.RIGHT | wx.ALIGN_CENTER_VERTICAL, - border=20, - ) randomSizer.Add( self.randomSeedStaticText, proportion=0, @@ -565,13 +553,6 @@ def OnUpdateStatusBar(self, event): self.SetStatusText(command) event.Skip() - def OnSeedFlag(self, event): - checked = self.randomSeed.IsChecked() - self.randomSeedText.Enable(not checked) - self.randomSeedStaticText.Enable(not checked) - - event.Skip() - def _getCommand(self): """Returns entire command as string.""" expr = self.text_mcalc.GetValue().strip().replace("\n", " ") @@ -581,18 +562,14 @@ def _getCommand(self): overwrite = "" if self.overwrite.IsChecked(): overwrite = " --overwrite" - seed_flag = seed = "" - if re.search(pattern=r"rand *\(.+\)", string=expr): - if self.randomSeed.IsChecked(): - seed_flag = " -s" - else: - seed = " seed={val}".format(val=self.randomSeedText.GetValue().strip()) + seed = "" + if self.randomSeedText.GetValue(): + seed = " seed={val}".format(val=self.randomSeedText.GetValue().strip()) - return '{cmd} expression="{new} = {expr}"{seed}{seed_flag}{overwrite}'.format( + return '{cmd} expression="{new} = {expr}"{seed}{overwrite}'.format( cmd=cmd, expr=expr, new=self.newmaptxt.GetValue(), - seed_flag=seed_flag, seed=seed, overwrite=overwrite, ) @@ -663,16 +640,9 @@ def OnMCalcRun(self, event): ) return - seed_flag = seed = None - if re.search(pattern=r"rand *\(.+\)", string=expr): - if self.randomSeed.IsChecked(): - seed_flag = "-s" - else: - seed = self.randomSeedText.GetValue().strip() + seed = self.randomSeedText.GetValue().strip() if self.log: cmd = [self.cmd] - if seed_flag: - cmd.append("-s") if seed: cmd.append("seed={val}".format(val=seed)) if self.overwrite.IsChecked(): @@ -684,8 +654,6 @@ def OnMCalcRun(self, event): else: overwrite = bool(self.overwrite.IsChecked()) params = {"expression": "%s=%s" % (name, expr), "overwrite": overwrite} - if seed_flag: - params["flags"] = "s" if seed: params["seed"] = seed diff --git a/raster/r.colors.out/r3.colors.out.md b/raster/r.colors.out/r3.colors.out.md index 462434e123c..a6fd00d643f 100644 --- a/raster/r.colors.out/r3.colors.out.md +++ b/raster/r.colors.out/r3.colors.out.md @@ -18,7 +18,7 @@ which includes the following options: === "Command line" ```sh - r3.mapcalc "random = rand(1, 5)" -s + r3.mapcalc "random = rand(1, 5)" r3.colors map=random color=gyr r3.colors.out map=random ``` @@ -38,7 +38,7 @@ which includes the following options: ```python import grass.script as gs - gs.run_command("r3.mapcalc", expression="random = rand(1, 5)", flags="s") + gs.run_command("r3.mapcalc", expression="random = rand(1, 5)") gs.run_command("r3.colors", map="random", color="gyr") colors = gs.parse_command("r3.colors.out", map="random", format="json") ``` diff --git a/raster/r.mapcalc/main.c b/raster/r.mapcalc/main.c index faa2fed12c1..32c12299ddf 100644 --- a/raster/r.mapcalc/main.c +++ b/raster/r.mapcalc/main.c @@ -19,6 +19,7 @@ #include #include #include +#include #include @@ -57,7 +58,41 @@ static expr_list *parse_file(const char *filename) return res; } -/****************************************************************************/ +static bool has_rand_expr(const expression *e) +{ + if (!e) + return 0; + + switch (e->type) { + case expr_type_function: + if (strcmp(e->data.func.name, "rand") == 0) + return 1; + // args is 1-indexed (likely from yacc parser conventions) + for (int i = 1; i <= e->data.func.argc; i++) { + if (has_rand_expr(e->data.func.args[i])) + return 1; + } + return 0; + + case expr_type_binding: + return has_rand_expr(e->data.bind.val); + + case expr_type_variable: + return has_rand_expr(e->data.var.bind); + + default: + return 0; + } +} + +static bool expr_list_has_rand(const expr_list *list) +{ + for (; list; list = list->next) { + if (has_rand_expr(list->exp)) + return 1; + } + return 0; +} int main(int argc, char **argv) { @@ -112,8 +147,11 @@ int main(int argc, char **argv) random = G_define_flag(); random->key = 's'; + random->label = + _("Generate random seed (result is non-deterministic) [deprecated]"); random->description = - _("Generate random seed (result is non-deterministic)"); + _("This flag is deprecated and will be removed in a future release. " + "Seeding is automatic or use parameter seed."); describe = G_define_flag(); describe->key = 'l'; @@ -153,17 +191,24 @@ int main(int argc, char **argv) if (!result) G_fatal_error(_("parse error")); + bool has_rand = expr_list_has_rand(result); if (seed->answer) { seed_value = atol(seed->answer); G_srand48(seed_value); seeded = 1; G_debug(3, "Read random seed from seed=: %ld", seed_value); } - - if (random->answer) { - seed_value = G_srand48_auto(); - seeded = 1; - G_debug(3, "Generated random seed (-s): %ld", seed_value); + else { + if (has_rand) { + seed_value = G_srand48_auto(); + seeded = 1; + G_debug(3, "Automatically generated random seed: %ld", seed_value); + } + if (random->answer) { + G_verbose_message(_("Flag 's' is deprecated and will be removed in " + "a future release. " + "Seeding is automatic or use parameter seed.")); + } } /* Set the global variable of the region setup approach */ @@ -200,11 +245,11 @@ int main(int argc, char **argv) nprocs->answer = "1"; G_verbose_message(_("r3.mapcalc does not support parallel execution.")); } - else if ((seeded) && (threads != 1)) { + else if ((threads != 1) && (has_rand)) { threads = 1; nprocs->answer = "1"; G_verbose_message( - _("Parallel execution is not supported for random seed.")); + _("Parallel execution is not supported with rand() function")); } /* Ensure the proper number of threads is assigned */ diff --git a/raster/r.mapcalc/r.mapcalc.md b/raster/r.mapcalc/r.mapcalc.md index 1c15884d0bd..f7f0c2154bb 100644 --- a/raster/r.mapcalc/r.mapcalc.md +++ b/raster/r.mapcalc/r.mapcalc.md @@ -762,23 +762,18 @@ g.rename raster=newmap,oldmap ### Random number generator initialization The pseudo-random number generator used by the rand() function can be -initialised to a specific value using the **seed** option. This can be +initialised to a specific value using the **seed** parameter. This can be used to replicate a previous calculation. -Alternatively, it can be initialised from the system time and the PID -using the **-s** flag. This should result in a different seed being used -each time. +If rand() function is used and no seed is given, +*r.mapcalc* will generate a seed, resulting in a different result for +each run. In either case, the seed will be written to the map's history, and can be seen using *r.info*. If you want other people to be able to verify your results, it's -preferable to use the **seed** option to supply a seed which is either -specified in the script or generated from a deterministic process such -as a pseudo-random number generator given an explicit seed. - -Note that the rand() function will generate a fatal error if neither the -**seed** option nor the **-s** flag are given. +preferable to use the **seed** parameter. ## EXAMPLES @@ -819,8 +814,7 @@ To change all values below 5 to NULL, keep 5 otherwise: newmap = if(map<5, null(), 5) ``` -To create a map with random values in a defined range (needs either the -usage of **-s** flag or the *seed* parameter). The precision of the +To create a map with random values in a defined range. The precision of the input values determines the output precision (the resulting [raster map type](rasterintro.md#raster-format)): diff --git a/raster/r.mapcalc/r3.mapcalc.md b/raster/r.mapcalc/r3.mapcalc.md index 71ca1431e13..363ecfc625e 100644 --- a/raster/r.mapcalc/r3.mapcalc.md +++ b/raster/r.mapcalc/r3.mapcalc.md @@ -551,23 +551,18 @@ they are not NULL. See *[r3.mask](r3.mask.md)* for details. ### Random number generator initialization The pseudo-random number generator used by the rand() function can be -initialised to a specific value using the **seed** option. This can be +initialised to a specific value using the **seed** parameter. This can be used to replicate a previous calculation. -Alternatively, it can be initialised from the system time and the PID -using the **-r** flag. This should result in a different seed being used -each time. +If rand() function is used and no seed is given, +*r3.mapcalc* will generate a seed, resulting in a different result for +each run. In either case, the seed will be written to the map's history, and can be seen using *r.info*. If you want other people to be able to verify your results, it's -preferable to use the **seed** option to supply a seed which is either -specified in the script or generated from a deterministic process such -as a pseudo-random number generator given an explicit seed. - -Note that the rand() function will generate a fatal error if neither the -**seed** option nor the **-s** flag are given. +preferable to use the **seed** parameter. ## EXAMPLES diff --git a/raster/r.mapcalc/tests/r_mapcalc_nprocs_test.py b/raster/r.mapcalc/tests/r_mapcalc_nprocs_test.py index d0e92b98402..f6f999992ed 100644 --- a/raster/r.mapcalc/tests/r_mapcalc_nprocs_test.py +++ b/raster/r.mapcalc/tests/r_mapcalc_nprocs_test.py @@ -43,8 +43,7 @@ def test_rand_no_explicit_seed_setting(session_in_mapset, nprocs): session=session_in_mapset, consistent_return_value=True, errors="ignore" ) result = tools.r_mapcalc(expression="test = rand(-15.0, 5.0)", nprocs=nprocs) - assert result.returncode == 1 - assert "not seeded" in result.stderr + assert result.returncode == 0 @pytest.mark.parametrize("nprocs", [0, 1, 4]) diff --git a/raster/r.mapcalc/testsuite/test_r3_mapcalc.py b/raster/r.mapcalc/testsuite/test_r3_mapcalc.py index 9fc7c691c30..1d12fea28da 100644 --- a/raster/r.mapcalc/testsuite/test_r3_mapcalc.py +++ b/raster/r.mapcalc/testsuite/test_r3_mapcalc.py @@ -29,7 +29,7 @@ def tearDownClass(cls): def test_difference_of_the_same_map_double(self): """Test zero difference of map with itself""" - self.runModule("r3.mapcalc", flags="s", expression="a = rand(1.0, 200)") + self.runModule("r3.mapcalc", expression="a = rand(1.0, 200)") self.to_remove.append("a") self.assertModule("r3.mapcalc", expression="diff_a_a = a - a") self.to_remove.append("diff_a_a") @@ -37,7 +37,7 @@ def test_difference_of_the_same_map_double(self): def test_difference_of_the_same_map_float(self): """Test zero difference of map with itself""" - self.runModule("r3.mapcalc", flags="s", expression="af = rand(float(1), 200)") + self.runModule("r3.mapcalc", expression="af = rand(float(1), 200)") self.to_remove.append("af") self.assertModule("r3.mapcalc", expression="diff_af_af = af - af") self.to_remove.append("diff_af_af") diff --git a/raster/r.mapcalc/testsuite/test_r_mapcalc.py b/raster/r.mapcalc/testsuite/test_r_mapcalc.py index 377e1af7f6a..feffa150be2 100644 --- a/raster/r.mapcalc/testsuite/test_r_mapcalc.py +++ b/raster/r.mapcalc/testsuite/test_r_mapcalc.py @@ -91,15 +91,6 @@ def test_seed_not_required(self): self.assertModule("r.mapcalc", expression="nonrand_cell = 200") self.to_remove.append("nonrand_cell") - def test_seed_required(self): - """Test that seed is required when rand() is used - - This test can, and probably should, generate an error message. - """ - self.assertModuleFail("r.mapcalc", expression="rand_x = rand(1, 200)") - # TODO: assert map not exists but it would be handy here - # TODO: test that error message was generated - def test_seed_cell(self): """Test given seed with CELL against reference map""" seed = 500 @@ -153,14 +144,10 @@ def test_seed_fcell(self): self.rinfo_contains_number("rand_fcell", seed) def test_auto_seed(self): - """Test that two runs with -s does not give same maps""" - self.assertModule( - "r.mapcalc", flags="s", expression="rand_auto_1 = rand(1., 2)" - ) + """Test that two runs do not give same maps""" + self.assertModule("r.mapcalc", expression="rand_auto_1 = rand(1., 2)") self.to_remove.append("rand_auto_1") - self.assertModule( - "r.mapcalc", flags="s", expression="rand_auto_2 = rand(1., 2)" - ) + self.assertModule("r.mapcalc", expression="rand_auto_2 = rand(1., 2)") self.to_remove.append("rand_auto_2") self.assertRastersDifference( "rand_auto_1", @@ -197,7 +184,7 @@ def tearDownClass(cls): def test_difference_of_the_same_map_double(self): """Test zero difference of map with itself""" - self.runModule("r.mapcalc", flags="s", expression="a = rand(1.0, 200)") + self.runModule("r.mapcalc", expression="a = rand(1.0, 200)") self.to_remove.append("a") self.assertModule("r.mapcalc", expression="diff_a_a = a - a") self.to_remove.append("diff_a_a") @@ -205,7 +192,7 @@ def test_difference_of_the_same_map_double(self): def test_difference_of_the_same_map_float(self): """Test zero difference of map with itself""" - self.runModule("r.mapcalc", flags="s", expression="af = rand(float(1), 200)") + self.runModule("r.mapcalc", expression="af = rand(float(1), 200)") self.to_remove.append("af") self.assertModule("r.mapcalc", expression="diff_af_af = af - af") self.to_remove.append("diff_af_af") @@ -213,7 +200,7 @@ def test_difference_of_the_same_map_float(self): def test_difference_of_the_same_map_int(self): """Test zero difference of map with itself""" - self.runModule("r.mapcalc", flags="s", expression="ai = rand(1, 200)") + self.runModule("r.mapcalc", expression="ai = rand(1, 200)") self.to_remove.append("ai") self.assertModule("r.mapcalc", expression="diff_ai_ai = ai - ai") self.to_remove.append("diff_ai_ai") diff --git a/raster/r.mapcalc/testsuite/test_r_mapcalc_parallel.py b/raster/r.mapcalc/testsuite/test_r_mapcalc_parallel.py index c635785daba..74ed762f0e5 100644 --- a/raster/r.mapcalc/testsuite/test_r_mapcalc_parallel.py +++ b/raster/r.mapcalc/testsuite/test_r_mapcalc_parallel.py @@ -93,17 +93,6 @@ def test_seed_not_required(self): self.assertModule("r.mapcalc", expression="nonrand_cell = 200", nprocs=THREADS) self.to_remove.append("nonrand_cell") - def test_seed_required(self): - """Test that seed is required when rand() is used - - This test can, and probably should, generate an error message. - """ - self.assertModuleFail( - "r.mapcalc", expression="rand_x = rand(1, 200)", nprocs=THREADS - ) - # TODO: assert map not exists but it would be handy here - # TODO: test that error message was generated - def test_seed_cell(self): """Test given seed with CELL against reference map""" seed = 500 @@ -167,18 +156,16 @@ def test_seed_fcell(self): ) self.rinfo_contains_number("rand_fcell", seed) - def test_auto_seed(self): - """Test that two runs with -s does not give same maps""" + def test_new_auto_seed(self): + """Test that two runs with autoseeding do not give same maps""" self.assertModule( "r.mapcalc", - flags="s", expression="rand_auto_1 = rand(1., 2)", nprocs=THREADS, ) self.to_remove.append("rand_auto_1") self.assertModule( "r.mapcalc", - flags="s", expression="rand_auto_2 = rand(1., 2)", nprocs=THREADS, ) @@ -190,6 +177,29 @@ def test_auto_seed(self): precision=0.5, ) # low precision, we have few cells + def test_legacy_auto_seed(self): + """Test that two runs with -s do not give same maps""" + self.assertModule( + "r.mapcalc", + flags="s", + expression="rand_auto_3 = rand(1., 2)", + nprocs=THREADS, + ) + self.to_remove.append("rand_auto_3") + self.assertModule( + "r.mapcalc", + flags="s", + expression="rand_auto_4 = rand(1., 2)", + nprocs=THREADS, + ) + self.to_remove.append("rand_auto_4") + self.assertRastersDifference( + "rand_auto_3", + "rand_auto_4", + statistics={"min": -1, "max": 1, "mean": 0}, + precision=0.5, + ) # low precision, we have few cells + # TODO: add more expressions # TODO: add tests with prepared data @@ -218,7 +228,7 @@ def tearDownClass(cls): def test_difference_of_the_same_map_double(self): """Test zero difference of map with itself""" - self.runModule("r.mapcalc", flags="s", expression="a = rand(1.0, 200)") + self.runModule("r.mapcalc", expression="a = rand(1.0, 200)") self.to_remove.append("a") self.assertModule("r.mapcalc", expression="diff_a_a = a - a", nprocs=THREADS) self.to_remove.append("diff_a_a") @@ -226,7 +236,7 @@ def test_difference_of_the_same_map_double(self): def test_difference_of_the_same_map_float(self): """Test zero difference of map with itself""" - self.runModule("r.mapcalc", flags="s", expression="af = rand(float(1), 200)") + self.runModule("r.mapcalc", expression="af = rand(float(1), 200)") self.to_remove.append("af") self.assertModule( "r.mapcalc", expression="diff_af_af = af - af", nprocs=THREADS @@ -236,7 +246,7 @@ def test_difference_of_the_same_map_float(self): def test_difference_of_the_same_map_int(self): """Test zero difference of map with itself""" - self.runModule("r.mapcalc", flags="s", expression="ai = rand(1, 200)") + self.runModule("r.mapcalc", expression="ai = rand(1, 200)") self.to_remove.append("ai") self.assertModule( "r.mapcalc", expression="diff_ai_ai = ai - ai", nprocs=THREADS diff --git a/raster/r.univar/r3.univar.html b/raster/r.univar/r3.univar.html index 1b526852188..320b57558a2 100644 --- a/raster/r.univar/r3.univar.html +++ b/raster/r.univar/r3.univar.html @@ -40,7 +40,7 @@

EXAMPLE

g.region n=10 s=0 w=0 e=10 b=0 t=10 res=1 res3=1 -p3 # generate random map -r3.mapcalc "random_0_1 = rand(0., 1)" -s +r3.mapcalc "random_0_1 = rand(0., 1)" # compute univariate statistics, along with extended statistics r3.univar -e map=random_0_1 percentile=98 diff --git a/raster/r.univar/r3.univar.md b/raster/r.univar/r3.univar.md index 03957446c6a..968a9ca44e8 100644 --- a/raster/r.univar/r3.univar.md +++ b/raster/r.univar/r3.univar.md @@ -36,7 +36,7 @@ values: g.region n=10 s=0 w=0 e=10 b=0 t=10 res=1 res3=1 -p3 # generate random map -r3.mapcalc "random_0_1 = rand(0., 1)" -s +r3.mapcalc "random_0_1 = rand(0., 1)" # compute univariate statistics, along with extended statistics r3.univar -e map=random_0_1 percentile=98 diff --git a/scripts/r.mask/r.mask.html b/scripts/r.mask/r.mask.html index dd3c918488e..e72e5e9be8c 100644 --- a/scripts/r.mask/r.mask.html +++ b/scripts/r.mask/r.mask.html @@ -101,7 +101,7 @@

Handling of floating-point maps

the mask, i.e., nothing is blocked out from analysis and/or display.
-r.mapcalc -s "map3 = rand(0.0,1.0)"
+r.mapcalc "map3 = rand(0.0,1.0)"
 r.mask raster=map3
 
@@ -112,7 +112,7 @@

Handling of floating-point maps

changed with r.quant).
-r.mapcalc -s "map4 = rand(0.0,1.0)"
+r.mapcalc "map4 = rand(0.0,1.0)"
 g.copy raster=map4,MASK
 
diff --git a/scripts/r.mask/r.mask.md b/scripts/r.mask/r.mask.md index 0d01b54bdcc..9dc36ab69b1 100644 --- a/scripts/r.mask/r.mask.md +++ b/scripts/r.mask/r.mask.md @@ -98,7 +98,7 @@ are part of the mask, i.e., nothing is blocked out from analysis and/or display. ```sh -r.mapcalc -s "map3 = rand(0.0,1.0)" +r.mapcalc "map3 = rand(0.0,1.0)" r.mask raster=map3 ``` @@ -109,7 +109,7 @@ map's quantisation rules (this defaults to round-to-nearest, but can be changed with r.quant). ```sh -r.mapcalc -s "map4 = rand(0.0,1.0)" +r.mapcalc "map4 = rand(0.0,1.0)" g.copy raster=map4,MASK ``` diff --git a/temporal/t.info/testsuite/test.t.info.sh b/temporal/t.info/testsuite/test.t.info.sh index 609e4bfe427..f3b0396e340 100755 --- a/temporal/t.info/testsuite/test.t.info.sh +++ b/temporal/t.info/testsuite/test.t.info.sh @@ -7,11 +7,11 @@ g.region s=0 n=80 w=0 e=120 b=0 t=50 res=10 res3=10 -p3 export GRASS_OVERWRITE=1 -r.mapcalc expr="prec_1 = rand(0, 550)" -s -r.mapcalc expr="prec_2 = rand(0, 450)" -s +r.mapcalc expr="prec_1 = rand(0, 550)" +r.mapcalc expr="prec_2 = rand(0, 450)" -r3.mapcalc expr="prec_1 = rand(0, 120)" -s -r3.mapcalc expr="prec_2 = rand(0, 320)" -s +r3.mapcalc expr="prec_1 = rand(0, 120)" +r3.mapcalc expr="prec_2 = rand(0, 320)" v.random -z output=lidar_abs_1 n=20 zmin=0 zmax=100 column=height v.random -z output=lidar_abs_2 n=20 zmin=0 zmax=100 column=height diff --git a/temporal/t.merge/t.merge.html b/temporal/t.merge/t.merge.html index ff24d1603f9..a54ca4ef98d 100644 --- a/temporal/t.merge/t.merge.html +++ b/temporal/t.merge/t.merge.html @@ -26,8 +26,8 @@

EXAMPLES

time raster datasets together.
-r.mapcalc expression="map1 = rand(0, 10)"  -s
-r.mapcalc expression="map2 = rand(10, 20)" -s
+r.mapcalc expression="map1 = rand(0, 10)"
+r.mapcalc expression="map2 = rand(10, 20)"
 
 t.create type=strds temporaltype=absolute \
          output=precipitation_daily_1 \
@@ -92,8 +92,8 @@ 

EXAMPLES

+----------------------------------------------------------------------------+ -r.mapcalc expression="map3 = rand(20, 30)" -s -r.mapcalc expression="map4 = rand(30, 40)" -s +r.mapcalc expression="map3 = rand(20, 30)" +r.mapcalc expression="map4 = rand(30, 40)" t.create type=strds temporaltype=absolute \ output=precipitation_daily_2 \ diff --git a/temporal/t.merge/t.merge.md b/temporal/t.merge/t.merge.md index a6de3e87e7c..d90a5e8c1a2 100644 --- a/temporal/t.merge/t.merge.md +++ b/temporal/t.merge/t.merge.md @@ -26,8 +26,8 @@ register two unique maps in each of it. Then we merge the two space time raster datasets together. ```sh -r.mapcalc expression="map1 = rand(0, 10)" -s -r.mapcalc expression="map2 = rand(10, 20)" -s +r.mapcalc expression="map1 = rand(0, 10)" +r.mapcalc expression="map2 = rand(10, 20)" t.create type=strds temporaltype=absolute \ output=precipitation_daily_1 \ @@ -92,8 +92,8 @@ t.info precipitation_daily_1 +----------------------------------------------------------------------------+ -r.mapcalc expression="map3 = rand(20, 30)" -s -r.mapcalc expression="map4 = rand(30, 40)" -s +r.mapcalc expression="map3 = rand(20, 30)" +r.mapcalc expression="map4 = rand(30, 40)" t.create type=strds temporaltype=absolute \ output=precipitation_daily_2 \ diff --git a/temporal/t.merge/testsuite/test.t.merge.sh b/temporal/t.merge/testsuite/test.t.merge.sh index a223b54dc3e..f5d4222d5b9 100755 --- a/temporal/t.merge/testsuite/test.t.merge.sh +++ b/temporal/t.merge/testsuite/test.t.merge.sh @@ -7,12 +7,12 @@ g.region s=0 n=80 w=0 e=120 b=0 t=50 res=10 res3=10 -p3 # Generate data -r.mapcalc --o expr="prec_1 = rand(10, 150)" -s -r.mapcalc --o expr="prec_2 = rand(20, 250)" -s -r.mapcalc --o expr="prec_3 = rand(30, 350)" -s -r.mapcalc --o expr="prec_4 = rand(40, 450)" -s -r.mapcalc --o expr="prec_5 = rand(50, 550)" -s -r.mapcalc --o expr="prec_6 = rand(60, 650)" -s +r.mapcalc --o expr="prec_1 = rand(10, 150)" +r.mapcalc --o expr="prec_2 = rand(20, 250)" +r.mapcalc --o expr="prec_3 = rand(30, 350)" +r.mapcalc --o expr="prec_4 = rand(40, 450)" +r.mapcalc --o expr="prec_5 = rand(50, 550)" +r.mapcalc --o expr="prec_6 = rand(60, 650)" # Register maps in temporal database t.register -i --o maps=prec_1,prec_2,prec_3,prec_4,prec_5,prec_6 \ diff --git a/temporal/t.rast.accdetect/testsuite/test_simple.py b/temporal/t.rast.accdetect/testsuite/test_simple.py index d67537487d5..2b24a64b7af 100644 --- a/temporal/t.rast.accdetect/testsuite/test_simple.py +++ b/temporal/t.rast.accdetect/testsuite/test_simple.py @@ -24,7 +24,6 @@ def setUpClass(cls): for i in range(1, 101): cls.runModule( "r.mapcalc", - flags="s", overwrite=True, expression="a_mapcalc{nu} = rand(1,10)".format(nu=i), ) diff --git a/temporal/t.rast.aggregate.ds/t.rast.aggregate.ds.html b/temporal/t.rast.aggregate.ds/t.rast.aggregate.ds.html index b76274c76d3..fe79ce95645 100644 --- a/temporal/t.rast.aggregate.ds/t.rast.aggregate.ds.html +++ b/temporal/t.rast.aggregate.ds/t.rast.aggregate.ds.html @@ -254,7 +254,7 @@

MODIS satellite sensor daily data aggregation to 8 days

# create maps every 8 days as seed maps for year in `seq 2000 2001` ; do for doy in `seq -w 1 8 365` ; do - r.mapcalc -s expression="8day_${year}_${doy} = rand(0.0,40.0)" + r.mapcalc expression="8day_${year}_${doy} = rand(0.0,40.0)" done done diff --git a/temporal/t.rast.aggregate.ds/t.rast.aggregate.ds.md b/temporal/t.rast.aggregate.ds/t.rast.aggregate.ds.md index 681147f9951..88620246b19 100644 --- a/temporal/t.rast.aggregate.ds/t.rast.aggregate.ds.md +++ b/temporal/t.rast.aggregate.ds/t.rast.aggregate.ds.md @@ -252,7 +252,7 @@ This "eight-day week" is used in some MODIS satellite sensor products. # create maps every 8 days as seed maps for year in `seq 2000 2001` ; do for doy in `seq -w 1 8 365` ; do - r.mapcalc -s expression="8day_${year}_${doy} = rand(0.0,40.0)" + r.mapcalc expression="8day_${year}_${doy} = rand(0.0,40.0)" done done diff --git a/temporal/t.rast.export/test.t.rast.export.sh b/temporal/t.rast.export/test.t.rast.export.sh index 8dfb2aba002..f45bf82d520 100755 --- a/temporal/t.rast.export/test.t.rast.export.sh +++ b/temporal/t.rast.export/test.t.rast.export.sh @@ -7,12 +7,12 @@ g.region s=0 n=80 w=0 e=120 b=0 t=50 res=10 res3=10 -p3 # Generate data -r.mapcalc --o expr="prec_1 = rand(0, 550.0)" -s -r.mapcalc --o expr="prec_2 = rand(0, 80000)" -s -r.mapcalc --o expr="prec_3 = rand(-120, 120)" -s -r.mapcalc --o expr="prec_4 = rand(0, 255)" -s -r.mapcalc --o expr="prec_5 = rand(-1, 60000)" -s -r.mapcalc --o expr="prec_6 = rand(0, 256)" -s +r.mapcalc --o expr="prec_1 = rand(0, 550.0)" +r.mapcalc --o expr="prec_2 = rand(0, 80000)" +r.mapcalc --o expr="prec_3 = rand(-120, 120)" +r.mapcalc --o expr="prec_4 = rand(0, 255)" +r.mapcalc --o expr="prec_5 = rand(-1, 60000)" +r.mapcalc --o expr="prec_6 = rand(0, 256)" n1=`g.tempfile pid=1 -d` diff --git a/temporal/t.rast.export/testsuite/test_rast_export.py b/temporal/t.rast.export/testsuite/test_rast_export.py index 163ce51c91b..c135f472179 100644 --- a/temporal/t.rast.export/testsuite/test_rast_export.py +++ b/temporal/t.rast.export/testsuite/test_rast_export.py @@ -39,7 +39,6 @@ def setUpClass(cls): cls.runModule( "r.mapcalc", expression="a_{id_} = rand(0.1,1.0)".format(id_=i), - flags="s", overwrite=True, ) maps.append("a_{id_}".format(id_=i)) diff --git a/temporal/t.rast.import/test.t.rast.import.relative.sh b/temporal/t.rast.import/test.t.rast.import.relative.sh index 6e8462c2d70..d71be92ba30 100755 --- a/temporal/t.rast.import/test.t.rast.import.relative.sh +++ b/temporal/t.rast.import/test.t.rast.import.relative.sh @@ -12,12 +12,12 @@ g.region s=0 n=80 w=0 e=120 b=0 t=50 res=10 res3=10 -p3 mkdir test # Generate data -r.mapcalc expr="prec_1 = rand(0, 550)" -s -r.mapcalc expr="prec_2 = rand(0, 450)" -s -r.mapcalc expr="prec_3 = rand(0, 320)" -s -r.mapcalc expr="prec_4 = rand(0, 510)" -s -r.mapcalc expr="prec_5 = rand(0, 300)" -s -r.mapcalc expr="prec_6 = rand(0, 650)" -s +r.mapcalc expr="prec_1 = rand(0, 550)" +r.mapcalc expr="prec_2 = rand(0, 450)" +r.mapcalc expr="prec_3 = rand(0, 320)" +r.mapcalc expr="prec_4 = rand(0, 510)" +r.mapcalc expr="prec_5 = rand(0, 300)" +r.mapcalc expr="prec_6 = rand(0, 650)" n1=`g.tempfile pid=1 -d` diff --git a/temporal/t.rast.import/test.t.rast.import.relative.with.semantic.label.sh b/temporal/t.rast.import/test.t.rast.import.relative.with.semantic.label.sh index a7e855b2f72..bfda3443a8e 100755 --- a/temporal/t.rast.import/test.t.rast.import.relative.with.semantic.label.sh +++ b/temporal/t.rast.import/test.t.rast.import.relative.with.semantic.label.sh @@ -32,12 +32,12 @@ g.region s=0 n=80 w=0 e=120 b=0 t=50 res=10 res3=10 -p3 mkdir test # Generate data -r.mapcalc expr="prec_1 = rand(0, 550)" -s -r.mapcalc expr="prec_2 = rand(0, 450)" -s -r.mapcalc expr="prec_3 = rand(0, 320)" -s -r.mapcalc expr="prec_4 = rand(0, 510)" -s -r.mapcalc expr="prec_5 = rand(0, 300)" -s -r.mapcalc expr="prec_6 = rand(0, 650)" -s +r.mapcalc expr="prec_1 = rand(0, 550)" +r.mapcalc expr="prec_2 = rand(0, 450)" +r.mapcalc expr="prec_3 = rand(0, 320)" +r.mapcalc expr="prec_4 = rand(0, 510)" +r.mapcalc expr="prec_5 = rand(0, 300)" +r.mapcalc expr="prec_6 = rand(0, 650)" n1=`g.tempfile pid=1 -d` diff --git a/temporal/t.rast.import/test.t.rast.import.sh b/temporal/t.rast.import/test.t.rast.import.sh index a16a88a9f64..062b301c5e7 100755 --- a/temporal/t.rast.import/test.t.rast.import.sh +++ b/temporal/t.rast.import/test.t.rast.import.sh @@ -12,12 +12,12 @@ g.region s=0 n=80 w=0 e=120 b=0 t=50 res=10 res3=10 -p3 mkdir test # Generate data -r.mapcalc expr="prec_1 = rand(0, 550)" -s -r.mapcalc expr="prec_2 = rand(0, 450)" -s -r.mapcalc expr="prec_3 = rand(0, 320)" -s -r.mapcalc expr="prec_4 = rand(0, 510)" -s -r.mapcalc expr="prec_5 = rand(0, 300)" -s -r.mapcalc expr="prec_6 = rand(0, 650)" -s +r.mapcalc expr="prec_1 = rand(0, 550)" +r.mapcalc expr="prec_2 = rand(0, 450)" +r.mapcalc expr="prec_3 = rand(0, 320)" +r.mapcalc expr="prec_4 = rand(0, 510)" +r.mapcalc expr="prec_5 = rand(0, 300)" +r.mapcalc expr="prec_6 = rand(0, 650)" n1=`g.tempfile pid=1 -d` diff --git a/temporal/t.rast.import/test.t.rast.import_locations.sh b/temporal/t.rast.import/test.t.rast.import_locations.sh index 9ae660e0579..1ec80451483 100755 --- a/temporal/t.rast.import/test.t.rast.import_locations.sh +++ b/temporal/t.rast.import/test.t.rast.import_locations.sh @@ -10,12 +10,12 @@ g.region s=0 n=80 w=0 e=120 b=0 t=50 res=10 res3=10 -p3 mkdir test # Generate data -r.mapcalc --o expr="prec_1 = rand(0, 550)" -s -r.mapcalc --o expr="prec_2 = rand(0, 450)" -s -r.mapcalc --o expr="prec_3 = rand(0, 320)" -s -r.mapcalc --o expr="prec_4 = rand(0, 510)" -s -r.mapcalc --o expr="prec_5 = rand(0, 300)" -s -r.mapcalc --o expr="prec_6 = rand(0, 650)" -s +r.mapcalc --o expr="prec_1 = rand(0, 550)" +r.mapcalc --o expr="prec_2 = rand(0, 450)" +r.mapcalc --o expr="prec_3 = rand(0, 320)" +r.mapcalc --o expr="prec_4 = rand(0, 510)" +r.mapcalc --o expr="prec_5 = rand(0, 300)" +r.mapcalc --o expr="prec_6 = rand(0, 650)" n1=`g.tempfile pid=1 -d` diff --git a/temporal/t.rast.list/testsuite/test_t_rast_list.sh b/temporal/t.rast.list/testsuite/test_t_rast_list.sh index 79041c55aae..e8d0a30bd21 100755 --- a/temporal/t.rast.list/testsuite/test_t_rast_list.sh +++ b/temporal/t.rast.list/testsuite/test_t_rast_list.sh @@ -10,12 +10,12 @@ g.region s=0 n=80 w=0 e=120 b=0 t=50 res=10 res3=10 -p3 export GRASS_OVERWRITE=1 # Generate data -r.mapcalc expr="prec_1 = rand(0, 550)" -s -r.mapcalc expr="prec_2 = rand(0, 450)" -s -r.mapcalc expr="prec_3 = rand(0, 320)" -s -r.mapcalc expr="prec_4 = rand(0, 510)" -s -r.mapcalc expr="prec_5 = rand(0, 300)" -s -r.mapcalc expr="prec_6 = rand(0, 650)" -s +r.mapcalc expr="prec_1 = rand(0, 550)" +r.mapcalc expr="prec_2 = rand(0, 450)" +r.mapcalc expr="prec_3 = rand(0, 320)" +r.mapcalc expr="prec_4 = rand(0, 510)" +r.mapcalc expr="prec_5 = rand(0, 300)" +r.mapcalc expr="prec_6 = rand(0, 650)" n1=`g.tempfile pid=1 -d` n2=`g.tempfile pid=2 -d` diff --git a/temporal/t.rast.mapcalc/test.t.rast.mapcalc.sh b/temporal/t.rast.mapcalc/test.t.rast.mapcalc.sh index d4da52720e9..da6a8564d83 100755 --- a/temporal/t.rast.mapcalc/test.t.rast.mapcalc.sh +++ b/temporal/t.rast.mapcalc/test.t.rast.mapcalc.sh @@ -10,12 +10,12 @@ export GRASS_OVERWRITE=1 g.region s=0 n=80 w=0 e=120 b=0 t=50 res=10 res3=10 -p3 # Generate data -r.mapcalc expr="prec_1 = rand(0, 550)" -s -r.mapcalc expr="prec_2 = rand(0, 450)" -s -r.mapcalc expr="prec_3 = rand(0, 320)" -s -r.mapcalc expr="prec_4 = rand(0, 510)" -s -r.mapcalc expr="prec_5 = rand(0, 300)" -s -r.mapcalc expr="prec_6 = rand(0, 650)" -s +r.mapcalc expr="prec_1 = rand(0, 550)" +r.mapcalc expr="prec_2 = rand(0, 450)" +r.mapcalc expr="prec_3 = rand(0, 320)" +r.mapcalc expr="prec_4 = rand(0, 510)" +r.mapcalc expr="prec_5 = rand(0, 300)" +r.mapcalc expr="prec_6 = rand(0, 650)" t.create type=strds temporaltype=absolute output=precip_abs1 title="A test" descr="A test" t.create type=strds temporaltype=absolute output=precip_abs2 title="A test" descr="A test" diff --git a/temporal/t.rast.neighbors/test.t.rast.neighbors.sh b/temporal/t.rast.neighbors/test.t.rast.neighbors.sh index d95863a77d0..d8d774a28ef 100755 --- a/temporal/t.rast.neighbors/test.t.rast.neighbors.sh +++ b/temporal/t.rast.neighbors/test.t.rast.neighbors.sh @@ -6,12 +6,12 @@ g.region s=0 n=80 w=0 e=120 b=0 t=50 res=10 -p # Generate data -r.mapcalc --o expr="prec_1 = rand(0, 550)" -s -r.mapcalc --o expr="prec_2 = rand(0, 450)" -s -r.mapcalc --o expr="prec_3 = rand(0, 320)" -s -r.mapcalc --o expr="prec_4 = rand(0, 510)" -s +r.mapcalc --o expr="prec_1 = rand(0, 550)" +r.mapcalc --o expr="prec_2 = rand(0, 450)" +r.mapcalc --o expr="prec_3 = rand(0, 320)" +r.mapcalc --o expr="prec_4 = rand(0, 510)" r.mapcalc --o expr="prec_5 = null()" -r.mapcalc --o expr="prec_6 = rand(0, 650)" -s +r.mapcalc --o expr="prec_6 = rand(0, 650)" t.create --o type=strds temporaltype=absolute output=precip_abs1 title="A test" descr="A test" t.register -i --o type=raster input=precip_abs1 maps=prec_1,prec_2,prec_3,prec_4,prec_5,prec_6 start="2001-01-15 12:05:45" increment="14 days" diff --git a/temporal/t.rast.neighbors/testsuite/test_neighbors.py b/temporal/t.rast.neighbors/testsuite/test_neighbors.py index b48df4df169..cb46e907bf3 100644 --- a/temporal/t.rast.neighbors/testsuite/test_neighbors.py +++ b/temporal/t.rast.neighbors/testsuite/test_neighbors.py @@ -19,19 +19,11 @@ def setUpClass(cls): tgis.init() cls.use_temp_region() cls.runModule("g.region", s=0, n=90, w=140, e=160, b=0, t=50, res=10, res3=10) - cls.runModule( - "r.mapcalc", expression="a4 = rand(1,10)", flags=["s"], overwrite=True - ) + cls.runModule("r.mapcalc", expression="a4 = rand(1,10)", overwrite=True) cls.runModule("g.region", s=0, n=80, w=0, e=120, b=0, t=50, res=10, res3=10) - cls.runModule( - "r.mapcalc", expression="a1 = rand(1,10)", flags=["s"], overwrite=True - ) - cls.runModule( - "r.mapcalc", expression="a2 = rand(1,10)", flags=["s"], overwrite=True - ) - cls.runModule( - "r.mapcalc", expression="a3 = rand(1,10)", flags=["s"], overwrite=True - ) + cls.runModule("r.mapcalc", expression="a1 = rand(1,10)", overwrite=True) + cls.runModule("r.mapcalc", expression="a2 = rand(1,10)", overwrite=True) + cls.runModule("r.mapcalc", expression="a3 = rand(1,10)", overwrite=True) cls.runModule( "t.create", diff --git a/temporal/t.rast.out.vtk/test.t.rast.out.vtk.sh b/temporal/t.rast.out.vtk/test.t.rast.out.vtk.sh index 63d130edc1b..6b0a11bc247 100755 --- a/temporal/t.rast.out.vtk/test.t.rast.out.vtk.sh +++ b/temporal/t.rast.out.vtk/test.t.rast.out.vtk.sh @@ -8,12 +8,12 @@ g.region s=0 n=80 w=0 e=120 res=0.5 -p # Generate data -r.mapcalc --o expr="prec_1 = rand(0, 550)" -s -r.mapcalc --o expr="prec_2 = rand(0, 450)" -s -r.mapcalc --o expr="prec_3 = rand(0, 320)" -s -r.mapcalc --o expr="prec_4 = rand(0, 510)" -s -r.mapcalc --o expr="prec_5 = rand(0, 300)" -s -r.mapcalc --o expr="prec_6 = rand(0, 650)" -s +r.mapcalc --o expr="prec_1 = rand(0, 550)" +r.mapcalc --o expr="prec_2 = rand(0, 450)" +r.mapcalc --o expr="prec_3 = rand(0, 320)" +r.mapcalc --o expr="prec_4 = rand(0, 510)" +r.mapcalc --o expr="prec_5 = rand(0, 300)" +r.mapcalc --o expr="prec_6 = rand(0, 650)" r.mapcalc --o expr="elevation = sin(row() + col()) * 10" n1=`g.tempfile pid=1 -d` diff --git a/temporal/t.rast3d.extract/testsuite/test.t.rast3d.extract.sh b/temporal/t.rast3d.extract/testsuite/test.t.rast3d.extract.sh index fa75e2b472b..122a2992616 100755 --- a/temporal/t.rast3d.extract/testsuite/test.t.rast3d.extract.sh +++ b/temporal/t.rast3d.extract/testsuite/test.t.rast3d.extract.sh @@ -7,12 +7,12 @@ g.region s=0 n=80 w=0 e=120 b=0 t=50 res=10 res3=10 -p3 # Generate data -r3.mapcalc --o expr="prec_1 = rand(0, 550)" -s -r3.mapcalc --o expr="prec_2 = rand(0, 450)" -s -r3.mapcalc --o expr="prec_3 = rand(0, 320)" -s -r3.mapcalc --o expr="prec_4 = rand(0, 510)" -s -r3.mapcalc --o expr="prec_5 = rand(0, 300)" -s -r3.mapcalc --o expr="prec_6 = rand(0, 650)" -s +r3.mapcalc --o expr="prec_1 = rand(0, 550)" +r3.mapcalc --o expr="prec_2 = rand(0, 450)" +r3.mapcalc --o expr="prec_3 = rand(0, 320)" +r3.mapcalc --o expr="prec_4 = rand(0, 510)" +r3.mapcalc --o expr="prec_5 = rand(0, 300)" +r3.mapcalc --o expr="prec_6 = rand(0, 650)" t.create --o type=str3ds temporaltype=absolute output=precip_abs1 title="A test" descr="A test" t.register -i type=raster_3d input=precip_abs1 maps=prec_1,prec_2,prec_3,prec_4,prec_5,prec_6 start="2001-01-01" increment="3 months" diff --git a/temporal/t.rast3d.list/testsuite/test.t.rast3d.list.sh b/temporal/t.rast3d.list/testsuite/test.t.rast3d.list.sh index b729992a82a..682778296e2 100755 --- a/temporal/t.rast3d.list/testsuite/test.t.rast3d.list.sh +++ b/temporal/t.rast3d.list/testsuite/test.t.rast3d.list.sh @@ -9,12 +9,12 @@ g.region s=0 n=80 w=0 e=120 b=0 t=50 res=10 res3=10 -p3 export GRASS_OVERWRITE=1 # Generate data -r3.mapcalc expr="vol_1 = rand(0, 550)" -s -r3.mapcalc expr="vol_2 = rand(0, 450)" -s -r3.mapcalc expr="vol_3 = rand(0, 320)" -s -r3.mapcalc expr="vol_4 = rand(0, 510)" -s -r3.mapcalc expr="vol_5 = rand(0, 300)" -s -r3.mapcalc expr="vol_6 = rand(0, 650)" -s +r3.mapcalc expr="vol_1 = rand(0, 550)" +r3.mapcalc expr="vol_2 = rand(0, 450)" +r3.mapcalc expr="vol_3 = rand(0, 320)" +r3.mapcalc expr="vol_4 = rand(0, 510)" +r3.mapcalc expr="vol_5 = rand(0, 300)" +r3.mapcalc expr="vol_6 = rand(0, 650)" n1=`g.tempfile pid=1 -d` n2=`g.tempfile pid=2 -d` diff --git a/temporal/t.rast3d.mapcalc/test.t.rast3d.mapcalc.sh b/temporal/t.rast3d.mapcalc/test.t.rast3d.mapcalc.sh index 9d2a66bd5fe..b4bfb608a14 100755 --- a/temporal/t.rast3d.mapcalc/test.t.rast3d.mapcalc.sh +++ b/temporal/t.rast3d.mapcalc/test.t.rast3d.mapcalc.sh @@ -7,12 +7,12 @@ g.region s=0 n=80 w=0 e=120 b=0 t=50 res=10 res3=10 -p3 # Generate data -r3.mapcalc --o expr="prec_1 = rand(0, 550)" -s -r3.mapcalc --o expr="prec_2 = rand(0, 450)" -s -r3.mapcalc --o expr="prec_3 = rand(0, 320)" -s -r3.mapcalc --o expr="prec_4 = rand(0, 510)" -s -r3.mapcalc --o expr="prec_5 = rand(0, 300)" -s -r3.mapcalc --o expr="prec_6 = rand(0, 650)" -s +r3.mapcalc --o expr="prec_1 = rand(0, 550)" +r3.mapcalc --o expr="prec_2 = rand(0, 450)" +r3.mapcalc --o expr="prec_3 = rand(0, 320)" +r3.mapcalc --o expr="prec_4 = rand(0, 510)" +r3.mapcalc --o expr="prec_5 = rand(0, 300)" +r3.mapcalc --o expr="prec_6 = rand(0, 650)" t.create --o type=str3ds temporaltype=absolute output=precip_abs1 title="A test" descr="A test" t.create --o type=str3ds temporaltype=absolute output=precip_abs2 title="A test" descr="A test" diff --git a/temporal/t.register/test.t.register.raster.file.reltime.sh b/temporal/t.register/test.t.register.raster.file.reltime.sh index 6060718460d..e4ecf3d89a8 100755 --- a/temporal/t.register/test.t.register.raster.file.reltime.sh +++ b/temporal/t.register/test.t.register.raster.file.reltime.sh @@ -12,12 +12,12 @@ g.region s=0 n=80 w=0 e=120 b=0 t=50 res=10 res3=10 -p3 # Generate data -r.mapcalc --o expr="prec_1 = rand(0, 550)" -s -r.mapcalc --o expr="prec_2 = rand(0, 450)" -s -r.mapcalc --o expr="prec_3 = rand(0, 320)" -s -r.mapcalc --o expr="prec_4 = rand(0, 510)" -s -r.mapcalc --o expr="prec_5 = rand(0, 300)" -s -r.mapcalc --o expr="prec_6 = rand(0, 650)" -s +r.mapcalc --o expr="prec_1 = rand(0, 550)" +r.mapcalc --o expr="prec_2 = rand(0, 450)" +r.mapcalc --o expr="prec_3 = rand(0, 320)" +r.mapcalc --o expr="prec_4 = rand(0, 510)" +r.mapcalc --o expr="prec_5 = rand(0, 300)" +r.mapcalc --o expr="prec_6 = rand(0, 650)" n1=`g.tempfile pid=1 -d` # Only map names n2=`g.tempfile pid=2 -d` # Map names and start time diff --git a/temporal/t.register/test.t.register.raster.file.timezone.sh b/temporal/t.register/test.t.register.raster.file.timezone.sh index a9ae80eadf3..19135d29d56 100755 --- a/temporal/t.register/test.t.register.raster.file.timezone.sh +++ b/temporal/t.register/test.t.register.raster.file.timezone.sh @@ -13,12 +13,12 @@ g.region s=0 n=80 w=0 e=120 b=0 t=50 res=10 res3=10 -p3 # Generate data -r.mapcalc --o expr="prec_1 = rand(0, 550)" -s -r.mapcalc --o expr="prec_2 = rand(0, 450)" -s -r.mapcalc --o expr="prec_3 = rand(0, 320)" -s -r.mapcalc --o expr="prec_4 = rand(0, 510)" -s -r.mapcalc --o expr="prec_5 = rand(0, 300)" -s -r.mapcalc --o expr="prec_6 = rand(0, 650)" -s +r.mapcalc --o expr="prec_1 = rand(0, 550)" +r.mapcalc --o expr="prec_2 = rand(0, 450)" +r.mapcalc --o expr="prec_3 = rand(0, 320)" +r.mapcalc --o expr="prec_4 = rand(0, 510)" +r.mapcalc --o expr="prec_5 = rand(0, 300)" +r.mapcalc --o expr="prec_6 = rand(0, 650)" n2=`g.tempfile pid=2 -d` # Map names and start time n3=`g.tempfile pid=3 -d` # Map names start time and increment diff --git a/temporal/t.register/test.t.register.raster.timestamp.sh b/temporal/t.register/test.t.register.raster.timestamp.sh index 33dde72c8b2..6b8c63a33eb 100755 --- a/temporal/t.register/test.t.register.raster.timestamp.sh +++ b/temporal/t.register/test.t.register.raster.timestamp.sh @@ -12,10 +12,10 @@ g.region s=0 n=80 w=0 e=120 b=0 t=50 res=10 res3=10 -p3 # Generate data -r.mapcalc --o expr="prec_1 = rand(0, 550)" -s -r.mapcalc --o expr="prec_2 = rand(0, 450)" -s -r.mapcalc --o expr="prec_3 = rand(0, 320)" -s -r.mapcalc --o expr="prec_4 = rand(0, 510)" -s +r.mapcalc --o expr="prec_1 = rand(0, 550)" +r.mapcalc --o expr="prec_2 = rand(0, 450)" +r.mapcalc --o expr="prec_3 = rand(0, 320)" +r.mapcalc --o expr="prec_4 = rand(0, 510)" r.timestamp map=prec_1 date="1 jan 1995 / 23 sep 1995" r.timestamp map=prec_2 date="14 jul 1996 / 15 jul 1996" diff --git a/temporal/t.register/test.t.register.raster3d.sh b/temporal/t.register/test.t.register.raster3d.sh index 5061d084b40..091072630bf 100755 --- a/temporal/t.register/test.t.register.raster3d.sh +++ b/temporal/t.register/test.t.register.raster3d.sh @@ -12,12 +12,12 @@ g.region s=0 n=80 w=0 e=120 b=0 t=50 res=10 res3=10 -p3 # Generate data -r3.mapcalc --o expr="volume_1 = rand(0, 550)" -s -r3.mapcalc --o expr="volume_2 = rand(0, 450)" -s -r3.mapcalc --o expr="volume_3 = rand(0, 320)" -s -r3.mapcalc --o expr="volume_4 = rand(0, 510)" -s -r3.mapcalc --o expr="volume_5 = rand(0, 300)" -s -r3.mapcalc --o expr="volume_6 = rand(0, 650)" -s +r3.mapcalc --o expr="volume_1 = rand(0, 550)" +r3.mapcalc --o expr="volume_2 = rand(0, 450)" +r3.mapcalc --o expr="volume_3 = rand(0, 320)" +r3.mapcalc --o expr="volume_4 = rand(0, 510)" +r3.mapcalc --o expr="volume_5 = rand(0, 300)" +r3.mapcalc --o expr="volume_6 = rand(0, 650)" # The first @test # We create the space time raster3d dataset and register the raster3d maps with absolute time interval diff --git a/temporal/t.register/testsuite/test_t_register_raster.py b/temporal/t.register/testsuite/test_t_register_raster.py index 59a82a8acd7..828b4b20521 100755 --- a/temporal/t.register/testsuite/test_t_register_raster.py +++ b/temporal/t.register/testsuite/test_t_register_raster.py @@ -42,24 +42,12 @@ def setUpClass(cls): ) # Generate data - cls.runModule( - "r.mapcalc", flags="s", expression="prec_1 = rand(0, 550)", overwrite=True - ) - cls.runModule( - "r.mapcalc", flags="s", expression="prec_2 = rand(0, 450)", overwrite=True - ) - cls.runModule( - "r.mapcalc", flags="s", expression="prec_3 = rand(0, 320)", overwrite=True - ) - cls.runModule( - "r.mapcalc", flags="s", expression="prec_4 = rand(0, 510)", overwrite=True - ) - cls.runModule( - "r.mapcalc", flags="s", expression="prec_5 = rand(0, 300)", overwrite=True - ) - cls.runModule( - "r.mapcalc", flags="s", expression="prec_6 = rand(0, 650)", overwrite=True - ) + cls.runModule("r.mapcalc", expression="prec_1 = rand(0, 550)", overwrite=True) + cls.runModule("r.mapcalc", expression="prec_2 = rand(0, 450)", overwrite=True) + cls.runModule("r.mapcalc", expression="prec_3 = rand(0, 320)", overwrite=True) + cls.runModule("r.mapcalc", expression="prec_4 = rand(0, 510)", overwrite=True) + cls.runModule("r.mapcalc", expression="prec_5 = rand(0, 300)", overwrite=True) + cls.runModule("r.mapcalc", expression="prec_6 = rand(0, 650)", overwrite=True) for strds_id in range(1, 9): cls.runModule( diff --git a/temporal/t.register/testsuite/test_t_register_raster_different_local.py b/temporal/t.register/testsuite/test_t_register_raster_different_local.py index 5c0467ae06f..af28c2ebffa 100644 --- a/temporal/t.register/testsuite/test_t_register_raster_different_local.py +++ b/temporal/t.register/testsuite/test_t_register_raster_different_local.py @@ -72,7 +72,6 @@ def setUpClass(cls): # Generate data cls.runModule( "r.mapcalc", - flags="s", expression=f"prec_{raster_map_id + 1} = rand(0, {parameters[0]})", overwrite=True, ) diff --git a/temporal/t.register/testsuite/test_t_register_raster_file.py b/temporal/t.register/testsuite/test_t_register_raster_file.py index c05a9d07140..4711318ec9b 100755 --- a/temporal/t.register/testsuite/test_t_register_raster_file.py +++ b/temporal/t.register/testsuite/test_t_register_raster_file.py @@ -43,24 +43,12 @@ def setUpClass(cls): ) # Generate data - cls.runModule( - "r.mapcalc", flags="s", expression="prec_1 = rand(0, 550)", overwrite=True - ) - cls.runModule( - "r.mapcalc", flags="s", expression="prec_2 = rand(0, 450)", overwrite=True - ) - cls.runModule( - "r.mapcalc", flags="s", expression="prec_3 = rand(0, 320)", overwrite=True - ) - cls.runModule( - "r.mapcalc", flags="s", expression="prec_4 = rand(0, 510)", overwrite=True - ) - cls.runModule( - "r.mapcalc", flags="s", expression="prec_5 = rand(0, 300)", overwrite=True - ) - cls.runModule( - "r.mapcalc", flags="s", expression="prec_6 = rand(0, 650)", overwrite=True - ) + cls.runModule("r.mapcalc", expression="prec_1 = rand(0, 550)", overwrite=True) + cls.runModule("r.mapcalc", expression="prec_2 = rand(0, 450)", overwrite=True) + cls.runModule("r.mapcalc", expression="prec_3 = rand(0, 320)", overwrite=True) + cls.runModule("r.mapcalc", expression="prec_4 = rand(0, 510)", overwrite=True) + cls.runModule("r.mapcalc", expression="prec_5 = rand(0, 300)", overwrite=True) + cls.runModule("r.mapcalc", expression="prec_6 = rand(0, 650)", overwrite=True) cls.runModule( "t.create", diff --git a/temporal/t.register/testsuite/test_t_register_raster_mapmetadata.py b/temporal/t.register/testsuite/test_t_register_raster_mapmetadata.py index d466e91a0f6..c9006d911f4 100644 --- a/temporal/t.register/testsuite/test_t_register_raster_mapmetadata.py +++ b/temporal/t.register/testsuite/test_t_register_raster_mapmetadata.py @@ -57,7 +57,6 @@ def setUpClass(cls): # Generate data cls.runModule( "r.mapcalc", - flags="s", expression=f"prec_{raster_map_id + 1} = rand(0, {parameters[0]})", overwrite=True, ) diff --git a/temporal/t.remove/test.t.remove.sh b/temporal/t.remove/test.t.remove.sh index 2d8efc7d56a..a674c8660c3 100755 --- a/temporal/t.remove/test.t.remove.sh +++ b/temporal/t.remove/test.t.remove.sh @@ -7,12 +7,12 @@ g.region s=0 n=80 w=0 e=120 b=0 t=50 res=10 res3=10 -p3 # Generate data -r.mapcalc --o expr="prec_1 = rand(0, 550)" -s -r.mapcalc --o expr="prec_2 = rand(0, 450)" -s -r.mapcalc --o expr="prec_3 = rand(0, 320)" -s -r.mapcalc --o expr="prec_4 = rand(0, 510)" -s -r.mapcalc --o expr="prec_5 = rand(0, 300)" -s -r.mapcalc --o expr="prec_6 = rand(0, 650)" -s +r.mapcalc --o expr="prec_1 = rand(0, 550)" +r.mapcalc --o expr="prec_2 = rand(0, 450)" +r.mapcalc --o expr="prec_3 = rand(0, 320)" +r.mapcalc --o expr="prec_4 = rand(0, 510)" +r.mapcalc --o expr="prec_5 = rand(0, 300)" +r.mapcalc --o expr="prec_6 = rand(0, 650)" # The first @test t.create --o type=strds temporaltype=absolute output=precip_abs1 title="A test" descr="A test" diff --git a/temporal/t.rename/testsuite/test_t_rename.py b/temporal/t.rename/testsuite/test_t_rename.py index ca4190aa6a7..13b94f411a4 100755 --- a/temporal/t.rename/testsuite/test_t_rename.py +++ b/temporal/t.rename/testsuite/test_t_rename.py @@ -34,12 +34,8 @@ def setUpClass(cls): ) # Generate data - cls.runModule( - "r.mapcalc", flags="s", expression="prec_1 = rand(0, 550)", overwrite=True - ) - cls.runModule( - "r.mapcalc", flags="s", expression="prec_2 = rand(0, 450)", overwrite=True - ) + cls.runModule("r.mapcalc", expression="prec_1 = rand(0, 550)", overwrite=True) + cls.runModule("r.mapcalc", expression="prec_2 = rand(0, 450)", overwrite=True) # We need to create three space time dataset cls.runModule( diff --git a/temporal/t.sample/t.sample.html b/temporal/t.sample/t.sample.html index 0ae2adb1d84..8374ad7a36d 100644 --- a/temporal/t.sample/t.sample.html +++ b/temporal/t.sample/t.sample.html @@ -43,12 +43,12 @@

EXAMPLE

g.region s=0 n=80 w=0 e=120 b=0 t=50 res=10 res3=10 -p3 # Generate the raster map layer -r.mapcalc expression="a1 = rand(0, 550)" -s -r.mapcalc expression="a2 = rand(0, 450)" -s -r.mapcalc expression="a3 = rand(0, 320)" -s -r.mapcalc expression="a4 = rand(0, 510)" -s -r.mapcalc expression="a5 = rand(0, 300)" -s -r.mapcalc expression="a6 = rand(0, 650)" -s +r.mapcalc expression="a1 = rand(0, 550)" +r.mapcalc expression="a2 = rand(0, 450)" +r.mapcalc expression="a3 = rand(0, 320)" +r.mapcalc expression="a4 = rand(0, 510)" +r.mapcalc expression="a5 = rand(0, 300)" +r.mapcalc expression="a6 = rand(0, 650)" # Generate the vector map layer v.random -z output=pnts1 n=20 zmin=0 zmax=100 column=height diff --git a/temporal/t.sample/t.sample.md b/temporal/t.sample/t.sample.md index f14df0a1715..436c8a7b13c 100644 --- a/temporal/t.sample/t.sample.md +++ b/temporal/t.sample/t.sample.md @@ -41,12 +41,12 @@ stamped map layers in *A* and *P*. g.region s=0 n=80 w=0 e=120 b=0 t=50 res=10 res3=10 -p3 # Generate the raster map layer -r.mapcalc expression="a1 = rand(0, 550)" -s -r.mapcalc expression="a2 = rand(0, 450)" -s -r.mapcalc expression="a3 = rand(0, 320)" -s -r.mapcalc expression="a4 = rand(0, 510)" -s -r.mapcalc expression="a5 = rand(0, 300)" -s -r.mapcalc expression="a6 = rand(0, 650)" -s +r.mapcalc expression="a1 = rand(0, 550)" +r.mapcalc expression="a2 = rand(0, 450)" +r.mapcalc expression="a3 = rand(0, 320)" +r.mapcalc expression="a4 = rand(0, 510)" +r.mapcalc expression="a5 = rand(0, 300)" +r.mapcalc expression="a6 = rand(0, 650)" # Generate the vector map layer v.random -z output=pnts1 n=20 zmin=0 zmax=100 column=height diff --git a/temporal/t.sample/testsuite/test.t.sample.sh b/temporal/t.sample/testsuite/test.t.sample.sh index d9f32988a28..4a93d49b208 100755 --- a/temporal/t.sample/testsuite/test.t.sample.sh +++ b/temporal/t.sample/testsuite/test.t.sample.sh @@ -9,12 +9,12 @@ g.region s=0 n=80 w=0 e=120 b=0 t=50 res=10 res3=10 -p3 export GRASS_OVERWRITE=1 # Generate data -r.mapcalc expr="prec_1 = rand(0, 550)" -s -r.mapcalc expr="prec_2 = rand(0, 450)" -s -r.mapcalc expr="prec_3 = rand(0, 320)" -s -r.mapcalc expr="prec_4 = rand(0, 510)" -s -r.mapcalc expr="prec_5 = rand(0, 300)" -s -r.mapcalc expr="prec_6 = rand(0, 650)" -s +r.mapcalc expr="prec_1 = rand(0, 550)" +r.mapcalc expr="prec_2 = rand(0, 450)" +r.mapcalc expr="prec_3 = rand(0, 320)" +r.mapcalc expr="prec_4 = rand(0, 510)" +r.mapcalc expr="prec_5 = rand(0, 300)" +r.mapcalc expr="prec_6 = rand(0, 650)" v.random -z output=pnts1 npoints=20 zmin=0 zmax=100 column=height v.random -z output=pnts2 npoints=20 zmin=0 zmax=100 column=height diff --git a/temporal/t.shift/t.shift.html b/temporal/t.shift/t.shift.html index c9059867661..77ab330245c 100644 --- a/temporal/t.shift/t.shift.html +++ b/temporal/t.shift/t.shift.html @@ -33,12 +33,12 @@

EXAMPLE

with a granularity of 12 hours.
-r.mapcalc expression="prec_1 = rand(0, 550)" -s
-r.mapcalc expression="prec_2 = rand(0, 450)" -s
-r.mapcalc expression="prec_3 = rand(0, 320)" -s
-r.mapcalc expression="prec_4 = rand(0, 510)" -s
-r.mapcalc expression="prec_5 = rand(0, 300)" -s
-r.mapcalc expression="prec_6 = rand(0, 650)" -s
+r.mapcalc expression="prec_1 = rand(0, 550)"
+r.mapcalc expression="prec_2 = rand(0, 450)"
+r.mapcalc expression="prec_3 = rand(0, 320)"
+r.mapcalc expression="prec_4 = rand(0, 510)"
+r.mapcalc expression="prec_5 = rand(0, 300)"
+r.mapcalc expression="prec_6 = rand(0, 650)"
 
 t.create type=strds temporaltype=absolute \
          output=precipitation_daily \
diff --git a/temporal/t.shift/t.shift.md b/temporal/t.shift/t.shift.md
index 5d4defb07f0..600364f0a12 100644
--- a/temporal/t.shift/t.shift.md
+++ b/temporal/t.shift/t.shift.md
@@ -32,12 +32,12 @@ using an increment of one day. Then we shift the time intervals with a
 granularity of 12 hours.
 
 ```sh
-r.mapcalc expression="prec_1 = rand(0, 550)" -s
-r.mapcalc expression="prec_2 = rand(0, 450)" -s
-r.mapcalc expression="prec_3 = rand(0, 320)" -s
-r.mapcalc expression="prec_4 = rand(0, 510)" -s
-r.mapcalc expression="prec_5 = rand(0, 300)" -s
-r.mapcalc expression="prec_6 = rand(0, 650)" -s
+r.mapcalc expression="prec_1 = rand(0, 550)"
+r.mapcalc expression="prec_2 = rand(0, 450)"
+r.mapcalc expression="prec_3 = rand(0, 320)"
+r.mapcalc expression="prec_4 = rand(0, 510)"
+r.mapcalc expression="prec_5 = rand(0, 300)"
+r.mapcalc expression="prec_6 = rand(0, 650)"
 
 t.create type=strds temporaltype=absolute \
          output=precipitation_daily \
diff --git a/temporal/t.snap/test.t.snap.absolute.sh b/temporal/t.snap/test.t.snap.absolute.sh
index 8b2ed3b21fb..4ce97a766eb 100755
--- a/temporal/t.snap/test.t.snap.absolute.sh
+++ b/temporal/t.snap/test.t.snap.absolute.sh
@@ -6,12 +6,12 @@
 g.region s=0 n=80 w=0 e=120 b=0 t=50 res=10 res3=10 -p3
 
 # Generate data
-r.mapcalc --o expr="prec_1 = rand(0, 550)" -s
-r.mapcalc --o expr="prec_2 = rand(0, 450)" -s
-r.mapcalc --o expr="prec_3 = rand(0, 320)" -s
-r.mapcalc --o expr="prec_4 = rand(0, 510)" -s
-r.mapcalc --o expr="prec_5 = rand(0, 300)" -s
-r.mapcalc --o expr="prec_6 = rand(0, 650)" -s
+r.mapcalc --o expr="prec_1 = rand(0, 550)"
+r.mapcalc --o expr="prec_2 = rand(0, 450)"
+r.mapcalc --o expr="prec_3 = rand(0, 320)"
+r.mapcalc --o expr="prec_4 = rand(0, 510)"
+r.mapcalc --o expr="prec_5 = rand(0, 300)"
+r.mapcalc --o expr="prec_6 = rand(0, 650)"
 
 n1=`g.tempfile pid=1 -d`
 
diff --git a/temporal/t.snap/test.t.snap.relative.sh b/temporal/t.snap/test.t.snap.relative.sh
index d489b699cc0..972ec390dab 100755
--- a/temporal/t.snap/test.t.snap.relative.sh
+++ b/temporal/t.snap/test.t.snap.relative.sh
@@ -6,12 +6,12 @@
 g.region s=0 n=80 w=0 e=120 b=0 t=50 res=10 res3=10 -p3
 
 # Generate data
-r.mapcalc --o expr="prec_1 = rand(0, 550)" -s
-r.mapcalc --o expr="prec_2 = rand(0, 450)" -s
-r.mapcalc --o expr="prec_3 = rand(0, 320)" -s
-r.mapcalc --o expr="prec_4 = rand(0, 510)" -s
-r.mapcalc --o expr="prec_5 = rand(0, 300)" -s
-r.mapcalc --o expr="prec_6 = rand(0, 650)" -s
+r.mapcalc --o expr="prec_1 = rand(0, 550)"
+r.mapcalc --o expr="prec_2 = rand(0, 450)"
+r.mapcalc --o expr="prec_3 = rand(0, 320)"
+r.mapcalc --o expr="prec_4 = rand(0, 510)"
+r.mapcalc --o expr="prec_5 = rand(0, 300)"
+r.mapcalc --o expr="prec_6 = rand(0, 650)"
 
 t.create --o type=strds temporaltype=relative output=precip_rel title="A test" descr="A test"
 t.register --o type=raster input=precip_rel unit="days" \
diff --git a/temporal/t.support/test.t.support.sh b/temporal/t.support/test.t.support.sh
index a7ba3330f1e..cb10bde9852 100755
--- a/temporal/t.support/test.t.support.sh
+++ b/temporal/t.support/test.t.support.sh
@@ -7,12 +7,12 @@
 g.region s=0 n=80 w=0 e=120 b=0 t=50 res=10 res3=10 -p3
 
 # Generate data
-r.mapcalc --o expr="prec_1 = rand(0, 550)" -s
-r.mapcalc --o expr="prec_2 = rand(0, 450)" -s
-r.mapcalc --o expr="prec_3 = rand(0, 320)" -s
-r.mapcalc --o expr="prec_4 = rand(0, 510)" -s
-r.mapcalc --o expr="prec_5 = rand(0, 300)" -s
-r.mapcalc --o expr="prec_6 = rand(0, 650)" -s
+r.mapcalc --o expr="prec_1 = rand(0, 550)"
+r.mapcalc --o expr="prec_2 = rand(0, 450)"
+r.mapcalc --o expr="prec_3 = rand(0, 320)"
+r.mapcalc --o expr="prec_4 = rand(0, 510)"
+r.mapcalc --o expr="prec_5 = rand(0, 300)"
+r.mapcalc --o expr="prec_6 = rand(0, 650)"
 # We create several space time raster datasets
 
 # @test Register the maps in two space time datasets
@@ -40,12 +40,12 @@ t.info type=strds input=precip_abs1
 g.region s=0 n=80 w=0 e=120 b=0 t=50 res=20 res3=20
 
 # Generate data
-r.mapcalc --o expr="prec_1 = rand(0, 55)" -s
-r.mapcalc --o expr="prec_2 = rand(0, 45)" -s
-r.mapcalc --o expr="prec_3 = rand(0, 32)" -s
-r.mapcalc --o expr="prec_4 = rand(0, 51)" -s
-r.mapcalc --o expr="prec_5 = rand(0, 30)" -s
-r.mapcalc --o expr="prec_6 = rand(0, 65)" -s
+r.mapcalc --o expr="prec_1 = rand(0, 55)"
+r.mapcalc --o expr="prec_2 = rand(0, 45)"
+r.mapcalc --o expr="prec_3 = rand(0, 32)"
+r.mapcalc --o expr="prec_4 = rand(0, 51)"
+r.mapcalc --o expr="prec_5 = rand(0, 30)"
+r.mapcalc --o expr="prec_6 = rand(0, 65)"
 
 # The map dependent metadata should have been updated
 t.support --v -m type=strds input=precip_abs1
diff --git a/temporal/t.topology/test.t.topology.abstime.sh b/temporal/t.topology/test.t.topology.abstime.sh
index a3fc0cfad8e..6a701137008 100755
--- a/temporal/t.topology/test.t.topology.abstime.sh
+++ b/temporal/t.topology/test.t.topology.abstime.sh
@@ -7,12 +7,12 @@
 g.region s=0 n=80 w=0 e=120 b=0 t=50 res=10 res3=10 -p3
 
 # Generate data
-r.mapcalc --o expr="prec_1 = rand(0, 550)" -s
-r.mapcalc --o expr="prec_2 = rand(0, 450)" -s
-r.mapcalc --o expr="prec_3 = rand(0, 320)" -s
-r.mapcalc --o expr="prec_4 = rand(0, 510)" -s
-r.mapcalc --o expr="prec_5 = rand(0, 300)" -s
-r.mapcalc --o expr="prec_6 = rand(0, 650)" -s
+r.mapcalc --o expr="prec_1 = rand(0, 550)"
+r.mapcalc --o expr="prec_2 = rand(0, 450)"
+r.mapcalc --o expr="prec_3 = rand(0, 320)"
+r.mapcalc --o expr="prec_4 = rand(0, 510)"
+r.mapcalc --o expr="prec_5 = rand(0, 300)"
+r.mapcalc --o expr="prec_6 = rand(0, 650)"
 
 # Different spatial extents
 r.mapcalc --o expr="A = 1"
diff --git a/temporal/t.topology/test.t.topology.reltime.sh b/temporal/t.topology/test.t.topology.reltime.sh
index 60e49355e9a..3b3db028d9a 100755
--- a/temporal/t.topology/test.t.topology.reltime.sh
+++ b/temporal/t.topology/test.t.topology.reltime.sh
@@ -7,12 +7,12 @@
 g.region s=0 n=80 w=0 e=120 b=0 t=50 res=10 res3=10 -p3
 
 # Generate data
-r.mapcalc --o expr="prec_1 = rand(0, 550)" -s
-r.mapcalc --o expr="prec_2 = rand(0, 450)" -s
-r.mapcalc --o expr="prec_3 = rand(0, 320)" -s
-r.mapcalc --o expr="prec_4 = rand(0, 510)" -s
-r.mapcalc --o expr="prec_5 = rand(0, 300)" -s
-r.mapcalc --o expr="prec_6 = rand(0, 650)" -s
+r.mapcalc --o expr="prec_1 = rand(0, 550)"
+r.mapcalc --o expr="prec_2 = rand(0, 450)"
+r.mapcalc --o expr="prec_3 = rand(0, 320)"
+r.mapcalc --o expr="prec_4 = rand(0, 510)"
+r.mapcalc --o expr="prec_5 = rand(0, 300)"
+r.mapcalc --o expr="prec_6 = rand(0, 650)"
 
 n1=`g.tempfile pid=1 -d`
 n2=`g.tempfile pid=2 -d`