<div dir="ltr">Hi Soren!<div><br></div><div>Thanks much for answering so quickly!! And so clearly!<br><div class="gmail_extra"><br>2014-03-05 21:21 GMT+01:00 Sören Gebbert <span dir="ltr"><<a href="mailto:soerengebbert@googlemail.com" target="_blank">soerengebbert@googlemail.com</a>></span>:<br>
<div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">Hi Veronica,<br>
<br>
2014-03-05 20:49 GMT+01:00 Veronica Andreo <<a href="mailto:veroandreo@gmail.com">veroandreo@gmail.com</a>>:<br>
<div class="">> Dear list<br>
><br>
> I'm working with ocean color data set from MODIS and starting to use t.*<br>
> modules... I'm trying now to register the strds and as i'm working with<br>
> 8-day products i specified start date as 2003-01-01 and interval as 8 days<br>
> for a list of 506 maps. The time series should end by 2013-12-31 and <a href="http://t.info" target="_blank">t.info</a><br>
> says<br>
><br>
> ...<br>
>  +-------------------- Absolute time<br>
> -----------------------------------------+<br>
>  | Start time:................. 2003-01-01 00:00:00<br>
>  | End time:................... 2014-01-31 00:00:00<br>
>  | Granularity:................ 8 days<br>
>  | Temporal type of maps:...... interval<br>
> ....<br>
<br>
</div>Using Python shows that in case of an 8 day's interval, the end date<br>
is computed correctly:<br>
<br>
{{{<br>
import datetime<br>
print datetime.datetime(2003,1,1) + datetime.timedelta(506*8)<br>
2014-01-31 00:00:00<br>
<div class="">}}}</div></blockquote><div> </div><div>Actually, it is the same as with grass... it is mathematically correct, but it is not correct for this case... end date of my time series is <b>2013-12-31</b> and not 2014-01-31... as i mentioned earlier the problem arises in the last image of each year that covers a 5 or 6 days period (dependending on leap years) and not 8 days as the rest of images in each year...<br>
</div><div>  </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div class="">
> The problem arise because all products at the end of the year don't really<br>
> cover an 8-days period... So, i understand i should add starting and ending<br>
> date to each file in the list i use as input for t.register... Question is:<br>
> Is it possible to use DOY instead of dates?? or what would be a (reasonably)<br>
> easy way of transforming DOY in map names (for example:<br>
> A20030732003080.L3m_8D_CHL_chlor_a_4km_arg) into the corresponding dates????<br>
<br>
</div>So your time series has unequal time intervals?</blockquote><div> </div><div>Sort of... most of it is every 8 day, excep for the last image of the year...<br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
I would suggest to use<br>
a single input file that lists all maps with time stamps as input for<br>
a single t.register call.<br>
DOY is not supported by t.register. I would suggest that you use the<br>
following Python code to extract the exact start and end time from the<br>
map names:<br>
<br>
{{{<br>
import datetime<br>
<br>
#           012345678901234567890123456789012345678901<br>
map_name = "A20030732003080.L3m_8D_CHL_chlor_a_4km_arg"<br>
start_year = int(map_name[1:5])<br>
start_day  = int(map_name[5:8])<br>
end_year   = int(map_name[8:12])<br>
end_day    = int(map_name[12:15])<br>
<br>
start = datetime.datetime(start_year, 1, 1) + datetime.timedelta(start_day - 1)<br>
end = datetime.datetime(int(end_year), 1, 1) + datetime.timedelta(end_day - 1)<br>
<br>
print map_name, "|", start, "|", end<br>
<br>
}}}<br>
<br></blockquote><div style>Great!! I really need to learn python :)</div><div style> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">

Write each map name with start and end time into one file (a single<br>
map name with start and end time each line) and register all maps at<br>
once with "t.register input=my_strds file=my_maps.txt".<br><div class=""><br></div></blockquote><div style>Thanks again!</div><div style>Vero </div></div></div></div></div>