correct time for GOFS3.1 hindcast from tds data server?

25 views
Skip to first unread message

Beaird, Nicholas - 0337 - MITLL

unread,
Mar 11, 2022, 11:58:43 AM3/11/22
to fo...@hycom.org

Hello,

 

I have a question about the timestamp on the GOFS 3.1 GLBy0.08/expt_93.0 hindcast tz3z netcdf files. The data url for the unaggregated file, for example, Feb 06 2020 06:00 (I think) is: 'https://tds.hycom.org/thredds/dodsC/datasets/GLBy0.08/expt_93.0/data/hindcasts/2020/hycom_glby_930_2020020612_t006_ts3z.nc'

 

My assumption is this is the model output for that time. However when I try to reference the time from the netcdf using the ‘time’ coordinate (long name: Valid Time, units: hours since 2000-01-01 00:00:00) I find that the ‘time’ coordinate is 12 hours ahead of what I expect from the data url. I’ve put a reproducible minimal example of the code I use below. Am I misunderstanding something about the url format? The ‘12_t’ part is mysterious to me and suspiciously like the 12 hours off set I’m finding.

 

Any help with this would be much appreciated! I’m sure I’m missing something simple about timezones or model run time vs model time, but I can’t figure it out!

 

import xarray as xr

import pandas as pd

 

# pick a time

dt = pd.to_datetime('02/06/2020 06:00:00')

 

# construct url for hycom thredds server:

hycom_org = 'https://tds.hycom.org/thredds/dodsC/datasets/GLBy0.08/expt_93.0/data/hindcasts/'

y = f'{dt.year}'

m = f'{dt.month:02d}'

d = f'{dt.day:02d}'

h = f'{dt.hour:03d}'

hycomTDS = hycom_org + y + '/hycom_glby_930_' + y + m + d + '12_t'+ h +'_ts3z.nc'

 

# load GOFS hindcast:

ds = xr.open_dataset(hycomTDS, decode_times= False, decode_coords="all")

 

#  get the time in datetime format

units, reference_date = ds.time.attrs['units'].split('since') # 'units since reference time'

ds['time_refd'] = pd.to_datetime(reference_date) + pd.Timedelta( ds.time.data[0] ,units[0])

 

print('url time:', dt)

print('netcdf time:', ds['time_refd'].data)

 

>> 

url time: 2020-02-06 06:00:00

netcdf time: 2020-02-06T18:00:00.000000000

 

----------------------------------------------------------------

Nicholas Beaird, PhD

Technical Staff

Advanced Undersea Systems and Technology

MIT Lincoln Laboratory

 

Cell: 401-573-9456

 

Alan Wallcraft

unread,
Mar 11, 2022, 12:44:17 PM3/11/22
to HYCOM.org Forum, Beaird, Nicholas - 0337 - MITLL
_t006 means tau=6 hrs or 6 hours since the analysis.  The analysis time is noon (12Z) every day, so t006 is 18Z as the netCDF indicates.

Alan.
Reply all
Reply to author
Forward
0 new messages