Simulate correlated random fields based on given power spectra on a flat sky