Skip to content

Commit

Permalink
#347: switch to using variable names as wms layers (#348)
Browse files Browse the repository at this point in the history
  • Loading branch information
mortenwh authored Sep 30, 2024
1 parent 6803b90 commit 732d39a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion py_mmd_tools/nc_to_mmd.py
Original file line number Diff line number Diff line change
Expand Up @@ -1914,7 +1914,7 @@ def get_data_access_dict(
all_netcdf_variables = []
for var in ncin.variables:
if "standard_name" in ncin.variables[var].ncattrs():
all_netcdf_variables.append(ncin.variables[var].standard_name)
all_netcdf_variables.append(ncin.variables[var].name)
data_accesses = [
{
"type": "OPeNDAP",
Expand Down
4 changes: 2 additions & 2 deletions tests/test_nc_to_mmd.py
Original file line number Diff line number Diff line change
Expand Up @@ -352,8 +352,8 @@ def test_get_data_access_dict_with_custom_wms(monkeypatch):
wms_link='http://test-link')
assert data[1]['type'] == 'OGC WMS'
assert 'http://test-link' in str(data[1]['resource'])
assert data[1]['wms_layers'] == ['toa_bidirectional_reflectance',
'toa_bidirectional_reflectance']
assert data[1]['wms_layers'] == ['M01',
'M01_copy']


@pytest.mark.py_mmd_tools
Expand Down

0 comments on commit 732d39a

Please sign in to comment.