diff --git a/Convert_Matlab/convert_id.py b/Convert_Matlab/convert_id.py
index 44ddff72701100e3d81242715bdf09b21d6aa951..e6fccb2d0f0e9d214c35aa285695166df9e7703f 100644
--- a/Convert_Matlab/convert_id.py
+++ b/Convert_Matlab/convert_id.py
@@ -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