STOFS 2D¶
We use the Stofs-2d-Global Fields-CWL dataset to compute a subset selector and reuse it
# 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 fsspec
import xarray as xr
import xarray_subset_grid
# Open the dataset from NODD s3 bucket directly
fs = fsspec.filesystem("s3", anon=True)
ds_cwl = xr.open_dataset(
fs.open(
"s3://noaa-gestofs-pds/stofs_2d_glo.20240807/stofs_2d_glo.t06z.fields.cwl.nc"
),
chunks={},
drop_variables=['nvel']
)
ds_cwl
<xarray.Dataset> Size: 20GB
Dimensions: (time: 186, node: 12785004, nele: 24875336, nvertex: 3,
mesh: 1, nbou: 262, nvel: 12421)
Coordinates:
* time (time) datetime64[ns] 1kB 2024-08-07T01:00:00 ... 2024-08-14...
x (node) float64 102MB dask.array<chunksize=(511401,), meta=np.ndarray>
y (node) float64 102MB dask.array<chunksize=(511401,), meta=np.ndarray>
Dimensions without coordinates: node, nele, nvertex, mesh, nbou, nvel
Data variables:
element (nele, nvertex) int32 299MB dask.array<chunksize=(2763927, 1), meta=np.ndarray>
adcirc_mesh (mesh) int32 4B dask.array<chunksize=(1,), meta=np.ndarray>
nvell (nbou) int32 1kB dask.array<chunksize=(262,), meta=np.ndarray>
max_nvell int32 4B ...
ibtype (nbou) int32 1kB dask.array<chunksize=(262,), meta=np.ndarray>
nbvv (nvel) int32 50kB dask.array<chunksize=(12421,), meta=np.ndarray>
depth (node) float64 102MB dask.array<chunksize=(511401,), meta=np.ndarray>
zeta (time, node) float64 19GB dask.array<chunksize=(1, 511401), meta=np.ndarray>
Attributes: (12/50)
_FillValue: -99999.0
model: ADCIRC
version: noaa.stofs.2d.glo.v2.1.0r1.v55.12
git_hash: 23947fbd9683d0ef48f12e6ce62d45d18bc27ff3
grid_type: Triangular
description: 2024080706 :-6 hr nowcast and +180 hr forecast ! 32 C...
... ...
sfea0: 45.0
cf: 0.0005
eslm: -0.2
cori: 0.0
ntif: 8
nbfr: 0- time: 186
- node: 12785004
- nele: 24875336
- nvertex: 3
- mesh: 1
- nbou: 262
- nvel: 12421
- time(time)datetime64[ns]2024-08-07T01:00:00 ... 2024-08-...
- long_name :
- model time
- standard_name :
- time
- base_date :
- 2024-04-04 12:00:00 ! NCDASE - BASE_DATE
array(['2024-08-07T01:00:00.000000000', '2024-08-07T02:00:00.000000000', '2024-08-07T03:00:00.000000000', '2024-08-07T04:00:00.000000000', '2024-08-07T05:00:00.000000000', '2024-08-07T06:00:00.000000000', '2024-08-07T07:00:00.000000000', '2024-08-07T08:00:00.000000000', '2024-08-07T09:00:00.000000000', '2024-08-07T10:00:00.000000000', '2024-08-07T11:00:00.000000000', '2024-08-07T12:00:00.000000000', '2024-08-07T13:00:00.000000000', '2024-08-07T14:00:00.000000000', '2024-08-07T15:00:00.000000000', '2024-08-07T16:00:00.000000000', '2024-08-07T17:00:00.000000000', '2024-08-07T18:00:00.000000000', '2024-08-07T19:00:00.000000000', '2024-08-07T20:00:00.000000000', '2024-08-07T21:00:00.000000000', '2024-08-07T22:00:00.000000000', '2024-08-07T23:00:00.000000000', '2024-08-08T00:00:00.000000000', '2024-08-08T01:00:00.000000000', '2024-08-08T02:00:00.000000000', '2024-08-08T03:00:00.000000000', '2024-08-08T04:00:00.000000000', '2024-08-08T05:00:00.000000000', '2024-08-08T06:00:00.000000000', '2024-08-08T07:00:00.000000000', '2024-08-08T08:00:00.000000000', '2024-08-08T09:00:00.000000000', '2024-08-08T10:00:00.000000000', '2024-08-08T11:00:00.000000000', '2024-08-08T12:00:00.000000000', '2024-08-08T13:00:00.000000000', '2024-08-08T14:00:00.000000000', '2024-08-08T15:00:00.000000000', '2024-08-08T16:00:00.000000000', '2024-08-08T17:00:00.000000000', '2024-08-08T18:00:00.000000000', '2024-08-08T19:00:00.000000000', '2024-08-08T20:00:00.000000000', '2024-08-08T21:00:00.000000000', '2024-08-08T22:00:00.000000000', '2024-08-08T23:00:00.000000000', '2024-08-09T00:00:00.000000000', '2024-08-09T01:00:00.000000000', '2024-08-09T02:00:00.000000000', '2024-08-09T03:00:00.000000000', '2024-08-09T04:00:00.000000000', '2024-08-09T05:00:00.000000000', '2024-08-09T06:00:00.000000000', '2024-08-09T07:00:00.000000000', '2024-08-09T08:00:00.000000000', '2024-08-09T09:00:00.000000000', '2024-08-09T10:00:00.000000000', '2024-08-09T11:00:00.000000000', '2024-08-09T12:00:00.000000000', '2024-08-09T13:00:00.000000000', '2024-08-09T14:00:00.000000000', '2024-08-09T15:00:00.000000000', '2024-08-09T16:00:00.000000000', '2024-08-09T17:00:00.000000000', '2024-08-09T18:00:00.000000000', '2024-08-09T19:00:00.000000000', '2024-08-09T20:00:00.000000000', '2024-08-09T21:00:00.000000000', '2024-08-09T22:00:00.000000000', '2024-08-09T23:00:00.000000000', '2024-08-10T00:00:00.000000000', '2024-08-10T01:00:00.000000000', '2024-08-10T02:00:00.000000000', '2024-08-10T03:00:00.000000000', '2024-08-10T04:00:00.000000000', '2024-08-10T05:00:00.000000000', '2024-08-10T06:00:00.000000000', '2024-08-10T07:00:00.000000000', '2024-08-10T08:00:00.000000000', '2024-08-10T09:00:00.000000000', '2024-08-10T10:00:00.000000000', '2024-08-10T11:00:00.000000000', '2024-08-10T12:00:00.000000000', '2024-08-10T13:00:00.000000000', '2024-08-10T14:00:00.000000000', '2024-08-10T15:00:00.000000000', '2024-08-10T16:00:00.000000000', '2024-08-10T17:00:00.000000000', '2024-08-10T18:00:00.000000000', '2024-08-10T19:00:00.000000000', '2024-08-10T20:00:00.000000000', '2024-08-10T21:00:00.000000000', '2024-08-10T22:00:00.000000000', '2024-08-10T23:00:00.000000000', '2024-08-11T00:00:00.000000000', '2024-08-11T01:00:00.000000000', '2024-08-11T02:00:00.000000000', '2024-08-11T03:00:00.000000000', '2024-08-11T04:00:00.000000000', '2024-08-11T05:00:00.000000000', '2024-08-11T06:00:00.000000000', '2024-08-11T07:00:00.000000000', '2024-08-11T08:00:00.000000000', '2024-08-11T09:00:00.000000000', '2024-08-11T10:00:00.000000000', '2024-08-11T11:00:00.000000000', '2024-08-11T12:00:00.000000000', '2024-08-11T13:00:00.000000000', '2024-08-11T14:00:00.000000000', '2024-08-11T15:00:00.000000000', '2024-08-11T16:00:00.000000000', '2024-08-11T17:00:00.000000000', '2024-08-11T18:00:00.000000000', '2024-08-11T19:00:00.000000000', '2024-08-11T20:00:00.000000000', '2024-08-11T21:00:00.000000000', '2024-08-11T22:00:00.000000000', '2024-08-11T23:00:00.000000000', '2024-08-12T00:00:00.000000000', '2024-08-12T01:00:00.000000000', '2024-08-12T02:00:00.000000000', '2024-08-12T03:00:00.000000000', '2024-08-12T04:00:00.000000000', '2024-08-12T05:00:00.000000000', '2024-08-12T06:00:00.000000000', '2024-08-12T07:00:00.000000000', '2024-08-12T08:00:00.000000000', '2024-08-12T09:00:00.000000000', '2024-08-12T10:00:00.000000000', '2024-08-12T11:00:00.000000000', '2024-08-12T12:00:00.000000000', '2024-08-12T13:00:00.000000000', '2024-08-12T14:00:00.000000000', '2024-08-12T15:00:00.000000000', '2024-08-12T16:00:00.000000000', '2024-08-12T17:00:00.000000000', '2024-08-12T18:00:00.000000000', '2024-08-12T19:00:00.000000000', '2024-08-12T20:00:00.000000000', '2024-08-12T21:00:00.000000000', '2024-08-12T22:00:00.000000000', '2024-08-12T23:00:00.000000000', '2024-08-13T00:00:00.000000000', '2024-08-13T01:00:00.000000000', '2024-08-13T02:00:00.000000000', '2024-08-13T03:00:00.000000000', '2024-08-13T04:00:00.000000000', '2024-08-13T05:00:00.000000000', '2024-08-13T06:00:00.000000000', '2024-08-13T07:00:00.000000000', '2024-08-13T08:00:00.000000000', '2024-08-13T09:00:00.000000000', '2024-08-13T10:00:00.000000000', '2024-08-13T11:00:00.000000000', '2024-08-13T12:00:00.000000000', '2024-08-13T13:00:00.000000000', '2024-08-13T14:00:00.000000000', '2024-08-13T15:00:00.000000000', '2024-08-13T16:00:00.000000000', '2024-08-13T17:00:00.000000000', '2024-08-13T18:00:00.000000000', '2024-08-13T19:00:00.000000000', '2024-08-13T20:00:00.000000000', '2024-08-13T21:00:00.000000000', '2024-08-13T22:00:00.000000000', '2024-08-13T23:00:00.000000000', '2024-08-14T00:00:00.000000000', '2024-08-14T01:00:00.000000000', '2024-08-14T02:00:00.000000000', '2024-08-14T03:00:00.000000000', '2024-08-14T04:00:00.000000000', '2024-08-14T05:00:00.000000000', '2024-08-14T06:00:00.000000000', '2024-08-14T07:00:00.000000000', '2024-08-14T08:00:00.000000000', '2024-08-14T09:00:00.000000000', '2024-08-14T10:00:00.000000000', '2024-08-14T11:00:00.000000000', '2024-08-14T12:00:00.000000000', '2024-08-14T13:00:00.000000000', '2024-08-14T14:00:00.000000000', '2024-08-14T15:00:00.000000000', '2024-08-14T16:00:00.000000000', '2024-08-14T17:00:00.000000000', '2024-08-14T18:00:00.000000000'], dtype='datetime64[ns]') - x(node)float64dask.array<chunksize=(511401,), meta=np.ndarray>
- long_name :
- longitude
- standard_name :
- longitude
- units :
- degrees_east
- positive :
- east
Array Chunk Bytes 97.54 MiB 3.90 MiB Shape (12785004,) (511401,) Dask graph 25 chunks in 2 graph layers Data type float64 numpy.ndarray - y(node)float64dask.array<chunksize=(511401,), meta=np.ndarray>
- long_name :
- latitude
- standard_name :
- latitude
- units :
- degrees_north
- positive :
- north
Array Chunk Bytes 97.54 MiB 3.90 MiB Shape (12785004,) (511401,) Dask graph 25 chunks in 2 graph layers Data type float64 numpy.ndarray
- element(nele, nvertex)int32dask.array<chunksize=(2763927, 1), meta=np.ndarray>
- long_name :
- element
- cf_role :
- face_node_connectivity
- start_index :
- 1
- units :
- nondimensional
Array Chunk Bytes 284.68 MiB 10.54 MiB Shape (24875336, 3) (2763927, 1) Dask graph 27 chunks in 2 graph layers Data type int32 numpy.ndarray - adcirc_mesh(mesh)int32dask.array<chunksize=(1,), meta=np.ndarray>
- long_name :
- mesh_topology
- cf_role :
- mesh_topology
- topology_dimension :
- 2
- node_coordinates :
- x y
- face_node_connectivity :
- element
Array Chunk Bytes 4 B 4 B Shape (1,) (1,) Dask graph 1 chunks in 2 graph layers Data type int32 numpy.ndarray - nvell(nbou)int32dask.array<chunksize=(262,), meta=np.ndarray>
- long_name :
- number of nodes in each normal flow specified boundary segment
- units :
- nondimensional
Array Chunk Bytes 1.02 kiB 1.02 kiB Shape (262,) (262,) Dask graph 1 chunks in 2 graph layers Data type int32 numpy.ndarray - max_nvell()int32...
[1 values with dtype=int32]
- ibtype(nbou)int32dask.array<chunksize=(262,), meta=np.ndarray>
- long_name :
- type of normal flow (discharge) boundary
- units :
- nondimensional
Array Chunk Bytes 1.02 kiB 1.02 kiB Shape (262,) (262,) Dask graph 1 chunks in 2 graph layers Data type int32 numpy.ndarray - nbvv(nvel)int32dask.array<chunksize=(12421,), meta=np.ndarray>
- long_name :
- node numbers on normal flow boundary segment
- units :
- nondimensional
Array Chunk Bytes 48.52 kiB 48.52 kiB Shape (12421,) (12421,) Dask graph 1 chunks in 2 graph layers Data type int32 numpy.ndarray - depth(node)float64dask.array<chunksize=(511401,), meta=np.ndarray>
- long_name :
- distance below geoid
- standard_name :
- depth below geoid
- location :
- node
- mesh :
- adcirc_mesh
- units :
- m
Array Chunk Bytes 97.54 MiB 3.90 MiB Shape (12785004,) (511401,) Dask graph 25 chunks in 2 graph layers Data type float64 numpy.ndarray - zeta(time, node)float64dask.array<chunksize=(1, 511401), meta=np.ndarray>
- long_name :
- water surface elevation above geoid
- standard_name :
- sea_surface_height_above_geoid
- location :
- node
- mesh :
- adcirc_mesh
- units :
- m
Array Chunk Bytes 17.72 GiB 3.90 MiB Shape (186, 12785004) (1, 511401) Dask graph 4650 chunks in 2 graph layers Data type float64 numpy.ndarray
- timePandasIndex
PandasIndex(DatetimeIndex(['2024-08-07 01:00:00', '2024-08-07 02:00:00', '2024-08-07 03:00:00', '2024-08-07 04:00:00', '2024-08-07 05:00:00', '2024-08-07 06:00:00', '2024-08-07 07:00:00', '2024-08-07 08:00:00', '2024-08-07 09:00:00', '2024-08-07 10:00:00', ... '2024-08-14 09:00:00', '2024-08-14 10:00:00', '2024-08-14 11:00:00', '2024-08-14 12:00:00', '2024-08-14 13:00:00', '2024-08-14 14:00:00', '2024-08-14 15:00:00', '2024-08-14 16:00:00', '2024-08-14 17:00:00', '2024-08-14 18:00:00'], dtype='datetime64[ns]', name='time', length=186, freq=None))
- _FillValue :
- -99999.0
- model :
- ADCIRC
- version :
- noaa.stofs.2d.glo.v2.1.0r1.v55.12
- git_hash :
- 23947fbd9683d0ef48f12e6ce62d45d18bc27ff3
- grid_type :
- Triangular
- description :
- 2024080706 :-6 hr nowcast and +180 hr forecast ! 32 CHARACTER ALPHANUMERIC RUN D
- agrid :
- OceanMesh2D
- rundes :
- 2024080706 :-6 hr nowcast and +180 hr forecast ! 32 CHARACTER ALPHANUMERIC RUN D
- runid :
- STOFS 2D GLOBAL v5.6.5 ! 24 CHARACTER ALPHANUMERIC RUN IDENTIFICATION
- title :
- STOFS_2D_GLOBAL.V2.1.0 ! NCPROJ - PROJECT TITLE
- institution :
- NOS/OCS/CSDL/CMMB ! NCINST - PROJECT INSTITUTION
- source :
- Dogwood/Cactus ! NCSOUR - PROJECT SOURCE
- history :
- PRODUCTION ! NCHIST - PROJECT HISTORY
- references :
- http://www.adcirc.org ! NCREF - PROJECT REFERENCES
- comments :
- STOFS_2D_GLOBAL.V2.1.0 ! NCCOM - PROJECT COMMENTS
- host :
- NOS/OCS/CSDL/CMMB ! NCHOST - PROJECT HOST
- convention :
- CF-1.0 ! NCCONV - CONVENTIONS
- Conventions :
- UGRID-0.9.0
- contact :
- Yuji.Funaoshi@noaa.gov ! NCCONT - CONTACT INFORMATION
- creation_date :
- 2024-08-07 9:55:31 00:00
- modification_date :
- 2024-08-07 9:55:31 00:00
- fort.15 :
- ==== Input File Parameters (below) ====
- dt :
- 6.0
- ihot :
- 568
- ics :
- 22
- nolibf :
- 1
- nolifa :
- 2
- nolica :
- 1
- nolicat :
- 1
- nwp :
- 7
- ncor :
- 1
- ntip :
- 2
- nws :
- 10
- nramp :
- 1
- tau0 :
- 0.053333
- statim :
- 0.0
- reftim :
- 0.0
- rnday :
- 124.75
- dramp :
- 6.75
- a00 :
- 0.8
- b00 :
- 0.2
- c00 :
- 0.0
- h0 :
- 0.1
- slam0 :
- 0.0
- sfea0 :
- 45.0
- cf :
- 0.0005
- eslm :
- -0.2
- cori :
- 0.0
- ntif :
- 8
- nbfr :
- 0
Make the dataset CF compliant
ds_cwl = xarray_subset_grid.grids.ugrid.assign_ugrid_topology(ds_cwl)
f"Dataset size: {ds_cwl.nbytes * 1.0e-9} Gb"
'Dataset size: 19.629483356 Gb'
Example BBOX¶
Drawn with https://geojson.io

Compute the subset selector.
Specify the selector name for easier accessibility. (optional)
%%time
bbox = (-70, 40, -60, 50)
name = 'northeastUSA2d'
bbox_selector = ds_cwl.xsg.grid.compute_bbox_subset_selector(ds_cwl, bbox, name)
bbox_selector
CPU times: user 17.6 s, sys: 1.92 s, total: 19.5 s
Wall time: 58.3 s
<class 'xarray_subset_grid.grids.ugrid.UGridSelector'> - northeastUSA2d
Use the subset selector to slice the dataset. This is fast because the computation is already done
%%time
ds_subset_cwl = bbox_selector.select(ds_cwl)
ds_subset_cwl
CPU times: user 255 ms, sys: 0 ns, total: 255 ms
Wall time: 253 ms
<xarray.Dataset> Size: 547MB
Dimensions: (time: 186, node: 356230, nele: 686355, nvertex: 3, mesh: 1,
nbou: 262, nvel: 12421)
Coordinates:
* time (time) datetime64[ns] 1kB 2024-08-07T01:00:00 ... 2024-08-14...
x (node) float64 3MB dask.array<chunksize=(79,), meta=np.ndarray>
y (node) float64 3MB dask.array<chunksize=(79,), meta=np.ndarray>
Dimensions without coordinates: node, nele, nvertex, mesh, nbou, nvel
Data variables:
element (nele, nvertex) int32 8MB dask.array<chunksize=(44090, 1), meta=np.ndarray>
adcirc_mesh (mesh) int32 4B dask.array<chunksize=(1,), meta=np.ndarray>
nvell (nbou) int32 1kB dask.array<chunksize=(262,), meta=np.ndarray>
max_nvell int32 4B ...
ibtype (nbou) int32 1kB dask.array<chunksize=(262,), meta=np.ndarray>
nbvv (nvel) int32 50kB dask.array<chunksize=(12421,), meta=np.ndarray>
depth (node) float64 3MB dask.array<chunksize=(79,), meta=np.ndarray>
zeta (time, node) float64 530MB dask.array<chunksize=(1, 79), meta=np.ndarray>
Attributes: (12/50)
_FillValue: -99999.0
model: ADCIRC
version: noaa.stofs.2d.glo.v2.1.0r1.v55.12
git_hash: 23947fbd9683d0ef48f12e6ce62d45d18bc27ff3
grid_type: Triangular
description: 2024080706 :-6 hr nowcast and +180 hr forecast ! 32 C...
... ...
sfea0: 45.0
cf: 0.0005
eslm: -0.2
cori: 0.0
ntif: 8
nbfr: 0- time: 186
- node: 356230
- nele: 686355
- nvertex: 3
- mesh: 1
- nbou: 262
- nvel: 12421
- time(time)datetime64[ns]2024-08-07T01:00:00 ... 2024-08-...
- long_name :
- model time
- standard_name :
- time
- base_date :
- 2024-04-04 12:00:00 ! NCDASE - BASE_DATE
array(['2024-08-07T01:00:00.000000000', '2024-08-07T02:00:00.000000000', '2024-08-07T03:00:00.000000000', '2024-08-07T04:00:00.000000000', '2024-08-07T05:00:00.000000000', '2024-08-07T06:00:00.000000000', '2024-08-07T07:00:00.000000000', '2024-08-07T08:00:00.000000000', '2024-08-07T09:00:00.000000000', '2024-08-07T10:00:00.000000000', '2024-08-07T11:00:00.000000000', '2024-08-07T12:00:00.000000000', '2024-08-07T13:00:00.000000000', '2024-08-07T14:00:00.000000000', '2024-08-07T15:00:00.000000000', '2024-08-07T16:00:00.000000000', '2024-08-07T17:00:00.000000000', '2024-08-07T18:00:00.000000000', '2024-08-07T19:00:00.000000000', '2024-08-07T20:00:00.000000000', '2024-08-07T21:00:00.000000000', '2024-08-07T22:00:00.000000000', '2024-08-07T23:00:00.000000000', '2024-08-08T00:00:00.000000000', '2024-08-08T01:00:00.000000000', '2024-08-08T02:00:00.000000000', '2024-08-08T03:00:00.000000000', '2024-08-08T04:00:00.000000000', '2024-08-08T05:00:00.000000000', '2024-08-08T06:00:00.000000000', '2024-08-08T07:00:00.000000000', '2024-08-08T08:00:00.000000000', '2024-08-08T09:00:00.000000000', '2024-08-08T10:00:00.000000000', '2024-08-08T11:00:00.000000000', '2024-08-08T12:00:00.000000000', '2024-08-08T13:00:00.000000000', '2024-08-08T14:00:00.000000000', '2024-08-08T15:00:00.000000000', '2024-08-08T16:00:00.000000000', '2024-08-08T17:00:00.000000000', '2024-08-08T18:00:00.000000000', '2024-08-08T19:00:00.000000000', '2024-08-08T20:00:00.000000000', '2024-08-08T21:00:00.000000000', '2024-08-08T22:00:00.000000000', '2024-08-08T23:00:00.000000000', '2024-08-09T00:00:00.000000000', '2024-08-09T01:00:00.000000000', '2024-08-09T02:00:00.000000000', '2024-08-09T03:00:00.000000000', '2024-08-09T04:00:00.000000000', '2024-08-09T05:00:00.000000000', '2024-08-09T06:00:00.000000000', '2024-08-09T07:00:00.000000000', '2024-08-09T08:00:00.000000000', '2024-08-09T09:00:00.000000000', '2024-08-09T10:00:00.000000000', '2024-08-09T11:00:00.000000000', '2024-08-09T12:00:00.000000000', '2024-08-09T13:00:00.000000000', '2024-08-09T14:00:00.000000000', '2024-08-09T15:00:00.000000000', '2024-08-09T16:00:00.000000000', '2024-08-09T17:00:00.000000000', '2024-08-09T18:00:00.000000000', '2024-08-09T19:00:00.000000000', '2024-08-09T20:00:00.000000000', '2024-08-09T21:00:00.000000000', '2024-08-09T22:00:00.000000000', '2024-08-09T23:00:00.000000000', '2024-08-10T00:00:00.000000000', '2024-08-10T01:00:00.000000000', '2024-08-10T02:00:00.000000000', '2024-08-10T03:00:00.000000000', '2024-08-10T04:00:00.000000000', '2024-08-10T05:00:00.000000000', '2024-08-10T06:00:00.000000000', '2024-08-10T07:00:00.000000000', '2024-08-10T08:00:00.000000000', '2024-08-10T09:00:00.000000000', '2024-08-10T10:00:00.000000000', '2024-08-10T11:00:00.000000000', '2024-08-10T12:00:00.000000000', '2024-08-10T13:00:00.000000000', '2024-08-10T14:00:00.000000000', '2024-08-10T15:00:00.000000000', '2024-08-10T16:00:00.000000000', '2024-08-10T17:00:00.000000000', '2024-08-10T18:00:00.000000000', '2024-08-10T19:00:00.000000000', '2024-08-10T20:00:00.000000000', '2024-08-10T21:00:00.000000000', '2024-08-10T22:00:00.000000000', '2024-08-10T23:00:00.000000000', '2024-08-11T00:00:00.000000000', '2024-08-11T01:00:00.000000000', '2024-08-11T02:00:00.000000000', '2024-08-11T03:00:00.000000000', '2024-08-11T04:00:00.000000000', '2024-08-11T05:00:00.000000000', '2024-08-11T06:00:00.000000000', '2024-08-11T07:00:00.000000000', '2024-08-11T08:00:00.000000000', '2024-08-11T09:00:00.000000000', '2024-08-11T10:00:00.000000000', '2024-08-11T11:00:00.000000000', '2024-08-11T12:00:00.000000000', '2024-08-11T13:00:00.000000000', '2024-08-11T14:00:00.000000000', '2024-08-11T15:00:00.000000000', '2024-08-11T16:00:00.000000000', '2024-08-11T17:00:00.000000000', '2024-08-11T18:00:00.000000000', '2024-08-11T19:00:00.000000000', '2024-08-11T20:00:00.000000000', '2024-08-11T21:00:00.000000000', '2024-08-11T22:00:00.000000000', '2024-08-11T23:00:00.000000000', '2024-08-12T00:00:00.000000000', '2024-08-12T01:00:00.000000000', '2024-08-12T02:00:00.000000000', '2024-08-12T03:00:00.000000000', '2024-08-12T04:00:00.000000000', '2024-08-12T05:00:00.000000000', '2024-08-12T06:00:00.000000000', '2024-08-12T07:00:00.000000000', '2024-08-12T08:00:00.000000000', '2024-08-12T09:00:00.000000000', '2024-08-12T10:00:00.000000000', '2024-08-12T11:00:00.000000000', '2024-08-12T12:00:00.000000000', '2024-08-12T13:00:00.000000000', '2024-08-12T14:00:00.000000000', '2024-08-12T15:00:00.000000000', '2024-08-12T16:00:00.000000000', '2024-08-12T17:00:00.000000000', '2024-08-12T18:00:00.000000000', '2024-08-12T19:00:00.000000000', '2024-08-12T20:00:00.000000000', '2024-08-12T21:00:00.000000000', '2024-08-12T22:00:00.000000000', '2024-08-12T23:00:00.000000000', '2024-08-13T00:00:00.000000000', '2024-08-13T01:00:00.000000000', '2024-08-13T02:00:00.000000000', '2024-08-13T03:00:00.000000000', '2024-08-13T04:00:00.000000000', '2024-08-13T05:00:00.000000000', '2024-08-13T06:00:00.000000000', '2024-08-13T07:00:00.000000000', '2024-08-13T08:00:00.000000000', '2024-08-13T09:00:00.000000000', '2024-08-13T10:00:00.000000000', '2024-08-13T11:00:00.000000000', '2024-08-13T12:00:00.000000000', '2024-08-13T13:00:00.000000000', '2024-08-13T14:00:00.000000000', '2024-08-13T15:00:00.000000000', '2024-08-13T16:00:00.000000000', '2024-08-13T17:00:00.000000000', '2024-08-13T18:00:00.000000000', '2024-08-13T19:00:00.000000000', '2024-08-13T20:00:00.000000000', '2024-08-13T21:00:00.000000000', '2024-08-13T22:00:00.000000000', '2024-08-13T23:00:00.000000000', '2024-08-14T00:00:00.000000000', '2024-08-14T01:00:00.000000000', '2024-08-14T02:00:00.000000000', '2024-08-14T03:00:00.000000000', '2024-08-14T04:00:00.000000000', '2024-08-14T05:00:00.000000000', '2024-08-14T06:00:00.000000000', '2024-08-14T07:00:00.000000000', '2024-08-14T08:00:00.000000000', '2024-08-14T09:00:00.000000000', '2024-08-14T10:00:00.000000000', '2024-08-14T11:00:00.000000000', '2024-08-14T12:00:00.000000000', '2024-08-14T13:00:00.000000000', '2024-08-14T14:00:00.000000000', '2024-08-14T15:00:00.000000000', '2024-08-14T16:00:00.000000000', '2024-08-14T17:00:00.000000000', '2024-08-14T18:00:00.000000000'], dtype='datetime64[ns]') - x(node)float64dask.array<chunksize=(79,), meta=np.ndarray>
- long_name :
- longitude
- standard_name :
- longitude
- units :
- degrees_east
- positive :
- east
Array Chunk Bytes 2.72 MiB 490.40 kiB Shape (356230,) (62771,) Dask graph 14 chunks in 3 graph layers Data type float64 numpy.ndarray - y(node)float64dask.array<chunksize=(79,), meta=np.ndarray>
- long_name :
- latitude
- standard_name :
- latitude
- units :
- degrees_north
- positive :
- north
Array Chunk Bytes 2.72 MiB 490.40 kiB Shape (356230,) (62771,) Dask graph 14 chunks in 3 graph layers Data type float64 numpy.ndarray
- element(nele, nvertex)int32dask.array<chunksize=(44090, 1), meta=np.ndarray>
- long_name :
- element
- cf_role :
- face_node_connectivity
- start_index :
- 1
- units :
- nondimensional
Array Chunk Bytes 7.85 MiB 1.16 MiB Shape (686355, 3) (305263, 1) Dask graph 21 chunks in 4 graph layers Data type int32 numpy.ndarray - adcirc_mesh(mesh)int32dask.array<chunksize=(1,), meta=np.ndarray>
- long_name :
- mesh_topology
- cf_role :
- mesh_topology
- topology_dimension :
- 2
- node_coordinates :
- x y
- face_node_connectivity :
- element
- face_dimension :
- nele
Array Chunk Bytes 4 B 4 B Shape (1,) (1,) Dask graph 1 chunks in 2 graph layers Data type int32 numpy.ndarray - nvell(nbou)int32dask.array<chunksize=(262,), meta=np.ndarray>
- long_name :
- number of nodes in each normal flow specified boundary segment
- units :
- nondimensional
Array Chunk Bytes 1.02 kiB 1.02 kiB Shape (262,) (262,) Dask graph 1 chunks in 2 graph layers Data type int32 numpy.ndarray - max_nvell()int32...
[1 values with dtype=int32]
- ibtype(nbou)int32dask.array<chunksize=(262,), meta=np.ndarray>
- long_name :
- type of normal flow (discharge) boundary
- units :
- nondimensional
Array Chunk Bytes 1.02 kiB 1.02 kiB Shape (262,) (262,) Dask graph 1 chunks in 2 graph layers Data type int32 numpy.ndarray - nbvv(nvel)int32dask.array<chunksize=(12421,), meta=np.ndarray>
- long_name :
- node numbers on normal flow boundary segment
- units :
- nondimensional
Array Chunk Bytes 48.52 kiB 48.52 kiB Shape (12421,) (12421,) Dask graph 1 chunks in 2 graph layers Data type int32 numpy.ndarray - depth(node)float64dask.array<chunksize=(79,), meta=np.ndarray>
- long_name :
- distance below geoid
- standard_name :
- depth below geoid
- location :
- node
- mesh :
- adcirc_mesh
- units :
- m
Array Chunk Bytes 2.72 MiB 490.40 kiB Shape (356230,) (62771,) Dask graph 14 chunks in 3 graph layers Data type float64 numpy.ndarray - zeta(time, node)float64dask.array<chunksize=(1, 79), meta=np.ndarray>
- long_name :
- water surface elevation above geoid
- standard_name :
- sea_surface_height_above_geoid
- location :
- node
- mesh :
- adcirc_mesh
- units :
- m
Array Chunk Bytes 505.51 MiB 490.40 kiB Shape (186, 356230) (1, 62771) Dask graph 2604 chunks in 3 graph layers Data type float64 numpy.ndarray
- timePandasIndex
PandasIndex(DatetimeIndex(['2024-08-07 01:00:00', '2024-08-07 02:00:00', '2024-08-07 03:00:00', '2024-08-07 04:00:00', '2024-08-07 05:00:00', '2024-08-07 06:00:00', '2024-08-07 07:00:00', '2024-08-07 08:00:00', '2024-08-07 09:00:00', '2024-08-07 10:00:00', ... '2024-08-14 09:00:00', '2024-08-14 10:00:00', '2024-08-14 11:00:00', '2024-08-14 12:00:00', '2024-08-14 13:00:00', '2024-08-14 14:00:00', '2024-08-14 15:00:00', '2024-08-14 16:00:00', '2024-08-14 17:00:00', '2024-08-14 18:00:00'], dtype='datetime64[ns]', name='time', length=186, freq=None))
- _FillValue :
- -99999.0
- model :
- ADCIRC
- version :
- noaa.stofs.2d.glo.v2.1.0r1.v55.12
- git_hash :
- 23947fbd9683d0ef48f12e6ce62d45d18bc27ff3
- grid_type :
- Triangular
- description :
- 2024080706 :-6 hr nowcast and +180 hr forecast ! 32 CHARACTER ALPHANUMERIC RUN D
- agrid :
- OceanMesh2D
- rundes :
- 2024080706 :-6 hr nowcast and +180 hr forecast ! 32 CHARACTER ALPHANUMERIC RUN D
- runid :
- STOFS 2D GLOBAL v5.6.5 ! 24 CHARACTER ALPHANUMERIC RUN IDENTIFICATION
- title :
- STOFS_2D_GLOBAL.V2.1.0 ! NCPROJ - PROJECT TITLE
- institution :
- NOS/OCS/CSDL/CMMB ! NCINST - PROJECT INSTITUTION
- source :
- Dogwood/Cactus ! NCSOUR - PROJECT SOURCE
- history :
- PRODUCTION ! NCHIST - PROJECT HISTORY
- references :
- http://www.adcirc.org ! NCREF - PROJECT REFERENCES
- comments :
- STOFS_2D_GLOBAL.V2.1.0 ! NCCOM - PROJECT COMMENTS
- host :
- NOS/OCS/CSDL/CMMB ! NCHOST - PROJECT HOST
- convention :
- CF-1.0 ! NCCONV - CONVENTIONS
- Conventions :
- UGRID-0.9.0
- contact :
- Yuji.Funaoshi@noaa.gov ! NCCONT - CONTACT INFORMATION
- creation_date :
- 2024-08-07 9:55:31 00:00
- modification_date :
- 2024-08-07 9:55:31 00:00
- fort.15 :
- ==== Input File Parameters (below) ====
- dt :
- 6.0
- ihot :
- 568
- ics :
- 22
- nolibf :
- 1
- nolifa :
- 2
- nolica :
- 1
- nolicat :
- 1
- nwp :
- 7
- ncor :
- 1
- ntip :
- 2
- nws :
- 10
- nramp :
- 1
- tau0 :
- 0.053333
- statim :
- 0.0
- reftim :
- 0.0
- rnday :
- 124.75
- dramp :
- 6.75
- a00 :
- 0.8
- b00 :
- 0.2
- c00 :
- 0.0
- h0 :
- 0.1
- slam0 :
- 0.0
- sfea0 :
- 45.0
- cf :
- 0.0005
- eslm :
- -0.2
- cori :
- 0.0
- ntif :
- 8
- nbfr :
- 0
f"Dataset size: {ds_subset_cwl.nbytes * 1.0e-9} Gb"
'Dataset size: 0.546909296 Gb'
We can save the selector to disk. (as a pickle file)
Use the save_to_bytes function to return the selector as a bytes object.
To get a unique filename, you can use the get_hashname function.
selector_bytes = bbox_selector.save_to_bytes()
filepath = bbox_selector.get_hashname()
with open(filepath, 'wb') as f:
f.write(selector_bytes)
'northeastUSA2d_bb3d126e.pkl'
Open a selector using a bytes object. This retains the subclass of the selector (i.e, UGridSelector, SGridSelector, etc)
from xarray_subset_grid import Selector
selector_bytes = open(filepath, 'rb').read()
loaded_bbox_selector = Selector(selector_bytes)
loaded_bbox_selector
<class 'xarray_subset_grid.grids.ugrid.UGridSelector'> - northeastUSA2d
Test if both the selectors are same.
bbox_selector == loaded_bbox_selector
True
Now we can load in a different STOFS-2D file, like the Fields-SWL file.
To subset a SWL dataset, first compute a selector using the CWL dataset and then reuse the selector.
This way, we can avoid the error that occurs during the normal subset method.
ds_swl = xr.open_dataset(
fs.open(
"s3://noaa-gestofs-pds/stofs_2d_glo.20240807/stofs_2d_glo.t06z.fields.swl.nc"
),
chunks={},
drop_variables=['nvel']
)
And then slice it with the same selector!
To subset a SWL dataset, first compute a selector using the CWL dataset and then reuse the selector.
%%time
ds_subset_swl = bbox_selector.select(ds_cwl)
ds_subset_swl
CPU times: user 380 ms, sys: 1.63 ms, total: 381 ms
Wall time: 410 ms
<xarray.Dataset> Size: 547MB
Dimensions: (time: 186, node: 356230, nele: 686355, nvertex: 3, mesh: 1,
nbou: 262, nvel: 12421)
Coordinates:
* time (time) datetime64[ns] 1kB 2024-08-07T01:00:00 ... 2024-08-14...
x (node) float64 3MB dask.array<chunksize=(79,), meta=np.ndarray>
y (node) float64 3MB dask.array<chunksize=(79,), meta=np.ndarray>
Dimensions without coordinates: node, nele, nvertex, mesh, nbou, nvel
Data variables:
element (nele, nvertex) int32 8MB dask.array<chunksize=(44090, 1), meta=np.ndarray>
adcirc_mesh (mesh) int32 4B dask.array<chunksize=(1,), meta=np.ndarray>
nvell (nbou) int32 1kB dask.array<chunksize=(262,), meta=np.ndarray>
max_nvell int32 4B ...
ibtype (nbou) int32 1kB dask.array<chunksize=(262,), meta=np.ndarray>
nbvv (nvel) int32 50kB dask.array<chunksize=(12421,), meta=np.ndarray>
depth (node) float64 3MB dask.array<chunksize=(79,), meta=np.ndarray>
zeta (time, node) float64 530MB dask.array<chunksize=(1, 79), meta=np.ndarray>
Attributes: (12/50)
_FillValue: -99999.0
model: ADCIRC
version: noaa.stofs.2d.glo.v2.1.0r1.v55.12
git_hash: 23947fbd9683d0ef48f12e6ce62d45d18bc27ff3
grid_type: Triangular
description: 2024080706 :-6 hr nowcast and +180 hr forecast ! 32 C...
... ...
sfea0: 45.0
cf: 0.0005
eslm: -0.2
cori: 0.0
ntif: 8
nbfr: 0- time: 186
- node: 356230
- nele: 686355
- nvertex: 3
- mesh: 1
- nbou: 262
- nvel: 12421
- time(time)datetime64[ns]2024-08-07T01:00:00 ... 2024-08-...
- long_name :
- model time
- standard_name :
- time
- base_date :
- 2024-04-04 12:00:00 ! NCDASE - BASE_DATE
array(['2024-08-07T01:00:00.000000000', '2024-08-07T02:00:00.000000000', '2024-08-07T03:00:00.000000000', '2024-08-07T04:00:00.000000000', '2024-08-07T05:00:00.000000000', '2024-08-07T06:00:00.000000000', '2024-08-07T07:00:00.000000000', '2024-08-07T08:00:00.000000000', '2024-08-07T09:00:00.000000000', '2024-08-07T10:00:00.000000000', '2024-08-07T11:00:00.000000000', '2024-08-07T12:00:00.000000000', '2024-08-07T13:00:00.000000000', '2024-08-07T14:00:00.000000000', '2024-08-07T15:00:00.000000000', '2024-08-07T16:00:00.000000000', '2024-08-07T17:00:00.000000000', '2024-08-07T18:00:00.000000000', '2024-08-07T19:00:00.000000000', '2024-08-07T20:00:00.000000000', '2024-08-07T21:00:00.000000000', '2024-08-07T22:00:00.000000000', '2024-08-07T23:00:00.000000000', '2024-08-08T00:00:00.000000000', '2024-08-08T01:00:00.000000000', '2024-08-08T02:00:00.000000000', '2024-08-08T03:00:00.000000000', '2024-08-08T04:00:00.000000000', '2024-08-08T05:00:00.000000000', '2024-08-08T06:00:00.000000000', '2024-08-08T07:00:00.000000000', '2024-08-08T08:00:00.000000000', '2024-08-08T09:00:00.000000000', '2024-08-08T10:00:00.000000000', '2024-08-08T11:00:00.000000000', '2024-08-08T12:00:00.000000000', '2024-08-08T13:00:00.000000000', '2024-08-08T14:00:00.000000000', '2024-08-08T15:00:00.000000000', '2024-08-08T16:00:00.000000000', '2024-08-08T17:00:00.000000000', '2024-08-08T18:00:00.000000000', '2024-08-08T19:00:00.000000000', '2024-08-08T20:00:00.000000000', '2024-08-08T21:00:00.000000000', '2024-08-08T22:00:00.000000000', '2024-08-08T23:00:00.000000000', '2024-08-09T00:00:00.000000000', '2024-08-09T01:00:00.000000000', '2024-08-09T02:00:00.000000000', '2024-08-09T03:00:00.000000000', '2024-08-09T04:00:00.000000000', '2024-08-09T05:00:00.000000000', '2024-08-09T06:00:00.000000000', '2024-08-09T07:00:00.000000000', '2024-08-09T08:00:00.000000000', '2024-08-09T09:00:00.000000000', '2024-08-09T10:00:00.000000000', '2024-08-09T11:00:00.000000000', '2024-08-09T12:00:00.000000000', '2024-08-09T13:00:00.000000000', '2024-08-09T14:00:00.000000000', '2024-08-09T15:00:00.000000000', '2024-08-09T16:00:00.000000000', '2024-08-09T17:00:00.000000000', '2024-08-09T18:00:00.000000000', '2024-08-09T19:00:00.000000000', '2024-08-09T20:00:00.000000000', '2024-08-09T21:00:00.000000000', '2024-08-09T22:00:00.000000000', '2024-08-09T23:00:00.000000000', '2024-08-10T00:00:00.000000000', '2024-08-10T01:00:00.000000000', '2024-08-10T02:00:00.000000000', '2024-08-10T03:00:00.000000000', '2024-08-10T04:00:00.000000000', '2024-08-10T05:00:00.000000000', '2024-08-10T06:00:00.000000000', '2024-08-10T07:00:00.000000000', '2024-08-10T08:00:00.000000000', '2024-08-10T09:00:00.000000000', '2024-08-10T10:00:00.000000000', '2024-08-10T11:00:00.000000000', '2024-08-10T12:00:00.000000000', '2024-08-10T13:00:00.000000000', '2024-08-10T14:00:00.000000000', '2024-08-10T15:00:00.000000000', '2024-08-10T16:00:00.000000000', '2024-08-10T17:00:00.000000000', '2024-08-10T18:00:00.000000000', '2024-08-10T19:00:00.000000000', '2024-08-10T20:00:00.000000000', '2024-08-10T21:00:00.000000000', '2024-08-10T22:00:00.000000000', '2024-08-10T23:00:00.000000000', '2024-08-11T00:00:00.000000000', '2024-08-11T01:00:00.000000000', '2024-08-11T02:00:00.000000000', '2024-08-11T03:00:00.000000000', '2024-08-11T04:00:00.000000000', '2024-08-11T05:00:00.000000000', '2024-08-11T06:00:00.000000000', '2024-08-11T07:00:00.000000000', '2024-08-11T08:00:00.000000000', '2024-08-11T09:00:00.000000000', '2024-08-11T10:00:00.000000000', '2024-08-11T11:00:00.000000000', '2024-08-11T12:00:00.000000000', '2024-08-11T13:00:00.000000000', '2024-08-11T14:00:00.000000000', '2024-08-11T15:00:00.000000000', '2024-08-11T16:00:00.000000000', '2024-08-11T17:00:00.000000000', '2024-08-11T18:00:00.000000000', '2024-08-11T19:00:00.000000000', '2024-08-11T20:00:00.000000000', '2024-08-11T21:00:00.000000000', '2024-08-11T22:00:00.000000000', '2024-08-11T23:00:00.000000000', '2024-08-12T00:00:00.000000000', '2024-08-12T01:00:00.000000000', '2024-08-12T02:00:00.000000000', '2024-08-12T03:00:00.000000000', '2024-08-12T04:00:00.000000000', '2024-08-12T05:00:00.000000000', '2024-08-12T06:00:00.000000000', '2024-08-12T07:00:00.000000000', '2024-08-12T08:00:00.000000000', '2024-08-12T09:00:00.000000000', '2024-08-12T10:00:00.000000000', '2024-08-12T11:00:00.000000000', '2024-08-12T12:00:00.000000000', '2024-08-12T13:00:00.000000000', '2024-08-12T14:00:00.000000000', '2024-08-12T15:00:00.000000000', '2024-08-12T16:00:00.000000000', '2024-08-12T17:00:00.000000000', '2024-08-12T18:00:00.000000000', '2024-08-12T19:00:00.000000000', '2024-08-12T20:00:00.000000000', '2024-08-12T21:00:00.000000000', '2024-08-12T22:00:00.000000000', '2024-08-12T23:00:00.000000000', '2024-08-13T00:00:00.000000000', '2024-08-13T01:00:00.000000000', '2024-08-13T02:00:00.000000000', '2024-08-13T03:00:00.000000000', '2024-08-13T04:00:00.000000000', '2024-08-13T05:00:00.000000000', '2024-08-13T06:00:00.000000000', '2024-08-13T07:00:00.000000000', '2024-08-13T08:00:00.000000000', '2024-08-13T09:00:00.000000000', '2024-08-13T10:00:00.000000000', '2024-08-13T11:00:00.000000000', '2024-08-13T12:00:00.000000000', '2024-08-13T13:00:00.000000000', '2024-08-13T14:00:00.000000000', '2024-08-13T15:00:00.000000000', '2024-08-13T16:00:00.000000000', '2024-08-13T17:00:00.000000000', '2024-08-13T18:00:00.000000000', '2024-08-13T19:00:00.000000000', '2024-08-13T20:00:00.000000000', '2024-08-13T21:00:00.000000000', '2024-08-13T22:00:00.000000000', '2024-08-13T23:00:00.000000000', '2024-08-14T00:00:00.000000000', '2024-08-14T01:00:00.000000000', '2024-08-14T02:00:00.000000000', '2024-08-14T03:00:00.000000000', '2024-08-14T04:00:00.000000000', '2024-08-14T05:00:00.000000000', '2024-08-14T06:00:00.000000000', '2024-08-14T07:00:00.000000000', '2024-08-14T08:00:00.000000000', '2024-08-14T09:00:00.000000000', '2024-08-14T10:00:00.000000000', '2024-08-14T11:00:00.000000000', '2024-08-14T12:00:00.000000000', '2024-08-14T13:00:00.000000000', '2024-08-14T14:00:00.000000000', '2024-08-14T15:00:00.000000000', '2024-08-14T16:00:00.000000000', '2024-08-14T17:00:00.000000000', '2024-08-14T18:00:00.000000000'], dtype='datetime64[ns]') - x(node)float64dask.array<chunksize=(79,), meta=np.ndarray>
- long_name :
- longitude
- standard_name :
- longitude
- units :
- degrees_east
- positive :
- east
Array Chunk Bytes 2.72 MiB 490.40 kiB Shape (356230,) (62771,) Dask graph 14 chunks in 3 graph layers Data type float64 numpy.ndarray - y(node)float64dask.array<chunksize=(79,), meta=np.ndarray>
- long_name :
- latitude
- standard_name :
- latitude
- units :
- degrees_north
- positive :
- north
Array Chunk Bytes 2.72 MiB 490.40 kiB Shape (356230,) (62771,) Dask graph 14 chunks in 3 graph layers Data type float64 numpy.ndarray
- element(nele, nvertex)int32dask.array<chunksize=(44090, 1), meta=np.ndarray>
- long_name :
- element
- cf_role :
- face_node_connectivity
- start_index :
- 1
- units :
- nondimensional
Array Chunk Bytes 7.85 MiB 1.16 MiB Shape (686355, 3) (305263, 1) Dask graph 21 chunks in 4 graph layers Data type int32 numpy.ndarray - adcirc_mesh(mesh)int32dask.array<chunksize=(1,), meta=np.ndarray>
- long_name :
- mesh_topology
- cf_role :
- mesh_topology
- topology_dimension :
- 2
- node_coordinates :
- x y
- face_node_connectivity :
- element
- face_dimension :
- nele
Array Chunk Bytes 4 B 4 B Shape (1,) (1,) Dask graph 1 chunks in 2 graph layers Data type int32 numpy.ndarray - nvell(nbou)int32dask.array<chunksize=(262,), meta=np.ndarray>
- long_name :
- number of nodes in each normal flow specified boundary segment
- units :
- nondimensional
Array Chunk Bytes 1.02 kiB 1.02 kiB Shape (262,) (262,) Dask graph 1 chunks in 2 graph layers Data type int32 numpy.ndarray - max_nvell()int32...
[1 values with dtype=int32]
- ibtype(nbou)int32dask.array<chunksize=(262,), meta=np.ndarray>
- long_name :
- type of normal flow (discharge) boundary
- units :
- nondimensional
Array Chunk Bytes 1.02 kiB 1.02 kiB Shape (262,) (262,) Dask graph 1 chunks in 2 graph layers Data type int32 numpy.ndarray - nbvv(nvel)int32dask.array<chunksize=(12421,), meta=np.ndarray>
- long_name :
- node numbers on normal flow boundary segment
- units :
- nondimensional
Array Chunk Bytes 48.52 kiB 48.52 kiB Shape (12421,) (12421,) Dask graph 1 chunks in 2 graph layers Data type int32 numpy.ndarray - depth(node)float64dask.array<chunksize=(79,), meta=np.ndarray>
- long_name :
- distance below geoid
- standard_name :
- depth below geoid
- location :
- node
- mesh :
- adcirc_mesh
- units :
- m
Array Chunk Bytes 2.72 MiB 490.40 kiB Shape (356230,) (62771,) Dask graph 14 chunks in 3 graph layers Data type float64 numpy.ndarray - zeta(time, node)float64dask.array<chunksize=(1, 79), meta=np.ndarray>
- long_name :
- water surface elevation above geoid
- standard_name :
- sea_surface_height_above_geoid
- location :
- node
- mesh :
- adcirc_mesh
- units :
- m
Array Chunk Bytes 505.51 MiB 490.40 kiB Shape (186, 356230) (1, 62771) Dask graph 2604 chunks in 3 graph layers Data type float64 numpy.ndarray
- timePandasIndex
PandasIndex(DatetimeIndex(['2024-08-07 01:00:00', '2024-08-07 02:00:00', '2024-08-07 03:00:00', '2024-08-07 04:00:00', '2024-08-07 05:00:00', '2024-08-07 06:00:00', '2024-08-07 07:00:00', '2024-08-07 08:00:00', '2024-08-07 09:00:00', '2024-08-07 10:00:00', ... '2024-08-14 09:00:00', '2024-08-14 10:00:00', '2024-08-14 11:00:00', '2024-08-14 12:00:00', '2024-08-14 13:00:00', '2024-08-14 14:00:00', '2024-08-14 15:00:00', '2024-08-14 16:00:00', '2024-08-14 17:00:00', '2024-08-14 18:00:00'], dtype='datetime64[ns]', name='time', length=186, freq=None))
- _FillValue :
- -99999.0
- model :
- ADCIRC
- version :
- noaa.stofs.2d.glo.v2.1.0r1.v55.12
- git_hash :
- 23947fbd9683d0ef48f12e6ce62d45d18bc27ff3
- grid_type :
- Triangular
- description :
- 2024080706 :-6 hr nowcast and +180 hr forecast ! 32 CHARACTER ALPHANUMERIC RUN D
- agrid :
- OceanMesh2D
- rundes :
- 2024080706 :-6 hr nowcast and +180 hr forecast ! 32 CHARACTER ALPHANUMERIC RUN D
- runid :
- STOFS 2D GLOBAL v5.6.5 ! 24 CHARACTER ALPHANUMERIC RUN IDENTIFICATION
- title :
- STOFS_2D_GLOBAL.V2.1.0 ! NCPROJ - PROJECT TITLE
- institution :
- NOS/OCS/CSDL/CMMB ! NCINST - PROJECT INSTITUTION
- source :
- Dogwood/Cactus ! NCSOUR - PROJECT SOURCE
- history :
- PRODUCTION ! NCHIST - PROJECT HISTORY
- references :
- http://www.adcirc.org ! NCREF - PROJECT REFERENCES
- comments :
- STOFS_2D_GLOBAL.V2.1.0 ! NCCOM - PROJECT COMMENTS
- host :
- NOS/OCS/CSDL/CMMB ! NCHOST - PROJECT HOST
- convention :
- CF-1.0 ! NCCONV - CONVENTIONS
- Conventions :
- UGRID-0.9.0
- contact :
- Yuji.Funaoshi@noaa.gov ! NCCONT - CONTACT INFORMATION
- creation_date :
- 2024-08-07 9:55:31 00:00
- modification_date :
- 2024-08-07 9:55:31 00:00
- fort.15 :
- ==== Input File Parameters (below) ====
- dt :
- 6.0
- ihot :
- 568
- ics :
- 22
- nolibf :
- 1
- nolifa :
- 2
- nolica :
- 1
- nolicat :
- 1
- nwp :
- 7
- ncor :
- 1
- ntip :
- 2
- nws :
- 10
- nramp :
- 1
- tau0 :
- 0.053333
- statim :
- 0.0
- reftim :
- 0.0
- rnday :
- 124.75
- dramp :
- 6.75
- a00 :
- 0.8
- b00 :
- 0.2
- c00 :
- 0.0
- h0 :
- 0.1
- slam0 :
- 0.0
- sfea0 :
- 45.0
- cf :
- 0.0005
- eslm :
- -0.2
- cori :
- 0.0
- ntif :
- 8
- nbfr :
- 0
ds_subset_cwl.isel(time=0).depth.plot()
[<matplotlib.lines.Line2D at 0x7dcec27f3d30>]