Created
December 3, 2020 02:26
-
-
Save raphaeldussin/e82ff7fde9ced1b784a88e140f23b519 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 rename_dims(ds): | |
""" rename dimensions | |
Parameters: | |
ds (xarray.Dataset): ROMS dataset | |
""" | |
ds = ds.rename({'xi_rho': 'xh', 'xi_v': 'xh', 'xi_u': 'xq', 'xi_psi': 'xq', | |
'eta_rho': 'yh', 'eta_v': 'yq', 'eta_u': 'yh', 'eta_psi': 'yq', | |
'ocean_time': 'time' | |
}) | |
return ds |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment