Assign CF Compliant Topology¶
This example assigns the missing CF Compliant topology information to allow for subsetting with the same workflow as the fvcom example, but with a netcdf file that does not contain the necessary metadata.
# 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 = xr.open_dataset(
fs.open(
"s3://noaa-nos-ofs-pds/sscofs/netcdf/202403/sscofs.t21z.20240320.fields.f064.nc"
),
chunks={},
drop_variables=["Itime2"],
)
ds
<xarray.Dataset> Size: 199MB
Dimensions: (nele: 433410, node: 239734, siglay: 10, siglev: 11,
three: 3, time: 1, maxnode: 11, maxelem: 9, four: 4)
Coordinates:
lon (node) float32 959kB dask.array<chunksize=(239734,), meta=np.ndarray>
lat (node) float32 959kB dask.array<chunksize=(239734,), meta=np.ndarray>
lonc (nele) float32 2MB dask.array<chunksize=(433410,), meta=np.ndarray>
latc (nele) float32 2MB dask.array<chunksize=(433410,), meta=np.ndarray>
siglay (siglay, node) float32 10MB dask.array<chunksize=(10, 239734), meta=np.ndarray>
siglev (siglev, node) float32 11MB dask.array<chunksize=(11, 239734), meta=np.ndarray>
* time (time) datetime64[ns] 8B 2024-03-23T13:00:07.031249984
Dimensions without coordinates: nele, node, three, maxnode, maxelem, four
Data variables: (12/45)
nprocs int32 4B ...
partition (nele) int32 2MB dask.array<chunksize=(433410,), meta=np.ndarray>
x (node) float32 959kB dask.array<chunksize=(239734,), meta=np.ndarray>
y (node) float32 959kB dask.array<chunksize=(239734,), meta=np.ndarray>
xc (nele) float32 2MB dask.array<chunksize=(433410,), meta=np.ndarray>
yc (nele) float32 2MB dask.array<chunksize=(433410,), meta=np.ndarray>
... ...
wet_nodes (time, node) int32 959kB dask.array<chunksize=(1, 239734), meta=np.ndarray>
wet_cells (time, nele) int32 2MB dask.array<chunksize=(1, 433410), meta=np.ndarray>
wet_nodes_prev_int (time, node) int32 959kB dask.array<chunksize=(1, 239734), meta=np.ndarray>
wet_cells_prev_int (time, nele) int32 2MB dask.array<chunksize=(1, 433410), meta=np.ndarray>
wet_cells_prev_ext (time, nele) int32 2MB dask.array<chunksize=(1, 433410), meta=np.ndarray>
inundation_cells (time, nele) int32 2MB dask.array<chunksize=(1, 433410), meta=np.ndarray>
Attributes: (12/14)
title: SSCOFS
institution: School for Marine Science and Technology
source: FVCOM_4.4.5
history: model started at: 20/03/2024 21:46
references: http://fvcom.smast.umassd.edu, http://codfis...
Conventions: CF-1.0
... ...
Tidal_Forcing: Tidal Forcing Time Series Title: sscofs late...
River_Forcing: THERE ARE 38 RIVERS IN THIS MODEL.\nRIVER IN...
GroundWater_Forcing: GROUND WATER FORCING IS OFF!
Surface_Heat_Forcing: FVCOM variable surface heat forcing file:\nF...
Surface_Wind_Forcing: FVCOM variable surface Wind forcing:\nFILE N...
Surface_PrecipEvap_Forcing: SURFACE PRECIPITATION FORCING IS OFFxarray.Dataset
- nele: 433410
- node: 239734
- siglay: 10
- siglev: 11
- three: 3
- time: 1
- maxnode: 11
- maxelem: 9
- four: 4
- lon(node)float32dask.array<chunksize=(239734,), meta=np.ndarray>
- long_name :
- nodal longitude
- standard_name :
- longitude
- units :
- degrees_east
Array Chunk Bytes 0.91 MiB 0.91 MiB Shape (239734,) (239734,) Dask graph 1 chunks in 2 graph layers Data type float32 numpy.ndarray - lat(node)float32dask.array<chunksize=(239734,), meta=np.ndarray>
- long_name :
- nodal latitude
- standard_name :
- latitude
- units :
- degrees_north
Array Chunk Bytes 0.91 MiB 0.91 MiB Shape (239734,) (239734,) Dask graph 1 chunks in 2 graph layers Data type float32 numpy.ndarray - lonc(nele)float32dask.array<chunksize=(433410,), meta=np.ndarray>
- long_name :
- zonal longitude
- standard_name :
- longitude
- units :
- degrees_east
Array Chunk Bytes 1.65 MiB 1.65 MiB Shape (433410,) (433410,) Dask graph 1 chunks in 2 graph layers Data type float32 numpy.ndarray - latc(nele)float32dask.array<chunksize=(433410,), meta=np.ndarray>
- long_name :
- zonal latitude
- standard_name :
- latitude
- units :
- degrees_north
Array Chunk Bytes 1.65 MiB 1.65 MiB Shape (433410,) (433410,) Dask graph 1 chunks in 2 graph layers Data type float32 numpy.ndarray - siglay(siglay, node)float32dask.array<chunksize=(10, 239734), meta=np.ndarray>
- long_name :
- Sigma Layers
- standard_name :
- ocean_sigma/general_coordinate
- positive :
- up
- valid_min :
- -1.0
- valid_max :
- 0.0
- formula_terms :
- sigma: siglay eta: zeta depth: h
Array Chunk Bytes 9.15 MiB 9.15 MiB Shape (10, 239734) (10, 239734) Dask graph 1 chunks in 2 graph layers Data type float32 numpy.ndarray - siglev(siglev, node)float32dask.array<chunksize=(11, 239734), meta=np.ndarray>
- long_name :
- Sigma Levels
- standard_name :
- ocean_sigma/general_coordinate
- positive :
- up
- valid_min :
- -1.0
- valid_max :
- 0.0
- formula_terms :
- sigma:siglay eta: zeta depth: h
Array Chunk Bytes 10.06 MiB 10.06 MiB Shape (11, 239734) (11, 239734) Dask graph 1 chunks in 2 graph layers Data type float32 numpy.ndarray - time(time)datetime64[ns]2024-03-23T13:00:07.031249984
- long_name :
- time
- format :
- defined reference date
- time_zone :
- UTC
array(['2024-03-23T13:00:07.031249984'], dtype='datetime64[ns]')
- nprocs()int32...
- long_name :
- number of processors
[1 values with dtype=int32]
- partition(nele)int32dask.array<chunksize=(433410,), meta=np.ndarray>
- long_name :
- partition
Array Chunk Bytes 1.65 MiB 1.65 MiB Shape (433410,) (433410,) Dask graph 1 chunks in 2 graph layers Data type int32 numpy.ndarray - x(node)float32dask.array<chunksize=(239734,), meta=np.ndarray>
- long_name :
- nodal x-coordinate
- units :
- meters
Array Chunk Bytes 0.91 MiB 0.91 MiB Shape (239734,) (239734,) Dask graph 1 chunks in 2 graph layers Data type float32 numpy.ndarray - y(node)float32dask.array<chunksize=(239734,), meta=np.ndarray>
- long_name :
- nodal y-coordinate
- units :
- meters
Array Chunk Bytes 0.91 MiB 0.91 MiB Shape (239734,) (239734,) Dask graph 1 chunks in 2 graph layers Data type float32 numpy.ndarray - xc(nele)float32dask.array<chunksize=(433410,), meta=np.ndarray>
- long_name :
- zonal x-coordinate
- units :
- meters
Array Chunk Bytes 1.65 MiB 1.65 MiB Shape (433410,) (433410,) Dask graph 1 chunks in 2 graph layers Data type float32 numpy.ndarray - yc(nele)float32dask.array<chunksize=(433410,), meta=np.ndarray>
- long_name :
- zonal y-coordinate
- units :
- meters
Array Chunk Bytes 1.65 MiB 1.65 MiB Shape (433410,) (433410,) Dask graph 1 chunks in 2 graph layers Data type float32 numpy.ndarray - h(node)float32dask.array<chunksize=(239734,), meta=np.ndarray>
- long_name :
- Bathymetry
- standard_name :
- sea_floor_depth_below_geoid
- units :
- m
- positive :
- down
- grid :
- Bathymetry_Mesh
- type :
- data
Array Chunk Bytes 0.91 MiB 0.91 MiB Shape (239734,) (239734,) Dask graph 1 chunks in 2 graph layers Data type float32 numpy.ndarray - nv(three, nele)int32dask.array<chunksize=(3, 433410), meta=np.ndarray>
- long_name :
- nodes surrounding element
Array Chunk Bytes 4.96 MiB 4.96 MiB Shape (3, 433410) (3, 433410) Dask graph 1 chunks in 2 graph layers Data type int32 numpy.ndarray - iint(time)int32dask.array<chunksize=(1,), meta=np.ndarray>
- long_name :
- internal mode iteration number
Array Chunk Bytes 4 B 4 B Shape (1,) (1,) Dask graph 1 chunks in 2 graph layers Data type int32 numpy.ndarray - Itime(time)datetime64[ns]dask.array<chunksize=(1,), meta=np.ndarray>
- format :
- defined reference date
- time_zone :
- UTC
Array Chunk Bytes 8 B 8 B Shape (1,) (1,) Dask graph 1 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 26 B 26 B Shape (1,) (1,) Dask graph 1 chunks in 2 graph layers Data type |S26 numpy.ndarray - zeta(time, node)float32dask.array<chunksize=(1, 239734), meta=np.ndarray>
- long_name :
- Water Surface Elevation
- units :
- meters
- positive :
- up
- standard_name :
- sea_surface_height_above_geoid
- grid :
- Bathymetry_Mesh
- type :
- data
- location :
- node
Array Chunk Bytes 0.91 MiB 0.91 MiB Shape (1, 239734) (1, 239734) Dask graph 1 chunks in 2 graph layers Data type float32 numpy.ndarray - nbe(three, nele)int32dask.array<chunksize=(3, 433410), meta=np.ndarray>
- long_name :
- elements surrounding each element
Array Chunk Bytes 4.96 MiB 4.96 MiB Shape (3, 433410) (3, 433410) Dask graph 1 chunks in 2 graph layers Data type int32 numpy.ndarray - ntsn(node)int32dask.array<chunksize=(239734,), meta=np.ndarray>
- long_name :
- #nodes surrounding each node
Array Chunk Bytes 0.91 MiB 0.91 MiB Shape (239734,) (239734,) Dask graph 1 chunks in 2 graph layers Data type int32 numpy.ndarray - nbsn(maxnode, node)int32dask.array<chunksize=(11, 239734), meta=np.ndarray>
- long_name :
- nodes surrounding each node
Array Chunk Bytes 10.06 MiB 10.06 MiB Shape (11, 239734) (11, 239734) Dask graph 1 chunks in 2 graph layers Data type int32 numpy.ndarray - ntve(node)int32dask.array<chunksize=(239734,), meta=np.ndarray>
- long_name :
- #elems surrounding each node
Array Chunk Bytes 0.91 MiB 0.91 MiB Shape (239734,) (239734,) Dask graph 1 chunks in 2 graph layers Data type int32 numpy.ndarray - nbve(maxelem, node)int32dask.array<chunksize=(9, 239734), meta=np.ndarray>
- long_name :
- elems surrounding each node
Array Chunk Bytes 8.23 MiB 8.23 MiB Shape (9, 239734) (9, 239734) Dask graph 1 chunks in 2 graph layers Data type int32 numpy.ndarray - a1u(four, nele)float32dask.array<chunksize=(4, 433410), meta=np.ndarray>
- long_name :
- a1u
Array Chunk Bytes 6.61 MiB 6.61 MiB Shape (4, 433410) (4, 433410) Dask graph 1 chunks in 2 graph layers Data type float32 numpy.ndarray - a2u(four, nele)float32dask.array<chunksize=(4, 433410), meta=np.ndarray>
- long_name :
- a2u
Array Chunk Bytes 6.61 MiB 6.61 MiB Shape (4, 433410) (4, 433410) Dask graph 1 chunks in 2 graph layers Data type float32 numpy.ndarray - aw0(three, nele)float32dask.array<chunksize=(3, 433410), meta=np.ndarray>
- long_name :
- aw0
Array Chunk Bytes 4.96 MiB 4.96 MiB Shape (3, 433410) (3, 433410) Dask graph 1 chunks in 2 graph layers Data type float32 numpy.ndarray - awx(three, nele)float32dask.array<chunksize=(3, 433410), meta=np.ndarray>
- long_name :
- awx
Array Chunk Bytes 4.96 MiB 4.96 MiB Shape (3, 433410) (3, 433410) Dask graph 1 chunks in 2 graph layers Data type float32 numpy.ndarray - awy(three, nele)float32dask.array<chunksize=(3, 433410), meta=np.ndarray>
- long_name :
- awy
Array Chunk Bytes 4.96 MiB 4.96 MiB Shape (3, 433410) (3, 433410) Dask graph 1 chunks in 2 graph layers Data type float32 numpy.ndarray - art2(node)float32dask.array<chunksize=(239734,), meta=np.ndarray>
- long_name :
- Area of elements around a node
Array Chunk Bytes 0.91 MiB 0.91 MiB Shape (239734,) (239734,) Dask graph 1 chunks in 2 graph layers Data type float32 numpy.ndarray - art1(node)float32dask.array<chunksize=(239734,), meta=np.ndarray>
- long_name :
- Area of Node-Base Control volume
Array Chunk Bytes 0.91 MiB 0.91 MiB Shape (239734,) (239734,) Dask graph 1 chunks in 2 graph layers Data type float32 numpy.ndarray - u(time, siglay, nele)float32dask.array<chunksize=(1, 4, 144470), meta=np.ndarray>
- long_name :
- Eastward Water Velocity
- standard_name :
- eastward_sea_water_velocity
- units :
- meters s-1
- grid :
- fvcom_grid
- type :
- data
- mesh :
- fvcom_mesh
- location :
- face
Array Chunk Bytes 16.53 MiB 2.20 MiB Shape (1, 10, 433410) (1, 4, 144470) Dask graph 9 chunks in 2 graph layers Data type float32 numpy.ndarray - v(time, siglay, nele)float32dask.array<chunksize=(1, 4, 144470), meta=np.ndarray>
- long_name :
- Northward Water Velocity
- standard_name :
- Northward_sea_water_velocity
- units :
- meters s-1
- grid :
- fvcom_grid
- type :
- data
- mesh :
- fvcom_mesh
- location :
- face
Array Chunk Bytes 16.53 MiB 2.20 MiB Shape (1, 10, 433410) (1, 4, 144470) Dask graph 9 chunks in 2 graph layers Data type float32 numpy.ndarray - tauc(time, nele)float32dask.array<chunksize=(1, 433410), meta=np.ndarray>
- long_name :
- bed stress magnitude from currents
- note1 :
- this stress is bottom boundary condtion on velocity field
- note2 :
- dimensions are stress/rho
- units :
- m^2 s^-2
- grid :
- fvcom_grid
- type :
- data
- mesh :
- fvcom_mesh
- location :
- face
Array Chunk Bytes 1.65 MiB 1.65 MiB Shape (1, 433410) (1, 433410) Dask graph 1 chunks in 2 graph layers Data type float32 numpy.ndarray - omega(time, siglev, node)float32dask.array<chunksize=(1, 6, 119867), meta=np.ndarray>
- long_name :
- Vertical Sigma Coordinate Velocity
- units :
- s-1
- grid :
- fvcom_grid
- type :
- data
Array Chunk Bytes 10.06 MiB 2.74 MiB Shape (1, 11, 239734) (1, 6, 119867) Dask graph 4 chunks in 2 graph layers Data type float32 numpy.ndarray - ww(time, siglay, nele)float32dask.array<chunksize=(1, 4, 144470), meta=np.ndarray>
- long_name :
- Upward Water Velocity
- units :
- meters s-1
- grid :
- fvcom_grid
- type :
- data
Array Chunk Bytes 16.53 MiB 2.20 MiB Shape (1, 10, 433410) (1, 4, 144470) Dask graph 9 chunks in 2 graph layers Data type float32 numpy.ndarray - temp(time, siglay, node)float32dask.array<chunksize=(1, 5, 119867), meta=np.ndarray>
- long_name :
- temperature
- standard_name :
- sea_water_temperature
- units :
- degrees_C
- grid :
- fvcom_grid
- type :
- data
- mesh :
- fvcom_mesh
- location :
- node
Array Chunk Bytes 9.15 MiB 2.29 MiB Shape (1, 10, 239734) (1, 5, 119867) Dask graph 4 chunks in 2 graph layers Data type float32 numpy.ndarray - salinity(time, siglay, node)float32dask.array<chunksize=(1, 5, 119867), meta=np.ndarray>
- long_name :
- salinity
- standard_name :
- sea_water_salinity
- units :
- 1e-3
- grid :
- fvcom_grid
- type :
- data
- mesh :
- fvcom_mesh
- location :
- node
Array Chunk Bytes 9.15 MiB 2.29 MiB Shape (1, 10, 239734) (1, 5, 119867) Dask graph 4 chunks in 2 graph layers Data type float32 numpy.ndarray - short_wave(time, node)float32dask.array<chunksize=(1, 239734), meta=np.ndarray>
- long_name :
- Short Wave Radiation
- units :
- W m-2
- grid :
- fvcom_grid
- type :
- data
- mesh :
- fvcom_mesh
- location :
- node
Array Chunk Bytes 0.91 MiB 0.91 MiB Shape (1, 239734) (1, 239734) Dask graph 1 chunks in 2 graph layers Data type float32 numpy.ndarray - net_heat_flux(time, node)float32dask.array<chunksize=(1, 239734), meta=np.ndarray>
- long_name :
- Surface Net Heat Flux
- units :
- W m-2
- grid :
- fvcom_grid
- type :
- data
- mesh :
- fvcom_mesh
- location :
- node
Array Chunk Bytes 0.91 MiB 0.91 MiB Shape (1, 239734) (1, 239734) Dask graph 1 chunks in 2 graph layers Data type float32 numpy.ndarray - sensible_heat_flux(time, node)float32dask.array<chunksize=(1, 239734), meta=np.ndarray>
- long_name :
- Sensible Heat Flux
- units :
- W m-2
- grid :
- fvcom_grid
- type :
- data
- mesh :
- fvcom_mesh
- location :
- node
Array Chunk Bytes 0.91 MiB 0.91 MiB Shape (1, 239734) (1, 239734) Dask graph 1 chunks in 2 graph layers Data type float32 numpy.ndarray - latent_heat_flux(time, node)float32dask.array<chunksize=(1, 239734), meta=np.ndarray>
- long_name :
- Latent Heat Flux
- units :
- W m-2
- grid :
- fvcom_grid
- type :
- data
- mesh :
- fvcom_mesh
- location :
- node
Array Chunk Bytes 0.91 MiB 0.91 MiB Shape (1, 239734) (1, 239734) Dask graph 1 chunks in 2 graph layers Data type float32 numpy.ndarray - long_wave(time, node)float32dask.array<chunksize=(1, 239734), meta=np.ndarray>
- long_name :
- Long Wave Radiation
- units :
- W m-2
- grid :
- fvcom_grid
- type :
- data
- mesh :
- fvcom_mesh
- location :
- node
Array Chunk Bytes 0.91 MiB 0.91 MiB Shape (1, 239734) (1, 239734) Dask graph 1 chunks in 2 graph layers Data type float32 numpy.ndarray - uwind_speed(time, nele)float32dask.array<chunksize=(1, 433410), meta=np.ndarray>
- long_name :
- Eastward Wind Velocity
- standard_name :
- eastward wind
- units :
- meters s-1
- grid :
- fvcom_grid
- type :
- data
- mesh :
- fvcom_mesh
- location :
- face
Array Chunk Bytes 1.65 MiB 1.65 MiB Shape (1, 433410) (1, 433410) Dask graph 1 chunks in 2 graph layers Data type float32 numpy.ndarray - vwind_speed(time, nele)float32dask.array<chunksize=(1, 433410), meta=np.ndarray>
- long_name :
- Northward Wind Velocity
- standard_name :
- northward wind
- units :
- meters s-1
- grid :
- fvcom_grid
- type :
- data
- mesh :
- fvcom_mesh
- location :
- face
Array Chunk Bytes 1.65 MiB 1.65 MiB Shape (1, 433410) (1, 433410) Dask graph 1 chunks in 2 graph layers Data type float32 numpy.ndarray - atmos_press(time, node)float32dask.array<chunksize=(1, 239734), meta=np.ndarray>
- long_name :
- Atmospheric Pressure
- units :
- pascals
- grid :
- fvcom_grid
- type :
- data
Array Chunk Bytes 0.91 MiB 0.91 MiB Shape (1, 239734) (1, 239734) Dask graph 1 chunks in 2 graph layers Data type float32 numpy.ndarray - wet_nodes(time, node)int32dask.array<chunksize=(1, 239734), meta=np.ndarray>
- long_name :
- Wet_Nodes
- grid :
- fvcom_grid
- type :
- data
- mesh :
- fvcom_mesh
- location :
- node
Array Chunk Bytes 0.91 MiB 0.91 MiB Shape (1, 239734) (1, 239734) Dask graph 1 chunks in 2 graph layers Data type int32 numpy.ndarray - wet_cells(time, nele)int32dask.array<chunksize=(1, 433410), meta=np.ndarray>
- long_name :
- Wet_Cells
- grid :
- fvcom_grid
- type :
- data
- mesh :
- fvcom_mesh
- location :
- face
Array Chunk Bytes 1.65 MiB 1.65 MiB Shape (1, 433410) (1, 433410) Dask graph 1 chunks in 2 graph layers Data type int32 numpy.ndarray - wet_nodes_prev_int(time, node)int32dask.array<chunksize=(1, 239734), meta=np.ndarray>
- long_name :
- Wet_Nodes_At_Previous_Internal_Step
- grid :
- fvcom_grid
- type :
- data
- mesh :
- fvcom_mesh
- location :
- node
Array Chunk Bytes 0.91 MiB 0.91 MiB Shape (1, 239734) (1, 239734) Dask graph 1 chunks in 2 graph layers Data type int32 numpy.ndarray - wet_cells_prev_int(time, nele)int32dask.array<chunksize=(1, 433410), meta=np.ndarray>
- long_name :
- Wet_Cells_At_Previous_Internal_Step
- grid :
- fvcom_grid
- type :
- data
- mesh :
- fvcom_mesh
- location :
- face
Array Chunk Bytes 1.65 MiB 1.65 MiB Shape (1, 433410) (1, 433410) Dask graph 1 chunks in 2 graph layers Data type int32 numpy.ndarray - wet_cells_prev_ext(time, nele)int32dask.array<chunksize=(1, 433410), meta=np.ndarray>
- long_name :
- Wet_Cells_At_Previous_External_Step
- grid :
- fvcom_grid
- type :
- data
Array Chunk Bytes 1.65 MiB 1.65 MiB Shape (1, 433410) (1, 433410) Dask graph 1 chunks in 2 graph layers Data type int32 numpy.ndarray - inundation_cells(time, nele)int32dask.array<chunksize=(1, 433410), meta=np.ndarray>
- long_name :
- Inundation_Cells
- grid :
- fvcom_grid
- type :
- data
Array Chunk Bytes 1.65 MiB 1.65 MiB Shape (1, 433410) (1, 433410) Dask graph 1 chunks in 2 graph layers Data type int32 numpy.ndarray
- timePandasIndex
PandasIndex(DatetimeIndex(['2024-03-23 13:00:07.031249984'], dtype='datetime64[ns]', name='time', freq=None))
- title :
- SSCOFS
- institution :
- School for Marine Science and Technology
- source :
- FVCOM_4.4.5
- history :
- model started at: 20/03/2024 21:46
- references :
- http://fvcom.smast.umassd.edu, http://codfish.smast.umassd.edu
- Conventions :
- CF-1.0
- CoordinateSystem :
- GeoReferenced
- CoordinateProjection :
- proj=utm +ellps=WGS84 +zone=10
- Tidal_Forcing :
- Tidal Forcing Time Series Title: sscofs lateral open boundary netCDF file
- River_Forcing :
- THERE ARE 38 RIVERS IN THIS MODEL. RIVER INFLOW IS ON THE nodes WHERE TEMPERATURE AND SALINITY ARE specified IN THE MODEL. THE FOLLOWING RIVER NAMES ARE USED: 14144700 14144700 08MF005 08MF005 12200500 12200500 12167000 12167000 12150800 12150800 14211720 14211720 12213100 12213100 12201500 12201500 12113000 12113000 12089500 12089500 12101500 12101500 12061500 12061500 12080010 12080010 12031000 12031000 12045500 12045500 12048000 12048000 12054000 12054000 14220500 14220500 14243000 14243000
- GroundWater_Forcing :
- GROUND WATER FORCING IS OFF!
- Surface_Heat_Forcing :
- FVCOM variable surface heat forcing file: FILE NAME:sscofs.t21z.20240320.hflux.forecast.nc SOURCE:FVCOM grid (unstructured) surface forcing Unknown start date meta data format
- Surface_Wind_Forcing :
- FVCOM variable surface Wind forcing: FILE NAME:sscofs.t21z.20240320.met.forecast.nc SOURCE:FVCOM grid (unstructured) surface forcing Unknown start date meta data format
- Surface_PrecipEvap_Forcing :
- SURFACE PRECIPITATION FORCING IS OFF
This step assigns a new variable with the mesh_toplogy cf role to add the mesh information needed for subsetting in space
ds = xarray_subset_grid.grids.ugrid.assign_ugrid_topology(ds,
face_node_connectivity='nv',
face_face_connectivity='nbe')
ds.cf['mesh_topology']
<xarray.DataArray 'mesh' ()> Size: 4B
array(0, dtype=int32)
Attributes:
cf_role: mesh_topology
topology_dimension: 2
node_coordinates: lon lat
face_node_connectivity: nv
face_coordinates: lonc latc
face_face_connectivity: nbexarray.DataArray
'mesh'
- 0
array(0, dtype=int32)
- cf_role :
- mesh_topology
- topology_dimension :
- 2
- node_coordinates :
- lon lat
- face_node_connectivity :
- nv
- face_coordinates :
- lonc latc
- face_face_connectivity :
- nbe
The subset grid accessor now finds the ugrid topology correctly
ds.xsg.grid.name
'ugrid'