test.t.rast3d.univar.sh 1014 B

1234567891011121314151617181920212223242526
  1. #!/bin/sh
  2. # Univariate statitsics for space time raster3d datasets
  3. # We need to set a specific region in the
  4. # @preprocess step of this test.
  5. # The region setting should work for UTM and LL test locations
  6. g.region s=0 n=80 w=0 e=120 b=0 t=50 res=10 res3=10 -p3
  7. # Data generation
  8. r3.mapcalc --o expr="prec_1 = rand(0, 550)"
  9. r3.mapcalc --o expr="prec_2 = rand(0, 450)"
  10. r3.mapcalc --o expr="prec_3 = rand(0, 320)"
  11. r3.mapcalc --o expr="prec_4 = rand(0, 510)"
  12. r3.mapcalc --o expr="prec_5 = rand(0, 300)"
  13. r3.mapcalc --o expr="prec_6 = rand(0, 650)"
  14. t.create --o type=str3ds temporaltype=absolute output=precip_abs1 title="A test" descr="A test"
  15. t.register type=rast3d --v -i 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"
  16. # The first @test
  17. t.rast3d.univar -he input=precip_abs1
  18. t.unregister type=rast3d maps=prec_1,prec_2,prec_3,prec_4,prec_5,prec_6
  19. t.remove type=str3ds input=precip_abs1
  20. g.remove rast3d=prec_1,prec_2,prec_3,prec_4,prec_5,prec_6