[GRASS-user] Aggregating daily maps in relative strds per month
Nikos Alexandris
nik at nikosalexandris.net
Tue May 19 02:41:43 PDT 2015
* Sören Gebbert:
> being not able to recreate the temporal database in a mapset after
> deleting it is definitely a bug in the temporal framework. I have to
> investigate this.
Need a ticket for this?
> Regarding ghost entries:
>
> You can use "t.list type=rast" to list all raster map layer registered
> in the temporal database, with or without STRDS association.
> Use the "maps" option of module t.unregister to un-register any kind
> of map layers (existing, ghost, non-STRDS association, ...).
It worked as follows:
# create a list with the maps in question
t.list rast |grep global_rad_clearsky > global_rad_clearsky_maps
# unregister using "it"
t.unregister file=global_rad_clearsky_maps
Question:
Is this eligible as an enhancement request? e.g. do:
t.unregister type=rast pattern=global_rad_clearsky*
?
Also, the maps derived from r.sun.daily have a relative timestamp
(irrelevant if the user requests for the '-t' flag to register
automatically in a strds or not).
With t.list at this point, there is no entry of the maps in question in
the temporal data base. Naturally. As well, the following won't work directly:
# create a strds
t.create out=global_rad_clearsky title="Clearsky global irradiation"
description="Clearsky global irradiation on a horizontal surface raster
maps [Wh.m-2.day-1]"
# (try to) register
t.register input=global_rad_clearsky maps=`g.list raster
pattern=global_rad_clearsky_* sep=,` start="2009-01-01" increment='1 days'
0..ERROR: invalid literal for int() with base 10: '2009-01-01'
Expected, right? To override this, without using the r.timestamp module
at all, I did:
# intentionally issuing a command that is expected to fail, yet...
t.register input=beam_rad_clearsky maps=`g.list raster
pattern=beam_rad_clearsky_* sep=,`
0..13..27..41..54..68..82..95..100
0..ERROR: Temporal type of space time dataset
<beam_rad_clearsky at global_rad_clearsky> and map
<beam_rad_clearsky_001 at global_rad_clearsky> are different
...the above created entries with the requested map names in the
temporal data base as "maps with relative time available in mapset...".
So, unregister (as above, using a list with the map names in question).
This will clean the relative timestamps from the maps.
The, recalling the first t.register command, as is, to register the
maps in the absolute strds will work, eg:
t.register input=global_rad_clearsky maps=`g.list raster
pattern=global_rad_clearsky_* sep=,` start="2009-01-01" increment='1 days'
Question:
Would it make sense to create a flag assisting in working this around?
Or would it be a "faulty design" ?
Thanks, Nikos
More information about the grass-user
mailing list