& shelf_edge_pos,
_RL shelf_edge_pos
CALL WRITE_0D_RL( shelf_edge_pos, INDEX_NONE,
slope_pos = shelf_edge_pos - shelf_flat_width
IF (xC(i-1,j,bi,bj).GE.shelf_edge_pos) THEN
IF (xC(i,j,bi,bj).GT.shelf_edge_pos) THEN
& (shelf_edge_pos-xG(i,j,bi,bj)) /