Commit f4ce0772 authored by Jan Klaus Rieck's avatar Jan Klaus Rieck

better conditions for defining over with depth dimension to average/sum

parent 8a024168
Pipeline #3647 passed with stage
in 1 minute and 47 seconds
......@@ -487,13 +487,7 @@ def depthave(ds, std_count=False):
+ ' vertical average!')
for gr in grids:
grid = grids[gr]
if ('z_c' in ds.dims) and ('z_l' in ds.dims):
argu = {'dim': ('z_c', 'z_l'), 'skipna': True, 'keep_attrs': True}
arg_count = {'dim': ('z_c', 'z_l'), 'keep_attrs': True}
elif ('z_c' in ds.dims) and ('z_l' not in ds.dims):
argu = {'dim': grid['z'], 'skipna': True, 'keep_attrs': True}
arg_count = {'dim': grid['z'], 'keep_attrs': True}
elif ('z_l' in ds.dims) and ('z_c' not in ds.dims):
if ('z_c' in ds.dims) or ('z_l' in ds.dims):
argu = {'dim': grid['z'], 'skipna': True, 'keep_attrs': True}
arg_count = {'dim': grid['z'], 'keep_attrs': True}
else:
......@@ -946,13 +940,7 @@ def depthsum(ds, std_count=False):
+ ' vertical average!')
for gr in grids:
grid = grids[gr]
if ('z_c' in ds.dims) and ('z_l' in ds.dims):
argu = {'dim': ('z_c', 'z_l'), 'skipna': True, 'keep_attrs': True}
arg_count = {'dim': ('z_c', 'z_l'), 'keep_attrs': True}
elif ('z_c' in ds.dims) and ('z_l' not in ds.dims):
argu = {'dim': grid['z'], 'skipna': True, 'keep_attrs': True}
arg_count = {'dim': grid['z'], 'keep_attrs': True}
elif ('z_l' in ds.dims) and ('z_c' not in ds.dims):
if ('z_c' in ds.dims) or ('z_l' in ds.dims):
argu = {'dim': grid['z'], 'skipna': True, 'keep_attrs': True}
arg_count = {'dim': grid['z'], 'keep_attrs': True}
else:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment