Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions PyFVCOM/utilities/time.py
Original file line number Diff line number Diff line change
Expand Up @@ -170,8 +170,10 @@ def date_range(start_date, end_date, inc=1):

"""

start_seconds = int(start_date.replace(tzinfo=pytz.UTC).strftime('%s'))
end_seconds = int(end_date.replace(tzinfo=pytz.UTC).strftime('%s'))
# start_seconds = int(start_date.replace(tzinfo=pytz.UTC).strftime('%s'))
start_seconds = int(start_date.replace(tzinfo=pytz.UTC).timestamp())
# end_seconds = int(end_date.replace(tzinfo=pytz.UTC).strftime('%s'))
end_seconds = int(end_date.replace(tzinfo=pytz.UTC).timestamp())

inc *= 86400 # seconds
dates = np.arange(start_seconds, end_seconds, inc)
Expand Down
2 changes: 1 addition & 1 deletion examples/pyfvcom_preprocessing_example.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@
"outputs": [],
"source": [
"# Make a vertical grid with 21 uniform levels\n",
"model.sigma.type = 'uniform'\n",
"model.sigma.type = 'UNIFORM'\n",
"model.dims.levels = 21"
]
},
Expand Down
2 changes: 1 addition & 1 deletion examples/pyfvcom_preprocessing_example.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
# In[6]:

# Make a vertical grid with 21 uniform levels
model.sigma.type = 'uniform'
model.sigma.type = 'UNIFORM'
model.dims.levels = 21


Expand Down