FVCOM¶
# 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 numpy as np
import xarray as xr
import xarray_subset_grid.accessor # noqa: F401
# open dataset as zarr object using fsspec reference file system and xarray
fs = fsspec.filesystem(
"reference",
fo="s3://nextgen-dmac-cloud-ingest/nos/ngofs2/nos.ngofs2.2ds.best.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={'time': 1},
drop_variables=["Itime2"],
)
ds
<xarray.Dataset> Size: 20GB
Dimensions: (time: 763, four: 4, nele: 569405, node: 303714,
three: 3, maxnode: 10, maxelem: 8)
Coordinates:
lat (node) float32 1MB dask.array<chunksize=(303714,), meta=np.ndarray>
latc (nele) float32 2MB dask.array<chunksize=(569405,), meta=np.ndarray>
lon (node) float32 1MB dask.array<chunksize=(303714,), meta=np.ndarray>
lonc (nele) float32 2MB dask.array<chunksize=(569405,), meta=np.ndarray>
* time (time) datetime64[ns] 6kB 2024-06-18T21:00:00 ... 202...
Dimensions without coordinates: four, nele, node, three, maxnode, maxelem
Data variables: (12/39)
Itime (time) datetime64[ns] 6kB dask.array<chunksize=(1,), meta=np.ndarray>
Times (time) |S26 20kB dask.array<chunksize=(1,), meta=np.ndarray>
a1u (four, nele) float32 9MB dask.array<chunksize=(4, 569405), meta=np.ndarray>
a2u (four, nele) float32 9MB dask.array<chunksize=(4, 569405), meta=np.ndarray>
art1 (node) float32 1MB dask.array<chunksize=(303714,), meta=np.ndarray>
art2 (node) float32 1MB dask.array<chunksize=(303714,), meta=np.ndarray>
... ...
wet_nodes_prev_int (time, node) int32 927MB dask.array<chunksize=(1, 303714), meta=np.ndarray>
x (node) float32 1MB dask.array<chunksize=(303714,), meta=np.ndarray>
xc (nele) float32 2MB dask.array<chunksize=(569405,), meta=np.ndarray>
y (node) float32 1MB dask.array<chunksize=(303714,), meta=np.ndarray>
yc (nele) float32 2MB dask.array<chunksize=(569405,), meta=np.ndarray>
zeta (time, node) float32 927MB dask.array<chunksize=(1, 303714), meta=np.ndarray>
Attributes: (12/14)
Conventions: CF-1.0
CoordinateProjection: init=nad83:4205
CoordinateSystem: GeoReferenced
GroundWater_Forcing: GROUND WATER FORCING IS OFF!
River_Forcing: THERE ARE 63 RIVERS IN THIS MODEL.\nRIVER IN...
Surface_Heat_Forcing: FVCOM variable surface heat forcing file:\nF...
... ...
Tidal_Forcing: TIDAL ELEVATION FORCING IS OFF!
history: model started at: 18/06/2024 21:15
institution: School for Marine Science and Technology
references: http://fvcom.smast.umassd.edu, http://codfis...
source: FVCOM_4.3
title: NGOFS2xarray.Dataset
- time: 763
- four: 4
- nele: 569405
- node: 303714
- three: 3
- maxnode: 10
- maxelem: 8
- lat(node)float32dask.array<chunksize=(303714,), meta=np.ndarray>
- long_name :
- nodal latitude
- standard_name :
- latitude
- units :
- degrees_north
Array Chunk Bytes 1.16 MiB 1.16 MiB Shape (303714,) (303714,) Dask graph 1 chunks in 2 graph layers Data type float32 numpy.ndarray - latc(nele)float32dask.array<chunksize=(569405,), meta=np.ndarray>
- long_name :
- zonal latitude
- standard_name :
- latitude
- units :
- degrees_north
Array Chunk Bytes 2.17 MiB 2.17 MiB Shape (569405,) (569405,) Dask graph 1 chunks in 2 graph layers Data type float32 numpy.ndarray - lon(node)float32dask.array<chunksize=(303714,), meta=np.ndarray>
- long_name :
- nodal longitude
- standard_name :
- longitude
- units :
- degrees_east
Array Chunk Bytes 1.16 MiB 1.16 MiB Shape (303714,) (303714,) Dask graph 1 chunks in 2 graph layers Data type float32 numpy.ndarray - lonc(nele)float32dask.array<chunksize=(569405,), meta=np.ndarray>
- long_name :
- zonal longitude
- standard_name :
- longitude
- units :
- degrees_east
Array Chunk Bytes 2.17 MiB 2.17 MiB Shape (569405,) (569405,) Dask graph 1 chunks in 2 graph layers Data type float32 numpy.ndarray - time(time)datetime64[ns]2024-06-18T21:00:00 ... 2024-07-...
- format :
- defined reference date
- long_name :
- time
- time_zone :
- UTC
array(['2024-06-18T21:00:00.000000000', '2024-06-18T21:59:56.484375008', '2024-06-18T23:00:03.515624992', ..., '2024-07-20T12:59:56.484375008', '2024-07-20T14:00:03.515624992', '2024-07-20T15:00:00.000000000'], dtype='datetime64[ns]')
- Itime(time)datetime64[ns]dask.array<chunksize=(1,), meta=np.ndarray>
- format :
- defined reference date
- time_zone :
- UTC
Array Chunk Bytes 5.96 kiB 8 B Shape (763,) (1,) Dask graph 763 chunks in 2 graph layers Data type datetime64[ns] numpy.ndarray - Times(time)|S26dask.array<chunksize=(1,), meta=np.ndarray>
- time_zone :
- UTC
Array Chunk Bytes 19.37 kiB 26 B Shape (763,) (1,) Dask graph 763 chunks in 2 graph layers Data type |S26 numpy.ndarray - a1u(four, nele)float32dask.array<chunksize=(4, 569405), meta=np.ndarray>
- long_name :
- a1u
Array Chunk Bytes 8.69 MiB 8.69 MiB Shape (4, 569405) (4, 569405) Dask graph 1 chunks in 2 graph layers Data type float32 numpy.ndarray - a2u(four, nele)float32dask.array<chunksize=(4, 569405), meta=np.ndarray>
- long_name :
- a2u
Array Chunk Bytes 8.69 MiB 8.69 MiB Shape (4, 569405) (4, 569405) Dask graph 1 chunks in 2 graph layers Data type float32 numpy.ndarray - art1(node)float32dask.array<chunksize=(303714,), meta=np.ndarray>
- long_name :
- Area of Node-Base Control volume
Array Chunk Bytes 1.16 MiB 1.16 MiB Shape (303714,) (303714,) Dask graph 1 chunks in 2 graph layers Data type float32 numpy.ndarray - art2(node)float32dask.array<chunksize=(303714,), meta=np.ndarray>
- long_name :
- Area of elements around a node
Array Chunk Bytes 1.16 MiB 1.16 MiB Shape (303714,) (303714,) Dask graph 1 chunks in 2 graph layers Data type float32 numpy.ndarray - atmos_press(time, node)float32dask.array<chunksize=(1, 303714), meta=np.ndarray>
- grid :
- fvcom_grid
- long_name :
- Atmospheric Pressure
- type :
- data
- units :
- pascals
Array Chunk Bytes 883.99 MiB 1.16 MiB Shape (763, 303714) (1, 303714) Dask graph 763 chunks in 2 graph layers Data type float32 numpy.ndarray - aw0(three, nele)float32dask.array<chunksize=(3, 569405), meta=np.ndarray>
- long_name :
- aw0
Array Chunk Bytes 6.52 MiB 6.52 MiB Shape (3, 569405) (3, 569405) Dask graph 1 chunks in 2 graph layers Data type float32 numpy.ndarray - awx(three, nele)float32dask.array<chunksize=(3, 569405), meta=np.ndarray>
- long_name :
- awx
Array Chunk Bytes 6.52 MiB 6.52 MiB Shape (3, 569405) (3, 569405) Dask graph 1 chunks in 2 graph layers Data type float32 numpy.ndarray - awy(three, nele)float32dask.array<chunksize=(3, 569405), meta=np.ndarray>
- long_name :
- awy
Array Chunk Bytes 6.52 MiB 6.52 MiB Shape (3, 569405) (3, 569405) Dask graph 1 chunks in 2 graph layers Data type float32 numpy.ndarray - fvcom_mesh()int32...
- cf_role :
- mesh_topology
- topology_dimension :
- 2
- node_coordinates :
- lon lat
- face_coordinates :
- lonc latc
- face_node_connectivity :
- nv
- face_face_connectivity :
- nbe
[1 values with dtype=int32]
- h(node)float32dask.array<chunksize=(303714,), 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 1.16 MiB 1.16 MiB Shape (303714,) (303714,) Dask graph 1 chunks in 2 graph layers Data type float32 numpy.ndarray - iint(time)int32dask.array<chunksize=(1,), meta=np.ndarray>
- long_name :
- internal mode iteration number
Array Chunk Bytes 2.98 kiB 4 B Shape (763,) (1,) Dask graph 763 chunks in 2 graph layers Data type int32 numpy.ndarray - nbe(three, nele)int32dask.array<chunksize=(3, 569405), meta=np.ndarray>
- long_name :
- elements surrounding each element
Array Chunk Bytes 6.52 MiB 6.52 MiB Shape (3, 569405) (3, 569405) Dask graph 1 chunks in 2 graph layers Data type int32 numpy.ndarray - nbsn(maxnode, node)int32dask.array<chunksize=(10, 303714), meta=np.ndarray>
- long_name :
- nodes surrounding each node
Array Chunk Bytes 11.59 MiB 11.59 MiB Shape (10, 303714) (10, 303714) Dask graph 1 chunks in 2 graph layers Data type int32 numpy.ndarray - nbve(maxelem, node)int32dask.array<chunksize=(8, 303714), meta=np.ndarray>
- long_name :
- elems surrounding each node
Array Chunk Bytes 9.27 MiB 9.27 MiB Shape (8, 303714) (8, 303714) Dask graph 1 chunks in 2 graph layers Data type int32 numpy.ndarray - net_heat_flux(time, node)float32dask.array<chunksize=(1, 303714), meta=np.ndarray>
- grid :
- fvcom_grid
- location :
- node
- long_name :
- Surface Net Heat Flux
- mesh :
- fvcom_mesh
- type :
- data
- units :
- W m-2
Array Chunk Bytes 883.99 MiB 1.16 MiB Shape (763, 303714) (1, 303714) Dask graph 763 chunks in 2 graph layers Data type float32 numpy.ndarray - nprocs()int32...
- long_name :
- number of processors
[1 values with dtype=int32]
- ntsn(node)int32dask.array<chunksize=(303714,), meta=np.ndarray>
- long_name :
- #nodes surrounding each node
Array Chunk Bytes 1.16 MiB 1.16 MiB Shape (303714,) (303714,) Dask graph 1 chunks in 2 graph layers Data type int32 numpy.ndarray - ntve(node)int32dask.array<chunksize=(303714,), meta=np.ndarray>
- long_name :
- #elems surrounding each node
Array Chunk Bytes 1.16 MiB 1.16 MiB Shape (303714,) (303714,) Dask graph 1 chunks in 2 graph layers Data type int32 numpy.ndarray - nv(three, nele)int32dask.array<chunksize=(3, 569405), meta=np.ndarray>
- long_name :
- nodes surrounding element
Array Chunk Bytes 6.52 MiB 6.52 MiB Shape (3, 569405) (3, 569405) Dask graph 1 chunks in 2 graph layers Data type int32 numpy.ndarray - partition(nele)int32dask.array<chunksize=(569405,), meta=np.ndarray>
- long_name :
- partition
Array Chunk Bytes 2.17 MiB 2.17 MiB Shape (569405,) (569405,) Dask graph 1 chunks in 2 graph layers Data type int32 numpy.ndarray - salinity_surface(time, node)float32dask.array<chunksize=(1, 303714), meta=np.ndarray>
- grid :
- fvcom_grid
- location :
- node
- long_name :
- surface salinity
- mesh :
- fvcom_mesh
- standard_name :
- seasurface_water_salinity
- type :
- data
- units :
- 1e-3
Array Chunk Bytes 883.99 MiB 1.16 MiB Shape (763, 303714) (1, 303714) Dask graph 763 chunks in 2 graph layers Data type float32 numpy.ndarray - short_wave(time, node)float32dask.array<chunksize=(1, 303714), meta=np.ndarray>
- grid :
- fvcom_grid
- location :
- node
- long_name :
- Short Wave Radiation
- mesh :
- fvcom_mesh
- type :
- data
- units :
- W m-2
Array Chunk Bytes 883.99 MiB 1.16 MiB Shape (763, 303714) (1, 303714) Dask graph 763 chunks in 2 graph layers Data type float32 numpy.ndarray - temp_surface(time, node)float32dask.array<chunksize=(1, 303714), meta=np.ndarray>
- grid :
- fvcom_grid
- location :
- node
- long_name :
- surface temperature
- mesh :
- fvcom_mesh
- standard_name :
- seasurface_water_temperature
- type :
- data
- units :
- degrees_C
Array Chunk Bytes 883.99 MiB 1.16 MiB Shape (763, 303714) (1, 303714) Dask graph 763 chunks in 2 graph layers Data type float32 numpy.ndarray - u_surface(time, nele)float32dask.array<chunksize=(1, 569405), meta=np.ndarray>
- grid :
- fvcom_grid
- location :
- face
- long_name :
- Eastward Surface Water Velocity
- mesh :
- fvcom_mesh
- standard_name :
- eastward_seasurface_water_velocity
- type :
- data
- units :
- meters s-1
Array Chunk Bytes 1.62 GiB 2.17 MiB Shape (763, 569405) (1, 569405) Dask graph 763 chunks in 2 graph layers Data type float32 numpy.ndarray - uwind_speed(time, nele)float32dask.array<chunksize=(1, 569405), meta=np.ndarray>
- grid :
- fvcom_grid
- location :
- face
- long_name :
- Eastward Wind Velocity
- mesh :
- fvcom_mesh
- standard_name :
- eastward wind
- type :
- data
- units :
- meters s-1
Array Chunk Bytes 1.62 GiB 2.17 MiB Shape (763, 569405) (1, 569405) Dask graph 763 chunks in 2 graph layers Data type float32 numpy.ndarray - v_surface(time, nele)float32dask.array<chunksize=(1, 569405), meta=np.ndarray>
- grid :
- fvcom_grid
- location :
- face
- long_name :
- Northward Surface Water Velocity
- mesh :
- fvcom_mesh
- standard_name :
- Northward_seasurface_water_velocity
- type :
- data
- units :
- meters s-1
Array Chunk Bytes 1.62 GiB 2.17 MiB Shape (763, 569405) (1, 569405) Dask graph 763 chunks in 2 graph layers Data type float32 numpy.ndarray - vwind_speed(time, nele)float32dask.array<chunksize=(1, 569405), meta=np.ndarray>
- grid :
- fvcom_grid
- location :
- face
- long_name :
- Northward Wind Velocity
- mesh :
- fvcom_mesh
- standard_name :
- northward wind
- type :
- data
- units :
- meters s-1
Array Chunk Bytes 1.62 GiB 2.17 MiB Shape (763, 569405) (1, 569405) Dask graph 763 chunks in 2 graph layers Data type float32 numpy.ndarray - wet_cells(time, nele)int32dask.array<chunksize=(1, 569405), meta=np.ndarray>
- grid :
- fvcom_grid
- location :
- face
- long_name :
- Wet_Cells
- mesh :
- fvcom_mesh
- type :
- data
Array Chunk Bytes 1.62 GiB 2.17 MiB Shape (763, 569405) (1, 569405) Dask graph 763 chunks in 2 graph layers Data type int32 numpy.ndarray - wet_cells_prev_ext(time, nele)int32dask.array<chunksize=(1, 569405), meta=np.ndarray>
- grid :
- fvcom_grid
- long_name :
- Wet_Cells_At_Previous_External_Step
- type :
- data
Array Chunk Bytes 1.62 GiB 2.17 MiB Shape (763, 569405) (1, 569405) Dask graph 763 chunks in 2 graph layers Data type int32 numpy.ndarray - wet_cells_prev_int(time, nele)int32dask.array<chunksize=(1, 569405), meta=np.ndarray>
- grid :
- fvcom_grid
- location :
- face
- long_name :
- Wet_Cells_At_Previous_Internal_Step
- mesh :
- fvcom_mesh
- type :
- data
Array Chunk Bytes 1.62 GiB 2.17 MiB Shape (763, 569405) (1, 569405) Dask graph 763 chunks in 2 graph layers Data type int32 numpy.ndarray - wet_nodes(time, node)int32dask.array<chunksize=(1, 303714), meta=np.ndarray>
- grid :
- fvcom_grid
- location :
- node
- long_name :
- Wet_Nodes
- mesh :
- fvcom_mesh
- type :
- data
Array Chunk Bytes 883.99 MiB 1.16 MiB Shape (763, 303714) (1, 303714) Dask graph 763 chunks in 2 graph layers Data type int32 numpy.ndarray - wet_nodes_prev_int(time, node)int32dask.array<chunksize=(1, 303714), meta=np.ndarray>
- grid :
- fvcom_grid
- location :
- node
- long_name :
- Wet_Nodes_At_Previous_Internal_Step
- mesh :
- fvcom_mesh
- type :
- data
Array Chunk Bytes 883.99 MiB 1.16 MiB Shape (763, 303714) (1, 303714) Dask graph 763 chunks in 2 graph layers Data type int32 numpy.ndarray - x(node)float32dask.array<chunksize=(303714,), meta=np.ndarray>
- long_name :
- nodal x-coordinate
- units :
- meters
Array Chunk Bytes 1.16 MiB 1.16 MiB Shape (303714,) (303714,) Dask graph 1 chunks in 2 graph layers Data type float32 numpy.ndarray - xc(nele)float32dask.array<chunksize=(569405,), meta=np.ndarray>
- long_name :
- zonal x-coordinate
- units :
- meters
Array Chunk Bytes 2.17 MiB 2.17 MiB Shape (569405,) (569405,) Dask graph 1 chunks in 2 graph layers Data type float32 numpy.ndarray - y(node)float32dask.array<chunksize=(303714,), meta=np.ndarray>
- long_name :
- nodal y-coordinate
- units :
- meters
Array Chunk Bytes 1.16 MiB 1.16 MiB Shape (303714,) (303714,) Dask graph 1 chunks in 2 graph layers Data type float32 numpy.ndarray - yc(nele)float32dask.array<chunksize=(569405,), meta=np.ndarray>
- long_name :
- zonal y-coordinate
- units :
- meters
Array Chunk Bytes 2.17 MiB 2.17 MiB Shape (569405,) (569405,) Dask graph 1 chunks in 2 graph layers Data type float32 numpy.ndarray - zeta(time, node)float32dask.array<chunksize=(1, 303714), meta=np.ndarray>
- grid :
- Bathymetry_Mesh
- location :
- node
- long_name :
- Water Surface Elevation
- positive :
- up
- standard_name :
- sea_surface_height_above_geoid
- type :
- data
- units :
- meters
Array Chunk Bytes 883.99 MiB 1.16 MiB Shape (763, 303714) (1, 303714) Dask graph 763 chunks in 2 graph layers Data type float32 numpy.ndarray
- timePandasIndex
PandasIndex(DatetimeIndex([ '2024-06-18 21:00:00', '2024-06-18 21:59:56.484375008', '2024-06-18 23:00:03.515624992', '2024-06-19 00:00:00', '2024-06-19 00:59:56.484375008', '2024-06-19 02:00:03.515624992', '2024-06-19 03:00:00', '2024-06-19 03:59:56.484375008', '2024-06-19 05:00:03.515624992', '2024-06-19 06:00:00', ... '2024-07-20 06:00:00', '2024-07-20 06:59:56.484375008', '2024-07-20 08:00:03.515624992', '2024-07-20 09:00:00', '2024-07-20 09:59:56.484375008', '2024-07-20 11:00:03.515624992', '2024-07-20 12:00:00', '2024-07-20 12:59:56.484375008', '2024-07-20 14:00:03.515624992', '2024-07-20 15:00:00'], dtype='datetime64[ns]', name='time', length=763, freq=None))
- Conventions :
- CF-1.0
- CoordinateProjection :
- init=nad83:4205
- CoordinateSystem :
- GeoReferenced
- GroundWater_Forcing :
- GROUND WATER FORCING IS OFF!
- River_Forcing :
- THERE ARE 63 RIVERS IN THIS MODEL. RIVER INFLOW IS ON THE nodes WHERE TEMPERATURE AND SALINITY ARE calculated IN THE MODEL. THE FOLLOWING RIVER NAMES ARE USED: 08012000 02365500 02375500 02489500 02492000 08211200 08211200 08211200 02481510 02481510 02481510 02479000 02479000 02479000 02479000 08164800 08164800 08164000 08164000 08188800 08188800 08188800 08066500 08066500 02479560 02479560 02479560 02479560 07375500 07375500 08030500 08030500 08069000 08069000 08069000 07381600 07381600 07381600 07381600 02470629 02470629 02470629 02470629 02471019 02471019 02471019 02471019 02471019 08076000 08076000 08075400 08041780 08015500 08075000 08075000 07374000 07374000 07374000 07374000 08162500 08116650 02376500 02368000
- Surface_Heat_Forcing :
- FVCOM variable surface heat forcing file: FILE NAME:nos.ngofs2.hflux.forecast.20240618.t21z.nc SOURCE:FVCOM grid (unstructured) surface forcing Unknown start date meta data format
- Surface_PrecipEvap_Forcing :
- SURFACE PRECIPITATION FORCING IS OFF
- Surface_Wind_Forcing :
- FVCOM variable surface Wind forcing: FILE NAME:nos.ngofs2.met.forecast.20240618.t21z.nc SOURCE:FVCOM grid (unstructured) surface forcing Unknown start date meta data format
- Tidal_Forcing :
- TIDAL ELEVATION FORCING IS OFF!
- history :
- model started at: 18/06/2024 21:15
- institution :
- School for Marine Science and Technology
- references :
- http://fvcom.smast.umassd.edu, http://codfish.smast.umassd.edu
- source :
- FVCOM_4.3
- title :
- NGOFS2
Fixup UGRID mesh topology to be CF Compliant
ds = xarray_subset_grid.grids.ugrid.assign_ugrid_topology(ds)
ds
<xarray.Dataset> Size: 20GB
Dimensions: (time: 763, four: 4, nele: 569405, node: 303714,
three: 3, maxnode: 10, maxelem: 8)
Coordinates:
lat (node) float32 1MB dask.array<chunksize=(303714,), meta=np.ndarray>
latc (nele) float32 2MB dask.array<chunksize=(569405,), meta=np.ndarray>
lon (node) float32 1MB dask.array<chunksize=(303714,), meta=np.ndarray>
lonc (nele) float32 2MB dask.array<chunksize=(569405,), meta=np.ndarray>
* time (time) datetime64[ns] 6kB 2024-06-18T21:00:00 ... 202...
Dimensions without coordinates: four, nele, node, three, maxnode, maxelem
Data variables: (12/39)
Itime (time) datetime64[ns] 6kB dask.array<chunksize=(1,), meta=np.ndarray>
Times (time) |S26 20kB dask.array<chunksize=(1,), meta=np.ndarray>
a1u (four, nele) float32 9MB dask.array<chunksize=(4, 569405), meta=np.ndarray>
a2u (four, nele) float32 9MB dask.array<chunksize=(4, 569405), meta=np.ndarray>
art1 (node) float32 1MB dask.array<chunksize=(303714,), meta=np.ndarray>
art2 (node) float32 1MB dask.array<chunksize=(303714,), meta=np.ndarray>
... ...
wet_nodes_prev_int (time, node) int32 927MB dask.array<chunksize=(1, 303714), meta=np.ndarray>
x (node) float32 1MB dask.array<chunksize=(303714,), meta=np.ndarray>
xc (nele) float32 2MB dask.array<chunksize=(569405,), meta=np.ndarray>
y (node) float32 1MB dask.array<chunksize=(303714,), meta=np.ndarray>
yc (nele) float32 2MB dask.array<chunksize=(569405,), meta=np.ndarray>
zeta (time, node) float32 927MB dask.array<chunksize=(1, 303714), meta=np.ndarray>
Attributes: (12/14)
Conventions: CF-1.0
CoordinateProjection: init=nad83:4205
CoordinateSystem: GeoReferenced
GroundWater_Forcing: GROUND WATER FORCING IS OFF!
River_Forcing: THERE ARE 63 RIVERS IN THIS MODEL.\nRIVER IN...
Surface_Heat_Forcing: FVCOM variable surface heat forcing file:\nF...
... ...
Tidal_Forcing: TIDAL ELEVATION FORCING IS OFF!
history: model started at: 18/06/2024 21:15
institution: School for Marine Science and Technology
references: http://fvcom.smast.umassd.edu, http://codfis...
source: FVCOM_4.3
title: NGOFS2xarray.Dataset
- time: 763
- four: 4
- nele: 569405
- node: 303714
- three: 3
- maxnode: 10
- maxelem: 8
- lat(node)float32dask.array<chunksize=(303714,), meta=np.ndarray>
- long_name :
- nodal latitude
- standard_name :
- latitude
- units :
- degrees_north
Array Chunk Bytes 1.16 MiB 1.16 MiB Shape (303714,) (303714,) Dask graph 1 chunks in 2 graph layers Data type float32 numpy.ndarray - latc(nele)float32dask.array<chunksize=(569405,), meta=np.ndarray>
- long_name :
- zonal latitude
- standard_name :
- latitude
- units :
- degrees_north
Array Chunk Bytes 2.17 MiB 2.17 MiB Shape (569405,) (569405,) Dask graph 1 chunks in 2 graph layers Data type float32 numpy.ndarray - lon(node)float32dask.array<chunksize=(303714,), meta=np.ndarray>
- long_name :
- nodal longitude
- standard_name :
- longitude
- units :
- degrees_east
Array Chunk Bytes 1.16 MiB 1.16 MiB Shape (303714,) (303714,) Dask graph 1 chunks in 2 graph layers Data type float32 numpy.ndarray - lonc(nele)float32dask.array<chunksize=(569405,), meta=np.ndarray>
- long_name :
- zonal longitude
- standard_name :
- longitude
- units :
- degrees_east
Array Chunk Bytes 2.17 MiB 2.17 MiB Shape (569405,) (569405,) Dask graph 1 chunks in 2 graph layers Data type float32 numpy.ndarray - time(time)datetime64[ns]2024-06-18T21:00:00 ... 2024-07-...
- format :
- defined reference date
- long_name :
- time
- time_zone :
- UTC
array(['2024-06-18T21:00:00.000000000', '2024-06-18T21:59:56.484375008', '2024-06-18T23:00:03.515624992', ..., '2024-07-20T12:59:56.484375008', '2024-07-20T14:00:03.515624992', '2024-07-20T15:00:00.000000000'], dtype='datetime64[ns]')
- Itime(time)datetime64[ns]dask.array<chunksize=(1,), meta=np.ndarray>
- format :
- defined reference date
- time_zone :
- UTC
Array Chunk Bytes 5.96 kiB 8 B Shape (763,) (1,) Dask graph 763 chunks in 2 graph layers Data type datetime64[ns] numpy.ndarray - Times(time)|S26dask.array<chunksize=(1,), meta=np.ndarray>
- time_zone :
- UTC
Array Chunk Bytes 19.37 kiB 26 B Shape (763,) (1,) Dask graph 763 chunks in 2 graph layers Data type |S26 numpy.ndarray - a1u(four, nele)float32dask.array<chunksize=(4, 569405), meta=np.ndarray>
- long_name :
- a1u
Array Chunk Bytes 8.69 MiB 8.69 MiB Shape (4, 569405) (4, 569405) Dask graph 1 chunks in 2 graph layers Data type float32 numpy.ndarray - a2u(four, nele)float32dask.array<chunksize=(4, 569405), meta=np.ndarray>
- long_name :
- a2u
Array Chunk Bytes 8.69 MiB 8.69 MiB Shape (4, 569405) (4, 569405) Dask graph 1 chunks in 2 graph layers Data type float32 numpy.ndarray - art1(node)float32dask.array<chunksize=(303714,), meta=np.ndarray>
- long_name :
- Area of Node-Base Control volume
Array Chunk Bytes 1.16 MiB 1.16 MiB Shape (303714,) (303714,) Dask graph 1 chunks in 2 graph layers Data type float32 numpy.ndarray - art2(node)float32dask.array<chunksize=(303714,), meta=np.ndarray>
- long_name :
- Area of elements around a node
Array Chunk Bytes 1.16 MiB 1.16 MiB Shape (303714,) (303714,) Dask graph 1 chunks in 2 graph layers Data type float32 numpy.ndarray - atmos_press(time, node)float32dask.array<chunksize=(1, 303714), meta=np.ndarray>
- grid :
- fvcom_grid
- long_name :
- Atmospheric Pressure
- type :
- data
- units :
- pascals
Array Chunk Bytes 883.99 MiB 1.16 MiB Shape (763, 303714) (1, 303714) Dask graph 763 chunks in 2 graph layers Data type float32 numpy.ndarray - aw0(three, nele)float32dask.array<chunksize=(3, 569405), meta=np.ndarray>
- long_name :
- aw0
Array Chunk Bytes 6.52 MiB 6.52 MiB Shape (3, 569405) (3, 569405) Dask graph 1 chunks in 2 graph layers Data type float32 numpy.ndarray - awx(three, nele)float32dask.array<chunksize=(3, 569405), meta=np.ndarray>
- long_name :
- awx
Array Chunk Bytes 6.52 MiB 6.52 MiB Shape (3, 569405) (3, 569405) Dask graph 1 chunks in 2 graph layers Data type float32 numpy.ndarray - awy(three, nele)float32dask.array<chunksize=(3, 569405), meta=np.ndarray>
- long_name :
- awy
Array Chunk Bytes 6.52 MiB 6.52 MiB Shape (3, 569405) (3, 569405) Dask graph 1 chunks in 2 graph layers Data type float32 numpy.ndarray - fvcom_mesh()int32...
- cf_role :
- mesh_topology
- topology_dimension :
- 2
- node_coordinates :
- lon lat
- face_coordinates :
- lonc latc
- face_node_connectivity :
- nv
- face_face_connectivity :
- nbe
- face_dimension :
- nele
[1 values with dtype=int32]
- h(node)float32dask.array<chunksize=(303714,), 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 1.16 MiB 1.16 MiB Shape (303714,) (303714,) Dask graph 1 chunks in 2 graph layers Data type float32 numpy.ndarray - iint(time)int32dask.array<chunksize=(1,), meta=np.ndarray>
- long_name :
- internal mode iteration number
Array Chunk Bytes 2.98 kiB 4 B Shape (763,) (1,) Dask graph 763 chunks in 2 graph layers Data type int32 numpy.ndarray - nbe(three, nele)int32dask.array<chunksize=(3, 569405), meta=np.ndarray>
- long_name :
- elements surrounding each element
- start_index :
- 1
Array Chunk Bytes 6.52 MiB 6.52 MiB Shape (3, 569405) (3, 569405) Dask graph 1 chunks in 2 graph layers Data type int32 numpy.ndarray - nbsn(maxnode, node)int32dask.array<chunksize=(10, 303714), meta=np.ndarray>
- long_name :
- nodes surrounding each node
Array Chunk Bytes 11.59 MiB 11.59 MiB Shape (10, 303714) (10, 303714) Dask graph 1 chunks in 2 graph layers Data type int32 numpy.ndarray - nbve(maxelem, node)int32dask.array<chunksize=(8, 303714), meta=np.ndarray>
- long_name :
- elems surrounding each node
Array Chunk Bytes 9.27 MiB 9.27 MiB Shape (8, 303714) (8, 303714) Dask graph 1 chunks in 2 graph layers Data type int32 numpy.ndarray - net_heat_flux(time, node)float32dask.array<chunksize=(1, 303714), meta=np.ndarray>
- grid :
- fvcom_grid
- location :
- node
- long_name :
- Surface Net Heat Flux
- mesh :
- fvcom_mesh
- type :
- data
- units :
- W m-2
Array Chunk Bytes 883.99 MiB 1.16 MiB Shape (763, 303714) (1, 303714) Dask graph 763 chunks in 2 graph layers Data type float32 numpy.ndarray - nprocs()int32...
- long_name :
- number of processors
[1 values with dtype=int32]
- ntsn(node)int32dask.array<chunksize=(303714,), meta=np.ndarray>
- long_name :
- #nodes surrounding each node
Array Chunk Bytes 1.16 MiB 1.16 MiB Shape (303714,) (303714,) Dask graph 1 chunks in 2 graph layers Data type int32 numpy.ndarray - ntve(node)int32dask.array<chunksize=(303714,), meta=np.ndarray>
- long_name :
- #elems surrounding each node
Array Chunk Bytes 1.16 MiB 1.16 MiB Shape (303714,) (303714,) Dask graph 1 chunks in 2 graph layers Data type int32 numpy.ndarray - nv(three, nele)int32dask.array<chunksize=(3, 569405), meta=np.ndarray>
- long_name :
- nodes surrounding element
- start_index :
- 1
Array Chunk Bytes 6.52 MiB 6.52 MiB Shape (3, 569405) (3, 569405) Dask graph 1 chunks in 2 graph layers Data type int32 numpy.ndarray - partition(nele)int32dask.array<chunksize=(569405,), meta=np.ndarray>
- long_name :
- partition
Array Chunk Bytes 2.17 MiB 2.17 MiB Shape (569405,) (569405,) Dask graph 1 chunks in 2 graph layers Data type int32 numpy.ndarray - salinity_surface(time, node)float32dask.array<chunksize=(1, 303714), meta=np.ndarray>
- grid :
- fvcom_grid
- location :
- node
- long_name :
- surface salinity
- mesh :
- fvcom_mesh
- standard_name :
- seasurface_water_salinity
- type :
- data
- units :
- 1e-3
Array Chunk Bytes 883.99 MiB 1.16 MiB Shape (763, 303714) (1, 303714) Dask graph 763 chunks in 2 graph layers Data type float32 numpy.ndarray - short_wave(time, node)float32dask.array<chunksize=(1, 303714), meta=np.ndarray>
- grid :
- fvcom_grid
- location :
- node
- long_name :
- Short Wave Radiation
- mesh :
- fvcom_mesh
- type :
- data
- units :
- W m-2
Array Chunk Bytes 883.99 MiB 1.16 MiB Shape (763, 303714) (1, 303714) Dask graph 763 chunks in 2 graph layers Data type float32 numpy.ndarray - temp_surface(time, node)float32dask.array<chunksize=(1, 303714), meta=np.ndarray>
- grid :
- fvcom_grid
- location :
- node
- long_name :
- surface temperature
- mesh :
- fvcom_mesh
- standard_name :
- seasurface_water_temperature
- type :
- data
- units :
- degrees_C
Array Chunk Bytes 883.99 MiB 1.16 MiB Shape (763, 303714) (1, 303714) Dask graph 763 chunks in 2 graph layers Data type float32 numpy.ndarray - u_surface(time, nele)float32dask.array<chunksize=(1, 569405), meta=np.ndarray>
- grid :
- fvcom_grid
- location :
- face
- long_name :
- Eastward Surface Water Velocity
- mesh :
- fvcom_mesh
- standard_name :
- eastward_seasurface_water_velocity
- type :
- data
- units :
- meters s-1
Array Chunk Bytes 1.62 GiB 2.17 MiB Shape (763, 569405) (1, 569405) Dask graph 763 chunks in 2 graph layers Data type float32 numpy.ndarray - uwind_speed(time, nele)float32dask.array<chunksize=(1, 569405), meta=np.ndarray>
- grid :
- fvcom_grid
- location :
- face
- long_name :
- Eastward Wind Velocity
- mesh :
- fvcom_mesh
- standard_name :
- eastward wind
- type :
- data
- units :
- meters s-1
Array Chunk Bytes 1.62 GiB 2.17 MiB Shape (763, 569405) (1, 569405) Dask graph 763 chunks in 2 graph layers Data type float32 numpy.ndarray - v_surface(time, nele)float32dask.array<chunksize=(1, 569405), meta=np.ndarray>
- grid :
- fvcom_grid
- location :
- face
- long_name :
- Northward Surface Water Velocity
- mesh :
- fvcom_mesh
- standard_name :
- Northward_seasurface_water_velocity
- type :
- data
- units :
- meters s-1
Array Chunk Bytes 1.62 GiB 2.17 MiB Shape (763, 569405) (1, 569405) Dask graph 763 chunks in 2 graph layers Data type float32 numpy.ndarray - vwind_speed(time, nele)float32dask.array<chunksize=(1, 569405), meta=np.ndarray>
- grid :
- fvcom_grid
- location :
- face
- long_name :
- Northward Wind Velocity
- mesh :
- fvcom_mesh
- standard_name :
- northward wind
- type :
- data
- units :
- meters s-1
Array Chunk Bytes 1.62 GiB 2.17 MiB Shape (763, 569405) (1, 569405) Dask graph 763 chunks in 2 graph layers Data type float32 numpy.ndarray - wet_cells(time, nele)int32dask.array<chunksize=(1, 569405), meta=np.ndarray>
- grid :
- fvcom_grid
- location :
- face
- long_name :
- Wet_Cells
- mesh :
- fvcom_mesh
- type :
- data
Array Chunk Bytes 1.62 GiB 2.17 MiB Shape (763, 569405) (1, 569405) Dask graph 763 chunks in 2 graph layers Data type int32 numpy.ndarray - wet_cells_prev_ext(time, nele)int32dask.array<chunksize=(1, 569405), meta=np.ndarray>
- grid :
- fvcom_grid
- long_name :
- Wet_Cells_At_Previous_External_Step
- type :
- data
Array Chunk Bytes 1.62 GiB 2.17 MiB Shape (763, 569405) (1, 569405) Dask graph 763 chunks in 2 graph layers Data type int32 numpy.ndarray - wet_cells_prev_int(time, nele)int32dask.array<chunksize=(1, 569405), meta=np.ndarray>
- grid :
- fvcom_grid
- location :
- face
- long_name :
- Wet_Cells_At_Previous_Internal_Step
- mesh :
- fvcom_mesh
- type :
- data
Array Chunk Bytes 1.62 GiB 2.17 MiB Shape (763, 569405) (1, 569405) Dask graph 763 chunks in 2 graph layers Data type int32 numpy.ndarray - wet_nodes(time, node)int32dask.array<chunksize=(1, 303714), meta=np.ndarray>
- grid :
- fvcom_grid
- location :
- node
- long_name :
- Wet_Nodes
- mesh :
- fvcom_mesh
- type :
- data
Array Chunk Bytes 883.99 MiB 1.16 MiB Shape (763, 303714) (1, 303714) Dask graph 763 chunks in 2 graph layers Data type int32 numpy.ndarray - wet_nodes_prev_int(time, node)int32dask.array<chunksize=(1, 303714), meta=np.ndarray>
- grid :
- fvcom_grid
- location :
- node
- long_name :
- Wet_Nodes_At_Previous_Internal_Step
- mesh :
- fvcom_mesh
- type :
- data
Array Chunk Bytes 883.99 MiB 1.16 MiB Shape (763, 303714) (1, 303714) Dask graph 763 chunks in 2 graph layers Data type int32 numpy.ndarray - x(node)float32dask.array<chunksize=(303714,), meta=np.ndarray>
- long_name :
- nodal x-coordinate
- units :
- meters
Array Chunk Bytes 1.16 MiB 1.16 MiB Shape (303714,) (303714,) Dask graph 1 chunks in 2 graph layers Data type float32 numpy.ndarray - xc(nele)float32dask.array<chunksize=(569405,), meta=np.ndarray>
- long_name :
- zonal x-coordinate
- units :
- meters
Array Chunk Bytes 2.17 MiB 2.17 MiB Shape (569405,) (569405,) Dask graph 1 chunks in 2 graph layers Data type float32 numpy.ndarray - y(node)float32dask.array<chunksize=(303714,), meta=np.ndarray>
- long_name :
- nodal y-coordinate
- units :
- meters
Array Chunk Bytes 1.16 MiB 1.16 MiB Shape (303714,) (303714,) Dask graph 1 chunks in 2 graph layers Data type float32 numpy.ndarray - yc(nele)float32dask.array<chunksize=(569405,), meta=np.ndarray>
- long_name :
- zonal y-coordinate
- units :
- meters
Array Chunk Bytes 2.17 MiB 2.17 MiB Shape (569405,) (569405,) Dask graph 1 chunks in 2 graph layers Data type float32 numpy.ndarray - zeta(time, node)float32dask.array<chunksize=(1, 303714), meta=np.ndarray>
- grid :
- Bathymetry_Mesh
- location :
- node
- long_name :
- Water Surface Elevation
- positive :
- up
- standard_name :
- sea_surface_height_above_geoid
- type :
- data
- units :
- meters
Array Chunk Bytes 883.99 MiB 1.16 MiB Shape (763, 303714) (1, 303714) Dask graph 763 chunks in 2 graph layers Data type float32 numpy.ndarray
- timePandasIndex
PandasIndex(DatetimeIndex([ '2024-06-18 21:00:00', '2024-06-18 21:59:56.484375008', '2024-06-18 23:00:03.515624992', '2024-06-19 00:00:00', '2024-06-19 00:59:56.484375008', '2024-06-19 02:00:03.515624992', '2024-06-19 03:00:00', '2024-06-19 03:59:56.484375008', '2024-06-19 05:00:03.515624992', '2024-06-19 06:00:00', ... '2024-07-20 06:00:00', '2024-07-20 06:59:56.484375008', '2024-07-20 08:00:03.515624992', '2024-07-20 09:00:00', '2024-07-20 09:59:56.484375008', '2024-07-20 11:00:03.515624992', '2024-07-20 12:00:00', '2024-07-20 12:59:56.484375008', '2024-07-20 14:00:03.515624992', '2024-07-20 15:00:00'], dtype='datetime64[ns]', name='time', length=763, freq=None))
- Conventions :
- CF-1.0
- CoordinateProjection :
- init=nad83:4205
- CoordinateSystem :
- GeoReferenced
- GroundWater_Forcing :
- GROUND WATER FORCING IS OFF!
- River_Forcing :
- THERE ARE 63 RIVERS IN THIS MODEL. RIVER INFLOW IS ON THE nodes WHERE TEMPERATURE AND SALINITY ARE calculated IN THE MODEL. THE FOLLOWING RIVER NAMES ARE USED: 08012000 02365500 02375500 02489500 02492000 08211200 08211200 08211200 02481510 02481510 02481510 02479000 02479000 02479000 02479000 08164800 08164800 08164000 08164000 08188800 08188800 08188800 08066500 08066500 02479560 02479560 02479560 02479560 07375500 07375500 08030500 08030500 08069000 08069000 08069000 07381600 07381600 07381600 07381600 02470629 02470629 02470629 02470629 02471019 02471019 02471019 02471019 02471019 08076000 08076000 08075400 08041780 08015500 08075000 08075000 07374000 07374000 07374000 07374000 08162500 08116650 02376500 02368000
- Surface_Heat_Forcing :
- FVCOM variable surface heat forcing file: FILE NAME:nos.ngofs2.hflux.forecast.20240618.t21z.nc SOURCE:FVCOM grid (unstructured) surface forcing Unknown start date meta data format
- Surface_PrecipEvap_Forcing :
- SURFACE PRECIPITATION FORCING IS OFF
- Surface_Wind_Forcing :
- FVCOM variable surface Wind forcing: FILE NAME:nos.ngofs2.met.forecast.20240618.t21z.nc SOURCE:FVCOM grid (unstructured) surface forcing Unknown start date meta data format
- Tidal_Forcing :
- TIDAL ELEVATION FORCING IS OFF!
- history :
- model started at: 18/06/2024 21:15
- institution :
- School for Marine Science and Technology
- references :
- http://fvcom.smast.umassd.edu, http://codfish.smast.umassd.edu
- source :
- FVCOM_4.3
- title :
- NGOFS2
f"Dataset size: {ds.nbytes * 1.0e-9} Gb"
'Dataset size: 19.676859022000002 Gb'
Example Polygon¶
Drawn with: https://geojson.io

polygon = np.array(
[
[-88.90580394001934, 30.29241252023394],
[-89.19516286474344, 30.472177580997183],
[-89.68564387438431, 30.353800554455674],
[-90.10008710994322, 30.07406870382799],
[-90.02651730481438, 29.72115942943863],
[-89.61697872293067, 29.347768286358786],
[-89.48700540053677, 28.869972870160396],
[-89.03822958925102, 28.876415308359796],
[-88.6164293731791, 29.163769289372496],
[-88.54531189488806, 29.682817158850725],
[-88.31234084531368, 29.836098340764792],
[-88.3491257478779, 29.967902324410517],
[-88.90580394001934, 30.29241252023394],
]
)
polygon
array([[-88.90580394, 30.29241252],
[-89.19516286, 30.47217758],
[-89.68564387, 30.35380055],
[-90.10008711, 30.0740687 ],
[-90.0265173 , 29.72115943],
[-89.61697872, 29.34776829],
[-89.4870054 , 28.86997287],
[-89.03822959, 28.87641531],
[-88.61642937, 29.16376929],
[-88.54531189, 29.68281716],
[-88.31234085, 29.83609834],
[-88.34912575, 29.96790232],
[-88.90580394, 30.29241252]])
We can subset down to the variables we care about, while keeping the grid information for later analysis
ds_zeta = ds.xsg.subset_vars(['zeta'])
ds_zeta
<xarray.Dataset> Size: 948MB
Dimensions: (node: 303714, nele: 569405, three: 3, time: 763)
Coordinates:
lon (node) float32 1MB dask.array<chunksize=(303714,), meta=np.ndarray>
lat (node) float32 1MB dask.array<chunksize=(303714,), meta=np.ndarray>
lonc (nele) float32 2MB dask.array<chunksize=(569405,), meta=np.ndarray>
latc (nele) float32 2MB dask.array<chunksize=(569405,), meta=np.ndarray>
* time (time) datetime64[ns] 6kB 2024-06-18T21:00:00 ... 2024-07-20T...
Dimensions without coordinates: node, nele, three
Data variables:
fvcom_mesh int32 4B ...
nv (three, nele) int32 7MB dask.array<chunksize=(3, 569405), meta=np.ndarray>
nbe (three, nele) int32 7MB dask.array<chunksize=(3, 569405), meta=np.ndarray>
zeta (time, node) float32 927MB dask.array<chunksize=(1, 303714), meta=np.ndarray>
Attributes: (12/14)
Conventions: CF-1.0
CoordinateProjection: init=nad83:4205
CoordinateSystem: GeoReferenced
GroundWater_Forcing: GROUND WATER FORCING IS OFF!
River_Forcing: THERE ARE 63 RIVERS IN THIS MODEL.\nRIVER IN...
Surface_Heat_Forcing: FVCOM variable surface heat forcing file:\nF...
... ...
Tidal_Forcing: TIDAL ELEVATION FORCING IS OFF!
history: model started at: 18/06/2024 21:15
institution: School for Marine Science and Technology
references: http://fvcom.smast.umassd.edu, http://codfis...
source: FVCOM_4.3
title: NGOFS2xarray.Dataset
- node: 303714
- nele: 569405
- three: 3
- time: 763
- lon(node)float32dask.array<chunksize=(303714,), meta=np.ndarray>
- long_name :
- nodal longitude
- standard_name :
- longitude
- units :
- degrees_east
Array Chunk Bytes 1.16 MiB 1.16 MiB Shape (303714,) (303714,) Dask graph 1 chunks in 2 graph layers Data type float32 numpy.ndarray - lat(node)float32dask.array<chunksize=(303714,), meta=np.ndarray>
- long_name :
- nodal latitude
- standard_name :
- latitude
- units :
- degrees_north
Array Chunk Bytes 1.16 MiB 1.16 MiB Shape (303714,) (303714,) Dask graph 1 chunks in 2 graph layers Data type float32 numpy.ndarray - lonc(nele)float32dask.array<chunksize=(569405,), meta=np.ndarray>
- long_name :
- zonal longitude
- standard_name :
- longitude
- units :
- degrees_east
Array Chunk Bytes 2.17 MiB 2.17 MiB Shape (569405,) (569405,) Dask graph 1 chunks in 2 graph layers Data type float32 numpy.ndarray - latc(nele)float32dask.array<chunksize=(569405,), meta=np.ndarray>
- long_name :
- zonal latitude
- standard_name :
- latitude
- units :
- degrees_north
Array Chunk Bytes 2.17 MiB 2.17 MiB Shape (569405,) (569405,) Dask graph 1 chunks in 2 graph layers Data type float32 numpy.ndarray - time(time)datetime64[ns]2024-06-18T21:00:00 ... 2024-07-...
- format :
- defined reference date
- long_name :
- time
- time_zone :
- UTC
array(['2024-06-18T21:00:00.000000000', '2024-06-18T21:59:56.484375008', '2024-06-18T23:00:03.515624992', ..., '2024-07-20T12:59:56.484375008', '2024-07-20T14:00:03.515624992', '2024-07-20T15:00:00.000000000'], dtype='datetime64[ns]')
- fvcom_mesh()int32...
- cf_role :
- mesh_topology
- topology_dimension :
- 2
- node_coordinates :
- lon lat
- face_coordinates :
- lonc latc
- face_node_connectivity :
- nv
- face_face_connectivity :
- nbe
- face_dimension :
- nele
[1 values with dtype=int32]
- nv(three, nele)int32dask.array<chunksize=(3, 569405), meta=np.ndarray>
- long_name :
- nodes surrounding element
- start_index :
- 1
Array Chunk Bytes 6.52 MiB 6.52 MiB Shape (3, 569405) (3, 569405) Dask graph 1 chunks in 2 graph layers Data type int32 numpy.ndarray - nbe(three, nele)int32dask.array<chunksize=(3, 569405), meta=np.ndarray>
- long_name :
- elements surrounding each element
- start_index :
- 1
Array Chunk Bytes 6.52 MiB 6.52 MiB Shape (3, 569405) (3, 569405) Dask graph 1 chunks in 2 graph layers Data type int32 numpy.ndarray - zeta(time, node)float32dask.array<chunksize=(1, 303714), meta=np.ndarray>
- grid :
- Bathymetry_Mesh
- location :
- node
- long_name :
- Water Surface Elevation
- positive :
- up
- standard_name :
- sea_surface_height_above_geoid
- type :
- data
- units :
- meters
Array Chunk Bytes 883.99 MiB 1.16 MiB Shape (763, 303714) (1, 303714) Dask graph 763 chunks in 2 graph layers Data type float32 numpy.ndarray
- timePandasIndex
PandasIndex(DatetimeIndex([ '2024-06-18 21:00:00', '2024-06-18 21:59:56.484375008', '2024-06-18 23:00:03.515624992', '2024-06-19 00:00:00', '2024-06-19 00:59:56.484375008', '2024-06-19 02:00:03.515624992', '2024-06-19 03:00:00', '2024-06-19 03:59:56.484375008', '2024-06-19 05:00:03.515624992', '2024-06-19 06:00:00', ... '2024-07-20 06:00:00', '2024-07-20 06:59:56.484375008', '2024-07-20 08:00:03.515624992', '2024-07-20 09:00:00', '2024-07-20 09:59:56.484375008', '2024-07-20 11:00:03.515624992', '2024-07-20 12:00:00', '2024-07-20 12:59:56.484375008', '2024-07-20 14:00:03.515624992', '2024-07-20 15:00:00'], dtype='datetime64[ns]', name='time', length=763, freq=None))
- Conventions :
- CF-1.0
- CoordinateProjection :
- init=nad83:4205
- CoordinateSystem :
- GeoReferenced
- GroundWater_Forcing :
- GROUND WATER FORCING IS OFF!
- River_Forcing :
- THERE ARE 63 RIVERS IN THIS MODEL. RIVER INFLOW IS ON THE nodes WHERE TEMPERATURE AND SALINITY ARE calculated IN THE MODEL. THE FOLLOWING RIVER NAMES ARE USED: 08012000 02365500 02375500 02489500 02492000 08211200 08211200 08211200 02481510 02481510 02481510 02479000 02479000 02479000 02479000 08164800 08164800 08164000 08164000 08188800 08188800 08188800 08066500 08066500 02479560 02479560 02479560 02479560 07375500 07375500 08030500 08030500 08069000 08069000 08069000 07381600 07381600 07381600 07381600 02470629 02470629 02470629 02470629 02471019 02471019 02471019 02471019 02471019 08076000 08076000 08075400 08041780 08015500 08075000 08075000 07374000 07374000 07374000 07374000 08162500 08116650 02376500 02368000
- Surface_Heat_Forcing :
- FVCOM variable surface heat forcing file: FILE NAME:nos.ngofs2.hflux.forecast.20240618.t21z.nc SOURCE:FVCOM grid (unstructured) surface forcing Unknown start date meta data format
- Surface_PrecipEvap_Forcing :
- SURFACE PRECIPITATION FORCING IS OFF
- Surface_Wind_Forcing :
- FVCOM variable surface Wind forcing: FILE NAME:nos.ngofs2.met.forecast.20240618.t21z.nc SOURCE:FVCOM grid (unstructured) surface forcing Unknown start date meta data format
- Tidal_Forcing :
- TIDAL ELEVATION FORCING IS OFF!
- history :
- model started at: 18/06/2024 21:15
- institution :
- School for Marine Science and Technology
- references :
- http://fvcom.smast.umassd.edu, http://codfish.smast.umassd.edu
- source :
- FVCOM_4.3
- title :
- NGOFS2
Then we can subset the grid down to the target area
ds_subset = ds_zeta.xsg.subset_polygon(polygon)
assert(ds_subset is not None)
ds_subset
<xarray.Dataset> Size: 168MB
Dimensions: (node: 54024, nele: 99246, three: 3, time: 763)
Coordinates:
lon (node) float32 216kB dask.array<chunksize=(54024,), meta=np.ndarray>
lat (node) float32 216kB dask.array<chunksize=(54024,), meta=np.ndarray>
lonc (nele) float32 397kB dask.array<chunksize=(99246,), meta=np.ndarray>
latc (nele) float32 397kB dask.array<chunksize=(99246,), meta=np.ndarray>
* time (time) datetime64[ns] 6kB 2024-06-18T21:00:00 ... 2024-07-20T...
Dimensions without coordinates: node, nele, three
Data variables:
fvcom_mesh int32 4B ...
nv (three, nele) int32 1MB dask.array<chunksize=(3, 99246), meta=np.ndarray>
nbe (three, nele) int32 1MB dask.array<chunksize=(3, 99246), meta=np.ndarray>
zeta (time, node) float32 165MB dask.array<chunksize=(1, 54024), meta=np.ndarray>
Attributes: (12/14)
Conventions: CF-1.0
CoordinateProjection: init=nad83:4205
CoordinateSystem: GeoReferenced
GroundWater_Forcing: GROUND WATER FORCING IS OFF!
River_Forcing: THERE ARE 63 RIVERS IN THIS MODEL.\nRIVER IN...
Surface_Heat_Forcing: FVCOM variable surface heat forcing file:\nF...
... ...
Tidal_Forcing: TIDAL ELEVATION FORCING IS OFF!
history: model started at: 18/06/2024 21:15
institution: School for Marine Science and Technology
references: http://fvcom.smast.umassd.edu, http://codfis...
source: FVCOM_4.3
title: NGOFS2xarray.Dataset
- node: 54024
- nele: 99246
- three: 3
- time: 763
- lon(node)float32dask.array<chunksize=(54024,), meta=np.ndarray>
- long_name :
- nodal longitude
- standard_name :
- longitude
- units :
- degrees_east
Array Chunk Bytes 211.03 kiB 211.03 kiB Shape (54024,) (54024,) Dask graph 1 chunks in 3 graph layers Data type float32 numpy.ndarray - lat(node)float32dask.array<chunksize=(54024,), meta=np.ndarray>
- long_name :
- nodal latitude
- standard_name :
- latitude
- units :
- degrees_north
Array Chunk Bytes 211.03 kiB 211.03 kiB Shape (54024,) (54024,) Dask graph 1 chunks in 3 graph layers Data type float32 numpy.ndarray - lonc(nele)float32dask.array<chunksize=(99246,), meta=np.ndarray>
- long_name :
- zonal longitude
- standard_name :
- longitude
- units :
- degrees_east
Array Chunk Bytes 387.68 kiB 387.68 kiB Shape (99246,) (99246,) Dask graph 1 chunks in 3 graph layers Data type float32 numpy.ndarray - latc(nele)float32dask.array<chunksize=(99246,), meta=np.ndarray>
- long_name :
- zonal latitude
- standard_name :
- latitude
- units :
- degrees_north
Array Chunk Bytes 387.68 kiB 387.68 kiB Shape (99246,) (99246,) Dask graph 1 chunks in 3 graph layers Data type float32 numpy.ndarray - time(time)datetime64[ns]2024-06-18T21:00:00 ... 2024-07-...
- format :
- defined reference date
- long_name :
- time
- time_zone :
- UTC
array(['2024-06-18T21:00:00.000000000', '2024-06-18T21:59:56.484375008', '2024-06-18T23:00:03.515624992', ..., '2024-07-20T12:59:56.484375008', '2024-07-20T14:00:03.515624992', '2024-07-20T15:00:00.000000000'], dtype='datetime64[ns]')
- fvcom_mesh()int32...
- cf_role :
- mesh_topology
- topology_dimension :
- 2
- node_coordinates :
- lon lat
- face_coordinates :
- lonc latc
- face_node_connectivity :
- nv
- face_face_connectivity :
- nbe
- face_dimension :
- nele
[1 values with dtype=int32]
- nv(three, nele)int32dask.array<chunksize=(3, 99246), meta=np.ndarray>
- long_name :
- nodes surrounding element
- start_index :
- 1
Array Chunk Bytes 1.14 MiB 1.14 MiB Shape (3, 99246) (3, 99246) Dask graph 1 chunks in 4 graph layers Data type int32 numpy.ndarray - nbe(three, nele)int32dask.array<chunksize=(3, 99246), meta=np.ndarray>
- long_name :
- elements surrounding each element
- start_index :
- 1
Array Chunk Bytes 1.14 MiB 1.14 MiB Shape (3, 99246) (3, 99246) Dask graph 1 chunks in 4 graph layers Data type int32 numpy.ndarray - zeta(time, node)float32dask.array<chunksize=(1, 54024), meta=np.ndarray>
- grid :
- Bathymetry_Mesh
- location :
- node
- long_name :
- Water Surface Elevation
- positive :
- up
- standard_name :
- sea_surface_height_above_geoid
- type :
- data
- units :
- meters
Array Chunk Bytes 157.24 MiB 211.03 kiB Shape (763, 54024) (1, 54024) Dask graph 763 chunks in 3 graph layers Data type float32 numpy.ndarray
- timePandasIndex
PandasIndex(DatetimeIndex([ '2024-06-18 21:00:00', '2024-06-18 21:59:56.484375008', '2024-06-18 23:00:03.515624992', '2024-06-19 00:00:00', '2024-06-19 00:59:56.484375008', '2024-06-19 02:00:03.515624992', '2024-06-19 03:00:00', '2024-06-19 03:59:56.484375008', '2024-06-19 05:00:03.515624992', '2024-06-19 06:00:00', ... '2024-07-20 06:00:00', '2024-07-20 06:59:56.484375008', '2024-07-20 08:00:03.515624992', '2024-07-20 09:00:00', '2024-07-20 09:59:56.484375008', '2024-07-20 11:00:03.515624992', '2024-07-20 12:00:00', '2024-07-20 12:59:56.484375008', '2024-07-20 14:00:03.515624992', '2024-07-20 15:00:00'], dtype='datetime64[ns]', name='time', length=763, freq=None))
- Conventions :
- CF-1.0
- CoordinateProjection :
- init=nad83:4205
- CoordinateSystem :
- GeoReferenced
- GroundWater_Forcing :
- GROUND WATER FORCING IS OFF!
- River_Forcing :
- THERE ARE 63 RIVERS IN THIS MODEL. RIVER INFLOW IS ON THE nodes WHERE TEMPERATURE AND SALINITY ARE calculated IN THE MODEL. THE FOLLOWING RIVER NAMES ARE USED: 08012000 02365500 02375500 02489500 02492000 08211200 08211200 08211200 02481510 02481510 02481510 02479000 02479000 02479000 02479000 08164800 08164800 08164000 08164000 08188800 08188800 08188800 08066500 08066500 02479560 02479560 02479560 02479560 07375500 07375500 08030500 08030500 08069000 08069000 08069000 07381600 07381600 07381600 07381600 02470629 02470629 02470629 02470629 02471019 02471019 02471019 02471019 02471019 08076000 08076000 08075400 08041780 08015500 08075000 08075000 07374000 07374000 07374000 07374000 08162500 08116650 02376500 02368000
- Surface_Heat_Forcing :
- FVCOM variable surface heat forcing file: FILE NAME:nos.ngofs2.hflux.forecast.20240618.t21z.nc SOURCE:FVCOM grid (unstructured) surface forcing Unknown start date meta data format
- Surface_PrecipEvap_Forcing :
- SURFACE PRECIPITATION FORCING IS OFF
- Surface_Wind_Forcing :
- FVCOM variable surface Wind forcing: FILE NAME:nos.ngofs2.met.forecast.20240618.t21z.nc SOURCE:FVCOM grid (unstructured) surface forcing Unknown start date meta data format
- Tidal_Forcing :
- TIDAL ELEVATION FORCING IS OFF!
- history :
- model started at: 18/06/2024 21:15
- institution :
- School for Marine Science and Technology
- references :
- http://fvcom.smast.umassd.edu, http://codfish.smast.umassd.edu
- source :
- FVCOM_4.3
- title :
- NGOFS2
import matplotlib.pyplot as plt
import matplotlib.tri as tri
zeta = ds_subset.zeta.isel(time=0)
tris = tri.Triangulation(
zeta.cf["longitude"],
zeta.cf["latitude"],
ds_subset[ds_subset.fvcom_mesh.face_node_connectivity].T - 1,
)
plt.tripcolor(tris, zeta, shading="flat")
<matplotlib.collections.PolyCollection at 0x334dc3970>
f"Subset dataset size: {ds_subset.nbytes * 1.0e-6} Mb"
'Subset dataset size: 168.49542 Mb'