OGGM / oggm

Open Global Glacier Model
http://oggm.org
BSD 3-Clause "New" or "Revised" License
221 stars 106 forks source link

fixed_dx #786

Open bpelto opened 5 years ago

bpelto commented 5 years ago

I like using a fixed_dx for inversion for comparability between glaciers, however I am having trouble getting the model to respect this during my custom MB model calibration.

When I use: gdirs = workflow.init_glacier_regions(rgidf, reset=True, force=True, from_prepro_level=3)

It seems from_prepro_level nullifies my 'fixed_dx', even though when I print: cfg.PARAMS['grid_dx_method'] it returns 'fixed'

However my gdirs each have a different dx.

If I remove from_prepro_level, I get a message: " please download and process some climate data" When calling: utils.get_ref_mb_glaciers(gdirs)

bpelto commented 5 years ago

Ah, I removed from_prepro_level and added in:

task_list = [ tasks.glacier_masks, tasks.compute_centerlines, tasks.initialize_flowlines, tasks.compute_downstream_line, tasks.compute_downstream_bedshape, tasks.catchment_area, tasks.catchment_intersections, tasks.catchment_width_geom, tasks.catchment_width_correction, tasks.process_cru_data ]
for task in task_list: execute_entity_task(task, gdirs)

This appears to have solved my issue

fmaussion commented 5 years ago

Ah, I removed from_prepro_level

Yes, this is it. To understand what's going on: from_prepro_level will download already prepared, pre-processed glacier directories. This is the recommended way to run OGGM as it ensures that we all work with the same data, but it has downsides: certain parameters like grid spacing (or which DEM to use) are decided very early in the model chain and are therefore fixed in the pre-processed directories.

What you are doing now is that you are relying on the raw data sources, i.e. the original DEMS and are doing your own cuisine.