The $RCWAzdiv command is used to set grid points along z-axis in each layer. The example is given as below
$RCWAzdiv 20 20 20 20 20 ... total layer