Last active
December 8, 2020 22:06
-
-
Save raphaeldussin/92234b0811b893da5e1ba24c9f7cb09f to your computer and use it in GitHub Desktop.
opening a ROMS zarr store
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
import xarray as xr | |
from xgcm import Grid | |
CCS2 = xr.open_zarr(CCS2_store, consolidated=True) | |
# Create xgcm grid object | |
grid_ccs2 = Grid(CCS2, coords={'X': {'center': 'xh', 'outer': 'xq'}, | |
'Y': {'center': 'yh', 'outer': 'yq'}, | |
'Z': {'center': 's_rho', 'outer': 's_w'}}, | |
periodic=False) | |
# Add depths of layers and interfaces to dataset | |
CCS2 = compute_depth_layers(CCS2, grid_ccs2) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment