Julien,
There is no unambiguous way to represent GPS time (or TAI time) in CF. This
needs to be addressed, but currently is not. For a nice article on the
variations between different time standards (UTC GPS TAI and Unix-C),
follow this link.
http://www.lsc-group.phys.uwm.edu/~ballen/grasp-distribution/GRASP/doc/html/node311.html
The article has a couple of problems (in particular, it doesn't properly
explain that TAI time is elapsed seconds since 1958-01-01 00:00:00 UTC),
but it can give you a good idea of what is going on. The big background
thing to keep in mind is that UTC really only exists as time stamps
(formatted date and time as, for example, YYYY-MM-DD HH:MM:SS.sss...). TAI
time, GPS time, and Unix-C time (if you don't use a time daemon such as
ntpd to keep bumping it) are all elapsed times since different epochs.
The first question to ask is, does it matter? Is your time precision tight
enough that you are concerned about a potentially constant 16 second shift
(depending on your range of times)? If not, no real problem.
If it does matter, there are a few different approaches.
You could store your times as "milliseconds since YYYY-MM-DD
HH:MM:SS", where the time stamp is a GPS time stamp, and include a comment
attribute that explains that the time stamp and the elapsed time are GPS
time.
You could store your times as "milliseconds since YYYY-MM-DD HH:MM:SS",
where the time stamp is a GPS time stamp converted to a UTC time stamp, and
again provide a comment attribute that indicates what you have done.
You could store your times as "milliseconds since 1980-01-06 00:00:00.000"
and add a comment attribute that explains that this is elapsed GPS time.
What you get when you convert the elapsed times (back) to time stamps will
vary depending on which time handling module you use in your software.
Interestingly, using the *nix gmtime() function for the first and third
approaches should produce proper GPS time stamps because gmtime() doesn't
handle leap seconds.
Grace and peace,
Jim
[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
e: jbiard at cicsnc.org
o: +1 828 271 4900
*We will be updating our social media soon. Follow our current Facebook
(NOAA National Climatic Data Center
<
https://www.facebook.com/NOAANationalClimaticDataCenter> and NOAA National
Oceanographic Data Center <
https://www.facebook.com/noaa.nodc>) and Twitter
(_at_NOAANCDC <
https://twitter.com/NOAANCDC> and @NOAAOceanData
<
https://twitter.com/NOAAOceanData>) accounts for the latest information.*
On Thu, Apr 23, 2015 at 10:19 AM, Julien Demaria <Julien.Demaria at acri-st.fr>
wrote:
> Dear Jonathan,
>
>
>
> I?m also not an expert on this:
>
> ?GPS, Global Positioning System time, is the atomic time scale implemented
> by the atomic clocks in the GPS ground control stations and the GPS
> satellites themselves. GPS time was zero at 0h 6-Jan-1980 and since it is
> not perturbed by leap seconds GPS is now ahead of UTC by 16 seconds.?
>
> http://www.leapsecond.com/java/gpsclock.htm
>
> a more detailed explanation:
>
> https://confluence.qps.nl/display/KBE/UTC+to+GPS+Time+Correction
>
>
>
> Thanks in advance,
>
>
>
> Julien
>
>
>
> >Jonathan Gregory j.m.gregory at reading.ac.uk
>
> >Thu Apr 23 07:58:09 MDT 2015
>
> >
>
> >Dear Julien
>
> >
>
> >Could you explain what the difference is between GPS time and UTC (for a
> non-
>
> >expert such as me)?
>
> >
>
> >Thanks
>
> >
>
> >Jonathan
>
>
>
> *De :* Julien Demaria
> *Envoy? :* jeudi 23 avril 2015 14:51
> *? :* 'cf-metadata at cgd.ucar.edu'
> *Objet :* How to define time coordinate in GPS?
>
>
>
> Hi,
>
>
>
> I need to define a time coordinate variable which use the GPS time
> referential instead of UTC, but I did not found how to specify this.
>
> For the moment my variable look like this :
>
>
>
> int64 time_stamp(rows) ;
>
> time_stamp:standard_name = "time" ;
>
> time_stamp:units = "microseconds since
> 2000-01-01 00:00:00" ;
>
> time_stamp:_FillValue = -1L ;
>
>
>
> Thanks in advance,
>
>
>
> Julien
>
>
>
> _______________________________________________
> CF-metadata mailing list
> CF-metadata at cgd.ucar.edu
> http://mailman.cgd.ucar.edu/mailman/listinfo/cf-metadata
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <
http://mailman.cgd.ucar.edu/pipermail/cf-metadata/attachments/20150423/384e61ce/attachment-0001.html>
Received on Thu Apr 23 2015 - 13:27:57 BST