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

Rename `num_of_days_to_avg` to `n_days_avg`

Rename variable `num_of_days_to_avg` to `n_days_avg`.
parent 903b2b83
No related branches found
No related tags found
No related merge requests found
......@@ -125,7 +125,7 @@ handlers = [util_eddies.open_shpc(shpc_dir) for shpc_dir in args.SHPC_dir]
array_d_init = [handler["d_init"] for handler in handlers]
# (create the list once and for all)
num_of_days_to_avg = 7 # number of days to average
n_days_avg = 7 # number of days to average
print("Iterating on vertices...")
for n in g.vertices():
......@@ -153,19 +153,19 @@ for n in g.vertices():
g.vp.pos_last[n] = handlers[i_SHPC]["readers"]["extremum"]\
.shape(ishape).points[0] # [in degrees]
if (num_of_days > num_of_days_to_avg):
if (num_of_days > n_days_avg):
# The segment is longer than the number of days over which
# to average
# First 7 days calculation
g.vp.first_av_rad[n], g.vp.first_av_ros[n] \
= calculate_radii_rossby(segment[:num_of_days_to_avg],
e_overestim, handlers, array_d_init)
= calculate_radii_rossby(segment[:n_days_avg], e_overestim,
handlers, array_d_init)
# Last 7 days calculation:
g.vp.last_av_rad[n], g.vp.last_av_ros[n] \
= calculate_radii_rossby(segment[- num_of_days_to_avg:],
e_overestim, handlers, array_d_init)
= calculate_radii_rossby(segment[- n_days_avg:], e_overestim,
handlers, array_d_init)
else:
# The number of eddies in a segment is lower than the number
# of days over which to average. The values will be the same
......
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