Skip to content

Commit 8b6282c

Browse files
changed test to hit the new noaa-nodd-kerchunk buckets, rather than nexget-dmac
1 parent 32b70f3 commit 8b6282c

File tree

1 file changed

+10
-9
lines changed

1 file changed

+10
-9
lines changed

tests/test_grids/test_sgrid.py

+10-9
Original file line numberDiff line numberDiff line change
@@ -41,13 +41,14 @@ def test_grid_topology_location_parse():
4141
@pytest.mark.online
4242
def test_polygon_subset():
4343
'''
44-
This is a basic integration test for the subsetting of a ROMS sgrid dataset using a polygon.
44+
This is a basic integration test for the subsetting of a ROMS sgrid dataset using
45+
a polygon.
4546
'''
4647
if fsspec is None:
4748
raise ImportError("Must have fsspec installed to run --online tests")
4849
fs = fsspec.filesystem(
4950
"reference",
50-
fo="s3://nextgen-dmac-cloud-ingest/nos/wcofs/nos.wcofs.2ds.best.nc.zarr",
51+
fo="s3://noaa-nodd-kerchunk-pds/nos/wcofs/wcofs.fields.best.nc.zarr",
5152
remote_protocol="s3",
5253
remote_options={"anon": True},
5354
target_protocol="s3",
@@ -71,25 +72,25 @@ def test_polygon_subset():
7172
[-122.38488806417945, 34.98888604471138],
7273
]
7374
)
74-
ds_temp = ds.xsg.subset_vars(['temp_sur'])
75+
ds_temp = ds.xsg.subset_vars(['temp','u', 'v'])
7576
ds_subset = ds_temp.xsg.subset_polygon(polygon)
7677

77-
#Check that the subset dataset has the correct dimensions given the original padding
78+
# Check that the subset dataset has the correct dimensions given the original padding
7879
assert ds_subset.sizes['eta_rho'] == ds_subset.sizes['eta_psi'] + 1
7980
assert ds_subset.sizes['eta_u'] == ds_subset.sizes['eta_psi'] + 1
8081
assert ds_subset.sizes['eta_v'] == ds_subset.sizes['eta_psi']
8182
assert ds_subset.sizes['xi_rho'] == ds_subset.sizes['xi_psi'] + 1
8283
assert ds_subset.sizes['xi_u'] == ds_subset.sizes['xi_psi']
8384
assert ds_subset.sizes['xi_v'] == ds_subset.sizes['xi_psi'] + 1
8485

85-
#Check that the subset rho/psi/u/v positional relationsip makes sense aka psi point is
86-
#'between' it's neighbor rho points
87-
#Note that this needs to be better generalized; it's not trivial to write a test that
88-
#works in all potential cases.
86+
# Check that the subset rho/psi/u/v positional relationship makes sense aka psi point is
87+
# 'between' it's neighbor rho points
88+
# Note that this needs to be better generalized; it's not trivial to write a test that
89+
# works in all potential cases.
8990
assert (ds_subset['lon_rho'][0,0] < ds_subset['lon_psi'][0,0]
9091
and ds_subset['lon_rho'][0,1] > ds_subset['lon_psi'][0,0])
9192

92-
#ds_subset.temp_sur.isel(ocean_time=0).plot(x="lon_rho", y="lat_rho")
93+
# ds_subset.temp_sur.isel(ocean_time=0).plot(x="lon_rho", y="lat_rho")
9394

9495
def test_polygon_subset_2():
9596
ds = xr.open_dataset(sample_sgrid_file, decode_times=False)

0 commit comments

Comments
 (0)