Discussion:
[CF-metadata] nitpick in time axes example
Chris Barker
2016-09-14 19:34:11 UTC
Permalink
I see in teh doc:

Example 4.4. Time axis

double time(time) ;
time:long_name = "time" ;
time:units = "days since 1990-1-1 0:0:0" ;

IIUC, ISO 8601 requires two digits for the time pieces [1], so that should
be:

"days since 1990-1-1 00:00:00"


The parser I use isn't picky about this, but maybe some are?

BTW, as it's an example, we should probably throw a time offset on there,
too:

"days since 1990-1-1 00:00:00Z"


or

"days since 1990-1-1 00:00:00+00:00"


[1] at least according to wikipedia:
https://en.wikipedia.org/wiki/ISO_8601#Times


-Chris
--
Christopher Barker, Ph.D.
Oceanographer

Emergency Response Division
NOAA/NOS/OR&R (206) 526-6959 voice
7600 Sand Point Way NE (206) 526-6329 fax
Seattle, WA 98115 (206) 526-6317 main reception

***@noaa.gov
Jim Biard
2016-09-14 21:01:34 UTC
Permalink
Chris,

CF has consistently maintained adherence to the UDUNITS definition for
the reference time string, and that is different from ISO. (See CF
Section 4.4
<http://cfconventions.org/cf-conventions/v1.6.0/cf-conventions.html#time-coordinate>)
As stated at the top of the section, Z is not used in the case of UTC
and there is a space before any time zone offset. Example 4.4 is written
that way specifically to make it clear that single-digit numbers are legal.

Grace and peace,

Jim
Post by Chris Barker
Example 4.4. Time axis
double time(time) ;
time:long_name = "time" ;
time:units = "days since 1990-1-1 0:0:0" ;
IIUC, ISO 8601 requires two digits for the time pieces [1], so that
"days since 1990-1-1 00:00:00"
The parser I use isn't picky about this, but maybe some are?
BTW, as it's an example, we should probably throw a time offset on
"days since 1990-1-1 00:00:00Z"
or
"days since 1990-1-1 00:00:00+00:00"
https://en.wikipedia.org/wiki/ISO_8601#Times
-Chris
--
Christopher Barker, Ph.D.
Oceanographer
Emergency Response Division
NOAA/NOS/OR&R (206) 526-6959 voice
7600 Sand Point Way NE (206) 526-6329 fax
Seattle, WA 98115 (206) 526-6317 main reception
_______________________________________________
CF-metadata mailing list
http://mailman.cgd.ucar.edu/mailman/listinfo/cf-metadata
--
CICS-NC <http://www.cicsnc.org/> Visit us on
Facebook <http://www.facebook.com/cicsnc> *Jim Biard*
*Research Scholar*
Cooperative Institute for Climate and Satellites NC <http://cicsnc.org/>
North Carolina State University <http://ncsu.edu/>
NOAA National Centers for Environmental Information <http://ncdc.noaa.gov/>
/formerly NOAA’s National Climatic Data Center/
151 Patton Ave, Asheville, NC 28801
e: ***@cicsnc.org <mailto:***@cicsnc.org>
o: +1 828 271 4900

/Connect with us on Facebook for climate
<https://www.facebook.com/NOAANCEIclimate> and ocean and geophysics
<https://www.facebook.com/NOAANCEIoceangeo> information, and follow us
on Twitter at @NOAANCEIclimate <https://twitter.com/NOAANCEIclimate> and
@NOAANCEIocngeo <https://twitter.com/NOAANCEIocngeo>. /
Chris Barker
2016-09-15 19:01:04 UTC
Permalink
CF has consistently maintained adherence to the UDUNITS definition for the
reference time string, and that is different from ISO. (See CF Section 4.4
<http://cfconventions.org/cf-conventions/v1.6.0/cf-conventions.html#time-coordinate>)
As stated at the top of the section, Z is not used in the case of UTC and
there is a space before any time zone offset.fair enough.
Though as we move forward in versions, I think preferring an ISO standard
over "what UDUNITS happens to support" would be a good idea.

Example 4.4 is written that way specifically to make it clear that
single-digit numbers are legal.
Hmm -- personally I think the examples should have recommended practice,
not allowable practice.

And see above ISO8601 should be recommended, even if not required.

But maybe that's just my opinion.

-CHB
Grace and peace,
Jim
Example 4.4. Time axis
double time(time) ;
time:long_name = "time" ;
time:units = "days since 1990-1-1 0:0:0" ;
IIUC, ISO 8601 requires two digits for the time pieces [1], so that should
"days since 1990-1-1 00:00:00"
The parser I use isn't picky about this, but maybe some are?
BTW, as it's an example, we should probably throw a time offset on there,
"days since 1990-1-1 00:00:00Z"
or
"days since 1990-1-1 00:00:00+00:00"
[1] at least according to wikipedia: https://en.
wikipedia.org/wiki/ISO_8601#Times
-Chris
--
Christopher Barker, Ph.D.
Oceanographer
Emergency Response Division
NOAA/NOS/OR&R (206) 526-6959 voice
7600 Sand Point Way NE (206) 526-6329 fax
Seattle, WA 98115 (206) 526-6317 main reception
_______________________________________________
--
[image: CICS-NC] <http://www.cicsnc.org/> Visit us on
Facebook <http://www.facebook.com/cicsnc> *Jim Biard*
*Research Scholar*
Cooperative Institute for Climate and Satellites NC <http://cicsnc.org/>
North Carolina State University <http://ncsu.edu/>
NOAA National Centers for Environmental Information
<http://ncdc.noaa.gov/>
*formerly NOAA’s National Climatic Data Center*
151 Patton Ave, Asheville, NC 28801
o: +1 828 271 4900
*Connect with us on Facebook for climate
<https://www.facebook.com/NOAANCEIclimate> and ocean and geophysics
<https://www.facebook.com/NOAANCEIoceangeo> information, and follow us on
@NOAANCEIocngeo <https://twitter.com/NOAANCEIocngeo>. *
_______________________________________________
CF-metadata mailing list
http://mailman.cgd.ucar.edu/mailman/listinfo/cf-metadata
--
Christopher Barker, Ph.D.
Oceanographer

Emergency Response Division
NOAA/NOS/OR&R (206) 526-6959 voice
7600 Sand Point Way NE (206) 526-6329 fax
Seattle, WA 98115 (206) 526-6317 main reception

***@noaa.gov
Loading...