Skip to content
Snippets Groups Projects
Commit 04362855 authored by tomrink's avatar tomrink
Browse files

minor

parent e8a8148f
No related branches found
No related tags found
No related merge requests found
import datetime
from datetime import timezone
from dateutil import tz
import re
from pathlib import Path
import h5py
......@@ -160,6 +161,9 @@ def pirep_icing(filename, lon_range=[-180, 180], lat_range=[-63, 63]):
def pirep_icing_from_boeing(dirname='/ships19/cloud/scratch/ICING/BOEING/icing/2020/', lon_range=[-180, 180], lat_range=[-63, 63]):
# This data is relative to US Pacific time
pac_tz = tz.gettz('America/Los_Angeles')
flist = []
for path in Path(dirname).rglob('*.nc'):
flist.append(path)
......@@ -191,7 +195,7 @@ def pirep_icing_from_boeing(dirname='/ships19/cloud/scratch/ICING/BOEING/icing/2
nrpts = ice_bool.shape[0]
if nrpts > 0:
for k in range(nrpts):
dto = datetime.datetime(year=years[k], month=mons[k], day=days[k], hour=hours[k], minute=mins[k], second=secs[k])
dto = datetime.datetime(year=years[k], month=mons[k], day=days[k], hour=hours[k], minute=mins[k], second=secs[k], tzinfo=pac_tz)
dto = dto.replace(tzinfo=timezone.utc)
ts = dto.timestamp()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment