[GRASS-user] t.register: ERROR: day is out of range for months

Hello,

I'm trying to register climate model data using t.register with a 360 day
year/30 day month.

I've created a text file containing layer names and dates (see sample
below), however on running t.register I get the following error:

Thanks for your help.

Cheers,
Richard

Sample of input file to t.register
...
bnd_cahpa_f1jan_05216_nc_remapped_nc_28|1951-01-28
bnd_cahpa_f1jan_05216_nc_remapped_nc_29|1951-01-29
*bnd_cahpa_f1jan_05216_nc_remapped_nc_30|1951-01-30*
bnd_cahpa_f1feb_05216_nc_remapped_nc_1|1951-02-01
bnd_cahpa_f1feb_05216_nc_remapped_nc_2|1951-02-02
bnd_cahpa_f1feb_05216_nc_remapped_nc_3|1951-02-03
...
bnd_cahpa_f1feb_05216_nc_remapped_nc_28|1951-02-28
bnd_cahpa_f1feb_05216_nc_remapped_nc_29|1951-02-29
*bnd_cahpa_f1feb_05216_nc_remapped_nc_30|1951-02-30*
bnd_cahpa_f1mar_05216_nc_remapped_nc_1|1951-03-01
bnd_cahpa_f1mar_05216_nc_remapped_nc_2|1951-03-02
bnd_cahpa_f1mar_05216_nc_remapped_nc_3|1951-03-03
bnd_cahpa_f1mar_05216_nc_remapped_nc_4|1951-03-04
...

--
View this message in context: http://osgeo-org.1560.x6.nabble.com/t-register-ERROR-day-is-out-of-range-for-months-tp5185155.html
Sent from the Grass - Users mailing list archive at Nabble.com.

Apologies for re-posting, but I noticed that much of the post's content
disappeared in the email.

Also, as an update I tried to add both a start and end date to the input
file (following the t.register manual) but still get the same error on
running t.register:

ERROR: day is out of range for month
ERROR: Unable to convert string "1951-02-29"into a datetime object

The process in more detail:
Aim: to process and analyse a 360 day (30 day/month) climate database

t.create --overwrite output=cahpa05216fgh_stvds type=stvds semantictype=max
title="cahpa_05216fgh_prcp_stvds" description="CAHPA05216 for MAPSETfgh
Precipitation STVDS"

t.register --overwrite input=test_stvds type=vector
file=/home/rcooper/glist_fgh_vectors.out
Gathering map information...
ERROR: day is out of range for month
ERROR: Unable to convert string "1951-02-29"into a datetime object

Sample of 360 day file input to t.register:
...
bnd_cahpa_f1jan_05216_nc_remapped_nc_28|1951-01-28
bnd_cahpa_f1jan_05216_nc_remapped_nc_29|1951-01-29
bnd_cahpa_f1jan_05216_nc_remapped_nc_30|1951-01-30
bnd_cahpa_f1feb_05216_nc_remapped_nc_1|1951-02-01
bnd_cahpa_f1feb_05216_nc_remapped_nc_2|1951-02-02
bnd_cahpa_f1feb_05216_nc_remapped_nc_3|1951-02-03
...
bnd_cahpa_f1feb_05216_nc_remapped_nc_28|1951-02-28
bnd_cahpa_f1feb_05216_nc_remapped_nc_29|1951-02-29
bnd_cahpa_f1feb_05216_nc_remapped_nc_30|1951-02-30
bnd_cahpa_f1mar_05216_nc_remapped_nc_1|1951-03-01
bnd_cahpa_f1mar_05216_nc_remapped_nc_2|1951-03-02
bnd_cahpa_f1mar_05216_nc_remapped_nc_3|1951-03-03
bnd_cahpa_f1mar_05216_nc_remapped_nc_4|1951-03-04
...

GRASS version: 7.0.0svn
GRASS SVN Revision: 64042
Build Date: 2015-01-10
Build Platform: i686-pc-linux-gnu
GDAL/OGR: 1.11.1
PROJ.4: 4.9.0
GEOS: 3.4.2
SQLite: 3.7.9
Python: 2.7.3
wxPython: 2.8.12.1
Platform: Linux-3.2.0-31-generic-pae-i686-with-LinuxMint-13-maya

--
View this message in context: http://osgeo-org.1560.x6.nabble.com/t-register-ERROR-day-is-out-of-range-for-months-tp5185155p5185370.html
Sent from the Grass - Users mailing list archive at Nabble.com.

On Wed, Feb 4, 2015 at 5:27 AM, RichardCooper <richtcooper@hotmail.com> wrote:

Apologies for re-posting, but I noticed that much of the post's content
disappeared in the email.

Also, as an update I tried to add both a start and end date to the input
file (following the t.register manual) but still get the same error on
running t.register:

ERROR: day is out of range for month
ERROR: Unable to convert string "1951-02-29"into a datetime object

The issue is that this date did not exist:

grassuser $ > cal 2 1951
    February 1951
Su Mo Tu We Th Fr Sa
             1 2 3
4 5 6 7 8 9 10
11 12 13 14 15 16 17
18 19 20 21 22 23 24
25 26 27 28

....

Sample of 360 day file input to t.register:
...
bnd_cahpa_f1feb_05216_nc_remapped_nc_3|1951-02-03
...
bnd_cahpa_f1feb_05216_nc_remapped_nc_28|1951-02-28
bnd_cahpa_f1feb_05216_nc_remapped_nc_29|1951-02-29 <--- remove

...

bnd_cahpa_f1feb_05216_nc_remapped_nc_30|1951-02-30 <--- remove
bnd_cahpa_f1mar_05216_nc_remapped_nc_1|1951-03-01

...

The list may only contain existing dates.

Markus

Hi,
the problem is that the model year has 360 days, ignoring the
Gregorian calendar that is the based on absolute time in GRASS. Hence,
the 29. and 30. February do not exist in 1951.

You can use relative time with a daily resolution, so you don't have
to to deal with Gregorian calendar time.

t.create temporaltype=relative ...

t.register start=0 increment=1 unit="day" ...

Best regards
Soeren

2015-02-04 5:27 GMT+01:00 RichardCooper <richtcooper@hotmail.com>:

Apologies for re-posting, but I noticed that much of the post's content
disappeared in the email.

Also, as an update I tried to add both a start and end date to the input
file (following the t.register manual) but still get the same error on
running t.register:

ERROR: day is out of range for month
ERROR: Unable to convert string "1951-02-29"into a datetime object

The process in more detail:
Aim: to process and analyse a 360 day (30 day/month) climate database

t.create --overwrite output=cahpa05216fgh_stvds type=stvds semantictype=max
title="cahpa_05216fgh_prcp_stvds" description="CAHPA05216 for MAPSETfgh
Precipitation STVDS"

t.register --overwrite input=test_stvds type=vector
file=/home/rcooper/glist_fgh_vectors.out
Gathering map information...
ERROR: day is out of range for month
ERROR: Unable to convert string "1951-02-29"into a datetime object

Sample of 360 day file input to t.register:
...
bnd_cahpa_f1jan_05216_nc_remapped_nc_28|1951-01-28
bnd_cahpa_f1jan_05216_nc_remapped_nc_29|1951-01-29
bnd_cahpa_f1jan_05216_nc_remapped_nc_30|1951-01-30
bnd_cahpa_f1feb_05216_nc_remapped_nc_1|1951-02-01
bnd_cahpa_f1feb_05216_nc_remapped_nc_2|1951-02-02
bnd_cahpa_f1feb_05216_nc_remapped_nc_3|1951-02-03
...
bnd_cahpa_f1feb_05216_nc_remapped_nc_28|1951-02-28
bnd_cahpa_f1feb_05216_nc_remapped_nc_29|1951-02-29
bnd_cahpa_f1feb_05216_nc_remapped_nc_30|1951-02-30
bnd_cahpa_f1mar_05216_nc_remapped_nc_1|1951-03-01
bnd_cahpa_f1mar_05216_nc_remapped_nc_2|1951-03-02
bnd_cahpa_f1mar_05216_nc_remapped_nc_3|1951-03-03
bnd_cahpa_f1mar_05216_nc_remapped_nc_4|1951-03-04
...

GRASS version: 7.0.0svn
GRASS SVN Revision: 64042
Build Date: 2015-01-10
Build Platform: i686-pc-linux-gnu
GDAL/OGR: 1.11.1
PROJ.4: 4.9.0
GEOS: 3.4.2
SQLite: 3.7.9
Python: 2.7.3
wxPython: 2.8.12.1
Platform: Linux-3.2.0-31-generic-pae-i686-with-LinuxMint-13-maya

--
View this message in context: http://osgeo-org.1560.x6.nabble.com/t-register-ERROR-day-is-out-of-range-for-months-tp5185155p5185370.html
Sent from the Grass - Users mailing list archive at Nabble.com.
_______________________________________________
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user