Skip to content

Commit

Permalink
Add Jan's calving to sandbox (#1615)
Browse files Browse the repository at this point in the history
* Add Jan's calving to sandbox

Co-authored-by: Jan Malles <[email protected]>

* More calving

* Add Jan's calving to sandbox

Co-authored-by: Jan Malles <[email protected]>

* Refactor a bit

* And a few more

* finalize

* typo

---------

Co-authored-by: Jan Malles <[email protected]>
  • Loading branch information
fmaussion and jmalles authored Apr 18, 2024
1 parent cd4f53c commit 5110d0e
Show file tree
Hide file tree
Showing 8 changed files with 1,747 additions and 7 deletions.
6 changes: 3 additions & 3 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ Get in touch
.. _on GitHub: https://github.com/OGGM/oggm
.. _issue tracker: https://github.com/OGGM/oggm/issues
.. _pull request: https://github.com/OGGM/oggm/pulls
.. _Twitter: https://twitter.com/OGGM1
.. _Twitter: https://twitter.com/OGGM_org


About
Expand All @@ -46,7 +46,7 @@ About
.. image:: https://img.shields.io/pypi/v/oggm.svg
:target: https://pypi.python.org/pypi/oggm
:alt: Pypi version

.. image:: https://img.shields.io/pypi/pyversions/oggm.svg
:target: https://pypi.python.org/pypi/oggm
:alt: Supported python versions
Expand All @@ -60,7 +60,7 @@ About
:target: https://zenodo.org/badge/latestdoi/43965645
:alt: Zenodo

:Tests:
:Tests:
.. image:: https://coveralls.io/repos/github/OGGM/oggm/badge.svg?branch=master
:target: https://coveralls.io/github/OGGM/oggm?branch=master
:alt: Code coverage
Expand Down
2 changes: 1 addition & 1 deletion docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ Get in touch
.. _on GitHub: https://github.com/OGGM/oggm
.. _issue tracker: https://github.com/OGGM/oggm/issues
.. _pull request: https://github.com/OGGM/oggm/pulls
.. _Twitter: https://twitter.com/OGGM1
.. _Twitter: https://twitter.com/OGGM_org
.. _meeting: https://oggm.org/meetings/
.. _reach out: [email protected]

Expand Down
13 changes: 11 additions & 2 deletions docs/whats-new.rst
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,15 @@ Enhancements
distributed thickness data from a dynamic model run.
By `Alex Fischer <https://github.com/afisc>`_ and
`Patrick Schmitt <https://github.com/pat-schmitt>`_
- Added a new calving module to the sandbox. The module is based on
Malles et al., 2023, but is currently still in development and
cannot be used operational yet. In general, calving is not
operational in the v1.6 series, it can only be used on a glacier
by glacier basis and is not yet fully integrated in the workflow
(:pull:`1615`).
Based on :pull:`1403` and :pull:`1532` (unmerged).
By `Jan Malles <https://github.com/jmalles>`_ and
`Fabien Maussion <https://github.com/fmaussion>`_

Bug fixes
~~~~~~~~~
Expand Down Expand Up @@ -564,7 +573,7 @@ Enhancements
By `Fabien Maussion <https://github.com/fmaussion>`_
- Added support for writing a NetCDF variable in ``gridded_data.nc`` file to
a georeferenced GeoTiff file (:pull:`1118`). The new task are
:py:func:`tasks.gridded_data_var_to_geotiff`.
:py:func:`tasks.gridded_data_var_to_geotiff`.
By `Li Fei <https://github.com/Keeptg>`_
- Added a `find_inversion_calving_from_any_mb` task which uses the Recinos et
al. approach, but on any mass balance profile (:pull:`1043`).
Expand All @@ -578,7 +587,7 @@ Bug fixes
(:pull:`957`, :pull:`967`, :pull:`968`, :pull:`958`, :pull:`974`, :pull:`977`,
:pull:`976`, :pull:`1124`).
By `Fabien Maussion <https://github.com/fmaussion>`_,
`Matthias Dusch <https://github.com/matthiasdusch>`_ and
`Matthias Dusch <https://github.com/matthiasdusch>`_ and
`Li Fei <https://github.com/Keeptg>`_.


Expand Down
8 changes: 8 additions & 0 deletions oggm/core/flowline.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,14 @@ def __init__(self, line=None, dx=1, map_dx=None,
def has_ice(self):
return np.any(self.thick > 0)

@utils.lazy_property
def water_depth(self):
return utils.clip_min(self.water_level - self.bed_h, 0)

@utils.lazy_property
def bed_below_wl(self):
return self.bed_h < self.water_level

@Centerline.widths.getter
def widths(self):
"""Compute the widths out of H and shape"""
Expand Down
Loading

0 comments on commit 5110d0e

Please sign in to comment.