SELFE¶
# Install required libraries
# !pip install -q xarray_subset_grid@git+https://github.com/asascience-open/xarray-subset-grid.git
# !pip install -q s3fs cftime xarray cf-xarray fsspec dask h5netcdf
import cf_xarray # noqa
import datetime
import fsspec
import numpy as np
import xarray as xr
import xarray_subset_grid.accessor # noqa: F401
date = datetime.datetime.now().strftime("%Y%m%d")
# open dataset as zarr object using fsspec reference file system and xarray
fs = fsspec.filesystem(
"reference",
fo=f"s3://nextgen-dmac-cloud-ingest/nos/creofs/nos.creofs.fields.forecast.{date}.t03z.nc.zarr",
remote_protocol="s3",
remote_options={"anon": True},
target_protocol="s3",
target_options={"anon": True},
)
m = fs.get_mapper("")
ds = xr.open_dataset(
m,
engine="zarr",
backend_kwargs=dict(consolidated=False),
chunks={},
)
ds
<xarray.Dataset> Size: 4GB
Dimensions: (sigma: 37, time: 49, node: 74061, nface: 3, nele: 142684,
nv: 54, nz: 17)
Coordinates:
lat (node) float32 296kB dask.array<chunksize=(74061,), meta=np.ndarray>
lon (node) float32 296kB dask.array<chunksize=(74061,), meta=np.ndarray>
* sigma (sigma) float32 148B -1.0 -0.9722 -0.9444 ... -0.02778 0.0
* time (time) datetime64[ns] 392B 2024-07-25T03:00:00 ... 2024-07-2...
Dimensions without coordinates: node, nface, nele, nv, nz
Data variables: (12/18)
Cs (sigma) float32 148B dask.array<chunksize=(37,), meta=np.ndarray>
Pair (time, node) float32 15MB dask.array<chunksize=(1, 74061), meta=np.ndarray>
ele (nface, nele) int32 2MB dask.array<chunksize=(3, 142684), meta=np.ndarray>
h (node) float32 296kB dask.array<chunksize=(74061,), meta=np.ndarray>
offset (node) float32 296kB dask.array<chunksize=(74061,), meta=np.ndarray>
salinity (time, nv, node) float32 784MB dask.array<chunksize=(1, 54, 74061), meta=np.ndarray>
... ...
x (node) float32 296kB dask.array<chunksize=(74061,), meta=np.ndarray>
y (node) float32 296kB dask.array<chunksize=(74061,), meta=np.ndarray>
z (nz) float32 68B dask.array<chunksize=(17,), meta=np.ndarray>
zeta (time, node) float32 15MB dask.array<chunksize=(1, 74061), meta=np.ndarray>
zeta_adj (time, node) float32 15MB dask.array<chunksize=(1, 74061), meta=np.ndarray>
zval (time, nv, node) float32 784MB dask.array<chunksize=(1, 54, 74061), meta=np.ndarray>
Attributes:
Vertical_type: Hybrid SZ vertical coordinates, K=1 for bottom
grid_type: Unstructured model grid:
history: Created at Eastern Local Time 04:25 07/25/2024
model_developer: Oregon Health & Science University
model_link: http://www.ccalmr.ogi.edu/CORIE/modeling/selfe
reference: Created by CO-OPS/NOS/NOAA
source: SELFE-MPI Version 3.1dc
title: Columbia River & Estuarine Operational Forecast System
type: gridded/field NetCDF file - CF-1.0xarray.Dataset
- sigma: 37
- time: 49
- node: 74061
- nface: 3
- nele: 142684
- nv: 54
- nz: 17
- lat(node)float32dask.array<chunksize=(74061,), meta=np.ndarray>
- long_name :
- nodal latitude
- units :
- degrees_north
Array Chunk Bytes 289.30 kiB 289.30 kiB Shape (74061,) (74061,) Dask graph 1 chunks in 2 graph layers Data type float32 numpy.ndarray - lon(node)float32dask.array<chunksize=(74061,), meta=np.ndarray>
- long_name :
- nodal longitude
- units :
- degrees_east
Array Chunk Bytes 289.30 kiB 289.30 kiB Shape (74061,) (74061,) Dask graph 1 chunks in 2 graph layers Data type float32 numpy.ndarray - sigma(sigma)float32-1.0 -0.9722 ... -0.02778 0.0
- long_name :
- S coordinates at whole levels
- positive :
- up
- units :
- non-dimensional
array([-1. , -0.972222, -0.944444, -0.916667, -0.888889, -0.861111, -0.833333, -0.805555, -0.777778, -0.75 , -0.722222, -0.694444, -0.666667, -0.638889, -0.611111, -0.583333, -0.555555, -0.527778, -0.5 , -0.472222, -0.444444, -0.416666, -0.388889, -0.361111, -0.333333, -0.305555, -0.277777, -0.25 , -0.222222, -0.194444, -0.166666, -0.138889, -0.111111, -0.083333, -0.055555, -0.027777, 0. ], dtype=float32) - time(time)datetime64[ns]2024-07-25T03:00:00 ... 2024-07-...
- base_date :
- 2024-07-24 21:00:00 UTC
- long_name :
- Time
- standard_name :
- time
array(['2024-07-25T03:00:00.000000000', '2024-07-25T04:00:00.000000000', '2024-07-25T05:00:00.000000000', '2024-07-25T06:00:00.000000000', '2024-07-25T07:00:00.000000000', '2024-07-25T08:00:00.000000000', '2024-07-25T09:00:00.000000000', '2024-07-25T10:00:00.000000000', '2024-07-25T11:00:00.000000000', '2024-07-25T12:00:00.000000000', '2024-07-25T13:00:00.000000000', '2024-07-25T14:00:00.000000000', '2024-07-25T15:00:00.000000000', '2024-07-25T16:00:00.000000000', '2024-07-25T17:00:00.000000000', '2024-07-25T18:00:00.000000000', '2024-07-25T19:00:00.000000000', '2024-07-25T20:00:00.000000000', '2024-07-25T21:00:00.000000000', '2024-07-25T22:00:00.000000000', '2024-07-25T23:00:00.000000000', '2024-07-26T00:00:00.000000000', '2024-07-26T01:00:00.000000000', '2024-07-26T02:00:00.000000000', '2024-07-26T03:00:00.000000000', '2024-07-26T04:00:00.000000000', '2024-07-26T05:00:00.000000000', '2024-07-26T06:00:00.000000000', '2024-07-26T07:00:00.000000000', '2024-07-26T08:00:00.000000000', '2024-07-26T09:00:00.000000000', '2024-07-26T10:00:00.000000000', '2024-07-26T11:00:00.000000000', '2024-07-26T12:00:00.000000000', '2024-07-26T13:00:00.000000000', '2024-07-26T14:00:00.000000000', '2024-07-26T15:00:00.000000000', '2024-07-26T16:00:00.000000000', '2024-07-26T17:00:00.000000000', '2024-07-26T18:00:00.000000000', '2024-07-26T19:00:00.000000000', '2024-07-26T20:00:00.000000000', '2024-07-26T21:00:00.000000000', '2024-07-26T22:00:00.000000000', '2024-07-26T23:00:00.000000000', '2024-07-27T00:00:00.000000000', '2024-07-27T01:00:00.000000000', '2024-07-27T02:00:00.000000000', '2024-07-27T03:00:00.000000000'], dtype='datetime64[ns]')
- Cs(sigma)float32dask.array<chunksize=(37,), meta=np.ndarray>
- long_name :
- Function C(s) at whole levels
- positive :
- up
- units :
- non-dimensional
Array Chunk Bytes 148 B 148 B Shape (37,) (37,) Dask graph 1 chunks in 2 graph layers Data type float32 numpy.ndarray - Pair(time, node)float32dask.array<chunksize=(1, 74061), meta=np.ndarray>
- grid :
- Bathymetry_Mesh
- location :
- node
- long_name :
- Pressure reduced to MSL
- type :
- data
- units :
- Pa
Array Chunk Bytes 13.84 MiB 289.30 kiB Shape (49, 74061) (1, 74061) Dask graph 49 chunks in 2 graph layers Data type float32 numpy.ndarray - ele(nface, nele)int32dask.array<chunksize=(3, 142684), meta=np.ndarray>
- long_name :
- Horizontal Triangular Element Table
- units :
- non-dimensional
Array Chunk Bytes 1.63 MiB 1.63 MiB Shape (3, 142684) (3, 142684) Dask graph 1 chunks in 2 graph layers Data type int32 numpy.ndarray - h(node)float32dask.array<chunksize=(74061,), meta=np.ndarray>
- grid :
- Bathymetry_Mesh
- long_name :
- Bathymetry
- positive :
- down
- standard_name :
- sea_floor_depth_below_geoid
- type :
- data
- units :
- m
Array Chunk Bytes 289.30 kiB 289.30 kiB Shape (74061,) (74061,) Dask graph 1 chunks in 2 graph layers Data type float32 numpy.ndarray - offset(node)float32dask.array<chunksize=(74061,), meta=np.ndarray>
- long_name :
- water level offset
- positive :
- up
- standard_name :
- mean difference of model minus obs. over 7 days
- units :
- meters
Array Chunk Bytes 289.30 kiB 289.30 kiB Shape (74061,) (74061,) Dask graph 1 chunks in 2 graph layers Data type float32 numpy.ndarray - salinity(time, nv, node)float32dask.array<chunksize=(1, 54, 74061), meta=np.ndarray>
- grid :
- Bathymetry_Mesh
- location :
- node
- long_name :
- salinity
- standard_name :
- sea_water_salinity
- type :
- data
- units :
- psu
Array Chunk Bytes 747.55 MiB 15.26 MiB Shape (49, 54, 74061) (1, 54, 74061) Dask graph 49 chunks in 2 graph layers Data type float32 numpy.ndarray - sigma_z(nv)float32dask.array<chunksize=(54,), meta=np.ndarray>
- long_name :
- sigma(1-37 layers),Z(38-54 layers)
- positive :
- up
- units :
- sigma or meters
Array Chunk Bytes 216 B 216 B Shape (54,) (54,) Dask graph 1 chunks in 2 graph layers Data type float32 numpy.ndarray - temp(time, nv, node)float32dask.array<chunksize=(1, 54, 74061), meta=np.ndarray>
- grid :
- Bathymetry_Mesh
- location :
- node
- long_name :
- temperature
- standard_name :
- sea_water_temperature
- type :
- data
- units :
- degrees_C
Array Chunk Bytes 747.55 MiB 15.26 MiB Shape (49, 54, 74061) (1, 54, 74061) Dask graph 49 chunks in 2 graph layers Data type float32 numpy.ndarray - u(time, nv, node)float32dask.array<chunksize=(1, 54, 74061), meta=np.ndarray>
- grid :
- Bathymetry_Mesh
- location :
- node
- long_name :
- Eastward Water Velocity
- type :
- data
- units :
- meters s-1
Array Chunk Bytes 747.55 MiB 15.26 MiB Shape (49, 54, 74061) (1, 54, 74061) Dask graph 49 chunks in 2 graph layers Data type float32 numpy.ndarray - uwind_speed(time, node)float32dask.array<chunksize=(1, 74061), meta=np.ndarray>
- grid :
- Bathymetry_Mesh
- location :
- node
- long_name :
- Eastward Wind Velocity
- type :
- data
- units :
- meters s-1
Array Chunk Bytes 13.84 MiB 289.30 kiB Shape (49, 74061) (1, 74061) Dask graph 49 chunks in 2 graph layers Data type float32 numpy.ndarray - v(time, nv, node)float32dask.array<chunksize=(1, 54, 74061), meta=np.ndarray>
- grid :
- Bathymetry_Mesh
- location :
- node
- long_name :
- Northward Water Velocity
- type :
- data
- units :
- meters s-1
Array Chunk Bytes 747.55 MiB 15.26 MiB Shape (49, 54, 74061) (1, 54, 74061) Dask graph 49 chunks in 2 graph layers Data type float32 numpy.ndarray - vwind_speed(time, node)float32dask.array<chunksize=(1, 74061), meta=np.ndarray>
- grid :
- Bathymetry_Mesh
- location :
- node
- long_name :
- Northward Wind Velocity
- type :
- data
- units :
- meters s-1
Array Chunk Bytes 13.84 MiB 289.30 kiB Shape (49, 74061) (1, 74061) Dask graph 49 chunks in 2 graph layers Data type float32 numpy.ndarray - x(node)float32dask.array<chunksize=(74061,), meta=np.ndarray>
- long_name :
- nodal x-coordinate
- units :
- meters
Array Chunk Bytes 289.30 kiB 289.30 kiB Shape (74061,) (74061,) Dask graph 1 chunks in 2 graph layers Data type float32 numpy.ndarray - y(node)float32dask.array<chunksize=(74061,), meta=np.ndarray>
- long_name :
- nodal y-coordinate
- units :
- meters
Array Chunk Bytes 289.30 kiB 289.30 kiB Shape (74061,) (74061,) Dask graph 1 chunks in 2 graph layers Data type float32 numpy.ndarray - z(nz)float32dask.array<chunksize=(17,), meta=np.ndarray>
- long_name :
- Z coordinates at whole levels
- positive :
- up
- units :
- meters
Array Chunk Bytes 68 B 68 B Shape (17,) (17,) Dask graph 1 chunks in 2 graph layers Data type float32 numpy.ndarray - zeta(time, node)float32dask.array<chunksize=(1, 74061), meta=np.ndarray>
- grid :
- Bathymetry_Mesh
- location :
- node
- long_name :
- Water Surface Elevation
- positive :
- up
- standard_name :
- Original modeled sea_surface_height_above_geoid
- type :
- data
- units :
- meters
Array Chunk Bytes 13.84 MiB 289.30 kiB Shape (49, 74061) (1, 74061) Dask graph 49 chunks in 2 graph layers Data type float32 numpy.ndarray - zeta_adj(time, node)float32dask.array<chunksize=(1, 74061), meta=np.ndarray>
- grid :
- Bathymetry_Mesh
- location :
- node
- long_name :
- Adjusted Water Surface Elevation
- positive :
- up
- standard_name :
- offset corrected sea_surface_height_above_geoid
- type :
- data
- units :
- meters
Array Chunk Bytes 13.84 MiB 289.30 kiB Shape (49, 74061) (1, 74061) Dask graph 49 chunks in 2 graph layers Data type float32 numpy.ndarray - zval(time, nv, node)float32dask.array<chunksize=(1, 54, 74061), meta=np.ndarray>
- grid :
- Bathymetry_Mesh
- location :
- node
- long_name :
- height of vertical grid level
- standard_name :
- z-coordinate height
- type :
- data
- units :
- meters
Array Chunk Bytes 747.55 MiB 15.26 MiB Shape (49, 54, 74061) (1, 54, 74061) Dask graph 49 chunks in 2 graph layers Data type float32 numpy.ndarray
- sigmaPandasIndex
PandasIndex(Index([ -1.0, -0.9722219705581665, -0.9444440007209778, -0.9166669845581055, -0.8888890147209167, -0.8611109852790833, -0.8333330154418945, -0.805554986000061, -0.7777780294418335, -0.75, -0.7222219705581665, -0.6944440007209778, -0.6666669845581055, -0.6388890147209167, -0.6111109852790833, -0.5833330154418945, -0.555554986000061, -0.5277780294418335, -0.5, -0.4722220003604889, -0.4444440007209778, -0.4166660010814667, -0.38888901472091675, -0.36111098527908325, -0.33333298563957214, -0.30555498600006104, -0.2777769863605499, -0.25, -0.2222220003604889, -0.19444400072097778, -0.16666600108146667, -0.13888899981975555, -0.11111100018024445, -0.08333300054073334, -0.05555500090122223, -0.02777699939906597, 0.0], dtype='float32', name='sigma')) - timePandasIndex
PandasIndex(DatetimeIndex(['2024-07-25 03:00:00', '2024-07-25 04:00:00', '2024-07-25 05:00:00', '2024-07-25 06:00:00', '2024-07-25 07:00:00', '2024-07-25 08:00:00', '2024-07-25 09:00:00', '2024-07-25 10:00:00', '2024-07-25 11:00:00', '2024-07-25 12:00:00', '2024-07-25 13:00:00', '2024-07-25 14:00:00', '2024-07-25 15:00:00', '2024-07-25 16:00:00', '2024-07-25 17:00:00', '2024-07-25 18:00:00', '2024-07-25 19:00:00', '2024-07-25 20:00:00', '2024-07-25 21:00:00', '2024-07-25 22:00:00', '2024-07-25 23:00:00', '2024-07-26 00:00:00', '2024-07-26 01:00:00', '2024-07-26 02:00:00', '2024-07-26 03:00:00', '2024-07-26 04:00:00', '2024-07-26 05:00:00', '2024-07-26 06:00:00', '2024-07-26 07:00:00', '2024-07-26 08:00:00', '2024-07-26 09:00:00', '2024-07-26 10:00:00', '2024-07-26 11:00:00', '2024-07-26 12:00:00', '2024-07-26 13:00:00', '2024-07-26 14:00:00', '2024-07-26 15:00:00', '2024-07-26 16:00:00', '2024-07-26 17:00:00', '2024-07-26 18:00:00', '2024-07-26 19:00:00', '2024-07-26 20:00:00', '2024-07-26 21:00:00', '2024-07-26 22:00:00', '2024-07-26 23:00:00', '2024-07-27 00:00:00', '2024-07-27 01:00:00', '2024-07-27 02:00:00', '2024-07-27 03:00:00'], dtype='datetime64[ns]', name='time', freq=None))
- Vertical_type :
- Hybrid SZ vertical coordinates, K=1 for bottom
- grid_type :
- Unstructured model grid:
- history :
- Created at Eastern Local Time 04:25 07/25/2024
- model_developer :
- Oregon Health & Science University
- model_link :
- http://www.ccalmr.ogi.edu/CORIE/modeling/selfe
- reference :
- Created by CO-OPS/NOS/NOAA
- source :
- SELFE-MPI Version 3.1dc
- title :
- Columbia River & Estuarine Operational Forecast System
- type :
- gridded/field NetCDF file - CF-1.0
Fixup any inconsistencies with regards to the datasets UGRID specification, for this example we have to explicitely set the face_node_connectivity parameter because the mesh is not included as a data variable
ds = xarray_subset_grid.grids.ugrid.assign_ugrid_topology(ds, face_node_connectivity='ele')
ds
<xarray.Dataset> Size: 4GB
Dimensions: (sigma: 37, time: 49, node: 74061, nface: 3, nele: 142684,
nv: 54, nz: 17)
Coordinates:
lat (node) float32 296kB dask.array<chunksize=(74061,), meta=np.ndarray>
lon (node) float32 296kB dask.array<chunksize=(74061,), meta=np.ndarray>
* sigma (sigma) float32 148B -1.0 -0.9722 -0.9444 ... -0.02778 0.0
* time (time) datetime64[ns] 392B 2024-07-25T03:00:00 ... 2024-07-2...
Dimensions without coordinates: node, nface, nele, nv, nz
Data variables: (12/19)
Cs (sigma) float32 148B dask.array<chunksize=(37,), meta=np.ndarray>
Pair (time, node) float32 15MB dask.array<chunksize=(1, 74061), meta=np.ndarray>
ele (nface, nele) int32 2MB dask.array<chunksize=(3, 142684), meta=np.ndarray>
h (node) float32 296kB dask.array<chunksize=(74061,), meta=np.ndarray>
offset (node) float32 296kB dask.array<chunksize=(74061,), meta=np.ndarray>
salinity (time, nv, node) float32 784MB dask.array<chunksize=(1, 54, 74061), meta=np.ndarray>
... ...
y (node) float32 296kB dask.array<chunksize=(74061,), meta=np.ndarray>
z (nz) float32 68B dask.array<chunksize=(17,), meta=np.ndarray>
zeta (time, node) float32 15MB dask.array<chunksize=(1, 74061), meta=np.ndarray>
zeta_adj (time, node) float32 15MB dask.array<chunksize=(1, 74061), meta=np.ndarray>
zval (time, nv, node) float32 784MB dask.array<chunksize=(1, 54, 74061), meta=np.ndarray>
mesh int32 4B 0
Attributes:
Vertical_type: Hybrid SZ vertical coordinates, K=1 for bottom
grid_type: Unstructured model grid:
history: Created at Eastern Local Time 04:25 07/25/2024
model_developer: Oregon Health & Science University
model_link: http://www.ccalmr.ogi.edu/CORIE/modeling/selfe
reference: Created by CO-OPS/NOS/NOAA
source: SELFE-MPI Version 3.1dc
title: Columbia River & Estuarine Operational Forecast System
type: gridded/field NetCDF file - CF-1.0xarray.Dataset
- sigma: 37
- time: 49
- node: 74061
- nface: 3
- nele: 142684
- nv: 54
- nz: 17
- lat(node)float32dask.array<chunksize=(74061,), meta=np.ndarray>
- long_name :
- nodal latitude
- units :
- degrees_north
Array Chunk Bytes 289.30 kiB 289.30 kiB Shape (74061,) (74061,) Dask graph 1 chunks in 2 graph layers Data type float32 numpy.ndarray - lon(node)float32dask.array<chunksize=(74061,), meta=np.ndarray>
- long_name :
- nodal longitude
- units :
- degrees_east
Array Chunk Bytes 289.30 kiB 289.30 kiB Shape (74061,) (74061,) Dask graph 1 chunks in 2 graph layers Data type float32 numpy.ndarray - sigma(sigma)float32-1.0 -0.9722 ... -0.02778 0.0
- long_name :
- S coordinates at whole levels
- positive :
- up
- units :
- non-dimensional
array([-1. , -0.972222, -0.944444, -0.916667, -0.888889, -0.861111, -0.833333, -0.805555, -0.777778, -0.75 , -0.722222, -0.694444, -0.666667, -0.638889, -0.611111, -0.583333, -0.555555, -0.527778, -0.5 , -0.472222, -0.444444, -0.416666, -0.388889, -0.361111, -0.333333, -0.305555, -0.277777, -0.25 , -0.222222, -0.194444, -0.166666, -0.138889, -0.111111, -0.083333, -0.055555, -0.027777, 0. ], dtype=float32) - time(time)datetime64[ns]2024-07-25T03:00:00 ... 2024-07-...
- base_date :
- 2024-07-24 21:00:00 UTC
- long_name :
- Time
- standard_name :
- time
array(['2024-07-25T03:00:00.000000000', '2024-07-25T04:00:00.000000000', '2024-07-25T05:00:00.000000000', '2024-07-25T06:00:00.000000000', '2024-07-25T07:00:00.000000000', '2024-07-25T08:00:00.000000000', '2024-07-25T09:00:00.000000000', '2024-07-25T10:00:00.000000000', '2024-07-25T11:00:00.000000000', '2024-07-25T12:00:00.000000000', '2024-07-25T13:00:00.000000000', '2024-07-25T14:00:00.000000000', '2024-07-25T15:00:00.000000000', '2024-07-25T16:00:00.000000000', '2024-07-25T17:00:00.000000000', '2024-07-25T18:00:00.000000000', '2024-07-25T19:00:00.000000000', '2024-07-25T20:00:00.000000000', '2024-07-25T21:00:00.000000000', '2024-07-25T22:00:00.000000000', '2024-07-25T23:00:00.000000000', '2024-07-26T00:00:00.000000000', '2024-07-26T01:00:00.000000000', '2024-07-26T02:00:00.000000000', '2024-07-26T03:00:00.000000000', '2024-07-26T04:00:00.000000000', '2024-07-26T05:00:00.000000000', '2024-07-26T06:00:00.000000000', '2024-07-26T07:00:00.000000000', '2024-07-26T08:00:00.000000000', '2024-07-26T09:00:00.000000000', '2024-07-26T10:00:00.000000000', '2024-07-26T11:00:00.000000000', '2024-07-26T12:00:00.000000000', '2024-07-26T13:00:00.000000000', '2024-07-26T14:00:00.000000000', '2024-07-26T15:00:00.000000000', '2024-07-26T16:00:00.000000000', '2024-07-26T17:00:00.000000000', '2024-07-26T18:00:00.000000000', '2024-07-26T19:00:00.000000000', '2024-07-26T20:00:00.000000000', '2024-07-26T21:00:00.000000000', '2024-07-26T22:00:00.000000000', '2024-07-26T23:00:00.000000000', '2024-07-27T00:00:00.000000000', '2024-07-27T01:00:00.000000000', '2024-07-27T02:00:00.000000000', '2024-07-27T03:00:00.000000000'], dtype='datetime64[ns]')
- Cs(sigma)float32dask.array<chunksize=(37,), meta=np.ndarray>
- long_name :
- Function C(s) at whole levels
- positive :
- up
- units :
- non-dimensional
Array Chunk Bytes 148 B 148 B Shape (37,) (37,) Dask graph 1 chunks in 2 graph layers Data type float32 numpy.ndarray - Pair(time, node)float32dask.array<chunksize=(1, 74061), meta=np.ndarray>
- grid :
- Bathymetry_Mesh
- location :
- node
- long_name :
- Pressure reduced to MSL
- type :
- data
- units :
- Pa
Array Chunk Bytes 13.84 MiB 289.30 kiB Shape (49, 74061) (1, 74061) Dask graph 49 chunks in 2 graph layers Data type float32 numpy.ndarray - ele(nface, nele)int32dask.array<chunksize=(3, 142684), meta=np.ndarray>
- long_name :
- Horizontal Triangular Element Table
- units :
- non-dimensional
- start_index :
- 1
Array Chunk Bytes 1.63 MiB 1.63 MiB Shape (3, 142684) (3, 142684) Dask graph 1 chunks in 2 graph layers Data type int32 numpy.ndarray - h(node)float32dask.array<chunksize=(74061,), meta=np.ndarray>
- grid :
- Bathymetry_Mesh
- long_name :
- Bathymetry
- positive :
- down
- standard_name :
- sea_floor_depth_below_geoid
- type :
- data
- units :
- m
Array Chunk Bytes 289.30 kiB 289.30 kiB Shape (74061,) (74061,) Dask graph 1 chunks in 2 graph layers Data type float32 numpy.ndarray - offset(node)float32dask.array<chunksize=(74061,), meta=np.ndarray>
- long_name :
- water level offset
- positive :
- up
- standard_name :
- mean difference of model minus obs. over 7 days
- units :
- meters
Array Chunk Bytes 289.30 kiB 289.30 kiB Shape (74061,) (74061,) Dask graph 1 chunks in 2 graph layers Data type float32 numpy.ndarray - salinity(time, nv, node)float32dask.array<chunksize=(1, 54, 74061), meta=np.ndarray>
- grid :
- Bathymetry_Mesh
- location :
- node
- long_name :
- salinity
- standard_name :
- sea_water_salinity
- type :
- data
- units :
- psu
Array Chunk Bytes 747.55 MiB 15.26 MiB Shape (49, 54, 74061) (1, 54, 74061) Dask graph 49 chunks in 2 graph layers Data type float32 numpy.ndarray - sigma_z(nv)float32dask.array<chunksize=(54,), meta=np.ndarray>
- long_name :
- sigma(1-37 layers),Z(38-54 layers)
- positive :
- up
- units :
- sigma or meters
Array Chunk Bytes 216 B 216 B Shape (54,) (54,) Dask graph 1 chunks in 2 graph layers Data type float32 numpy.ndarray - temp(time, nv, node)float32dask.array<chunksize=(1, 54, 74061), meta=np.ndarray>
- grid :
- Bathymetry_Mesh
- location :
- node
- long_name :
- temperature
- standard_name :
- sea_water_temperature
- type :
- data
- units :
- degrees_C
Array Chunk Bytes 747.55 MiB 15.26 MiB Shape (49, 54, 74061) (1, 54, 74061) Dask graph 49 chunks in 2 graph layers Data type float32 numpy.ndarray - u(time, nv, node)float32dask.array<chunksize=(1, 54, 74061), meta=np.ndarray>
- grid :
- Bathymetry_Mesh
- location :
- node
- long_name :
- Eastward Water Velocity
- type :
- data
- units :
- meters s-1
Array Chunk Bytes 747.55 MiB 15.26 MiB Shape (49, 54, 74061) (1, 54, 74061) Dask graph 49 chunks in 2 graph layers Data type float32 numpy.ndarray - uwind_speed(time, node)float32dask.array<chunksize=(1, 74061), meta=np.ndarray>
- grid :
- Bathymetry_Mesh
- location :
- node
- long_name :
- Eastward Wind Velocity
- type :
- data
- units :
- meters s-1
Array Chunk Bytes 13.84 MiB 289.30 kiB Shape (49, 74061) (1, 74061) Dask graph 49 chunks in 2 graph layers Data type float32 numpy.ndarray - v(time, nv, node)float32dask.array<chunksize=(1, 54, 74061), meta=np.ndarray>
- grid :
- Bathymetry_Mesh
- location :
- node
- long_name :
- Northward Water Velocity
- type :
- data
- units :
- meters s-1
Array Chunk Bytes 747.55 MiB 15.26 MiB Shape (49, 54, 74061) (1, 54, 74061) Dask graph 49 chunks in 2 graph layers Data type float32 numpy.ndarray - vwind_speed(time, node)float32dask.array<chunksize=(1, 74061), meta=np.ndarray>
- grid :
- Bathymetry_Mesh
- location :
- node
- long_name :
- Northward Wind Velocity
- type :
- data
- units :
- meters s-1
Array Chunk Bytes 13.84 MiB 289.30 kiB Shape (49, 74061) (1, 74061) Dask graph 49 chunks in 2 graph layers Data type float32 numpy.ndarray - x(node)float32dask.array<chunksize=(74061,), meta=np.ndarray>
- long_name :
- nodal x-coordinate
- units :
- meters
Array Chunk Bytes 289.30 kiB 289.30 kiB Shape (74061,) (74061,) Dask graph 1 chunks in 2 graph layers Data type float32 numpy.ndarray - y(node)float32dask.array<chunksize=(74061,), meta=np.ndarray>
- long_name :
- nodal y-coordinate
- units :
- meters
Array Chunk Bytes 289.30 kiB 289.30 kiB Shape (74061,) (74061,) Dask graph 1 chunks in 2 graph layers Data type float32 numpy.ndarray - z(nz)float32dask.array<chunksize=(17,), meta=np.ndarray>
- long_name :
- Z coordinates at whole levels
- positive :
- up
- units :
- meters
Array Chunk Bytes 68 B 68 B Shape (17,) (17,) Dask graph 1 chunks in 2 graph layers Data type float32 numpy.ndarray - zeta(time, node)float32dask.array<chunksize=(1, 74061), meta=np.ndarray>
- grid :
- Bathymetry_Mesh
- location :
- node
- long_name :
- Water Surface Elevation
- positive :
- up
- standard_name :
- Original modeled sea_surface_height_above_geoid
- type :
- data
- units :
- meters
Array Chunk Bytes 13.84 MiB 289.30 kiB Shape (49, 74061) (1, 74061) Dask graph 49 chunks in 2 graph layers Data type float32 numpy.ndarray - zeta_adj(time, node)float32dask.array<chunksize=(1, 74061), meta=np.ndarray>
- grid :
- Bathymetry_Mesh
- location :
- node
- long_name :
- Adjusted Water Surface Elevation
- positive :
- up
- standard_name :
- offset corrected sea_surface_height_above_geoid
- type :
- data
- units :
- meters
Array Chunk Bytes 13.84 MiB 289.30 kiB Shape (49, 74061) (1, 74061) Dask graph 49 chunks in 2 graph layers Data type float32 numpy.ndarray - zval(time, nv, node)float32dask.array<chunksize=(1, 54, 74061), meta=np.ndarray>
- grid :
- Bathymetry_Mesh
- location :
- node
- long_name :
- height of vertical grid level
- standard_name :
- z-coordinate height
- type :
- data
- units :
- meters
Array Chunk Bytes 747.55 MiB 15.26 MiB Shape (49, 54, 74061) (1, 54, 74061) Dask graph 49 chunks in 2 graph layers Data type float32 numpy.ndarray - mesh()int320
- cf_role :
- mesh_topology
- topology_dimension :
- 2
- node_coordinates :
- lon lat
- face_node_connectivity :
- ele
- face_dimension :
- nele
array(0, dtype=int32)
- sigmaPandasIndex
PandasIndex(Index([ -1.0, -0.9722219705581665, -0.9444440007209778, -0.9166669845581055, -0.8888890147209167, -0.8611109852790833, -0.8333330154418945, -0.805554986000061, -0.7777780294418335, -0.75, -0.7222219705581665, -0.6944440007209778, -0.6666669845581055, -0.6388890147209167, -0.6111109852790833, -0.5833330154418945, -0.555554986000061, -0.5277780294418335, -0.5, -0.4722220003604889, -0.4444440007209778, -0.4166660010814667, -0.38888901472091675, -0.36111098527908325, -0.33333298563957214, -0.30555498600006104, -0.2777769863605499, -0.25, -0.2222220003604889, -0.19444400072097778, -0.16666600108146667, -0.13888899981975555, -0.11111100018024445, -0.08333300054073334, -0.05555500090122223, -0.02777699939906597, 0.0], dtype='float32', name='sigma')) - timePandasIndex
PandasIndex(DatetimeIndex(['2024-07-25 03:00:00', '2024-07-25 04:00:00', '2024-07-25 05:00:00', '2024-07-25 06:00:00', '2024-07-25 07:00:00', '2024-07-25 08:00:00', '2024-07-25 09:00:00', '2024-07-25 10:00:00', '2024-07-25 11:00:00', '2024-07-25 12:00:00', '2024-07-25 13:00:00', '2024-07-25 14:00:00', '2024-07-25 15:00:00', '2024-07-25 16:00:00', '2024-07-25 17:00:00', '2024-07-25 18:00:00', '2024-07-25 19:00:00', '2024-07-25 20:00:00', '2024-07-25 21:00:00', '2024-07-25 22:00:00', '2024-07-25 23:00:00', '2024-07-26 00:00:00', '2024-07-26 01:00:00', '2024-07-26 02:00:00', '2024-07-26 03:00:00', '2024-07-26 04:00:00', '2024-07-26 05:00:00', '2024-07-26 06:00:00', '2024-07-26 07:00:00', '2024-07-26 08:00:00', '2024-07-26 09:00:00', '2024-07-26 10:00:00', '2024-07-26 11:00:00', '2024-07-26 12:00:00', '2024-07-26 13:00:00', '2024-07-26 14:00:00', '2024-07-26 15:00:00', '2024-07-26 16:00:00', '2024-07-26 17:00:00', '2024-07-26 18:00:00', '2024-07-26 19:00:00', '2024-07-26 20:00:00', '2024-07-26 21:00:00', '2024-07-26 22:00:00', '2024-07-26 23:00:00', '2024-07-27 00:00:00', '2024-07-27 01:00:00', '2024-07-27 02:00:00', '2024-07-27 03:00:00'], dtype='datetime64[ns]', name='time', freq=None))
- Vertical_type :
- Hybrid SZ vertical coordinates, K=1 for bottom
- grid_type :
- Unstructured model grid:
- history :
- Created at Eastern Local Time 04:25 07/25/2024
- model_developer :
- Oregon Health & Science University
- model_link :
- http://www.ccalmr.ogi.edu/CORIE/modeling/selfe
- reference :
- Created by CO-OPS/NOS/NOAA
- source :
- SELFE-MPI Version 3.1dc
- title :
- Columbia River & Estuarine Operational Forecast System
- type :
- gridded/field NetCDF file - CF-1.0
Recognize the grid as a SELFE grid
ds.xsg.grid.name
'selfe'
f"Dataset size: {ds.nbytes * 1.0e-9} Gb"
'Dataset size: 3.995378548 Gb'
Lets subset to the surface
ds_surface = ds.xsg.subset_surface_level(method='nearest')
ds_surface
<xarray.Dataset> Size: 149MB
Dimensions: (time: 49, node: 74061, nface: 3, nele: 142684, nz: 17)
Coordinates:
lat (node) float32 296kB dask.array<chunksize=(74061,), meta=np.ndarray>
lon (node) float32 296kB dask.array<chunksize=(74061,), meta=np.ndarray>
sigma float32 4B 0.0
* time (time) datetime64[ns] 392B 2024-07-25T03:00:00 ... 2024-07-2...
Dimensions without coordinates: node, nface, nele, nz
Data variables: (12/19)
Cs float32 4B dask.array<chunksize=(), meta=np.ndarray>
Pair (time, node) float32 15MB dask.array<chunksize=(1, 74061), meta=np.ndarray>
ele (nface, nele) int32 2MB dask.array<chunksize=(3, 142684), meta=np.ndarray>
h (node) float32 296kB dask.array<chunksize=(74061,), meta=np.ndarray>
offset (node) float32 296kB dask.array<chunksize=(74061,), meta=np.ndarray>
salinity (time, node) float32 15MB dask.array<chunksize=(1, 74061), meta=np.ndarray>
... ...
y (node) float32 296kB dask.array<chunksize=(74061,), meta=np.ndarray>
z (nz) float32 68B dask.array<chunksize=(17,), meta=np.ndarray>
zeta (time, node) float32 15MB dask.array<chunksize=(1, 74061), meta=np.ndarray>
zeta_adj (time, node) float32 15MB dask.array<chunksize=(1, 74061), meta=np.ndarray>
zval (time, node) float32 15MB dask.array<chunksize=(1, 74061), meta=np.ndarray>
mesh int32 4B 0
Attributes:
Vertical_type: Hybrid SZ vertical coordinates, K=1 for bottom
grid_type: Unstructured model grid:
history: Created at Eastern Local Time 04:25 07/25/2024
model_developer: Oregon Health & Science University
model_link: http://www.ccalmr.ogi.edu/CORIE/modeling/selfe
reference: Created by CO-OPS/NOS/NOAA
source: SELFE-MPI Version 3.1dc
title: Columbia River & Estuarine Operational Forecast System
type: gridded/field NetCDF file - CF-1.0xarray.Dataset
- time: 49
- node: 74061
- nface: 3
- nele: 142684
- nz: 17
- lat(node)float32dask.array<chunksize=(74061,), meta=np.ndarray>
- long_name :
- nodal latitude
- units :
- degrees_north
Array Chunk Bytes 289.30 kiB 289.30 kiB Shape (74061,) (74061,) Dask graph 1 chunks in 2 graph layers Data type float32 numpy.ndarray - lon(node)float32dask.array<chunksize=(74061,), meta=np.ndarray>
- long_name :
- nodal longitude
- units :
- degrees_east
Array Chunk Bytes 289.30 kiB 289.30 kiB Shape (74061,) (74061,) Dask graph 1 chunks in 2 graph layers Data type float32 numpy.ndarray - sigma()float320.0
- long_name :
- S coordinates at whole levels
- positive :
- up
- units :
- non-dimensional
array(0., dtype=float32)
- time(time)datetime64[ns]2024-07-25T03:00:00 ... 2024-07-...
- base_date :
- 2024-07-24 21:00:00 UTC
- long_name :
- Time
- standard_name :
- time
array(['2024-07-25T03:00:00.000000000', '2024-07-25T04:00:00.000000000', '2024-07-25T05:00:00.000000000', '2024-07-25T06:00:00.000000000', '2024-07-25T07:00:00.000000000', '2024-07-25T08:00:00.000000000', '2024-07-25T09:00:00.000000000', '2024-07-25T10:00:00.000000000', '2024-07-25T11:00:00.000000000', '2024-07-25T12:00:00.000000000', '2024-07-25T13:00:00.000000000', '2024-07-25T14:00:00.000000000', '2024-07-25T15:00:00.000000000', '2024-07-25T16:00:00.000000000', '2024-07-25T17:00:00.000000000', '2024-07-25T18:00:00.000000000', '2024-07-25T19:00:00.000000000', '2024-07-25T20:00:00.000000000', '2024-07-25T21:00:00.000000000', '2024-07-25T22:00:00.000000000', '2024-07-25T23:00:00.000000000', '2024-07-26T00:00:00.000000000', '2024-07-26T01:00:00.000000000', '2024-07-26T02:00:00.000000000', '2024-07-26T03:00:00.000000000', '2024-07-26T04:00:00.000000000', '2024-07-26T05:00:00.000000000', '2024-07-26T06:00:00.000000000', '2024-07-26T07:00:00.000000000', '2024-07-26T08:00:00.000000000', '2024-07-26T09:00:00.000000000', '2024-07-26T10:00:00.000000000', '2024-07-26T11:00:00.000000000', '2024-07-26T12:00:00.000000000', '2024-07-26T13:00:00.000000000', '2024-07-26T14:00:00.000000000', '2024-07-26T15:00:00.000000000', '2024-07-26T16:00:00.000000000', '2024-07-26T17:00:00.000000000', '2024-07-26T18:00:00.000000000', '2024-07-26T19:00:00.000000000', '2024-07-26T20:00:00.000000000', '2024-07-26T21:00:00.000000000', '2024-07-26T22:00:00.000000000', '2024-07-26T23:00:00.000000000', '2024-07-27T00:00:00.000000000', '2024-07-27T01:00:00.000000000', '2024-07-27T02:00:00.000000000', '2024-07-27T03:00:00.000000000'], dtype='datetime64[ns]')
- Cs()float32dask.array<chunksize=(), meta=np.ndarray>
- long_name :
- Function C(s) at whole levels
- positive :
- up
- units :
- non-dimensional
Array Chunk Bytes 4 B 4 B Shape () () Dask graph 1 chunks in 3 graph layers Data type float32 numpy.ndarray - Pair(time, node)float32dask.array<chunksize=(1, 74061), meta=np.ndarray>
- grid :
- Bathymetry_Mesh
- location :
- node
- long_name :
- Pressure reduced to MSL
- type :
- data
- units :
- Pa
Array Chunk Bytes 13.84 MiB 289.30 kiB Shape (49, 74061) (1, 74061) Dask graph 49 chunks in 2 graph layers Data type float32 numpy.ndarray - ele(nface, nele)int32dask.array<chunksize=(3, 142684), meta=np.ndarray>
- long_name :
- Horizontal Triangular Element Table
- units :
- non-dimensional
- start_index :
- 1
Array Chunk Bytes 1.63 MiB 1.63 MiB Shape (3, 142684) (3, 142684) Dask graph 1 chunks in 2 graph layers Data type int32 numpy.ndarray - h(node)float32dask.array<chunksize=(74061,), meta=np.ndarray>
- grid :
- Bathymetry_Mesh
- long_name :
- Bathymetry
- positive :
- down
- standard_name :
- sea_floor_depth_below_geoid
- type :
- data
- units :
- m
Array Chunk Bytes 289.30 kiB 289.30 kiB Shape (74061,) (74061,) Dask graph 1 chunks in 2 graph layers Data type float32 numpy.ndarray - offset(node)float32dask.array<chunksize=(74061,), meta=np.ndarray>
- long_name :
- water level offset
- positive :
- up
- standard_name :
- mean difference of model minus obs. over 7 days
- units :
- meters
Array Chunk Bytes 289.30 kiB 289.30 kiB Shape (74061,) (74061,) Dask graph 1 chunks in 2 graph layers Data type float32 numpy.ndarray - salinity(time, node)float32dask.array<chunksize=(1, 74061), meta=np.ndarray>
- grid :
- Bathymetry_Mesh
- location :
- node
- long_name :
- salinity
- standard_name :
- sea_water_salinity
- type :
- data
- units :
- psu
Array Chunk Bytes 13.84 MiB 289.30 kiB Shape (49, 74061) (1, 74061) Dask graph 49 chunks in 3 graph layers Data type float32 numpy.ndarray - sigma_z()float32dask.array<chunksize=(), meta=np.ndarray>
- long_name :
- sigma(1-37 layers),Z(38-54 layers)
- positive :
- up
- units :
- sigma or meters
Array Chunk Bytes 4 B 4 B Shape () () Dask graph 1 chunks in 3 graph layers Data type float32 numpy.ndarray - temp(time, node)float32dask.array<chunksize=(1, 74061), meta=np.ndarray>
- grid :
- Bathymetry_Mesh
- location :
- node
- long_name :
- temperature
- standard_name :
- sea_water_temperature
- type :
- data
- units :
- degrees_C
Array Chunk Bytes 13.84 MiB 289.30 kiB Shape (49, 74061) (1, 74061) Dask graph 49 chunks in 3 graph layers Data type float32 numpy.ndarray - u(time, node)float32dask.array<chunksize=(1, 74061), meta=np.ndarray>
- grid :
- Bathymetry_Mesh
- location :
- node
- long_name :
- Eastward Water Velocity
- type :
- data
- units :
- meters s-1
Array Chunk Bytes 13.84 MiB 289.30 kiB Shape (49, 74061) (1, 74061) Dask graph 49 chunks in 3 graph layers Data type float32 numpy.ndarray - uwind_speed(time, node)float32dask.array<chunksize=(1, 74061), meta=np.ndarray>
- grid :
- Bathymetry_Mesh
- location :
- node
- long_name :
- Eastward Wind Velocity
- type :
- data
- units :
- meters s-1
Array Chunk Bytes 13.84 MiB 289.30 kiB Shape (49, 74061) (1, 74061) Dask graph 49 chunks in 2 graph layers Data type float32 numpy.ndarray - v(time, node)float32dask.array<chunksize=(1, 74061), meta=np.ndarray>
- grid :
- Bathymetry_Mesh
- location :
- node
- long_name :
- Northward Water Velocity
- type :
- data
- units :
- meters s-1
Array Chunk Bytes 13.84 MiB 289.30 kiB Shape (49, 74061) (1, 74061) Dask graph 49 chunks in 3 graph layers Data type float32 numpy.ndarray - vwind_speed(time, node)float32dask.array<chunksize=(1, 74061), meta=np.ndarray>
- grid :
- Bathymetry_Mesh
- location :
- node
- long_name :
- Northward Wind Velocity
- type :
- data
- units :
- meters s-1
Array Chunk Bytes 13.84 MiB 289.30 kiB Shape (49, 74061) (1, 74061) Dask graph 49 chunks in 2 graph layers Data type float32 numpy.ndarray - x(node)float32dask.array<chunksize=(74061,), meta=np.ndarray>
- long_name :
- nodal x-coordinate
- units :
- meters
Array Chunk Bytes 289.30 kiB 289.30 kiB Shape (74061,) (74061,) Dask graph 1 chunks in 2 graph layers Data type float32 numpy.ndarray - y(node)float32dask.array<chunksize=(74061,), meta=np.ndarray>
- long_name :
- nodal y-coordinate
- units :
- meters
Array Chunk Bytes 289.30 kiB 289.30 kiB Shape (74061,) (74061,) Dask graph 1 chunks in 2 graph layers Data type float32 numpy.ndarray - z(nz)float32dask.array<chunksize=(17,), meta=np.ndarray>
- long_name :
- Z coordinates at whole levels
- positive :
- up
- units :
- meters
Array Chunk Bytes 68 B 68 B Shape (17,) (17,) Dask graph 1 chunks in 2 graph layers Data type float32 numpy.ndarray - zeta(time, node)float32dask.array<chunksize=(1, 74061), meta=np.ndarray>
- grid :
- Bathymetry_Mesh
- location :
- node
- long_name :
- Water Surface Elevation
- positive :
- up
- standard_name :
- Original modeled sea_surface_height_above_geoid
- type :
- data
- units :
- meters
Array Chunk Bytes 13.84 MiB 289.30 kiB Shape (49, 74061) (1, 74061) Dask graph 49 chunks in 2 graph layers Data type float32 numpy.ndarray - zeta_adj(time, node)float32dask.array<chunksize=(1, 74061), meta=np.ndarray>
- grid :
- Bathymetry_Mesh
- location :
- node
- long_name :
- Adjusted Water Surface Elevation
- positive :
- up
- standard_name :
- offset corrected sea_surface_height_above_geoid
- type :
- data
- units :
- meters
Array Chunk Bytes 13.84 MiB 289.30 kiB Shape (49, 74061) (1, 74061) Dask graph 49 chunks in 2 graph layers Data type float32 numpy.ndarray - zval(time, node)float32dask.array<chunksize=(1, 74061), meta=np.ndarray>
- grid :
- Bathymetry_Mesh
- location :
- node
- long_name :
- height of vertical grid level
- standard_name :
- z-coordinate height
- type :
- data
- units :
- meters
Array Chunk Bytes 13.84 MiB 289.30 kiB Shape (49, 74061) (1, 74061) Dask graph 49 chunks in 3 graph layers Data type float32 numpy.ndarray - mesh()int320
- cf_role :
- mesh_topology
- topology_dimension :
- 2
- node_coordinates :
- lon lat
- face_node_connectivity :
- ele
- face_dimension :
- nele
array(0, dtype=int32)
- timePandasIndex
PandasIndex(DatetimeIndex(['2024-07-25 03:00:00', '2024-07-25 04:00:00', '2024-07-25 05:00:00', '2024-07-25 06:00:00', '2024-07-25 07:00:00', '2024-07-25 08:00:00', '2024-07-25 09:00:00', '2024-07-25 10:00:00', '2024-07-25 11:00:00', '2024-07-25 12:00:00', '2024-07-25 13:00:00', '2024-07-25 14:00:00', '2024-07-25 15:00:00', '2024-07-25 16:00:00', '2024-07-25 17:00:00', '2024-07-25 18:00:00', '2024-07-25 19:00:00', '2024-07-25 20:00:00', '2024-07-25 21:00:00', '2024-07-25 22:00:00', '2024-07-25 23:00:00', '2024-07-26 00:00:00', '2024-07-26 01:00:00', '2024-07-26 02:00:00', '2024-07-26 03:00:00', '2024-07-26 04:00:00', '2024-07-26 05:00:00', '2024-07-26 06:00:00', '2024-07-26 07:00:00', '2024-07-26 08:00:00', '2024-07-26 09:00:00', '2024-07-26 10:00:00', '2024-07-26 11:00:00', '2024-07-26 12:00:00', '2024-07-26 13:00:00', '2024-07-26 14:00:00', '2024-07-26 15:00:00', '2024-07-26 16:00:00', '2024-07-26 17:00:00', '2024-07-26 18:00:00', '2024-07-26 19:00:00', '2024-07-26 20:00:00', '2024-07-26 21:00:00', '2024-07-26 22:00:00', '2024-07-26 23:00:00', '2024-07-27 00:00:00', '2024-07-27 01:00:00', '2024-07-27 02:00:00', '2024-07-27 03:00:00'], dtype='datetime64[ns]', name='time', freq=None))
- Vertical_type :
- Hybrid SZ vertical coordinates, K=1 for bottom
- grid_type :
- Unstructured model grid:
- history :
- Created at Eastern Local Time 04:25 07/25/2024
- model_developer :
- Oregon Health & Science University
- model_link :
- http://www.ccalmr.ogi.edu/CORIE/modeling/selfe
- reference :
- Created by CO-OPS/NOS/NOAA
- source :
- SELFE-MPI Version 3.1dc
- title :
- Columbia River & Estuarine Operational Forecast System
- type :
- gridded/field NetCDF file - CF-1.0
Then we can subset the grid down to the target area

polygon = np.array(
[
[-124.2107493335611, 46.33385978494991],
[-124.14865898498047, 46.098557502544395],
[-124.05608944557105, 46.091919687734276],
[-123.90949622876111, 46.06806045921755],
[-123.68806634560113, 46.08206433450994],
[-123.53658789732481, 46.1555125798732],
[-123.62320946003382, 46.313992255513426],
[-123.86869261497935, 46.340309927154266],
[-124.2107493335611, 46.33385978494991],
]
)
ds_surface_subset = ds_surface.xsg.subset_polygon(polygon)
assert(ds_surface_subset is not None)
ds_surface_subset
<xarray.Dataset> Size: 27MB
Dimensions: (time: 49, node: 13486, nface: 3, nele: 26040, nz: 17)
Coordinates:
lat (node) float32 54kB dask.array<chunksize=(13486,), meta=np.ndarray>
lon (node) float32 54kB dask.array<chunksize=(13486,), meta=np.ndarray>
sigma float32 4B 0.0
* time (time) datetime64[ns] 392B 2024-07-25T03:00:00 ... 2024-07-2...
Dimensions without coordinates: node, nface, nele, nz
Data variables: (12/19)
Cs float32 4B dask.array<chunksize=(), meta=np.ndarray>
Pair (time, node) float32 3MB dask.array<chunksize=(1, 13486), meta=np.ndarray>
ele (nface, nele) int32 312kB dask.array<chunksize=(3, 26040), meta=np.ndarray>
h (node) float32 54kB dask.array<chunksize=(13486,), meta=np.ndarray>
offset (node) float32 54kB dask.array<chunksize=(13486,), meta=np.ndarray>
salinity (time, node) float32 3MB dask.array<chunksize=(1, 13486), meta=np.ndarray>
... ...
y (node) float32 54kB dask.array<chunksize=(13486,), meta=np.ndarray>
z (nz) float32 68B dask.array<chunksize=(17,), meta=np.ndarray>
zeta (time, node) float32 3MB dask.array<chunksize=(1, 13486), meta=np.ndarray>
zeta_adj (time, node) float32 3MB dask.array<chunksize=(1, 13486), meta=np.ndarray>
zval (time, node) float32 3MB dask.array<chunksize=(1, 13486), meta=np.ndarray>
mesh int32 4B 0
Attributes:
Vertical_type: Hybrid SZ vertical coordinates, K=1 for bottom
grid_type: Unstructured model grid:
history: Created at Eastern Local Time 04:25 07/25/2024
model_developer: Oregon Health & Science University
model_link: http://www.ccalmr.ogi.edu/CORIE/modeling/selfe
reference: Created by CO-OPS/NOS/NOAA
source: SELFE-MPI Version 3.1dc
title: Columbia River & Estuarine Operational Forecast System
type: gridded/field NetCDF file - CF-1.0xarray.Dataset
- time: 49
- node: 13486
- nface: 3
- nele: 26040
- nz: 17
- lat(node)float32dask.array<chunksize=(13486,), meta=np.ndarray>
- long_name :
- nodal latitude
- units :
- degrees_north
Array Chunk Bytes 52.68 kiB 52.68 kiB Shape (13486,) (13486,) Dask graph 1 chunks in 3 graph layers Data type float32 numpy.ndarray - lon(node)float32dask.array<chunksize=(13486,), meta=np.ndarray>
- long_name :
- nodal longitude
- units :
- degrees_east
Array Chunk Bytes 52.68 kiB 52.68 kiB Shape (13486,) (13486,) Dask graph 1 chunks in 3 graph layers Data type float32 numpy.ndarray - sigma()float320.0
- long_name :
- S coordinates at whole levels
- positive :
- up
- units :
- non-dimensional
array(0., dtype=float32)
- time(time)datetime64[ns]2024-07-25T03:00:00 ... 2024-07-...
- base_date :
- 2024-07-24 21:00:00 UTC
- long_name :
- Time
- standard_name :
- time
array(['2024-07-25T03:00:00.000000000', '2024-07-25T04:00:00.000000000', '2024-07-25T05:00:00.000000000', '2024-07-25T06:00:00.000000000', '2024-07-25T07:00:00.000000000', '2024-07-25T08:00:00.000000000', '2024-07-25T09:00:00.000000000', '2024-07-25T10:00:00.000000000', '2024-07-25T11:00:00.000000000', '2024-07-25T12:00:00.000000000', '2024-07-25T13:00:00.000000000', '2024-07-25T14:00:00.000000000', '2024-07-25T15:00:00.000000000', '2024-07-25T16:00:00.000000000', '2024-07-25T17:00:00.000000000', '2024-07-25T18:00:00.000000000', '2024-07-25T19:00:00.000000000', '2024-07-25T20:00:00.000000000', '2024-07-25T21:00:00.000000000', '2024-07-25T22:00:00.000000000', '2024-07-25T23:00:00.000000000', '2024-07-26T00:00:00.000000000', '2024-07-26T01:00:00.000000000', '2024-07-26T02:00:00.000000000', '2024-07-26T03:00:00.000000000', '2024-07-26T04:00:00.000000000', '2024-07-26T05:00:00.000000000', '2024-07-26T06:00:00.000000000', '2024-07-26T07:00:00.000000000', '2024-07-26T08:00:00.000000000', '2024-07-26T09:00:00.000000000', '2024-07-26T10:00:00.000000000', '2024-07-26T11:00:00.000000000', '2024-07-26T12:00:00.000000000', '2024-07-26T13:00:00.000000000', '2024-07-26T14:00:00.000000000', '2024-07-26T15:00:00.000000000', '2024-07-26T16:00:00.000000000', '2024-07-26T17:00:00.000000000', '2024-07-26T18:00:00.000000000', '2024-07-26T19:00:00.000000000', '2024-07-26T20:00:00.000000000', '2024-07-26T21:00:00.000000000', '2024-07-26T22:00:00.000000000', '2024-07-26T23:00:00.000000000', '2024-07-27T00:00:00.000000000', '2024-07-27T01:00:00.000000000', '2024-07-27T02:00:00.000000000', '2024-07-27T03:00:00.000000000'], dtype='datetime64[ns]')
- Cs()float32dask.array<chunksize=(), meta=np.ndarray>
- long_name :
- Function C(s) at whole levels
- positive :
- up
- units :
- non-dimensional
Array Chunk Bytes 4 B 4 B Shape () () Dask graph 1 chunks in 3 graph layers Data type float32 numpy.ndarray - Pair(time, node)float32dask.array<chunksize=(1, 13486), meta=np.ndarray>
- grid :
- Bathymetry_Mesh
- location :
- node
- long_name :
- Pressure reduced to MSL
- type :
- data
- units :
- Pa
Array Chunk Bytes 2.52 MiB 52.68 kiB Shape (49, 13486) (1, 13486) Dask graph 49 chunks in 3 graph layers Data type float32 numpy.ndarray - ele(nface, nele)int32dask.array<chunksize=(3, 26040), meta=np.ndarray>
- long_name :
- Horizontal Triangular Element Table
- units :
- non-dimensional
- start_index :
- 1
Array Chunk Bytes 305.16 kiB 305.16 kiB Shape (3, 26040) (3, 26040) Dask graph 1 chunks in 4 graph layers Data type int32 numpy.ndarray - h(node)float32dask.array<chunksize=(13486,), meta=np.ndarray>
- grid :
- Bathymetry_Mesh
- long_name :
- Bathymetry
- positive :
- down
- standard_name :
- sea_floor_depth_below_geoid
- type :
- data
- units :
- m
Array Chunk Bytes 52.68 kiB 52.68 kiB Shape (13486,) (13486,) Dask graph 1 chunks in 3 graph layers Data type float32 numpy.ndarray - offset(node)float32dask.array<chunksize=(13486,), meta=np.ndarray>
- long_name :
- water level offset
- positive :
- up
- standard_name :
- mean difference of model minus obs. over 7 days
- units :
- meters
Array Chunk Bytes 52.68 kiB 52.68 kiB Shape (13486,) (13486,) Dask graph 1 chunks in 3 graph layers Data type float32 numpy.ndarray - salinity(time, node)float32dask.array<chunksize=(1, 13486), meta=np.ndarray>
- grid :
- Bathymetry_Mesh
- location :
- node
- long_name :
- salinity
- standard_name :
- sea_water_salinity
- type :
- data
- units :
- psu
Array Chunk Bytes 2.52 MiB 52.68 kiB Shape (49, 13486) (1, 13486) Dask graph 49 chunks in 4 graph layers Data type float32 numpy.ndarray - sigma_z()float32dask.array<chunksize=(), meta=np.ndarray>
- long_name :
- sigma(1-37 layers),Z(38-54 layers)
- positive :
- up
- units :
- sigma or meters
Array Chunk Bytes 4 B 4 B Shape () () Dask graph 1 chunks in 3 graph layers Data type float32 numpy.ndarray - temp(time, node)float32dask.array<chunksize=(1, 13486), meta=np.ndarray>
- grid :
- Bathymetry_Mesh
- location :
- node
- long_name :
- temperature
- standard_name :
- sea_water_temperature
- type :
- data
- units :
- degrees_C
Array Chunk Bytes 2.52 MiB 52.68 kiB Shape (49, 13486) (1, 13486) Dask graph 49 chunks in 4 graph layers Data type float32 numpy.ndarray - u(time, node)float32dask.array<chunksize=(1, 13486), meta=np.ndarray>
- grid :
- Bathymetry_Mesh
- location :
- node
- long_name :
- Eastward Water Velocity
- type :
- data
- units :
- meters s-1
Array Chunk Bytes 2.52 MiB 52.68 kiB Shape (49, 13486) (1, 13486) Dask graph 49 chunks in 4 graph layers Data type float32 numpy.ndarray - uwind_speed(time, node)float32dask.array<chunksize=(1, 13486), meta=np.ndarray>
- grid :
- Bathymetry_Mesh
- location :
- node
- long_name :
- Eastward Wind Velocity
- type :
- data
- units :
- meters s-1
Array Chunk Bytes 2.52 MiB 52.68 kiB Shape (49, 13486) (1, 13486) Dask graph 49 chunks in 3 graph layers Data type float32 numpy.ndarray - v(time, node)float32dask.array<chunksize=(1, 13486), meta=np.ndarray>
- grid :
- Bathymetry_Mesh
- location :
- node
- long_name :
- Northward Water Velocity
- type :
- data
- units :
- meters s-1
Array Chunk Bytes 2.52 MiB 52.68 kiB Shape (49, 13486) (1, 13486) Dask graph 49 chunks in 4 graph layers Data type float32 numpy.ndarray - vwind_speed(time, node)float32dask.array<chunksize=(1, 13486), meta=np.ndarray>
- grid :
- Bathymetry_Mesh
- location :
- node
- long_name :
- Northward Wind Velocity
- type :
- data
- units :
- meters s-1
Array Chunk Bytes 2.52 MiB 52.68 kiB Shape (49, 13486) (1, 13486) Dask graph 49 chunks in 3 graph layers Data type float32 numpy.ndarray - x(node)float32dask.array<chunksize=(13486,), meta=np.ndarray>
- long_name :
- nodal x-coordinate
- units :
- meters
Array Chunk Bytes 52.68 kiB 52.68 kiB Shape (13486,) (13486,) Dask graph 1 chunks in 3 graph layers Data type float32 numpy.ndarray - y(node)float32dask.array<chunksize=(13486,), meta=np.ndarray>
- long_name :
- nodal y-coordinate
- units :
- meters
Array Chunk Bytes 52.68 kiB 52.68 kiB Shape (13486,) (13486,) Dask graph 1 chunks in 3 graph layers Data type float32 numpy.ndarray - z(nz)float32dask.array<chunksize=(17,), meta=np.ndarray>
- long_name :
- Z coordinates at whole levels
- positive :
- up
- units :
- meters
Array Chunk Bytes 68 B 68 B Shape (17,) (17,) Dask graph 1 chunks in 2 graph layers Data type float32 numpy.ndarray - zeta(time, node)float32dask.array<chunksize=(1, 13486), meta=np.ndarray>
- grid :
- Bathymetry_Mesh
- location :
- node
- long_name :
- Water Surface Elevation
- positive :
- up
- standard_name :
- Original modeled sea_surface_height_above_geoid
- type :
- data
- units :
- meters
Array Chunk Bytes 2.52 MiB 52.68 kiB Shape (49, 13486) (1, 13486) Dask graph 49 chunks in 3 graph layers Data type float32 numpy.ndarray - zeta_adj(time, node)float32dask.array<chunksize=(1, 13486), meta=np.ndarray>
- grid :
- Bathymetry_Mesh
- location :
- node
- long_name :
- Adjusted Water Surface Elevation
- positive :
- up
- standard_name :
- offset corrected sea_surface_height_above_geoid
- type :
- data
- units :
- meters
Array Chunk Bytes 2.52 MiB 52.68 kiB Shape (49, 13486) (1, 13486) Dask graph 49 chunks in 3 graph layers Data type float32 numpy.ndarray - zval(time, node)float32dask.array<chunksize=(1, 13486), meta=np.ndarray>
- grid :
- Bathymetry_Mesh
- location :
- node
- long_name :
- height of vertical grid level
- standard_name :
- z-coordinate height
- type :
- data
- units :
- meters
Array Chunk Bytes 2.52 MiB 52.68 kiB Shape (49, 13486) (1, 13486) Dask graph 49 chunks in 4 graph layers Data type float32 numpy.ndarray - mesh()int320
- cf_role :
- mesh_topology
- topology_dimension :
- 2
- node_coordinates :
- lon lat
- face_node_connectivity :
- ele
- face_dimension :
- nele
array(0, dtype=int32)
- timePandasIndex
PandasIndex(DatetimeIndex(['2024-07-25 03:00:00', '2024-07-25 04:00:00', '2024-07-25 05:00:00', '2024-07-25 06:00:00', '2024-07-25 07:00:00', '2024-07-25 08:00:00', '2024-07-25 09:00:00', '2024-07-25 10:00:00', '2024-07-25 11:00:00', '2024-07-25 12:00:00', '2024-07-25 13:00:00', '2024-07-25 14:00:00', '2024-07-25 15:00:00', '2024-07-25 16:00:00', '2024-07-25 17:00:00', '2024-07-25 18:00:00', '2024-07-25 19:00:00', '2024-07-25 20:00:00', '2024-07-25 21:00:00', '2024-07-25 22:00:00', '2024-07-25 23:00:00', '2024-07-26 00:00:00', '2024-07-26 01:00:00', '2024-07-26 02:00:00', '2024-07-26 03:00:00', '2024-07-26 04:00:00', '2024-07-26 05:00:00', '2024-07-26 06:00:00', '2024-07-26 07:00:00', '2024-07-26 08:00:00', '2024-07-26 09:00:00', '2024-07-26 10:00:00', '2024-07-26 11:00:00', '2024-07-26 12:00:00', '2024-07-26 13:00:00', '2024-07-26 14:00:00', '2024-07-26 15:00:00', '2024-07-26 16:00:00', '2024-07-26 17:00:00', '2024-07-26 18:00:00', '2024-07-26 19:00:00', '2024-07-26 20:00:00', '2024-07-26 21:00:00', '2024-07-26 22:00:00', '2024-07-26 23:00:00', '2024-07-27 00:00:00', '2024-07-27 01:00:00', '2024-07-27 02:00:00', '2024-07-27 03:00:00'], dtype='datetime64[ns]', name='time', freq=None))
- Vertical_type :
- Hybrid SZ vertical coordinates, K=1 for bottom
- grid_type :
- Unstructured model grid:
- history :
- Created at Eastern Local Time 04:25 07/25/2024
- model_developer :
- Oregon Health & Science University
- model_link :
- http://www.ccalmr.ogi.edu/CORIE/modeling/selfe
- reference :
- Created by CO-OPS/NOS/NOAA
- source :
- SELFE-MPI Version 3.1dc
- title :
- Columbia River & Estuarine Operational Forecast System
- type :
- gridded/field NetCDF file - CF-1.0
import matplotlib.pyplot as plt
import matplotlib.tri as tri
salinity = ds_surface_subset.temp.isel(time=0)
tris = tri.Triangulation(
salinity.cf["longitude"],
salinity.cf["latitude"],
triangles=ds_surface_subset[ds_surface_subset.mesh.face_node_connectivity].T - 1,
)
plt.tripcolor(tris, salinity, shading="flat")
<matplotlib.collections.PolyCollection at 0x3128fa860>
f"Subset dataset size: {ds_surface_subset.nbytes * 1.0e-6} Mb"
'Subset dataset size: 27.06918 Mb'