Created
December 3, 2020 02:33
-
-
Save raphaeldussin/9d72b4f6e4da6113d9c443ffbea680ba to your computer and use it in GitHub Desktop.
function for roms2zarr tutorial
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
def add_coords(ds): | |
""" set coordinate variables as xarray coordinates | |
Parameters: | |
ds (xarray.Dataset): ROMS dataset | |
""" | |
ds = ds.set_coords(['Cs_r', 'Cs_w', 'hc', 'h', 'Vtransform', 'time', | |
'lon_rho', 'lon_v', 'lon_u', 'lon_psi', | |
'lat_rho', 'lat_v', 'lat_u', 'lat_psi']) | |
return ds |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment