sigh,,you should use your own random number generator,, otherwise, your code is not portable coz it depends on compiler.. Here are two codes copied from ROMS model: SUBROUTINE nrng (ix, a, n, ierr) ! !======================================================================= ! ! ! Gaussian random-number generator from the NSWC Library. It calls ! ! the NSWC uniform random-number generator, URNG. ! !