Init2shocks does not work

Dear all,
I tried to use the init2shocks command, but it does not work and I was wondering if you could help me with this. Specifically, I get the following error message:

Reference to non-existent field 'initval_decomposition'.
Error in plot_shock_decomposition (line 259)
            z(:,jj,:)= z(:,jj,:) + oo_.initval_decomposition (:,j,1:size(z,3));
Error in Exe_DT7_piobjur_gelntw_dm_OIS12c.driver (line 3543)
oo_ = plot_shock_decomposition(M_, oo_, options_, var_list_);
Error in dynare (line 281)
    evalin('base',[fname '.driver']); 

I attach the .mod files and the datafile. The architecture is a bit messy, you need to execute Exe_DT7_piobjur_gelntw_dm_OIS12c.mod in order to reproduce the problem. The commands related to the the historical decomposition are all in decompfw4.mod
Here is some additional information:
-plot_shock_decomposition works fine if I don’t use init2shocks
-I am using Dynare 5.5.

Bes wishes and many thanks,
Ansgar
init2shocks_question.zip (1.9 MB)

It is a really nice feature by the way, I have often thought that it would be great to have something like this.

This is something @rattoma needs to have a look at. This is almost surely a bug. I opened a ticket at Investigate crash in plot_shock_decomposition related to Init2Shocks (#1913) · Issues · Dynare / dynare · GitLab

@jpfeifer @Romero
Dear Ansgar thanks for pointing this out. In fact, init2shocks requires to run initial_condition_decomposition before hand, in order to construct oo_.initval_decomposition

this is not well documented.

I attach a fix to your file that does the job.

all the best
Marco
decompfw4.mod (1.8 KB)