Skip to content

Commit

Permalink
Extrapolate to grid (#1576)
Browse files Browse the repository at this point in the history
* adds changes to distribute_thickness_per_altitude so it can be used with different topo data

* adds notebook to discuss changes
  • Loading branch information
anoukvlug committed May 15, 2023
1 parent d175002 commit 48f63cb
Show file tree
Hide file tree
Showing 2 changed files with 58,953 additions and 2 deletions.
4 changes: 2 additions & 2 deletions oggm/core/inversion.py
Original file line number Diff line number Diff line change
Expand Up @@ -723,7 +723,7 @@ def compute_inversion_velocities(gdir, glen_a=None, fs=None, filesuffix='',


@entity_task(log, writes=['gridded_data'])
def distribute_thickness_per_altitude(gdir, add_slope=True,
def distribute_thickness_per_altitude(gdir, add_slope=True, topo='topo_smoothed',
smooth_radius=None,
dis_from_border_exp=0.25,
varname_suffix=''):
Expand Down Expand Up @@ -757,7 +757,7 @@ def distribute_thickness_per_altitude(gdir, add_slope=True,
gridded_attributes(gdir)

with utils.ncDataset(grids_file) as nc:
topo_smoothed = nc.variables['topo_smoothed'][:]
topo_smoothed = nc.variables[topo][:]
glacier_mask = nc.variables['glacier_mask'][:]
dis_from_border = nc.variables['dis_from_border'][:]
if add_slope:
Expand Down
Loading

0 comments on commit 48f63cb

Please sign in to comment.