pism / pism

Repository for the Parallel Ice Sheet Model (PISM)
https://pism.io/
GNU General Public License v3.0
102 stars 41 forks source link

Fix temperature in atmosphere pik model when combined with elevation_… #492

Closed talbrecht closed 3 years ago

talbrecht commented 3 years ago

The atmosphere.pik model contains already a lapse rate correction according to surface elevation change. When the elevation_change modifier is used for scaling precipitation, temperature is altered too, but needs to be reset afterwards.

I added a little regression test that makes sure that temperature is not corrected for lapse rate twice, when surface elevation is changed by 100m.

Checklist

ckhroulev commented 3 years ago

As far as I can tell, the issue addressed by this is that sometimes we need to combine an elevation-dependent parameterization of the surface temperature with the scaling of the precipitation (or SMB at the "surface model" level).

The current implementation of -atmosphere ...,elevation_change uses atmosphere.elevation_change.temperature_lapse_rate to adjust (shift) the temperature and to compute the change in temperature needed to scale precipitation.

What we need (and this would be a better fix) is the ability to set

Let's add a new parameter atmosphere.elevation_change.precipitation.temp_lapse_rate that will be used to scale precipitation.

Then the desired behavior can be achieved by setting

talbrecht commented 3 years ago

Yes, I agree, two different parameters would be clearer!

ckhroulev commented 3 years ago

See 0a8470eb49a25996cd3e5e43901bbe15df6d6ec8.