function ice = calc_strain_rates( grid, ice)  
% Calculate the strain rates

% Calculate horizontal stretch/shear strain rates du/dx, du/dy, dv/dx,
% and dv/dy on the ak-grid
ice.du_dx_ak  = grid.M_ddx_bk_ak  * ice.u_bk;
ice.du_dy_ak  = grid.M_ddy_bk_ak  * ice.u_bk;
ice.dv_dx_ak  = grid.M_ddx_bk_ak  * ice.v_bk;
ice.dv_dy_ak  = grid.M_ddy_bk_ak  * ice.v_bk;

% Calculate vertical shear strain rates du/dz and dv/dz on the bks-grid
ice.du_dz_bks = grid.M_ddz_bk_bks * ice.u_bk;
ice.dv_dz_bks = grid.M_ddz_bk_bks * ice.v_bk;

% Map horizontal stretch/shear strain rates du/dx, du/dy, dv/dx,
% and dv/dy from the ak-grid to the bks-grid
ice.du_dx_bks = grid.M_map_ak_bks * ice.du_dx_ak;
ice.du_dy_bks = grid.M_map_ak_bks * ice.du_dy_ak;
ice.dv_dx_bks = grid.M_map_ak_bks * ice.dv_dx_ak;
ice.dv_dy_bks = grid.M_map_ak_bks * ice.dv_dy_ak;

% Map vertical shear strain rates du/dz and dv/dz from the bks-grid
% to the ak-grid
ice.du_dz_ak  = grid.M_map_bks_ak * ice.du_dz_bks;
ice.dv_dz_ak  = grid.M_map_bks_ak * ice.dv_dz_bks;

end