Created
September 4, 2015 02:33
-
-
Save angus-g/12a57caf8623e8e9f27b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from netCDF4 import Dataset | |
import numpy as np | |
NK = 40 | |
depth = 4000 | |
with Dataset('vgrid.nc', 'w') as d: | |
d.createDimension('level', NK) | |
zt = d.createVariable('zt', 'f8', ('level',)) | |
zt.units = b'm' | |
zt[:] = np.linspace(0, -depth, NK) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment