test.t.remove.sh 950 B

1234567891011121314151617181920212223
  1. #!/bin/sh
  2. # We need to set a specific region in the
  3. # @preprocess step of this test. We generate
  4. # raster with r.mapcalc and create several space time raster datasets
  5. # with absolute time
  6. # The region setting should work for UTM and LL test locations
  7. g.region s=0 n=80 w=0 e=120 b=0 t=50 res=10 res3=10 -p3
  8. # Generate data
  9. r.mapcalc --o expr="prec_1 = rand(0, 550)" -s
  10. r.mapcalc --o expr="prec_2 = rand(0, 450)" -s
  11. r.mapcalc --o expr="prec_3 = rand(0, 320)" -s
  12. r.mapcalc --o expr="prec_4 = rand(0, 510)" -s
  13. r.mapcalc --o expr="prec_5 = rand(0, 300)" -s
  14. r.mapcalc --o expr="prec_6 = rand(0, 650)" -s
  15. # The first @test
  16. t.create --o type=strds temporaltype=absolute output=precip_abs1 title="A test" descr="A test"
  17. t.register --o -i input=precip_abs1 maps=prec_1,prec_2,prec_3,prec_4,prec_5,prec_6 start="2001-01-01" increment="1 seconds"
  18. t.remove -rf type=strds input=precip_abs1
  19. # This will produce an error
  20. t.remove -r type=strds input=precip_abs1