ntim = 5 nlat = 10 nlon = 20 x = random_uniform(-100,100,(/ntim,nlat,nlon/)) x!0 = "time" x!1 = "lat" x!2 = "lon" y = random_uniform(0,1000,(/ntim,nlat,nlon/)) y!0 = "time" y!1 = "lat" y!2 = "lon" ;--Note what happens in "test.nc" when you don't name the dimensions z = random_uniform(0,1000,(/ntim,nlat,nlon/)) fout_name = "test.nc" system("rm " + fout_name) fout = addfile(fout_name,"c") fout->x = x fout->y = y fout->z = z