So First I thought its possible that the change from hydro to calendar in the flowline.pyv1.6 is messing this test, but if @lilianschuster is re-sampling the daily output to monthly, in order to compare it with the default OGGM monthly output you should change the variable name to calendar_month_2d instead of daily?
I then did a varname to varname comparison outside of the for loop, to bypass the 'hydro_month_2d', 'calendar_month_2d' & 'calendar_day_2d' names issue.
assert_allclose(odf_mean_monthly_d_mb['snow_bucket'][2:], odf_ma['snow_bucket'][2:], rtol=1e-5) ❌ This one and residual_mb are very different! But I guess you don't expect them to be the same..
I think the solution to this is quite simple but for me to identify where exactly the hydro to calendar changes will go in the sandbox is a bit tricky... But if you tell me more or less if I am in the right direction I'm sure we can figure it out 😃
Two pytests fail due to the same problem: different mass balance keys for time between old and new oggm version.
pytests fails
In test_hydro.py
These two dataframes end up with different column names (the one produced with the sandbox code has only calendar .. the other one hydro):
So First I thought its possible that the change from hydro to calendar in the
flowline.py
v1.6 is messing this test, but if @lilianschuster is re-sampling the daily output to monthly, in order to compare it with the default OGGM monthly output you should change the variable name tocalendar_month_2d
instead of daily?I then did a
varname to varname
comparison outside of the for loop, to bypass the 'hydro_month_2d', 'calendar_month_2d' & 'calendar_day_2d' names issue.assert_allclose(odf_mean_monthly_d_mb['melt_off_glacier'][2:], odf_ma['melt_off_glacier'][2:], rtol=1.0) #(only passes with tol = 1.0)
✔️assert_allclose(odf_mean_monthly_d_mb['melt_on_glacier'][2:], odf_ma['melt_on_glacier'][2:], rtol=1e-5)
✔️assert_allclose(odf_mean_monthly_d_mb['liq_prcp_off_glacier'][2:], odf_ma['liq_prcp_off_glacier'][2:], rtol=1e-5)
✔️assert_allclose(odf_mean_monthly_d_mb['snowfall_off_glacier'][2:], odf_ma['snowfall_off_glacier'][2:], rtol=1e-5)
✔️assert_allclose(odf_mean_monthly_d_mb['snowfall_on_glacier'][2:], odf_ma['snowfall_on_glacier'][2:], rtol=1e-5)
✔️assert_allclose(odf_mean_monthly_d_mb['snow_bucket'][2:], odf_ma['snow_bucket'][2:], rtol=1e-5)
❌ This one and residual_mb are very different! But I guess you don't expect them to be the same..I think the solution to this is quite simple but for me to identify where exactly the hydro to calendar changes will go in the sandbox is a bit tricky... But if you tell me more or less if I am in the right direction I'm sure we can figure it out 😃