Problem with make_bry in climatological run

Hi all,
I am setting up a climatological simulation with lateral boundary. I made used of make_bry after setting the grid and atmospheric forcing (make_forcing). However, I ran into a problem related in computing geostrophic current:

  Compute potential temperature from in-situ...

  Compute geostrophic currents
Warning zref not found. Taking :-20
time index: 1 of total: 12
Add the Ekman transport
Error using +
Matrix dimensions must agree.

Error in geost_currents_bry (line 233)
       u_r(1:k_ekman,:)=u_r(1:k_ekman,:)+squeeze(tridim(rmask.*...

Error in make_bry (line 198)
            geost_currents_bry(bryname,grdname,Zbryname,frcname,zref,obcndx)

Has anyone faced this problem? Any help with be appreciated.