File map is used as reference file. Cells in the mask are marked as "mask out" if the corresponding cell in map contains a value in the range specified with maskvalues.
Before a new 3d-mask can be created the exisitng mask has to be removed with g.remove.