Skip to content

Model snowlines and melt extents #129

@btobers

Description

@btobers

Functionality to output snowlines and melt extents. There is already some functionality for this in massbalance.PyGEMMassBalance:

            # Snow line altitude (m a.s.l.)
            heights_monthly = heights[:, np.newaxis].repeat(12, axis=1)
            snow_mask = np.zeros(heights_monthly.shape)
            snow_mask[
                self.glac_bin_snowpack[:, year_start_month_idx:year_stop_month_idx] > 0
            ] = 1
            heights_monthly_wsnow = heights_monthly * snow_mask
            heights_monthly_wsnow[heights_monthly_wsnow == 0] = np.nan
            heights_change = np.zeros(heights.shape)
            heights_change[0:-1] = heights[0:-1] - heights[1:]
            try:
                snowline_idx = np.nanargmin(heights_monthly_wsnow, axis=0)
                self.glac_wide_snowline[year_start_month_idx:year_stop_month_idx] = (
                    heights[snowline_idx] - heights_change[snowline_idx] / 2
                )

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions