Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Negative volume with fixed-geometry-spinup #1513

Open
pat-schmitt opened this issue Dec 14, 2022 · 1 comment
Open

Negative volume with fixed-geometry-spinup #1513

pat-schmitt opened this issue Dec 14, 2022 · 1 comment
Labels
wontfix Problem acknowledged - probably won't fix this

Comments

@pat-schmitt
Copy link
Member

When using the fixed-geometry-spinup the volume in the past can become negative. Probably, this is only a problem for small glaciers but can be easily overseen when aggregating the results of multiple glaciers.

I would suggest clipping the value of the volume to zero after the calculation here https://github.com/OGGM/oggm/blob/master/oggm/core/flowline.py#L1266. Not sure if this leads to unwanted site-effects with run_with_hydro, but I don't think so.

fixed_geometry_spinup_negative_volume

I created the figure with:

from oggm import cfg, workflow, tasks
import xarray as xr
import matplotlib.pyplot as plt

cfg.initialize(logging_level='WARNING')
cfg.PATHS['working_dir'] = utils.gettempdir(dirname='Test_fixed_geometry_spinup', reset=True)

gdir = workflow.init_glacier_directories(
            ['RGI60-11.00033'],
            from_prepro_level=3, prepro_border=160,
            prepro_base_url='https://cluster.klima.uni-bremen.de/~oggm/gdirs/oggm_v1.6/L3-L5_files/centerlines/w5e5/qc0/pcpwin/match_geod_pergla/')[0]


tasks.run_from_climate_data(gdir, fixed_geometry_spinup_yr=1980,
                            output_filesuffix='_fixed_geometry_spinup')

fp = gdir.get_filepath('model_diagnostics',
                       filesuffix='_fixed_geometry_spinup')
with xr.open_dataset(fp) as ds:
    ds = ds.load()

ds.volume_m3.plot(figsize=(10, 5))
fig = plt.gcf()
fig.set_facecolor('white')
plt.savefig('fixed_geometry_spinup_negative_volume.png')
@fmaussion
Copy link
Member

Thanks for the report!

Unfortunately I think that for mass-conservation it is necessary to keep it like that (especially for hydro, yes).

This is unfortunate, but I don't think there is a better solution. For non-hydro applications it's probably best to not have negative volumes, maybe people should be informed to clip the data beforehand

@fmaussion fmaussion added the wontfix Problem acknowledged - probably won't fix this label Jan 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
wontfix Problem acknowledged - probably won't fix this
Projects
None yet
Development

No branches or pull requests

2 participants