Skip to content

Commit

Permalink
lint code
Browse files Browse the repository at this point in the history
  • Loading branch information
nlensse1 committed Apr 30, 2024
1 parent 2fb501b commit be0ea62
Showing 1 changed file with 11 additions and 10 deletions.
21 changes: 11 additions & 10 deletions podaac/subsetter/gpm_cleanup.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,11 @@
"""

import datetime
from netCDF4 import date2num # pylint: disable=no-name-in-module
from netCDF4 import date2num # pylint: disable=no-name-in-module

dim_dict = {}


def compute_new_time_data(time_group, nc_dataset):
"""
create a time variable, timeMidScan, that is present in other
Expand All @@ -16,15 +17,15 @@ def compute_new_time_data(time_group, nc_dataset):
# set the time unit for GPM
time_unit_out = "seconds since 1980-01-06 00:00:00"
# conver to a float, seconds variable
new_time_list = [date2num(datetime.datetime(nc_dataset[time_group+'__Year'][:][i],
nc_dataset[time_group+'__Month'][:][i],
nc_dataset[time_group+'__DayOfMonth'][:][i],
hour=nc_dataset[time_group+'__Hour'][:][i],
minute=nc_dataset[time_group+'__Minute'][:][i],
second=nc_dataset[time_group+'__Second'][:][i],
microsecond=nc_dataset[time_group+'__Second'][:][i]*1000),
time_unit_out)
for i in range(len(nc_dataset[time_group+'__Year'][:]))]
new_time_list = [date2num(datetime.datetime(
nc_dataset[time_group+'__Year'][:][i],
nc_dataset[time_group+'__Month'][:][i],
nc_dataset[time_group+'__DayOfMonth'][:][i],
hour=nc_dataset[time_group+'__Hour'][:][i],
minute=nc_dataset[time_group+'__Minute'][:][i],
second=nc_dataset[time_group+'__Second'][:][i],
microsecond=nc_dataset[time_group+'__Second'][:][i]*1000),
time_unit_out) for i in range(len(nc_dataset[time_group+'__Year'][:]))]

return new_time_list, time_unit_out

Expand Down

0 comments on commit be0ea62

Please sign in to comment.