Skip to content
Snippets Groups Projects
Commit 7f3fcca3 authored by Lionel GUEZ's avatar Lionel GUEZ
Browse files

Define function `get_ishape`

parent 5b2851a5
No related branches found
No related tags found
No related merge requests found
......@@ -7,3 +7,13 @@ def days_1950(date_num):
"""
date = datetime.date.fromordinal(date_num - 366) - datetime.date(1950, 1, 1)
return date.days
def get_ishape(d_init, ishape_last, days_1950, eddy_index):
k = days_1950 - d_init
if k == 0:
ishape = eddy_index - 1
else:
ishape = ishape_last[k - 1] + eddy_index
return ishape
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