Skip to content

Commit 25ece4d

Browse files
authoredJul 6, 2018
Fix doc example (#499)
1 parent e06d37a commit 25ece4d

File tree

3 files changed

+6
-13
lines changed

3 files changed

+6
-13
lines changed
 

‎docs/_code/prepare_climate.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -76,13 +76,13 @@
7676

7777
# For the distributed thickness
7878
tasks.volume_inversion(gdir, glen_a=cfg.A*3, fs=0)
79-
tasks.distribute_thickness(gdir, how='per_interpolation')
79+
tasks.distribute_thickness_per_altitude(gdir)
8080

8181

8282
# plot functions
8383
def example_plot_temp_ts():
8484
d = xr.open_dataset(gdir.get_filepath('climate_monthly'))
85-
temp = d.temp.resample(freq='12MS', dim='time', how=np.mean).to_series()
85+
temp = d.temp.resample(time='12MS').mean('time').to_series()
8686
del temp.index.name
8787
ax = temp.plot(figsize=(8, 4), label='Annual temp')
8888
temp.rolling(31, center=True, min_periods=15).mean().plot(label='31-yr avg')

‎docs/api.rst

+3-1
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,9 @@ the majority of OGGM's tasks). They are parallelizable.
5454
tasks.mu_candidates
5555
tasks.prepare_for_inversion
5656
tasks.volume_inversion
57-
tasks.distribute_thickness
57+
tasks.filter_inversion_output
58+
tasks.distribute_thickness_per_altitude
59+
tasks.distribute_thickness_interp
5860
tasks.init_present_time_glacier
5961
tasks.run_random_climate
6062
tasks.run_constant_climate

‎oggm/core/centerlines.py

+1-10
Original file line numberDiff line numberDiff line change
@@ -58,16 +58,7 @@ class Centerline(object):
5858
"""
5959

6060
def __init__(self, line, dx=None, surface_h=None, orig_head=None):
61-
""" Instanciate.
62-
63-
Parameters
64-
----------
65-
line: Shapely LineString
66-
67-
Properties
68-
----------
69-
#TODO: document properties
70-
"""
61+
""" Instantiate."""
7162

7263
self.line = None # Shapely LineString
7364
self.head = None # Shapely Point

0 commit comments

Comments
 (0)