This paper proposes a data-localization compilation scheme for Fortran macro-dataflow processing on a multiprocessor system with local memory and centralized shared memory. The data-localization scheme minimizes data transfer overhead for passing shared data among coarse-grain tasks composed of Doall loops and sequential loops by using local memory on each processor effectively. In this scheme, a compiler firstly partitions coarse-grain tasks like loops having data dependences among them and their data into multiple groups by a loop aligned decomposition so that data transfer among groups can be minimum. Secondly it generates dynamic scheduling routine which assigns decomposed tasks in a group to the same processor at run-time. Thirdly it generates parallel machine code to pass shared data inside the group through local memory. This compiler has been implemented for an multiprocessor system OSCAR having centralized shared memory and distributed shared memory in addition to local memory on each processor. Performance evaluation on OSCAR shows that macro-dataflow processing with the proposed data-localization scheme can reduce the execution time by 10% to 20% in average compared with macro-dataflow processing without data-localization.